/* Shopee-like design tokens, giữ màu đỏ chủ đạo của shop */
:root{
  --sp-red:#dc2626;
  --sp-red-dark:#b91c1c;
  --sp-text:rgba(0,0,0,.87);
  --sp-text2:rgba(0,0,0,.54);
  --sp-line:rgba(0,0,0,.09);
  --sp-bg:#f5f5f5;
  --sp-font:-apple-system,BlinkMacSystemFont,"Helvetica Neue",Helvetica,Roboto,"Droid Sans",Arial,sans-serif;
}
html{-webkit-text-size-adjust:100%}
*,*::before,*::after{box-sizing:border-box}
body{font-family:var(--sp-font);font-size:14px;line-height:1.4;color:var(--sp-text);font-weight:400}
.h2{font-weight:600;font-size:14px;color:var(--sp-text)}
.inp{border:1px solid var(--sp-line);border-radius:2px;padding:9px 10px;width:100%;font-size:14px;font-family:inherit}
.inp:focus{border-color:var(--sp-red);outline:none;box-shadow:0 0 0 1px var(--sp-red)}
/* iOS Safari tự zoom nếu input < 16px khi focus — mobile để 16px */
@media (max-width:768px){.inp{font-size:16px}}
/* Card phẳng kiểu Shopee */
.sp-sec{background:#fff;margin-top:8px;padding:12px}
/* Mô tả sản phẩm (HTML từ trình soạn thảo) */
#productInfo p{margin:8px 0}
#productInfo img{max-width:100%;height:auto;border-radius:8px;margin:10px 0;display:block}
#productInfo ul,#productInfo ol{margin:8px 0;padding-left:20px}
#productInfo ul{list-style:disc}
#productInfo ol{list-style:decimal}
#productInfo h3,#productInfo h4{font-weight:700;margin:12px 0 6px}
#productInfo h3{font-size:15px}
#productInfo a{color:#0284c7}
/* Thông số sản phẩm — 13px, 2 cột (lẻ thì cột 1 nhiều hơn, cột 2 là phần thiếu) */
.spec-list{margin-top:4px;font-size:13px;display:flex;gap:18px;align-items:flex-start}
.spec-col{flex:1;min-width:0}
.spec-row{display:flex;gap:8px;padding:7px 0;border-bottom:1px solid var(--sp-line);font-size:13px;line-height:18px}
.spec-col .spec-row:last-child{border-bottom:0}
.spec-k{flex:none;width:84px;color:var(--sp-text2)}
.spec-v{flex:1;min-width:0;color:var(--sp-text);word-break:break-word}
@media(min-width:640px){
  .spec-list{gap:32px}
  .spec-k{width:104px}
}
.cta{display:block;background:var(--sp-red);color:#fff;font-weight:500;font-size:15px;letter-spacing:.3px;padding:11px;border-radius:2px;margin-top:12px;text-transform:uppercase;font-family:inherit;cursor:pointer;text-decoration:none;text-align:center}
button.cta{margin-left:auto;margin-right:auto}
.cta:active{background:var(--sp-red-dark)}
.cd{background:#111;color:#fff;font-weight:500;border-radius:4px;padding:6px 12px;font-size:20px}
.cd.sm{padding:2px 8px;font-size:15px;border-radius:4px;background:var(--sp-red)}
/* Hero mobile-first */
.hero-gallery{position:relative;background:#f3f4f6;overflow:hidden}
.hero-img{width:100%;aspect-ratio:1/1;object-fit:cover;display:block;transition:opacity .18s ease}
.hero-img.fading{opacity:0}
.hero-img.hero-loading{background:transparent}
/* Lớp ảnh phụ cho vuốt nối tiếp: JS tự chèn, nằm sẵn bên cạnh ảnh chính */
.hero-next{position:absolute;inset:0;opacity:0;pointer-events:none}
.hero-counter{position:absolute;right:10px;bottom:10px;background:rgba(0,0,0,.45);color:#fff;font-size:12px;padding:2px 10px;border-radius:9999px}
/* Nút chuyển ảnh hero (chỉ thiết bị có chuột; mobile giữ vuốt) */
.hero-nav{position:absolute;top:50%;transform:translateY(-50%);width:38px;height:38px;border:0;border-radius:50%;background:rgba(0,0,0,.35);color:#fff;font-size:22px;line-height:1;cursor:pointer;z-index:3;display:none;align-items:center;justify-content:center;padding:0;font-family:inherit}
.hero-nav:hover{background:rgba(0,0,0,.55)}
.hero-nav.prev{left:8px}.hero-nav.next{right:8px}
@media(hover:hover){
  .hero-gallery:hover .hero-nav{display:flex}
  .hero-nav:focus-visible{display:flex}
  .hero-img{cursor:grab}
  .hero-img:active{cursor:grabbing}
}
@media(hover:none){.hero-nav{display:none!important}}
.price-sale{font-size:20px;font-weight:500;color:var(--sp-red);line-height:20px}
.price-orig{color:#8e90a1;text-decoration:line-through;font-size:12px}
.price-badge{background:var(--sp-red);color:#fff;font-size:12px;font-weight:500;border-radius:2px;padding:2px 6px}
.count-strip{display:flex;align-items:center;gap:8px;background:#fef2f2;border:1px dashed var(--sp-red);border-radius:2px;padding:6px 10px}
/* Hàng coupon + cam kết dịch vụ kiểu AliExpress */
.coupon-row{display:flex;align-items:center;gap:8px;background:#fff7ed;border:1px dashed #e8a33d;border-radius:2px;padding:7px 10px;font-size:12px;color:var(--sp-text)}
.coupon-row b{font-weight:700}
.clamp2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.color-strip{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;-webkit-overflow-scrolling:touch}
#sheetVariants label{display:flex;gap:8px;align-items:center;border:1px solid var(--sp-line);border-radius:2px;padding:8px;cursor:pointer;font-size:14px}
#sheetVariants label.sel{border-color:var(--sp-red);background:#fef2f2}
.color-strip button{border:1px solid var(--sp-line);border-radius:2px;padding:0;flex-shrink:0;width:64px;background:#fff}
.color-strip button img{width:62px;height:62px;object-fit:cover;border-radius:2px 2px 0 0;display:block}
.color-strip button span{display:block;font-size:11px;padding:2px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--sp-text)}
.color-strip button.sel{border-color:var(--sp-red);background:#fef2f2}
/* Biến thể theo nhóm: option có ảnh = ô vuông, không ảnh = pill chữ */
.optgroup{margin-bottom:10px}
.optgroup-label{font-weight:500;font-size:13px;margin-bottom:6px}
.optgroup-label .req{color:var(--sp-red)}
.opt-opts{display:flex;gap:8px;flex-wrap:wrap;align-items:flex-start}
/* Dải biến thể trên trang: 1 hàng cuộn ngang, không kéo dài trang */
.opt-opts[data-ctx="optGroups"]{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;padding-bottom:4px;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
.opt-opts[data-ctx="optGroups"] .opt-btn{scroll-snap-align:start}
.opt-opts.missing{outline:2px solid var(--sp-red);outline-offset:4px;border-radius:4px}
.opt-btn{border:1px solid var(--sp-line);border-radius:2px;background:#fff;cursor:pointer;padding:0;flex-shrink:0;position:relative}
.opt-btn.has-img{width:53px}
.opt-btn.has-img img{width:51px;height:51px;object-fit:cover;border-radius:2px;display:block}
.opt-btn.no-img{padding:8px 14px;font-size:13px;min-height:40px}
.opt-btn .delta{display:block;font-size:10px;color:#8e90a1}
.opt-btn.sel{border-color:var(--sp-red);background:#fef2f2}
.opt-btn.sel::after{content:"✓";position:absolute;top:-1px;right:-1px;width:16px;height:16px;background:var(--sp-red);color:#fff;font-size:11px;line-height:16px;text-align:center;border-radius:0 2px 0 2px}
/* Bottom bar chốt đơn kiểu Shopee: gọn ~54px, 1 dòng */
.bottombar{position:fixed;bottom:0;left:0;right:0;z-index:50;background:#fff;border-top:1px solid var(--sp-line);box-shadow:0 -1px 6px rgba(0,0,0,.06)}
.bottombar>div{height:54px;padding:7px 10px;gap:8px}
.bottombar-cart{flex:0 0 33%;display:flex;align-items:center;justify-content:center;color:var(--sp-red);background:#fff;border:1px solid var(--sp-line);border-radius:8px}
.bottombar-buy{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;background:var(--sp-red);color:#fff;font-size:15px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;border-radius:8px}
.bottombar-buy:active{background:var(--sp-red-dark)}
.cart-badge{display:inline-block;background:var(--sp-red);color:#fff;font-size:10px;font-weight:700;min-width:16px;height:16px;line-height:16px;text-align:center;border-radius:99px;padding:0 4px;margin-left:2px}
.cart-badge[hidden]{display:none}
/* Biểu tượng giỏ hàng SVG (nét, hiện đại, xanh nước biển) */
.cart-ico{display:inline-block;vertical-align:-4px;flex:none;width:20px;height:20px}
.cart-float .cart-ico{width:21px;height:21px;vertical-align:middle}
.bottombar-cart .cart-ico{width:26px;height:26px}
.h2 .cart-ico{width:17px;height:17px;margin-right:1px;color:var(--sp-red)}
/* Thanh tiêu đề trang giỏ hàng/đặt hàng */
.topbar-back{width:36px;height:32px;flex:none;display:flex;align-items:center;justify-content:center;color:#fff;text-decoration:none;border:1.5px solid rgba(255,255,255,.75);border-radius:8px}
.topbar-back svg{width:18px;height:18px;display:block}
.topbar-back:active{background:rgba(255,255,255,.2)}
.topbar-title{font-size:15px;font-weight:600;letter-spacing:.3px}
.topbar-spacer{width:36px;flex:none}
/* Tổng kết giỏ hàng: từng hàng, tổng tiền ở hàng dưới cùng */
.sum-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:3px 0}
.sum-total{border-top:1px dashed rgba(0,0,0,.2);margin-top:5px;padding-top:8px;font-size:15px;font-weight:600}
.toast{position:fixed;left:50%;bottom:70px;transform:translateX(-50%) translateY(10px);background:rgba(0,0,0,.85);color:#fff;font-size:13px;padding:8px 16px;border-radius:99px;opacity:0;pointer-events:none;transition:opacity .25s,transform .25s;z-index:70;white-space:nowrap;max-width:92vw}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
/* Bottom-sheet chọn biến thể kiểu AliExpress */
.sheet-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);opacity:0;pointer-events:none;transition:opacity .25s ease;z-index:60}
.sheet-overlay.open{opacity:1;pointer-events:auto}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:61;background:#fff;border-radius:12px 12px 0 0;transform:translateY(105%);transition:transform .25s ease;max-height:84vh;overflow-y:auto;box-shadow:0 -4px 24px rgba(0,0,0,.15)}
.sheet.open{transform:translateY(0)}
.sheet-handle{width:40px;height:4px;border-radius:99px;background:#e0e0e0;margin:8px auto;touch-action:none;cursor:grab}
.sheet-close{position:absolute;top:10px;right:12px;border:1px solid var(--sp-line);border-radius:50%;width:28px;height:28px;font-size:13px;color:var(--sp-text2);background:#fff}
.sheet-body{padding:4px 12px calc(14px + env(safe-area-inset-bottom))}
/* Danh sách biến thể: khống chế cao 200px, cuộn chuột/cuộn cảm ứng */
#sheetGroups{max-height:200px;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;padding-right:2px}
.sheet-thumb{width:200px;height:200px;object-fit:cover;border-radius:4px;background:#f3f4f6;flex-shrink:0}
/* 2 nút trong sheet: đồng bộ style với bottombar trang sản phẩm */
.sheet-actions{display:flex;gap:8px;margin-top:12px;align-items:stretch}
.sheet-actions .cta{flex:1;margin-top:0;border-radius:8px;font-weight:700;letter-spacing:.5px;padding:10px 11px}
.sheet-cart{flex:0 0 36%;display:flex;align-items:center;justify-content:center;gap:4px;border:1px solid var(--sp-line);border-radius:8px;background:#fff;color:var(--sp-red);font-size:14px;font-weight:600;letter-spacing:.5px;text-transform:uppercase;text-decoration:none;padding:10px 11px;font-family:inherit}
.sheet-cart:active{background:#fef2f2}
.stepper{display:inline-flex;align-items:center;border:1px solid var(--sp-line);border-radius:2px;overflow:hidden}
.stepper button{width:34px;height:32px;font-size:18px;background:#f5f5f5;color:var(--sp-text)}
.stepper button:active{background:#e5e5e5}
.stepper button:disabled{opacity:.35}
.stepper span{min-width:42px;text-align:center;font-size:14px}
#reviews>div{border:1px solid var(--sp-line);border-radius:2px}
/* Ảnh trong đánh giá + lightbox */
.rv-photos{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.rv-photos img{width:64px;height:64px;object-fit:cover;border-radius:2px;border:1px solid var(--sp-line);cursor:zoom-in;display:block;background:#f3f4f6}
.rv-lb{position:fixed;inset:0;z-index:80;background:rgba(0,0,0,.88);display:flex;align-items:center;justify-content:center;cursor:zoom-out}
.rv-lb.hidden{display:none}
.rv-lb img{max-width:92vw;max-height:86vh;border-radius:4px;box-shadow:0 8px 40px rgba(0,0,0,.5)}
.rv-lb button{position:absolute;top:14px;right:18px;background:none;border:0;color:#fff;font-size:28px;cursor:pointer;line-height:1;padding:6px}
/* Badge giỏ nổi góc phải trên (trang sản phẩm) — thay thế nút giỏ khi header ẩn */
.cart-float{position:fixed;top:calc(10px + env(safe-area-inset-top));right:10px;z-index:65;display:flex;align-items:center;justify-content:center;width:40px;height:40px;background:#fff;border:1px solid var(--sp-line);border-radius:50%;box-shadow:0 1px 6px rgba(0,0,0,.12);color:var(--sp-red);opacity:0;transform:translateY(-6px);pointer-events:none;transition:opacity .22s ease,transform .22s ease}
html.hdr-hidden .cart-float{opacity:1;transform:none;pointer-events:auto}
.cart-float .cart-badge{position:absolute;top:-4px;right:-6px;margin:0}
@media (prefers-reduced-motion: reduce){
  .hdr{transition:none}
  .cart-float{transition:none}
}
/* Video hero kieu Shopee: nut play tren anh dau + loa khi phat */
.hidden-el{display:none!important}
.hero-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:2;pointer-events:none;background:#000}
.hero-play{position:absolute;left:50%;top:50%;margin:-32px 0 0 -32px;z-index:4;width:64px;height:64px;border-radius:50%;border:0;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;transition:background .15s,opacity .2s}
.hero-play:hover{background:rgba(0,0,0,.6)}
.hero-mute{position:absolute;left:10px;bottom:10px;z-index:4;width:34px;height:34px;border-radius:50%;border:0;background:rgba(0,0,0,.45);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
.hero-mute:hover{background:rgba(0,0,0,.6)}
.hero-mute .mute-slash{display:none}
.hero-mute.muted .mute-slash{display:block}

/* ---------- Header thuong hi?u (gi?ng trang ch?) ---------- */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.hdr{position:sticky;top:0;z-index:45;background:#fff;padding:9px 12px;border-bottom:1px solid #eee;transition:transform .22s ease}
.hdr.hdr--hidden{transform:translateY(-105%)}
.hdr__row{display:flex;align-items:center;gap:10px;max-width:768px;margin:0 auto}
.hdr__logo{flex:none;font-weight:800;font-size:18px;letter-spacing:-.3px;white-space:nowrap;color:#222;text-decoration:none}
.hdr__logo .elan{color:#ff6600}
.hdr .search{flex:1;display:flex;align-items:center;gap:8px;background:#f4f4f4;border-radius:20px;height:38px;padding:0 6px 0 14px;min-width:0}
.hdr .search input{flex:1;border:0;background:transparent;outline:none;font-size:14px;color:#222;min-width:0;font-family:inherit}
.hdr .search input::placeholder{color:#9a9a9a}
.hdr .search .go{flex:none;width:32px;height:32px;border-radius:50%;background:var(--sp-red);border:0;display:flex;align-items:center;justify-content:center;padding:0;cursor:pointer}
.hdr .search .go:active{background:var(--sp-red-dark)}
.hdr .search .go svg{width:18px;height:18px;stroke:#fff;fill:none;stroke-width:2.2}
.hdr .cart-btn{position:relative;flex:none;width:38px;height:38px;display:flex;align-items:center;justify-content:center;color:#222}
.hdr .cart-btn svg{width:24px;height:24px;stroke:#222;fill:none;stroke-width:1.8}
.hdr .cart-btn .badge{position:absolute;top:0;right:0;min-width:17px;height:17px;border-radius:9px;background:var(--sp-red);color:#fff;font-size:10.5px;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 4px}
.hdr .cart-btn .badge[hidden]{display:none}
