/* =========================================================================
 * Giao diện 2026: nền xám rất nhạt, thẻ trắng bo tròn lớn, một màu nhấn cam ấm,
 * chữ Be Vietnam Pro, thanh điều hướng tối nổi ở đáy trên điện thoại.
 * Lớp này nạp sau main.css và chỉ ghi đè màu, khoảng cách, hình dạng.
 * ========================================================================= */
:root {
  --g: #D9772B; --g-d: #BC6220; --g-l: #FBEADB; --g-ll: #FDF5EE;
  --bg: #F5F5F7; --card: #FFFFFF; --soft: #F1F1F4; --soft2: #E9E9EE;
  --ink: #1C1D21; --ink2: #44464E; --mut: #8E909B; --line: #ECECF0; --line2: #DEDFE5;
  --red: #E0533D; --dark: #1E2026;
  --r: 16px; --r-lg: 22px;
  --sh: 0 1px 2px rgba(28, 29, 33, .04), 0 10px 28px -18px rgba(28, 29, 33, .28);
  --bnr-tint: #F6F2EE;
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body { background: var(--bg); font-family: var(--font); font-size: 14.5px; }
h1, h2, h3 { letter-spacing: -.02em; }
a:hover { color: var(--g); }

/* Nút */
.btn, .button, button.button, a.button, input.button, #place_order { border-radius: 14px; font-weight: 600; background: var(--g); box-shadow: 0 8px 18px -12px rgba(217, 119, 43, .9); }
.btn:hover, .button:hover, #place_order:hover { background: var(--g-d); }

/* ---------- Đầu trang ---------- */
.hd { background: color-mix(in srgb, var(--bg) 92%, transparent); border-bottom: 0; }
.hd__in { min-height: 72px; }
.logo__mk { background: var(--ink); border-radius: 12px; }
.logo__t b { color: var(--g); }
.sb { height: 48px; padding: 0 4px 0 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh); }
.sb:focus-within { border-color: var(--g); }
.sb > svg { color: var(--mut); }
.sb__go { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--g); color: #fff; cursor: pointer; }
.sb__go svg { width: 18px; height: 18px; }
.sb__go:hover { background: var(--g-d); }
.hd__nav a { border-radius: 12px; }
.hd__nav a:hover { background: var(--card); }
.hd__tel { color: var(--ink) !important; }
.ctn-cc { background: var(--g); border-color: var(--bg); }
.catbar { gap: 18px; padding-block: 2px 10px; }
.catbar a { padding: 6px 0; border-radius: 0; background: none !important; color: var(--mut); font-weight: 500; position: relative; }
.catbar a:hover { color: var(--ink); }
.catbar a.is-on { color: var(--g); font-weight: 700; }
.catbar a.is-on::after { content: ""; position: absolute; left: 50%; bottom: -2px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--g); }

/* ---------- Trang chủ ---------- */
.intro h1 { color: var(--mut); font-weight: 500; font-size: 13.5px; }
.sec { padding-top: 34px; }
.sec__h h2 { font-size: 19px; font-weight: 700; }
.sec__h a { color: var(--mut); font-weight: 500; font-size: 13px; }
.sec__h a::after { content: " ›"; }
.sec__h a:hover { color: var(--g); }
.cats { gap: 14px; padding: 16px 2px 8px; }
.ct { width: 86px; gap: 8px; }
.ct__ph { width: 80px; height: 92px; border-radius: 20px; background: var(--card); border: 0; box-shadow: var(--sh); }
.ct__ph img { border-radius: 0; }
.ct:hover .ct__ph { transform: translateY(-2px); transition: transform .2s; }
.ct.is-on .ct__ph { background: var(--card); color: var(--g); outline: 2px solid var(--g); outline-offset: -2px; }
.ct__n { font-size: 12.5px; color: var(--ink2); }
.ct.is-on .ct__n { color: var(--g); font-weight: 700; }

