/* Aster Giao Diện
 * Bố cục: nền than chì cho toàn site, một màu nhấn cam lấy từ logo, ảnh sản phẩm luôn đặt trên ô nền sáng đồng nhất.
 * Phần 1 (body.aster-gd ...) phủ lên Flatsome/WooCommerce. Phần 2 (.agd-*) là khối riêng của plugin.
 */
:root {
  --agd-bg: #0f1012;
  --agd-surface: #17191c;
  --agd-surface2: #1f2226;
  --agd-line: #2b2f35;
  --agd-line-hi: #4a4f57;
  --agd-shadow: rgba(0,0,0,.4);
  --agd-fg: #f3f0ea;
  --agd-fg2: #d9d6d0;
  --agd-muted: #a4a8ae;
  --agd-accent: #ff7a1a;
  --agd-accent-hi: #ff9447;
  --agd-on-accent: #1b0c00;
  --agd-tile: #eceef0;
  --agd-ok: #43c98b;
  --agd-sale: #ff4d4d;
  --agd-zalo: #0068ff;
  --agd-f-display: "Chakra Petch", "Be Vietnam Pro", system-ui, sans-serif;
  --agd-f-body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --agd-r: 10px;
}

/* Nền sáng: bật bằng nút mặt trời/mặt trăng trên header (data-agd-theme trên thẻ html, lưu trong trình duyệt) */
html[data-agd-theme="light"] {
  --agd-bg: #f3f4f6;
  --agd-surface: #ffffff;
  --agd-surface2: #eceef1;
  --agd-line: #dcdfe4;
  --agd-line-hi: #aeb4bc;
  --agd-fg: #14161a;
  --agd-fg2: #2f333a;
  --agd-muted: #5c626b;
  --agd-accent: #d9560a;
  --agd-accent-hi: #ef6a16;
  --agd-on-accent: #ffffff;
  --agd-tile: #f1f2f4;
  --agd-shadow: rgba(20,22,26,.14);
}

/* ================= 1. Phủ lên Flatsome ================= */

/* Hình nền hai bên (ảnh nền html của Flatsome, video nền Enweby) giữ nguyên: chỉ khung giữa (body boxed 1200px) tô nền tối */
body.aster-gd {
  background: var(--agd-bg) !important;
  color: var(--agd-fg);
  font-family: var(--agd-f-body);
  color-scheme: dark;
}
html[data-agd-theme="light"] body.aster-gd { color-scheme: light; }

body.aster-gd #wrapper,
body.aster-gd #main,
body.aster-gd .page-wrapper,
body.aster-gd .shop-container,
body.aster-gd .product-main,
body.aster-gd .product-footer,
body.aster-gd .category-page-row { background: var(--agd-bg) !important; box-shadow: none !important; }

body.aster-gd #main,
body.aster-gd #main p,
body.aster-gd #main li,
body.aster-gd #main label,
body.aster-gd #main td,
body.aster-gd #main th { color: var(--agd-fg2); }
body.aster-gd #main h1, body.aster-gd #main h2, body.aster-gd #main h3,
body.aster-gd #main h4, body.aster-gd #main h5, body.aster-gd #main h6,
body.aster-gd .product-title, body.aster-gd .product-title a,
body.aster-gd .product_title { color: var(--agd-fg); font-family: var(--agd-f-display); letter-spacing: .005em; text-wrap: balance; }
body.aster-gd #main a:not(.button):not(.agd-btn) { color: inherit; }
body.aster-gd #main .entry-content a:not(.button):not(.agd-btn) { color: var(--agd-accent); }

/* Header: logo + chữ ASTER STORE, menu chữ thường dạng nút, bên phải là số điện thoại và các nút vuông (tìm, tài khoản, giỏ) như bản demo */
body.aster-gd #masthead,
body.aster-gd .header-main,
body.aster-gd .header-bottom,
body.aster-gd .header-wrapper,
body.aster-gd .header-bg-color { background: var(--agd-surface) !important; }
body.aster-gd .header-wrapper { border-bottom: 1px solid var(--agd-line); }
body.aster-gd .header-main { height: 68px !important; }
body.aster-gd .header-main .header-inner { gap: 10px; }
body.aster-gd .top-divider { display: none; }

/* Logo và chữ thương hiệu */
body.aster-gd #logo { width: auto !important; margin-right: 8px !important; }
body.aster-gd #logo a { display: flex; align-items: center; gap: 10px; text-decoration: none; }
body.aster-gd #logo img { height: 40px !important; width: 40px !important; max-height: 40px !important; border-radius: 8px; object-fit: cover; }
body.aster-gd #logo a::after { content: "ASTER STORE"; font-family: var(--agd-f-display); font-weight: 700; font-size: 18px; letter-spacing: .05em; color: var(--agd-fg); white-space: nowrap; }