/* Banner: thẻ sáng, ảnh sản phẩm rõ, chữ tối, một nút cam */
.hero2 { gap: 16px; }
.bnr { border-radius: var(--r-lg); background: var(--card); box-shadow: var(--sh); }
.bnr__s { color: var(--ink); min-height: 300px; padding: 30px 34px 46px; grid-template-columns: 1.05fr 1fr;
  background: linear-gradient(120deg, var(--card) 0 46%, color-mix(in srgb, var(--c1) 9%, var(--bnr-tint)) 46% 100%); }
.bnr__s:hover { color: var(--ink); }
.bnr__deco { display: none; }
.bnr__k { background: color-mix(in srgb, var(--c1) 12%, var(--card)); color: color-mix(in srgb, var(--c1) 75%, var(--ink)); border: 0; font-weight: 600; letter-spacing: 0; }
.bnr__t b { text-transform: none; text-shadow: none; color: var(--ink); font-size: clamp(26px, 3.2vw, 40px); line-height: 1.08; letter-spacing: -.03em; }
.bnr__sub { color: var(--ink2); opacity: 1; font-weight: 500; }
.bnr__t small { color: var(--mut); opacity: 1; font-size: 14px; }
.bnr__btn { background: var(--g) !important; color: #fff !important; border-radius: 12px; box-shadow: 0 10px 22px -12px rgba(217, 119, 43, .95) !important; }
.bnr__from { color: var(--ink2); opacity: 1; } .bnr__from b { color: var(--g); }
.bnr__pics { height: 240px; }
.bnr__pic { border: 0; border-radius: 20px; box-shadow: 0 22px 36px -22px rgba(28, 29, 33, .55); animation: none !important; }
.bnr__pic--0 { transform: none; width: 64%; height: 86%; right: 0; top: 4%; }
.bnr__pic--1 { transform: none; width: 40%; height: 46%; left: 4%; top: 2%; }
.bnr__pic--2 { transform: none; width: 40%; height: 44%; left: 4%; bottom: 0; }
.bnr__badge { right: 8px; bottom: 6%; border-radius: 999px; font-weight: 600; font-size: 11.5px; box-shadow: var(--sh); }
.bnr__dots i { background: var(--line2); }
.bnr__dots i.is-on { background: var(--g); }
.bnr__nav { background: var(--card); box-shadow: var(--sh); }
.side { border-radius: var(--r-lg); }
.side--ctv { background: var(--dark); }
.side--ctv i { color: rgba(217, 119, 43, .18); }

.perks { margin-top: 18px; padding: 16px 8px; border: 0; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--sh); }
.perks li + li { border-left-color: var(--line); }
.perks svg { color: var(--g); }
.need { border-radius: var(--r-lg); }
.ctvb { border: 0; border-radius: var(--r-lg); background: var(--dark); color: #fff; }
.ctvb small { color: #B8BAC4; }
.ctvb .btn { background: var(--g); }
.seo-text { background: var(--card); border-radius: var(--r-lg); padding: 24px 26px; box-shadow: var(--sh); max-width: none; }
.seo-text .pitch li::before { background: var(--g-l); color: var(--g); }

/* Flash sale theo màu nhấn */
.fs { background: linear-gradient(135deg, #2A2C33 0%, #1E2026 100%); box-shadow: var(--sh); }
.fs__h h2 { color: #fff; }
.fs__cd b { color: var(--g); }
.fs ul.products li.product .onsale { background: var(--g); box-shadow: none; }
.fs-bar { background: var(--g-ll); border-color: var(--g-l); }
.fs-bar b { color: var(--g); }
[data-countdown]:not([data-countdown-box]) { background: var(--g); }

/* ---------- Thẻ sản phẩm ---------- */
.woocommerce ul.products, ul.products { gap: 16px; }
ul.products li.product { background: var(--card); border-radius: var(--r-lg); padding: 10px 10px 12px; box-shadow: var(--sh); gap: 4px; transition: transform .2s, box-shadow .2s; }
ul.products li.product:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(28, 29, 33, .05), 0 18px 34px -20px rgba(28, 29, 33, .35); }
ul.products li.product img { border-radius: 16px; background: var(--soft); margin-bottom: 6px; }
ul.products li.product:hover img { transform: none; }
ul.products li.product .woocommerce-loop-product__title { font-weight: 600; font-size: 13.5px; color: var(--ink); }
ul.products li.product:hover .woocommerce-loop-product__title { color: var(--ink); }
ul.products li.product .price { color: var(--g); font-size: 15px; font-weight: 700; }
ul.products li.product .button { min-height: 38px; border-radius: 12px; background: var(--g-ll); color: var(--g) !important; box-shadow: none; }
ul.products li.product .button:hover { background: var(--g); color: #fff !important; }
ul.products li.product .pc-buy-mini { background: transparent; color: var(--ink2) !important; border: 1px solid var(--line2); }
ul.products li.product .onsale, .woocommerce span.onsale { top: 18px; left: 18px; border-radius: 999px; background: var(--red); padding: 3px 9px; }
ul.products li.product .pc-tag { top: 18px; left: 18px; border-radius: 999px; background: var(--dark); padding: 3px 9px; }
ul.products li.product .pc-tag--q { background: var(--card); color: var(--ink); box-shadow: var(--sh); }
.ctn-chips a { border-radius: 999px; background: var(--card); border-color: var(--line); }
.ctn-chips a.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.woocommerce-pagination a, .woocommerce-pagination span { border-radius: 12px; background: var(--card); border-color: var(--line); }
.woocommerce-pagination span.current { background: var(--g); border-color: var(--g); }
.ctn-subs a, .ctn-sub { border-radius: 16px; background: var(--card); }

/* ---------- Trang sản phẩm ---------- */
.single-product div.product { background: transparent; }
.single-product .woocommerce-product-gallery { background: var(--card); border-radius: var(--r-lg); padding: 10px; box-shadow: var(--sh); }
.single-product .woocommerce-product-gallery img { border-radius: 16px; }
.single-product .summary { background: var(--card); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--sh); }
.single-product .summary .price { color: var(--g) !important; }
.variations select, .woocommerce-ordering select { border-radius: 12px; }
.quantity .qty { border-radius: 12px; border: 1px solid var(--line2); background: var(--soft); }
.pd-trust { border-radius: 16px; }
.woocommerce-tabs, .related, .upsells { background: var(--card); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--sh); margin-top: 18px; }

/* ---------- Giỏ hàng, thanh toán ---------- */
.woocommerce table.shop_table, table.shop_table { background: var(--card); border: 0; border-radius: var(--r-lg); box-shadow: var(--sh); }
.shop_table thead th { background: transparent; }
.shop_table .product-thumbnail img { border-radius: 14px; background: var(--soft); }
.cart_totals, #order_review { background: var(--card); border: 0 !important; border-radius: var(--r-lg); box-shadow: var(--sh); padding: 20px; }
form.checkout .col2-set { background: var(--card); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--sh); }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select, .select2-container .select2-selection--single { border-radius: 14px; border: 1px solid var(--line2); background: var(--soft); }
.woocommerce form .form-row input.input-text:focus, .woocommerce form .form-row textarea:focus { background: var(--card); border-color: var(--g); box-shadow: 0 0 0 3px var(--g-l); }
#payment ul.payment_methods li { border-radius: 16px; border: 1px solid var(--line2); background: var(--card); }
#payment ul.payment_methods li:has(input:checked) { border-color: var(--g); background: var(--g-ll); }
.woocommerce-order-overview { background: var(--card); box-shadow: var(--sh); border-radius: var(--r-lg); }
.woocommerce-thankyou-order-received { color: var(--ink); }
.ctn-qr { background: var(--card); box-shadow: var(--sh); }
.woocommerce-cart .cart-empty, .cart-empty.woocommerce-info { background: var(--card); border-radius: var(--r-lg); padding: 30px; text-align: center; box-shadow: var(--sh); }

/* ---------- Chân trang ---------- */
.ft { background: var(--card); border-top: 0; margin-top: 40px; }
.zalo { border-radius: 999px; box-shadow: 0 12px 26px -14px rgba(0, 104, 255, .8); }

/* ---------- Điện thoại ---------- */
@media (max-width: 720px) {
  body { padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
  .hd__in { padding-block: 12px; }
  .sb { height: 46px; }
  .catbar { gap: 16px; }
  ul.products { gap: 12px; }
  ul.products li.product { padding: 8px 8px 10px; border-radius: 18px; }
  ul.products li.product img { border-radius: 13px; }
  .bnr__s { min-height: 190px; padding: 18px 16px 32px; grid-template-columns: 1.1fr .9fr;
    background: linear-gradient(120deg, var(--card) 0 54%, color-mix(in srgb, var(--c1) 9%, var(--bnr-tint)) 54% 100%); }
  .bnr__t b { font-size: 22px; }
  .bnr__t small, .bnr__badge, .bnr__pic--1, .bnr__pic--2 { display: none; }
  .bnr__pics { height: 150px; }
  .bnr__pic--0 { width: 100%; height: 100%; top: 0; }
  .ct__ph { width: 70px; height: 80px; border-radius: 18px; }
  .ct { width: 74px; }
  .seo-text { padding: 18px; }
  /* Thanh điều hướng tối, nổi, bo tròn */
  .bn { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); padding: 8px 6px; border: 0; border-radius: 22px; background: var(--dark); box-shadow: 0 18px 34px -14px rgba(0, 0, 0, .55); }
  .bn a { color: #8A8D98; font-size: 10px; }
  .bn a.is-on { color: #fff; }
  .bn a.is-on svg { color: var(--g); }
  .bn .ctn-cc { border-color: var(--dark); }
  .zalo { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) { ul.products li.product, .ct__ph { transition: none; } }

/* Banner: nhãn và giá không bị cỡ chữ của dòng phụ đè */
.bnr__t > .bnr__k { font-size: 12.5px !important; padding: 5px 11px; }
.bnr__t > .bnr__cta { font-size: 13px !important; }
.bnr__from { font-size: 13px !important; } .bnr__from b { font-size: 20px !important; letter-spacing: -.02em; }

/* Thẻ sản phẩm gọn trên điện thoại: một nút chính */
@media (max-width: 720px) {
  ul.products li.product .pc-buy-mini { display: none; }
  ul.products li.product .button { min-height: 36px; font-size: 12.5px; }
  ul.products li.product .woocommerce-loop-product__title { min-height: 2.7em; }
}

/* Thẻ sản phẩm: nút tròn "+" cạnh giá thay cho nút chữ dài (chữ vẫn có cho trình đọc màn hình qua aria-label) */
ul.products li.product { padding-bottom: 12px; }
ul.products li.product .price { padding-right: 48px; min-height: 40px; display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; }
ul.products li.product .button { position: absolute; right: 12px; bottom: 12px; width: 40px; min-height: 40px !important; height: 40px; padding: 0 !important; margin: 0; border-radius: 13px;
  background: var(--g) !important; color: transparent !important; font-size: 0 !important; box-shadow: 0 8px 16px -10px rgba(217, 119, 43, .95); overflow: hidden; }
ul.products li.product .button::before { content: "+"; color: #fff; font-size: 24px; font-weight: 500; line-height: 1; }
ul.products li.product .button:hover { background: var(--g-d) !important; }
ul.products li.product .button.loading { opacity: .7; }
ul.products li.product .button.loading::before { content: "…"; }
ul.products li.product .button.added::before { content: "✓"; font-size: 18px; font-weight: 800; }
ul.products li.product .button.added::after { display: none !important; }
/* Hàng nhiều cỡ / báo giá: nút dẫn vào trang sản phẩm để chọn, dùng mũi tên */
ul.products li.product .button.product_type_variable::before, ul.products li.product .button:not(.ajax_add_to_cart)::before { content: "›"; font-size: 26px; margin-top: -2px; }
ul.products li.product .added_to_cart, ul.products li.product .pc-buy-mini { display: none !important; }
@media (max-width: 720px) {
  ul.products li.product .button { width: 36px; height: 36px; min-height: 36px !important; right: 8px; bottom: 10px; border-radius: 12px; }
  ul.products li.product .price { padding-right: 40px; font-size: 14px; }
}

/* Bộ chọn in: chọn loại (menu cuốn, mica, PVC...) */
.pc__models { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.pc__model { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px; border-radius: 16px; border: 1.5px solid var(--line2); background: var(--card); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.pc__model input { position: absolute; opacity: 0; pointer-events: none; }
.pc__model img, .pc__model i { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; background: var(--soft); display: grid; place-items: center; font-style: normal; font-weight: 800; color: var(--g); }
.pc__model span { display: grid; gap: 1px; min-width: 0; }
.pc__model b { font-size: 13px; font-weight: 600; line-height: 1.3; }
.pc__model small { color: var(--mut); font-size: 12px; }
.pc__model:hover { border-color: #E9B98C; }
.pc__model:has(input:checked) { border-color: var(--g); background: var(--g-ll); box-shadow: 0 0 0 3px var(--g-l); }
.pc__model:has(input:checked) b { color: var(--g-d); }
.pc__model:has(input:focus-visible) { outline: 2px solid var(--g); outline-offset: 2px; }
.pc__msub { margin: 0 0 10px; color: var(--ink2); font-size: 13.5px; }
.pc__mspec { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 14px; margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--soft); font-size: 13px; }
.pc__mspec div { display: flex; gap: 6px; } .pc__mspec dt { color: var(--mut); } .pc__mspec dd { margin: 0; font-weight: 600; }
@media (max-width: 720px) { .pc__models { grid-template-columns: 1fr 1fr; } .pc__model { grid-template-columns: 40px minmax(0, 1fr); } .pc__model img, .pc__model i { width: 40px; height: 40px; } }

/* =========================================================================
 * Chế độ tối: mặc định theo máy, nút mặt trời / mặt trăng ở đầu trang ghi đè (lưu ở trình duyệt).
 * Nền than ấm, thẻ nổi hơn nền một bậc, giữ màu cam nhấn sáng hơn chút cho đủ tương phản.
 * ========================================================================= */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --g: #E8893F; --g-d: #F29C57; --g-l: rgba(232, 137, 63, .2); --g-ll: rgba(232, 137, 63, .1);
    --bg: #121317; --card: #1B1C21; --soft: #24252B; --soft2: #2C2D34;
    --ink: #EDEDF0; --ink2: #C5C6CD; --mut: #8D8F99; --line: #2A2B31; --line2: #383940;
    --red: #F06B55; --dark: #0B0C0F; --bnr-tint: #24211F;
    --sh: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 30px -18px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --g: #E8893F; --g-d: #F29C57; --g-l: rgba(232, 137, 63, .2); --g-ll: rgba(232, 137, 63, .1);
  --bg: #121317; --card: #1B1C21; --soft: #24252B; --soft2: #2C2D34;
  --ink: #EDEDF0; --ink2: #C5C6CD; --mut: #8D8F99; --line: #2A2B31; --line2: #383940;
  --red: #F06B55; --dark: #0B0C0F; --bnr-tint: #24211F;
  --sh: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 30px -18px rgba(0, 0, 0, .8);
  color-scheme: dark;
}
body { background: var(--bg); color: var(--ink); transition: background-color .2s; }
.bnr__pic { border-color: var(--card); }
.woocommerce-error { background: color-mix(in srgb, var(--red) 12%, var(--card)); border-color: color-mix(in srgb, var(--red) 30%, var(--card)); color: var(--red); }
.select2-dropdown, .select2-results__option { background: var(--card); color: var(--ink); border-color: var(--line2); }
input, select, textarea { color: var(--ink); }
.ft, .ft a { color: var(--ink2); }

/* Nút đổi sáng / tối */
.hd__theme { display: grid; place-items: center; width: 40px; height: 40px; margin-right: 2px; border: 0; border-radius: 12px; background: transparent; color: var(--ink2); cursor: pointer; }
.hd__theme:hover { background: var(--card); color: var(--ink); }
.hd__theme svg { width: 20px; height: 20px; }
.hd__theme svg:last-child { display: none; }
:root[data-theme="dark"] .hd__theme svg:first-child { display: none; }
:root[data-theme="dark"] .hd__theme svg:last-child { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hd__theme svg:first-child { display: none; }
  :root:not([data-theme="light"]) .hd__theme svg:last-child { display: block; }
}

/* ---------- Nút giỏ trên thẻ sản phẩm: biểu tượng giỏ hàng có dấu +, như các sàn ---------- */
ul.products li.product .button { border-radius: 12px; }
ul.products li.product .button::before, ul.products li.product .button.product_type_variable::before {
  content: ""; width: 21px; height: 21px; margin: 0; background: #fff; font-size: 0;
  -webkit-mask: var(--ic-cart) center / contain no-repeat; mask: var(--ic-cart) center / contain no-repeat; }
ul.products li.product .button:not(.ajax_add_to_cart):not(.product_type_variable)::before { --ic-cart: var(--ic-go); width: 18px; height: 18px; }
ul.products li.product .button.loading::before { content: ""; --ic-cart: var(--ic-spin); animation: ctn-spin .8s linear infinite; }
ul.products li.product .button.added::before { content: ""; --ic-cart: var(--ic-ok); }
:root {
  --ic-cart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 3.5h2.2l2.4 11a1.6 1.6 0 0 0 1.6 1.2h8.7a1.6 1.6 0 0 0 1.5-1.2L21 7.5H6.3'/%3E%3Ccircle cx='9.5' cy='20' r='1.4'/%3E%3Ccircle cx='17.2' cy='20' r='1.4'/%3E%3Cpath d='M13.4 9v4.6M11.1 11.3h4.6'/%3E%3C/svg%3E");
  --ic-go: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 5 7 7-7 7'/%3E%3C/svg%3E");
  --ic-ok: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --ic-spin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 3a9 9 0 1 0 9 9'/%3E%3C/svg%3E");
}
@keyframes ctn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { ul.products li.product .button.loading::before { animation: none; } }

/* ---------- Thông báo nhỏ ---------- */
.ctn-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 90; transform: translate(-50%, 12px); opacity: 0; display: flex; align-items: center; gap: 12px;
  max-width: calc(100vw - 32px); padding: 10px 10px 10px 16px; border-radius: 14px; background: var(--dark); color: #fff; font-weight: 500; font-size: 14px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6); transition: opacity .2s, transform .2s; pointer-events: none; }
.ctn-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.ctn-toast a { padding: 7px 12px; border-radius: 10px; background: var(--g); color: #fff !important; font-weight: 600; white-space: nowrap; }
@media (max-width: 720px) { .ctn-toast { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); } }

/* ---------- Bảng chọn nhanh (kích cỡ / loại) ---------- */
.qs-mask { position: fixed; inset: 0; z-index: 80; background: rgba(10, 11, 14, .5); opacity: 0; transition: opacity .2s; }
.qs { position: fixed; z-index: 81; left: 50%; top: 50%; width: min(520px, calc(100vw - 32px)); max-height: min(86vh, 720px); display: flex; flex-direction: column;
  background: var(--card); color: var(--ink); border-radius: 22px; box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .55);
  transform: translate(-50%, -46%); opacity: 0; transition: opacity .2s, transform .22s cubic-bezier(.2, .8, .2, 1); }
.qs.is-on { opacity: 1; transform: translate(-50%, -50%); }
.qs-mask.is-on { opacity: 1; }
.qs__h { display: grid; grid-template-columns: 96px minmax(0, 1fr) 36px; gap: 14px; padding: 16px 16px 14px; border-bottom: 1px solid var(--line); }
.qs__h img { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; background: var(--soft); }
.qs__h > div { display: grid; align-content: end; gap: 4px; min-width: 0; }
.qs__n { font-size: 14px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qs__p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.qs__p b { color: var(--g); font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.qs__p del { color: var(--mut); font-size: 13px; }
.qs__p small { color: var(--mut); font-size: 12.5px; }
.qs__s { color: var(--mut); font-size: 12.5px; }
.qs__x { width: 36px; height: 36px; border: 0; border-radius: 12px; background: var(--soft); color: var(--ink2); font-size: 20px; line-height: 1; cursor: pointer; }
.qs__x:hover { color: var(--ink); }
.qs__b { flex: 1; overflow-y: auto; padding: 14px 16px 6px; display: grid; gap: 16px; align-content: start; }
.qs__g { display: grid; gap: 8px; }
.qs__g > span { font-size: 13px; font-weight: 600; color: var(--ink2); }
.qs__g > span em { font-style: normal; font-weight: 500; color: var(--mut); }
.qs__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.qs__o { min-height: 38px; padding: 6px 14px; border-radius: 11px; border: 1.5px solid var(--line2); background: var(--card); color: var(--ink); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: border-color .12s, background-color .12s; }
.qs__o:hover:not(:disabled) { border-color: var(--g); }
.qs__o[aria-pressed="true"] { border-color: var(--g); background: var(--g-ll); color: var(--g); font-weight: 600; }
.qs__o:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.qs__q { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qs__q > span { font-size: 13px; font-weight: 600; color: var(--ink2); }
.qs__step { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; }
.qs__step button { width: 40px; height: 40px; border: 0; background: var(--soft); color: var(--ink); font-size: 18px; cursor: pointer; }
.qs__step button:disabled { opacity: .4; cursor: default; }
.qs__step input { width: 56px; height: 40px; border: 0; background: var(--card); color: var(--ink); text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.qs__step input::-webkit-inner-spin-button, .qs__step input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qs__msg { margin: 0; min-height: 1.2em; color: var(--red); font-size: 12.5px; }
.qs__f { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 16px 16px; padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
.qs__f .button { min-height: 48px; border-radius: 14px; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.qs__f .qs__add { background: var(--g-ll) !important; color: var(--g) !important; border: 1.5px solid var(--g); box-shadow: none; }
.qs__f .qs__add:hover { background: var(--g-l) !important; }
.qs__f .qs__add svg { width: 20px; height: 20px; }
.qs__f .button:disabled { opacity: .5; cursor: not-allowed; }
.qs__more { justify-self: center; color: var(--mut); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.qs__load { padding: 50px 16px; text-align: center; color: var(--mut); }
html.qs-open { overflow: hidden; }
@media (max-width: 720px) {
  .qs { left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 88vh; border-radius: 22px 22px 0 0; transform: translateY(100%); opacity: 1; }
  .qs.is-on { transform: translateY(0); }
  .qs::before { content: ""; display: block; width: 40px; height: 4px; margin: 8px auto 0; border-radius: 4px; background: var(--line2); }
  .qs__h { grid-template-columns: 84px minmax(0, 1fr) 36px; padding-top: 10px; }
  .qs__h img { width: 84px; height: 84px; }
}
@media (prefers-reduced-motion: reduce) { .qs, .qs-mask, .ctn-toast { transition: none; } }

/* Thanh mua dính đáy (điện thoại): nút giỏ + Mua ngay */
.pd-sticky { background: var(--card); border-top: 1px solid var(--line); }
.pd-sticky__b { display: flex; gap: 8px; flex: none; }
.pd-sticky__b .button { min-height: 44px; padding: 0 18px; border-radius: 13px; }
.pd-sticky__add { width: 48px; padding: 0 !important; background: var(--g-ll) !important; color: var(--g) !important; border: 1.5px solid var(--g); box-shadow: none; display: grid; place-items: center; }
.pd-sticky__add svg { width: 22px; height: 22px; }

/* Thẻ sản phẩm: hàng nút dưới cùng [Mua ngay][giỏ] */
ul.products li.product:has(.pc-buy-mini) { padding-bottom: 62px; }
ul.products li.product:has(.pc-buy-mini) .price { padding-right: 0; min-height: 0; }
ul.products li.product a.pc-buy-mini, ul.products li.product .pc-buy-mini { display: inline-flex !important; position: absolute; left: 12px; right: 60px; bottom: 12px; height: 40px; min-height: 40px;
  align-items: center; justify-content: center; padding: 0 8px; margin: 0; border-radius: 12px; border: 0; background: var(--g) !important; color: #fff !important;
  font-size: 13.5px !important; font-weight: 700; box-shadow: none; white-space: nowrap; width: auto; overflow: visible; }
ul.products li.product .pc-buy-mini::before { display: none !important; }
ul.products li.product .pc-buy-mini:hover { background: var(--g-d) !important; }
ul.products li.product:has(.pc-buy-mini) .button:not(.pc-buy-mini) { background: var(--g-ll) !important; border: 1.5px solid var(--g); box-shadow: none; }
ul.products li.product:has(.pc-buy-mini) .button:not(.pc-buy-mini)::before { background: var(--g); }
ul.products li.product:has(.pc-buy-mini) .button:not(.pc-buy-mini).added::before, ul.products li.product:has(.pc-buy-mini) .button:not(.pc-buy-mini).loading::before { background: var(--g); }
@media (max-width: 720px) {
  ul.products li.product:has(.pc-buy-mini) { padding-bottom: 54px; }
  ul.products li.product a.pc-buy-mini, ul.products li.product .pc-buy-mini { left: 8px; right: 50px; bottom: 10px; height: 36px; min-height: 36px; font-size: 12.5px !important; }
}
/* Bảng chọn mở từ "Mua ngay": nút Mua ngay nổi bật hơn */
.qs--buy .qs__f { grid-template-columns: 56px 1fr; }
.qs--buy .qs__add { font-size: 0 !important; gap: 0; padding: 0; }
.qs--buy .qs__add svg { width: 22px; height: 22px; }

/* Số lượng đang có trong giỏ trên nút giỏ của thẻ, hiệu ứng +1 khi bấm */
ul.products li.product .button { overflow: visible !important; }
ul.products li.product .pc-q { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff;
  font: 700 11px/20px var(--font); font-style: normal; text-align: center; border: 2px solid var(--card); box-sizing: content-box; pointer-events: none; }
ul.products li.product .pc-q.bump { animation: pc-bump .35s ease; }
@keyframes pc-bump { 40% { transform: scale(1.35); } }
ul.products li.product .pc-plus { position: absolute; right: 18px; bottom: 54px; z-index: 3; color: var(--g); font-weight: 800; font-size: 15px; pointer-events: none; animation: pc-plus .8s ease-out forwards; }
@keyframes pc-plus { from { opacity: 0; transform: translateY(6px); } 25% { opacity: 1; } to { opacity: 0; transform: translateY(-22px); } }
@media (max-width: 720px) { ul.products li.product .pc-plus { right: 12px; bottom: 48px; } }
@media (prefers-reduced-motion: reduce) { ul.products li.product .pc-q.bump, ul.products li.product .pc-plus { animation: none; } ul.products li.product .pc-plus { display: none; } }

/* Nút − trên thẻ khi món đã có trong giỏ: [Mua ngay][−][giỏ] */
ul.products li.product .pc-minus { position: absolute; right: 58px; bottom: 12px; z-index: 2; width: 40px; height: 40px; padding: 0; border-radius: 12px;
  border: 1.5px solid var(--line2); background: var(--card); color: var(--ink); font-size: 22px; font-weight: 500; line-height: 1; cursor: pointer; display: grid; place-items: center; }
ul.products li.product .pc-minus:hover:not(:disabled) { border-color: var(--g); color: var(--g); }
ul.products li.product .pc-minus:disabled { opacity: .5; cursor: default; }
ul.products li.product.has-q a.pc-buy-mini, ul.products li.product.has-q .pc-buy-mini { right: 104px; }
@media (max-width: 720px) {
  ul.products li.product .pc-minus { right: 48px; bottom: 10px; width: 34px; height: 36px; font-size: 20px; border-radius: 11px; }
  ul.products li.product.has-q a.pc-buy-mini, ul.products li.product.has-q .pc-buy-mini { right: 88px; font-size: 12px !important; }
}