/* Menu chính: chữ thường, ô bo góc khi rê chuột */
body.aster-gd .header-nav.nav-uppercase > li > a,
body.aster-gd .nav-uppercase > li > a { text-transform: none !important; letter-spacing: 0 !important; }
body.aster-gd .header-nav-main.nav-left > li { margin: 0; }
body.aster-gd .header-nav-main.nav-left > li > a {
  color: var(--agd-muted) !important; font-family: var(--agd-f-body); font-weight: 500; font-size: 14px;
  padding: 8px !important; border-radius: 8px; line-height: 1.2; transition: background .15s, color .15s;
}
body.aster-gd .header-nav-main.nav-left > li > a:hover,
body.aster-gd .header-nav-main.nav-left > li.active > a,
body.aster-gd .header-nav-main.nav-left > li.current-menu-item > a,
body.aster-gd .header-nav-main.nav-left > li.current-menu-ancestor > a { color: var(--agd-fg) !important; background: var(--agd-surface2); }
body.aster-gd .header-nav-main.nav-left > li > a .icon-angle-down { font-size: 11px; margin-left: 4px; opacity: .7; }
/* Ô tìm kiếm của Flatsome nằm đầu menu: ẩn, nút tìm mới ở bên phải mở cùng hộp tìm kiếm */
body.aster-gd .header-nav-main > li.header-search { display: none; }
body.aster-gd .nav-dropdown { background: var(--agd-surface); border-color: var(--agd-line) !important; border-radius: 12px; }
body.aster-gd .nav-dropdown li a { color: var(--agd-fg2) !important; text-transform: none !important; }
body.aster-gd .nav-dropdown li a:hover { color: var(--agd-accent) !important; background: var(--agd-surface2); }
body.aster-gd .nav-dropdown .nav-dropdown-col > a { color: var(--agd-fg) !important; font-weight: 600; }
body.aster-gd .nav-dropdown-has-arrow li.has-dropdown:after { border-bottom-color: var(--agd-surface); }

/* Bên phải: số điện thoại, các nút vuông */
body.aster-gd .header-nav-main.nav-right { gap: 8px; align-items: center; }
body.aster-gd .header-nav-main.nav-right > li { margin: 0; }
body.aster-gd .header-nav-main.nav-right > li.header-divider { display: none; }
/* Bản demo không có nút tài khoản trên máy tính; đăng nhập vẫn có trong menu điện thoại và trang thanh toán */
body.aster-gd .hide-for-medium .header-nav-main.nav-right > li.account-item { display: none; }
body.aster-gd .agd-h-phone a { display: flex; flex-direction: column; line-height: 1.2; text-align: right; padding: 0 6px 0 0 !important; text-decoration: none; }
/* Header dính (khi cuộn) của Flatsome đặt line-height lớn cho link: giữ chữ gọn */
body.aster-gd .agd-h-phone a, body.aster-gd .agd-h-phone a * { line-height: 1.2 !important; min-height: 0 !important; }
body.aster-gd .stuck .header-main, body.aster-gd .header-wrapper.stuck .header-main { height: 64px !important; }
body.aster-gd .stuck #logo img { height: 36px !important; width: 36px !important; }
body.aster-gd .agd-h-phone small { color: var(--agd-muted); font-size: 12px; font-weight: 400; }
body.aster-gd .agd-h-phone b { color: var(--agd-fg); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
body.aster-gd .agd-icbtn,
body.aster-gd .header-nav-main.nav-right > li.account-item > a,
body.aster-gd .header-cart-link {
  position: relative; width: 40px; height: 40px; padding: 0 !important; margin: 0 !important;
  display: grid !important; place-items: center; border-radius: 10px;
  border: 1px solid var(--agd-line); background: var(--agd-surface2); color: var(--agd-fg) !important; cursor: pointer;
  font-size: 0 !important; transition: border-color .15s;
}
body.aster-gd .agd-icbtn:hover,
body.aster-gd .header-nav-main.nav-right > li.account-item > a:hover,
body.aster-gd .header-cart-link:hover { border-color: var(--agd-muted); }
body.aster-gd .agd-icbtn svg { width: 19px; height: 19px; }
body.aster-gd .header-nav-main.nav-right > li.account-item > a > *,
body.aster-gd .header-cart-title { display: none !important; }
/* Biểu tượng người và giỏ vẽ bằng mask để theo màu chữ */
body.aster-gd .header-nav-main.nav-right > li.account-item > a::before,
body.aster-gd .header-cart-link::before {
  content: ""; width: 19px; height: 19px; background: currentColor;
  -webkit-mask: var(--agd-ic) center / contain no-repeat; mask: var(--agd-ic) center / contain no-repeat;
}
body.aster-gd .header-nav-main.nav-right > li.account-item > a {
  --agd-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E");
}
body.aster-gd .header-cart-link {
  --agd-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2l2.4 11h11l2-8H6.2'/%3E%3Ccircle cx='9' cy='19.5' r='1.4'/%3E%3Ccircle cx='17' cy='19.5' r='1.4'/%3E%3C/svg%3E");
}
/* Số lượng trong giỏ: chấm cam ở góc nút */
body.aster-gd .header-cart-link .cart-icon { position: absolute; top: -6px; right: -6px; margin: 0 !important; }
body.aster-gd .header-cart-link .cart-icon strong {
  display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; margin: 0 !important;
  border: 0 !important; border-radius: 9px !important; background: var(--agd-accent) !important; color: var(--agd-on-accent) !important;
  font-size: 11px !important; font-weight: 700; line-height: 1; font-family: var(--agd-f-body);
}
body.aster-gd .header-cart-link .cart-icon strong:after { display: none !important; }

/* Điện thoại, máy tính bảng: logo giữa, nút menu trái, giỏ phải */
@media (max-width: 849px) {
  body.aster-gd .header-main { height: 60px !important; }
  body.aster-gd #logo a::after { font-size: 16px; }
  body.aster-gd .mobile-nav .icon-menu { color: var(--agd-fg); font-size: 22px; }
}
@media (max-width: 380px) {
  body.aster-gd #logo a::after { display: none; }
}

/* Breadcrumb */
body.aster-gd .breadcrumbs,
body.aster-gd .breadcrumbs a,
body.aster-gd .woocommerce-breadcrumb { color: var(--agd-muted) !important; font-weight: 500; text-transform: none; letter-spacing: 0; }
body.aster-gd .breadcrumbs a:hover { color: var(--agd-fg) !important; }

/* Giá */
body.aster-gd span.amount { color: var(--agd-accent); font-variant-numeric: tabular-nums; }
body.aster-gd del span.amount, body.aster-gd del { color: var(--agd-muted) !important; opacity: 1; }
body.aster-gd ins { text-decoration: none; }
body.aster-gd .product-info .price { font-family: var(--agd-f-display); font-size: 1.6em; line-height: 1.25; }
body.aster-gd .product-info .price .screen-reader-text + span.amount { margin-left: 0; }
body.aster-gd .header-cart-title span.amount { color: currentColor; }

/* Nút */
body.aster-gd .button.primary:not(.is-outline),
body.aster-gd .single_add_to_cart_button,
body.aster-gd .checkout-button,
body.aster-gd #place_order,
body.aster-gd input[type="submit"].button,
body.aster-gd button[type="submit"].button:not(.agd-buy-now):not(.wishlist-button):not(.icon) {
  background: var(--agd-accent) !important;
  color: var(--agd-on-accent) !important;
  border: 0 !important;
  border-radius: var(--agd-r) !important;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: none;
  min-height: 48px;
  box-shadow: none;
}
body.aster-gd .button.primary:not(.is-outline):hover,
body.aster-gd .single_add_to_cart_button:hover { background: var(--agd-accent-hi) !important; }
body.aster-gd .single_add_to_cart_button.disabled { opacity: .55; }
body.aster-gd .button.is-outline,
body.aster-gd .button.secondary,
body.aster-gd .button.white { color: var(--agd-fg) !important; border-color: var(--agd-line) !important; background: var(--agd-surface2) !important; border-radius: var(--agd-r); }

/* Ô nhập */
body.aster-gd #main input[type="text"], body.aster-gd #main input[type="email"],
body.aster-gd #main input[type="tel"], body.aster-gd #main input[type="number"],
body.aster-gd #main input[type="password"], body.aster-gd #main input[type="search"],
body.aster-gd #main select, body.aster-gd #main textarea,
body.aster-gd .searchform input[type="search"] {
  background: var(--agd-surface2) !important;
  border: 1px solid var(--agd-line) !important;
  color: var(--agd-fg) !important;
  box-shadow: none !important;
  border-radius: 8px;
}
body.aster-gd #main input:focus, body.aster-gd #main select:focus, body.aster-gd #main textarea:focus { border-color: var(--agd-accent) !important; }
body.aster-gd #main table, body.aster-gd #main table td, body.aster-gd #main table th { border-color: var(--agd-line) !important; }
body.aster-gd .woocommerce-message, body.aster-gd .woocommerce-info, body.aster-gd .woocommerce-error,
body.aster-gd .message-container { background: var(--agd-surface); color: var(--agd-fg); border-color: var(--agd-line); }
body.aster-gd .is-divider { background: var(--agd-line); }
body.aster-gd :focus-visible { outline: 2px solid var(--agd-accent); outline-offset: 2px; }

/* Thẻ sản phẩm Flatsome (cửa hàng, danh mục, sản phẩm tương tự) */
body.aster-gd .product-small.box {
  background: var(--agd-surface);
  border: 1px solid var(--agd-line);
  border-radius: 14px;
  overflow: hidden;
  height: 100%;
  transition: border-color .15s, transform .15s;
}
body.aster-gd .product-small.box:hover { border-color: var(--agd-line-hi); transform: translateY(-2px); }
body.aster-gd .product-small .box-image { background: var(--agd-tile); }
body.aster-gd .product-small .box-image img { object-fit: cover; }
body.aster-gd .product-small .box-text { padding: 12px 16px 16px; text-align: left !important; }
body.aster-gd .product-small .box-text .category,
body.aster-gd .product-small .box-text .product-cat { color: var(--agd-muted) !important; font-size: 11px; letter-spacing: .1em; font-weight: 600; opacity: 1; }
body.aster-gd .product-small .product-title a { color: var(--agd-fg) !important; font-family: var(--agd-f-body); font-weight: 600; font-size: 15px; }
body.aster-gd .product-small .price-wrapper .price { margin-top: 6px; }
body.aster-gd .product-small .price-wrapper .screen-reader-text { position: absolute; }
body.aster-gd .badge-inner { border-radius: 6px; font-weight: 700; }
body.aster-gd .badge-inner.on-sale { background: var(--agd-sale) !important; }
body.aster-gd .out-of-stock-label { background: #5b6068; color: #fff; border-radius: 6px; }
body.aster-gd .image-tools .wishlist-button { background: rgba(15,16,18,.6); border-color: transparent; color: #fff; }
body.aster-gd .product-small .yith-wcwl-add-to-wishlist { display: none; }
body.aster-gd .quick-view { background: var(--agd-surface) !important; color: var(--agd-fg) !important; }

/* Danh mục dạng ô (trang chủ cũ, trang cửa hàng): ô chữ đồng bộ thay vì logo lẫn ảnh */
body.aster-gd .product-category .box-image { background: var(--agd-surface2); }
body.aster-gd .product-category .box-text { background: var(--agd-surface) !important; }
body.aster-gd .product-category .header-title { color: var(--agd-fg); font-family: var(--agd-f-display); }
body.aster-gd .product-category .count { display: none; }

/* Trang sản phẩm */
body.aster-gd .product-gallery .woocommerce-product-gallery__image,
body.aster-gd .product-gallery-slider .slide { background: var(--agd-tile); border-radius: 16px; overflow: hidden; }
body.aster-gd .product-thumbnails .col a { background: var(--agd-tile); border-radius: 10px; overflow: hidden; border: 2px solid transparent; }
body.aster-gd .product-thumbnails .is-nav-selected a { border-color: var(--agd-accent) !important; }
body.aster-gd .product-thumbnails img { opacity: 1 !important; }
body.aster-gd .product-info .product-title { font-size: clamp(28px, 3.4vw, 40px); }
body.aster-gd .product-info .is-divider { display: none; }
body.aster-gd .product-short-description { color: var(--agd-fg2); }
body.aster-gd .product-short-description mark,
body.aster-gd .product-short-description [style*="background"] { background: transparent !important; color: var(--agd-fg) !important; }
body.aster-gd .product_meta .sku_wrapper { display: none; }
body.aster-gd .product_meta { color: var(--agd-muted); font-size: 13px; border-top: 1px solid var(--agd-line); padding-top: 12px; }
body.aster-gd .product_meta a { color: var(--agd-muted) !important; }
body.aster-gd .product-info .social-icons { opacity: .7; }
body.aster-gd .product-info .social-icons .button { color: var(--agd-muted) !important; border-color: var(--agd-line) !important; background: transparent !important; }
body.aster-gd .product-info .yith-wcwl-add-to-wishlist { margin-top: 4px; }
body.aster-gd .product-info .yith-wcwl-add-to-wishlist a { color: var(--agd-muted) !important; font-size: 13px; }

/* Chọn biến thể (Variation Swatches) */
body.aster-gd table.variations { border: 0; }
body.aster-gd table.variations th.label, body.aster-gd table.variations td.label { color: var(--agd-fg) !important; font-weight: 600; text-transform: none; letter-spacing: 0; }
body.aster-gd table.variations tr + tr { border-top: 0 !important; }
body.aster-gd .variable-items-wrapper .variable-item:not(.radio-variable-item) {
  background: var(--agd-surface) !important;
  box-shadow: 0 0 0 1px var(--agd-line) !important;
  color: var(--agd-fg) !important;
  border-radius: var(--agd-r) !important;
}
body.aster-gd .variable-items-wrapper .button-variable-item { min-height: 42px; padding: 0 14px !important; font-weight: 500; }
body.aster-gd .variable-items-wrapper .variable-item.selected:not(.radio-variable-item),
body.aster-gd .variable-items-wrapper .variable-item:not(.radio-variable-item):hover { box-shadow: 0 0 0 2px var(--agd-accent) !important; }
/* Ô màu: nền sáng để màu chưa khai báo (trong suốt) vẫn thấy được, như trên nền trắng cũ */
body.aster-gd .variable-items-wrapper .variable-item.color-variable-item:not(.radio-variable-item) { border-radius: 50% !important; background: var(--agd-tile) !important; }
body.aster-gd .reset_variations { color: var(--agd-muted) !important; }
body.aster-gd .woocommerce-variation-price .price { font-size: 1.4em; }

/* Số lượng */
body.aster-gd .quantity .button.minus, body.aster-gd .quantity .button.plus,
body.aster-gd .quantity input.qty { background: var(--agd-surface) !important; color: var(--agd-fg) !important; border-color: var(--agd-line) !important; min-height: 48px; }
body.aster-gd .quantity .button.minus { border-radius: var(--agd-r) 0 0 var(--agd-r) !important; }
body.aster-gd .quantity .button.plus { border-radius: 0 var(--agd-r) var(--agd-r) 0 !important; }

/* Tab dưới sản phẩm */
body.aster-gd .product-footer .woocommerce-tabs { border-top: 0; padding-top: 24px; }
body.aster-gd .product-tabs { border-bottom: 1px solid var(--agd-line); }
body.aster-gd .product-tabs li a { color: var(--agd-muted) !important; text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 600; padding: 14px 16px; }
body.aster-gd .product-tabs li.active a, body.aster-gd .product-tabs li a:hover { color: var(--agd-fg) !important; }
body.aster-gd .product-tabs.nav-line > li > a:before { background: var(--agd-accent); height: 2px; top: auto; bottom: -1px; }
/* Mô tả: chữ giữ nguyên bề ngang, chỉ ảnh và video căn giữa */
body.aster-gd .woocommerce-Tabs-panel { color: var(--agd-fg2); }
body.aster-gd .woocommerce-Tabs-panel img { border-radius: 12px; }
body.aster-gd .woocommerce-Tabs-panel img,
body.aster-gd .woocommerce-Tabs-panel iframe,
body.aster-gd .woocommerce-Tabs-panel video,
body.aster-gd .woocommerce-Tabs-panel figure,
body.aster-gd .woocommerce-Tabs-panel .wp-video,
body.aster-gd .woocommerce-Tabs-panel .wp-block-embed,
body.aster-gd .woocommerce-Tabs-panel .wp-caption { display: block; margin-left: auto !important; margin-right: auto !important; max-width: 100%; float: none !important; }
body.aster-gd .woocommerce-Tabs-panel iframe { aspect-ratio: 16 / 9; width: 100%; max-width: 860px; height: auto; border: 0; border-radius: 12px; }
/* Khung video kiểu padding-bottom 56.25% (iframe nằm tuyệt đối bên trong): thu về 860px và căn giữa */
body.aster-gd .woocommerce-Tabs-panel div:has(> iframe) { max-width: 860px !important; margin-left: auto !important; margin-right: auto !important; }
body.aster-gd .woocommerce-Tabs-panel div[style*="padding-bottom"]:has(> iframe) { padding-bottom: 0 !important; height: auto !important; aspect-ratio: 16 / 9; border-radius: 12px; }
body.aster-gd .woocommerce-Tabs-panel p:has(> img:only-child),
body.aster-gd .woocommerce-Tabs-panel p:has(> iframe:only-child) { text-align: center; }
body.aster-gd table.shop_attributes { border: 0; }
body.aster-gd table.shop_attributes th { color: var(--agd-muted) !important; font-weight: 500; width: 34%; text-transform: none; letter-spacing: 0; background: transparent !important; }
body.aster-gd table.shop_attributes td { color: var(--agd-fg) !important; font-style: normal; background: transparent !important; }
body.aster-gd table.shop_attributes tr { border-bottom: 1px solid var(--agd-line); }
body.aster-gd .related .product-section-title,
body.aster-gd .related h3 { font-family: var(--agd-f-display); color: var(--agd-fg); text-transform: none; letter-spacing: 0; font-size: 26px; }

/* Chân trang */
body.aster-gd #footer .footer-widgets,
body.aster-gd #footer .absolute-footer { background: var(--agd-surface) !important; color: var(--agd-muted); }
body.aster-gd #footer .absolute-footer { border-top: 1px solid var(--agd-line); }
body.aster-gd #footer iframe[src*="google.com/maps"],
body.aster-gd #footer iframe[data-litespeed-src*="google.com/maps"] { height: 320px; border-radius: 14px; }
body.agd-hide-payments .payment-icons { display: none !important; }
body.agd-hide-old-fab #button-contact-vr { display: none !important; }
body.aster-gd .back-to-top { display: none !important; }

/* ================= 2. Khối của plugin ================= */

.agd-wrap { max-width: 1200px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); box-sizing: border-box; }
.agd-wrap *, .agd-sec *, .agd-fab *, .agd-sticky * { box-sizing: border-box; }
.agd-sec { font-family: var(--agd-f-body); color: var(--agd-fg); }
.agd-sec h1, .agd-sec h2, .agd-sec h3 { font-family: var(--agd-f-display); line-height: 1.15; text-wrap: balance; margin: 0; color: var(--agd-fg); }
.agd-ic { width: 18px; height: 18px; flex: none; }
.agd-eyebrow { display: block; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--agd-accent); }

.agd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--agd-r);
  font-family: var(--agd-f-body); font-weight: 600; font-size: 15px; line-height: 1;
  border: 1px solid transparent; text-decoration: none !important; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.agd-btn:active { transform: scale(.97); }
.agd-btn-primary { background: var(--agd-accent); color: var(--agd-on-accent) !important; }
.agd-btn-primary:hover { background: var(--agd-accent-hi); }
.agd-btn-ghost { background: var(--agd-surface2); border-color: var(--agd-line); color: var(--agd-fg) !important; }
.agd-btn-ghost:hover { border-color: var(--agd-muted); }
.agd-btn-zalo { background: var(--agd-zalo); color: #fff !important; }
.agd-more { color: var(--agd-accent) !important; font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none !important; }

/* Hero */
.agd-hero { padding: 48px 0 40px; }
.agd-hero .agd-wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.agd-hero h1 { font-size: clamp(30px, 4.6vw, 52px); font-weight: 700; margin: 14px 0 16px; }
.agd-hero h1 em { font-style: normal; color: var(--agd-accent); }
.agd-lead { color: var(--agd-muted) !important; font-size: 17px; max-width: 52ch; margin: 0 0 26px; }
.agd-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.agd-hero-stage { position: relative; display: block; background: var(--agd-tile); border-radius: 18px; aspect-ratio: 1 / 1; max-width: 100%; overflow: hidden; }
.agd-hero-stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.agd-hero-tag { position: absolute; left: 16px; bottom: 16px; background: var(--agd-surface); border: 1px solid var(--agd-line); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.agd-hero-tag small { color: var(--agd-muted); font-size: 12px; }
.agd-hero-tag s { display: none; }
@media (max-width: 820px) { .agd-hero { padding: 28px 0; } .agd-hero .agd-wrap { grid-template-columns: 1fr; } }

/* Cam kết */
.agd-trust { border-block: 1px solid var(--agd-line); background: var(--agd-surface); font-family: var(--agd-f-body); }
.agd-trust .agd-wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-block: 20px; }
.agd-ti { display: flex; gap: 12px; align-items: center; }
.agd-ti .agd-ic { width: 30px; height: 30px; color: var(--agd-accent); }
.agd-ti b { display: block; font-size: 14px; color: var(--agd-fg); }
.agd-ti span { font-size: 13px; color: var(--agd-muted); }
@media (max-width: 820px) { .agd-trust .agd-wrap { grid-template-columns: 1fr 1fr; } }

/* Tiêu đề khối */
.agd-shead-sec { padding-top: 56px; }
.agd-shead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.agd-shead h2 { font-size: clamp(24px, 3vw, 32px); margin-top: 6px; }

/* Hãng */
.agd-brands { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; }
.agd-brands a { min-height: 64px; padding: 8px; border: 1px solid var(--agd-line); border-radius: var(--agd-r); background: var(--agd-surface); display: grid; place-items: center; text-align: center; font-family: var(--agd-f-display); font-weight: 600; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: var(--agd-muted) !important; text-decoration: none !important; transition: color .15s, border-color .15s; }
.agd-brands a:hover { color: var(--agd-fg) !important; border-color: var(--agd-accent); }
@media (max-width: 980px) { .agd-brands { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 420px) { .agd-brands a { font-size: 13px; } }

/* Lưới sản phẩm */
.agd-grid { display: grid; gap: 16px; }
.agd-cols-2 { grid-template-columns: repeat(2, 1fr); }
.agd-cols-3 { grid-template-columns: repeat(3, 1fr); }
.agd-cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .agd-cols-3, .agd-cols-4 { grid-template-columns: repeat(2, 1fr); } }
.agd-card { display: flex; flex-direction: column; background: var(--agd-surface); border: 1px solid var(--agd-line); border-radius: 14px; overflow: hidden; text-decoration: none !important; transition: border-color .15s, transform .15s; font-family: var(--agd-f-body); }
.agd-card:hover { border-color: var(--agd-line-hi); transform: translateY(-2px); }
.agd-ph { position: relative; background: var(--agd-tile); aspect-ratio: 1 / 1; }
.agd-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.agd-badge { position: absolute; z-index: 1; top: 10px; left: 10px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; background: var(--agd-fg); color: var(--agd-bg); }
.agd-badge-sale { background: var(--agd-sale); color: #fff; }
.agd-badge-out { background: #5b6068; color: #fff; }
.agd-bd { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.agd-br { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--agd-muted); font-weight: 600; }
.agd-card h3 { font-family: var(--agd-f-body) !important; font-size: 16px; font-weight: 600; color: var(--agd-fg) !important; margin: 0; line-height: 1.35; }
.agd-pr { margin-top: auto; padding-top: 8px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.agd-price, .agd-price .amount { color: var(--agd-accent) !important; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.agd-pr s, .agd-pr s .amount { color: var(--agd-muted) !important; font-size: 13px; font-weight: 400; }
@media (max-width: 520px) { .agd-bd { padding: 10px 12px 12px; } .agd-card h3 { font-size: 14px; } .agd-price, .agd-price .amount { font-size: 14px; } }

/* Nhu cầu */
.agd-needs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.agd-needs > br, .agd-needs > p:empty { display: none; }
.agd-need { border: 1px solid var(--agd-line); border-radius: 14px; padding: 24px; background: linear-gradient(160deg, var(--agd-surface2), var(--agd-surface)); display: flex; flex-direction: column; gap: 8px; min-height: 180px; text-decoration: none !important; font-family: var(--agd-f-body); transition: border-color .15s; }
.agd-need:hover { border-color: var(--agd-line-hi); }
.agd-need-k { font-family: var(--agd-f-display); font-size: 13px; color: var(--agd-accent); letter-spacing: .08em; text-transform: uppercase; }
.agd-need h3 { font-family: var(--agd-f-display); font-size: 22px; color: var(--agd-fg) !important; margin: 0; }
.agd-need p { color: var(--agd-muted) !important; margin: 0; font-size: 14px; }
.agd-need .agd-more { margin-top: auto; }
@media (max-width: 820px) { .agd-needs { grid-template-columns: 1fr; } }

/* Cửa hàng */
#cua-hang.agd-sec { padding-top: 56px; }
.agd-store { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--agd-line); border-radius: 16px; overflow: hidden; background: var(--agd-surface); }
.agd-store-info { padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.agd-store dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.agd-store dt { color: var(--agd-muted); font-size: 13px; font-weight: 400; }
.agd-store dd { margin: 0; font-weight: 500; color: var(--agd-fg); font-variant-numeric: tabular-nums; }
.agd-map { min-height: 300px; background: var(--agd-surface2); }
.agd-map iframe { display: block; width: 100%; height: 100%; min-height: 300px; border: 0; }
@media (max-width: 820px) { .agd-store { grid-template-columns: 1fr; } .agd-store-info { padding: 22px; } }

/* Bài viết */
.agd-res { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 56px; }
.agd-res a { border: 1px solid var(--agd-line); border-radius: 14px; background: var(--agd-surface); display: flex; flex-direction: column; overflow: hidden; text-decoration: none !important; font-family: var(--agd-f-body); transition: border-color .15s; }
.agd-res a:hover { border-color: var(--agd-line-hi); }
.agd-res-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--agd-surface2); }
.agd-res-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.agd-res-bd { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 6px; }
.agd-res small { color: var(--agd-muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.agd-res b { font-size: 16px; line-height: 1.4; color: var(--agd-fg); }
@media (max-width: 820px) { .agd-res { grid-template-columns: 1fr; } }

/* Số điện thoại trên header */
.agd-hphone { display: flex; flex-direction: column; line-height: 1.2; text-align: right; text-decoration: none !important; }
.agd-hphone small { color: var(--agd-muted); font-size: 11px; }
.agd-hphone b { color: var(--agd-fg); font-size: 15px; font-variant-numeric: tabular-nums; }

/* Trang sản phẩm: khối thêm */
.agd-buy-now {
  background: var(--agd-surface2) !important; color: var(--agd-fg) !important;
  border: 1px solid var(--agd-line) !important; border-radius: var(--agd-r) !important;
  min-height: 48px; font-weight: 700; text-transform: none !important; letter-spacing: .02em; margin: 0 !important;
}
.agd-buy-now:hover { border-color: var(--agd-accent) !important; }
.agd-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.agd-contact .agd-btn { width: 100%; }
.agd-perks { list-style: none; margin: 0 0 14px !important; padding: 16px !important; border: 1px solid var(--agd-line); border-radius: 12px; background: var(--agd-surface); display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-family: var(--agd-f-body); }
.agd-perks li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.4; margin: 0 !important; }
.agd-perks .agd-ic { width: 20px; height: 20px; color: var(--agd-accent); }
.agd-perks b { display: block; color: var(--agd-fg); }
.agd-perks span { color: var(--agd-muted); }
@media (max-width: 420px) { .agd-perks { grid-template-columns: 1fr; } }
.agd-note { font-size: 13px; color: var(--agd-muted) !important; border-left: 3px solid var(--agd-accent); padding: 4px 0 4px 12px; margin: 0 0 16px; }

.agd-hl-wrap { max-width: 1200px; margin: 8px auto 0; padding: 0 15px; }
.agd-hl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; font-family: var(--agd-f-body); }
.agd-hl > div { border: 1px solid var(--agd-line); border-radius: 14px; padding: 20px; background: var(--agd-surface); }
.agd-hl b { display: block; font-family: var(--agd-f-display); font-size: 22px; line-height: 1.2; margin: 6px 0; color: var(--agd-fg); }
.agd-hl-sub { color: var(--agd-muted); font-size: 13.5px; }
@media (max-width: 900px) { .agd-hl { grid-template-columns: 1fr 1fr; } }

.agd-faq details { border-bottom: 1px solid var(--agd-line); }
.agd-faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; color: var(--agd-fg); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.agd-faq summary::-webkit-details-marker { display: none; }
.agd-faq summary::after { content: "+"; color: var(--agd-accent); font-size: 20px; line-height: 1; }
.agd-faq details[open] summary::after { content: "–"; }
.agd-faq p { margin: 0 0 16px; color: var(--agd-muted) !important; max-width: 70ch; }

/* Thanh mua dính (điện thoại) */
.agd-sticky { display: none; }
@media (max-width: 760px) {
  .agd-sticky {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 990; gap: 8px; align-items: center;
    background: var(--agd-surface); border-top: 1px solid var(--agd-line); font-family: var(--agd-f-body);
    padding: 10px max(12px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
    transform: translateY(110%); transition: transform .2s;
  }
  .agd-sticky.is-on { transform: none; }
  .agd-sticky-p { flex: 1; min-width: 0; line-height: 1.2; }
  .agd-sticky-p small { color: var(--agd-muted); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .agd-sticky-price, .agd-sticky-price .amount { color: var(--agd-accent); font-weight: 700; font-size: 16px; white-space: nowrap; }
  .agd-sticky-price del { display: none; }
  .agd-sticky .agd-btn { min-height: 44px; padding: 0 14px; }
  body.aster-gd.single-product #footer { padding-bottom: 76px; }
  body.aster-gd.single-product .agd-fab { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

/* Nút liên hệ nổi */
.agd-fab { position: fixed; right: max(16px, calc(env(safe-area-inset-right, 0px) + 12px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 995; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; font-family: var(--agd-f-body); }
.agd-fab-menu { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.agd-fab-menu[hidden] { display: none; }
.agd-fab-menu a { background: var(--agd-surface); color: var(--agd-fg) !important; border: 1px solid var(--agd-line); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none !important; box-shadow: 0 6px 20px var(--agd-shadow); }
.agd-fab-menu a:hover { border-color: var(--agd-accent); }
.agd-fab-btn { width: 52px; height: 52px; border-radius: 26px; border: 0; padding: 0; margin: 0; background: var(--agd-accent); color: var(--agd-on-accent); display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 20px var(--agd-shadow); }
.agd-fab-btn .agd-ic { width: 24px; height: 24px; }
.agd-fab-btn .agd-fab-close, .agd-fab.is-open .agd-fab-open { display: none; }
.agd-fab.is-open .agd-fab-close { display: grid; }

.agd-preview-flag { position: fixed; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 996; background: var(--agd-accent); color: var(--agd-on-accent); font: 600 12px/1 var(--agd-f-body); padding: 8px 10px; border-radius: 8px; pointer-events: none; }
@media (max-width: 760px) { body.single-product .agd-preview-flag { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .agd-card, .agd-btn, .agd-sticky, body.aster-gd .product-small.box { transition: none !important; }
}

/* Nút đổi nền sáng/tối trên header: mặt trời khi đang tối (bấm để sáng), mặt trăng khi đang sáng */
.agd-theme-btn .agd-ic-moon { display: none; }
html[data-agd-theme="light"] .agd-theme-btn .agd-ic-sun { display: none; }
html[data-agd-theme="light"] .agd-theme-btn .agd-ic-moon { display: block; }
body.aster-gd .mobile-nav > li.agd-h-theme { display: flex; align-items: center; margin: 0 4px; }
body.aster-gd .mobile-nav .agd-icbtn { width: 36px; height: 36px; }

/* Trang hướng dẫn (.agd-guide): cột đọc 820px, bước đánh số, ô lưu ý */
.agd-guide { max-width: 820px; margin: 0 auto; padding: 40px 0 64px; font-family: var(--agd-f-body); color: var(--agd-fg2); font-size: 16px; line-height: 1.65; }
.agd-guide * { box-sizing: border-box; }
.agd-guide h1, .agd-guide h2, .agd-guide h3 { font-family: var(--agd-f-display); color: var(--agd-fg) !important; line-height: 1.2; text-wrap: balance; margin: 0; }
.agd-guide h1 { font-size: clamp(28px, 4vw, 40px); margin: 10px 0 12px; }
.agd-guide h2 { font-size: clamp(22px, 2.6vw, 28px); margin: 48px 0 8px; }
.agd-guide h3 { font-size: 19px; margin: 0 0 6px; }
.agd-guide p, .agd-guide li { color: var(--agd-fg2) !important; }
.agd-guide p { margin: 0 0 12px; }
.agd-guide b, .agd-guide strong { color: var(--agd-fg); }
.agd-guide .agd-lead { margin-bottom: 28px; }
.agd-callout { border: 1px solid var(--agd-line); border-left: 4px solid var(--agd-accent); border-radius: 12px; background: var(--agd-surface); padding: 18px 22px; margin: 0 0 16px; }
.agd-callout > b { display: block; font-family: var(--agd-f-display); font-size: 17px; color: var(--agd-fg); margin-bottom: 6px; }
.agd-callout ul { margin: 0 !important; padding-left: 20px !important; }
.agd-callout li { margin: 4px 0 !important; }
.agd-callout p:last-child { margin-bottom: 0; }
.agd-callout figure { margin: 14px 0 0 !important; }
.agd-guide-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border: 1px solid var(--agd-line); border-radius: 12px; background: var(--agd-surface); padding: 16px 22px; text-decoration: none !important; transition: border-color .15s; }
.agd-guide-link:hover { border-color: var(--agd-accent); }
.agd-guide-link b { display: block; color: var(--agd-fg); font-size: 16px; }
.agd-guide-link small { color: var(--agd-muted); font-size: 14px; }
.agd-steps { list-style: none; counter-reset: agd-step; margin: 20px 0 0 !important; padding: 0 !important; display: grid; gap: 28px; }
.agd-steps > li { counter-increment: agd-step; position: relative; padding-left: 56px; margin: 0 !important; }
.agd-steps > li::before { content: counter(agd-step); position: absolute; left: 0; top: -2px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--agd-accent); color: var(--agd-on-accent); font: 700 17px/1 var(--agd-f-display); }
.agd-guide figure { margin: 12px 0 0 !important; }
.agd-guide figure img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--agd-line); }
.agd-guide figure.agd-fig-sm img { max-width: 620px; }
.agd-guide figcaption { color: var(--agd-muted); font-size: 13px; margin-top: 6px; }
@media (max-width: 600px) {
  .agd-guide { padding: 24px 16px 48px; font-size: 15px; }
  .agd-steps > li { padding-left: 42px; }
  .agd-steps > li::before { width: 30px; height: 30px; font-size: 15px; }
  .agd-guide figure { margin-left: -42px !important; }
  .agd-callout { padding: 16px; }
}

/* ---------- Trang /decky/ (khối #asd tự mang CSS nền tối): bản nền sáng ---------- */
html[data-agd-theme="light"] #asd {
  --ink: #14161a; --muted: #5c626b; --line: #dcdfe4; --soft: #fff;
  --blue: #0b78d1; --blue-d: #0963ad; --night: #f3f4f6;
}
html[data-agd-theme="light"] #asd .asd-hero {
  background: radial-gradient(1200px 420px at 50% -120px, rgba(26,159,255,.18), transparent 70%), var(--night);
  color: var(--ink);
}
html[data-agd-theme="light"] #asd .asd-eyebrow { color: #0963ad; background: rgba(26,159,255,.1); border-color: rgba(11,120,209,.3); }
html[data-agd-theme="light"] #asd .asd-hero h1,
html[data-agd-theme="light"] #asd .asd-lead strong,
html[data-agd-theme="light"] #asd .asd-sec h2,
html[data-agd-theme="light"] #asd .asd-feats h3,
html[data-agd-theme="light"] #asd .asd-sec strong,
html[data-agd-theme="light"] #asd .aa-cap strong { color: #14161a; }
html[data-agd-theme="light"] #asd .asd-hero h1 span,
html[data-agd-theme="light"] #asd .asd-log-head { color: #5c626b; }
html[data-agd-theme="light"] #asd .asd-lead,
html[data-agd-theme="light"] #asd .asd-log li,
html[data-agd-theme="light"] #asd .aa-cap { color: #2f333a; }
html[data-agd-theme="light"] #asd .asd-btn:focus-visible,
html[data-agd-theme="light"] #asd .aa-thumbs button:focus-visible { outline-color: #14161a; }
html[data-agd-theme="light"] #asd .asd-log,
html[data-agd-theme="light"] #asd .aa-cap { background: #fff; border-color: var(--line); }
html[data-agd-theme="light"] #asd .asd-log-date,
html[data-agd-theme="light"] #asd .aa-cap .aa-n { color: #0963ad; }
html[data-agd-theme="light"] #asd .asd-log-date { background: rgba(26,159,255,.12); }
html[data-agd-theme="light"] #asd .aa-main { box-shadow: 0 16px 40px rgba(20,22,26,.18), 0 0 0 1px rgba(20,22,26,.08); }
html[data-agd-theme="light"] #asd .asd-ico { background: rgba(26,159,255,.12); color: #0b78d1; }
html[data-agd-theme="light"] #asd .asd-note { background: #fff7e6; border-color: #f0c66b; color: #5a3d00; }
html[data-agd-theme="light"] #asd .asd-note p { color: #5a3d00; }
html[data-agd-theme="light"] #asd .asd-note svg { color: #c98a00; }
html[data-agd-theme="light"] #asd code { background: #eceef1; color: #0a4f8a; }
/* Luật "body.aster-gd #main a { color: inherit }" thắng màu link của #asd: đặt lại, cả hai nền. */
body.aster-gd #main #asd .asd-btn-primary,
body.aster-gd #main #asd .asd-btn-primary:hover { color: #fff; }
body.aster-gd #main #asd .asd-btn-warn,
body.aster-gd #main #asd .asd-btn-warn:hover { color: #1a1204; }
body.aster-gd #main #asd .asd-btn-ghost { color: #dbe4ee; }
body.aster-gd #main #asd .asd-btn-ghost:hover { color: #fff; }
body.aster-gd #main #asd .asd-feats a,
body.aster-gd #main #asd .asd-steps a { color: #6cbcff; }
body.aster-gd #main #asd .asd-feats a:hover,
body.aster-gd #main #asd .asd-steps a:hover { color: #9ad2ff; }
html[data-agd-theme="light"] body.aster-gd #main #asd .asd-btn-ghost { color: #14161a; border-color: #aeb4bc; }
html[data-agd-theme="light"] body.aster-gd #main #asd .asd-btn-ghost:hover { color: #14161a; background: rgba(20,22,26,.05); }
html[data-agd-theme="light"] body.aster-gd #main #asd .asd-feats a,
html[data-agd-theme="light"] body.aster-gd #main #asd .asd-steps a { color: #0b6fc4; }
html[data-agd-theme="light"] body.aster-gd #main #asd .asd-feats a:hover,
html[data-agd-theme="light"] body.aster-gd #main #asd .asd-steps a:hover { color: #0963ad; }
