/* Điều chỉnh bố cục so với prototype (yêu cầu chủ dự án 09/2026).
   base.css giữ nguyên bản port 1:1; mọi thay đổi layout nằm ở đây.
   Chỉ dùng token có sẵn (thêm --lav 27/11/2026 theo yêu cầu chủ dự án) — không dark mode. */

/* ── nới rộng khung nội dung trên màn hình lớn (base.css chốt 1240px, hẹp
   so với màn hình rộng/2K+ hiện nay — lề trắng 2 bên quá nhiều). Chỉ tăng
   trần, màn hình dưới ~1640px không đổi gì (vẫn dùng hết chiều ngang). ── */
.wrap{max-width:1600px}

/* ── header + thanh danh mục dính khi cuộn ─────────────────── */
.stick{position:sticky;top:env(safe-area-inset-top,0px);z-index:40;background:var(--bg)}
.stick .hdr{position:static}
/* Khối dính cao ~134px (header 88 + cnav 46): đẩy các phần sticky khác và
   điểm neo xuống dưới nó. */
#top,#best,#catalog{scroll-margin-top:146px}
.gal,.shopcard{top:146px}

/* ── logo to hơn, tên danh mục đậm + to hơn (19/10/2026) ───── */
.brandmark img{width:60px;height:60px;border-radius:8px}
.brandmark b{font-size:20px}
/* Header: ảnh logo chữ (tên + slogan), giữ tỷ lệ theo chiều cao. */
.hdr .brandmark img{width:auto;height:60px;border-radius:0}
/* Nút giỏ hàng: giỏ xách đặc (FA) to hơn, huy hiệu = số loại hàng (19/10/2026). */
.hact .ib{width:46px;height:46px}
.ib svg.cart-ic{width:27px;height:24px;fill:currentColor;stroke:none}
.hact .badge{top:0;right:-5px;min-width:18px;height:18px;border-radius:9px;font-size:11px}
.cnav button{font-size:15px;font-weight:600}
/* ul cuộn ngang (overflow-x:auto) thì trình duyệt cũng cho cuộn dọc; nút có margin-bottom:-1px (gạch chân đè
   viền) làm nội dung cao hơn khung 1px → trên iPhone kéo dọc là chữ trôi lệch trong thanh (21/10/2026). */
.cnav ul{overflow-y:hidden;overscroll-behavior-x:contain}
.cnav button[aria-current="true"]{font-weight:700}
/* Nền tím lavender nhạt #E4DAFE (27/11/2026) cho thanh danh mục + dải cam kết cuối trang — chủ dự án chọn #C6B2FC trước,
   đổi sang nhạt (cách A) vì #C6B2FC làm thanh dính nặng nhất màn hình, lấn logo + nút xanh. Chữ trên nền tím dùng --ink (xám --mid
   chỉ ~3:1). Mục đang chọn: chữ xanh đậm + thanh gạch xanh 3px bo tròn, dài đúng bằng chữ, sát đáy thanh (::after) — đã thử
   chữ đen + gạch đen (mờ nhạt) và thẻ nền trắng (trông rẻ tiền). */
:root{--lav:#E4DAFE}
.cnav{background:var(--lav);border-bottom-color:transparent}
.cnav button{position:relative;color:var(--ink)}
.cnav button:hover,.cnav li.open > button{color:var(--brand)}
.cnav button[aria-current="true"]{color:var(--brand);border-color:transparent}
.cnav button[aria-current="true"]::after{content:"";position:absolute;left:13px;right:13px;bottom:1px;height:3px;
  border-radius:3px;background:var(--brand)}
@media (max-width:620px){
  .hdr .brandmark img{height:44px}
}

/* ── chữ đọc chính 15px (19/10/2026) — nhãn/nút/chip/giá giữ cỡ prototype.
   Trang chính sách (.doc-text, shop.css) đã 15px từ trước. ── */
body{font-size:15px}
.bens li,.spectab,.desc p,.desc li{font-size:15px}
.desc li::before{top:10px}   /* chấm đầu dòng theo dòng cao hơn (15 × 1.6) */
.nm{font-size:14px}

/* ── chân trang: logo, mạng xã hội, cột liên hệ (19/10/2026) ── */
.ft-social{display:flex;gap:10px;margin-top:16px}
.ft .ft-social li{margin:0}
.ft .ft-social a{display:grid;place-items:center;width:38px;height:38px;border:1px solid rgba(255,255,255,.22);border-radius:50%;opacity:.85}
.ft .ft-social a:hover{opacity:1;border-color:#fff}
.ft-social svg{width:17px;height:17px}
/* Cột branding chân trang canh giữa (13/11/2026): logo, câu giới thiệu, mạng xã hội cùng nằm giữa cột. */
.ft-brand{display:flex;flex-direction:column;align-items:center;text-align:center}
/* Câu giới thiệu dùng hết bề ngang cột (bỏ 36ch của base.css) + chia đều các dòng — bản tiếng Anh dài hơn,
   trước bị 3 dòng với một chữ lẻ ở cuối. */
.ft-brand .bl2{max-width:42ch;margin-inline:auto;text-wrap:balance}
.ft-brand .ft-social{justify-content:center}
/* Logo "Đã thông báo Bộ Công Thương" (26/11/2026) — ảnh gốc 230×86, nền trong suốt: dấu tick + chữ trắng là phần
   TRONG SUỐT, đặt trên nền đen của chân trang thì thành tick đen → lót nền trắng như logo gốc (26/11/2026). */
.ft-bct{display:block;margin-top:16px;line-height:0}
.ft-bct img{width:138px;height:auto;background:#fff;border-radius:4px}
.ft-txt{opacity:.8}
/* 4 cột trên máy tính (11/11/2026): cột "CHÍNH SÁCH" rộng theo tên trang dài nhất (tối đa 360px,
   dài hơn mới xuống dòng), cột logo thu từ 1.6fr về 1.2fr. ≤860px giữ 2 / 1 cột của base.css. */
@media (min-width:861px){.ft-in{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) fit-content(360px) minmax(0,1fr)}}
/* Cột blog chưa có bài: điện thoại xếp 1 cột thì ẩn hẳn, khỏi một khoảng trống lớn. */
@media (max-width:620px){.ft-blog:has(> ul:empty){display:none}}

/* ── câu cam kết (23/10/2026): thanh đen trên cùng canh giữa, chữ to + đậm, mỗi câu
   có dấu ✓ lime; dải cam kết cuối trang canh giữa trang (base.css là lưới 4 cột
   cố định — ít mục hơn thì dồn sang trái). ── */
.top .wrap{justify-content:center;padding-block:9px}
.top .tb{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 32px;font-size:14px;font-weight:600;letter-spacing:.01em}
.top .tb span{display:inline-flex;align-items:center;gap:7px}
.top .tb span::before{content:"✓";color:var(--lime);font-weight:800}
@media (max-width:620px){.top .tb{font-size:13px;gap:2px 18px}}
/* Thanh cam kết: .tb-track / .tb-set chỉ là lớp bọc — máy tính vẫn một hàng canh giữa như trên. */
.top .tb-track,.top .tb-set{display:contents}
.top .tb-set[aria-hidden]{display:none}
/* Điện thoại, từ 3 câu: một dòng chạy ngang liên tục, cùng cách làm với dải logo (.brands) — hai bản nối đuôi,
   trượt −50% rồi lặp; mờ hai mép; chạm giữ thì dừng; "giảm chuyển động" → đứng yên, vuốt ngang (24/10/2026). */
@media (max-width:720px){
  .top .tb-loop{display:block;overflow:hidden;width:100%;-webkit-mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent);mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent)}
  .top .tb-loop .tb-track{display:flex;width:max-content;animation:tb-run 22s linear infinite}
  .top .tb-loop:active .tb-track{animation-play-state:paused}
  .top .tb-loop .tb-set,.top .tb-loop .tb-set[aria-hidden]{display:flex;flex:none;gap:28px;padding-right:28px;white-space:nowrap}
}
@keyframes tb-run{to{transform:translateX(-50%)}}
@media (max-width:720px) and (prefers-reduced-motion:reduce){
  .top .tb-loop{overflow-x:auto;scrollbar-width:none;-webkit-mask-image:none;mask-image:none}
  .top .tb-loop .tb-track{animation:none}
  .top .tb-loop .tb-set[aria-hidden]{display:none}
}
.trust{background:var(--lav);border-top-color:transparent}
.trust .ti span{color:var(--ink)}
.trust .wrap{display:flex;flex-wrap:wrap;justify-content:center;gap:22px 48px}
.trust .ti{flex:0 1 250px}
@media (max-width:860px){.trust .wrap{gap:20px 24px}.trust .ti{flex-basis:calc(50% - 12px)}}

/* ── trang danh mục: bỏ cột trái, lưới full chiều ngang ────── */
.grid.g6{grid-template-columns:repeat(6,minmax(0,1fr))}
.fbar{display:flex;align-items:center;gap:6px;margin-bottom:12px;flex-wrap:wrap}
.fbar::-webkit-scrollbar{display:none}
.fbar .lbl{font-size:12.5px;color:var(--mid);margin-right:2px;white-space:nowrap}
.fbar .sep{width:1px;height:18px;background:var(--line-2);margin-inline:6px;flex:none}
.chip{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;font-size:12.5px;padding:5px 10px;border:1px solid var(--line-2);border-radius:14px;color:var(--mid);background:var(--bg)}
.chip:hover{color:var(--ink);border-color:var(--ink)}
.chip span{font-size:11px;color:var(--mute);font-variant-numeric:tabular-nums}
.chip.on{background:var(--brand-tint);border-color:var(--brand);color:var(--brand);font-weight:600}
.chip.on span{color:inherit}
.fbar .clr{width:auto;padding:5px 8px;white-space:nowrap}

@media (max-width:1080px){
  .grid.g6{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media (max-width:860px){
  .grid.g6{grid-template-columns:repeat(3,minmax(0,1fr))}
  /* Màn hẹp: một hàng chip cuộn ngang thay vì xuống 3–4 dòng. */
  .fbar{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
}
@media (max-width:620px){
  .grid.g6{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* ── PDP: dải ảnh cuộn ngang có mũi tên, video, bộ chọn phân loại ── */
/* base.css ≤860px đặt .pdp-top{grid-template-columns:1fr}: 1fr = minmax(auto,1fr) nên cột không hẹp hơn
   nội dung — dải nhiều ảnh nhỏ kéo cả cột rộng quá màn hình, giá + nút mua bị cắt bên phải (21/10/2026). */
@media (max-width:1080px){
  .pdp-low{grid-template-columns:minmax(0,1fr)}
  .pdp-low > *{min-width:0}
}
@media (max-width:860px){
  .pdp-top{grid-template-columns:minmax(0,1fr)}
  .pdp-top > *{min-width:0}
}
/* Điện thoại: mô tả dài thu gọn + "Xem thêm" giống Shopee (pdp.js thêm .clamp, CLAUDE.md §9). */
.desc-more{display:none}
@media (max-width:720px){
  #pDesc{scroll-margin-top:190px}
  .desc.clamp{max-height:300px;overflow:hidden;position:relative}
  .desc.clamp::after{content:"";position:absolute;left:0;right:0;bottom:0;height:90px;background:linear-gradient(rgba(255,255,255,0),var(--bg));pointer-events:none}
  .desc-more:not([hidden]){display:block;width:calc(100% - 36px);margin:0 18px 16px;height:42px;border:1px solid var(--line-2);border-radius:6px;font-size:14px;font-weight:600;color:var(--ink);background:var(--bg)}
}
/* Khối cam kết cạnh nút mua (CLAUDE.md §9, 22/10/2026): mức freeship tô kiểu bút dạ lime;
   màn >720px xếp ngang — icon, tiêu đề, mô tả chồng dọc trong mỗi cột; điện thoại giữ xếp dọc như base.css. */
.assure .hl{background:linear-gradient(transparent 45%,var(--lime) 45%);color:var(--ink);font-weight:700;padding:0 2px}
.assure b i{font-style:normal}
@media (min-width:721px){
  .assure{display:flex;flex-wrap:wrap;gap:16px}
  .assure > div{flex:1 1 0;min-width:130px;flex-direction:column;gap:6px;line-height:1.45}
  .assure svg{width:20px;height:20px;margin-top:0}
  .assure b{display:block}
  .assure b i{display:none}
}
.strip-wrap{position:relative;margin-top:10px}
.gal .strip-wrap .strip{margin-top:0;overflow-x:auto;scrollbar-width:none;scroll-snap-type:x proximity}
.gal .strip::-webkit-scrollbar{display:none}
.gal .strip > button{flex:none;width:62px;height:62px;border:1px solid var(--line);border-radius:4px;background:var(--wash);padding:4px;position:relative;scroll-snap-align:start}
.gal .strip > button.on{border-color:var(--brand);border-width:2px;padding:3px}
.gal .strip > button.vid::after{content:"";position:absolute;inset:0;margin:auto;width:22px;height:22px;border-radius:50%;
  background:rgba(25,27,38,.72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 7v10l8-5z'/%3E%3C/svg%3E") center/14px no-repeat}
.sarr{position:absolute;top:50%;transform:translateY(-50%);z-index:1;width:22px;height:40px;background:rgba(255,255,255,.92);border:1px solid var(--line-2);border-radius:3px;color:var(--mid);font-size:16px;line-height:1}
.sarr[data-dir="-1"]{left:-4px}
.sarr[data-dir="1"]{right:-4px}
.sarr:hover{color:var(--ink)}
.gal .big{position:relative}
.gal .big video{width:100%;height:100%;object-fit:contain;background:#000;border-radius:4px}

.picker{margin-top:16px;display:grid;gap:14px;padding:14px 16px;background:var(--wash);border-radius:8px}
.optrow{display:grid;grid-template-columns:96px minmax(0,1fr);gap:10px;align-items:start}
.optlbl{font-size:13.5px;font-weight:700;color:var(--ink);padding-top:8px}
.opts{display:flex;flex-wrap:wrap;gap:8px}
.opt{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:6px 14px;border:1.5px solid var(--line-2);border-radius:4px;background:var(--bg);font-size:13.5px;font-weight:500;color:var(--ink)}
.opt img{width:24px;height:24px;object-fit:contain}
.opt:hover{border-color:var(--brand);color:var(--brand)}
.opt[aria-pressed="true"]{border-color:var(--brand);background:var(--brand-tint);color:var(--brand);font-weight:700;box-shadow:0 0 0 1px var(--brand) inset}
/* .dim chứ không phải .off — base.css đã dùng .off cho nhãn giảm giá trên thẻ. */
.opt.dim{color:var(--mute);border-style:dashed}
.opt.dim:not([aria-pressed="true"]) img{opacity:.45}
.pick-err{color:var(--warn);font-size:12.5px}
.stockn{font-size:12.5px;color:var(--mute)}
.vsel-wrap{flex-basis:100%;display:grid;gap:5px;font-size:12.5px;color:var(--mid)}
.vsel{height:40px;border:1px solid var(--line-2);border-radius:4px;padding:0 10px;font:inherit;color:var(--ink);background:var(--bg)}
.buyrow .btn:disabled{opacity:.5;cursor:default}
@media (max-width:620px){
  .optrow{grid-template-columns:1fr;gap:6px}
  .optlbl{padding-top:0}
}

/* ── thẻ sản phẩm nhiều giá: "từ 95.000₫" ── */
.pz .from{font-size:11.5px;color:var(--mute)}

/* ── nhãn sản phẩm cấu hình được (ProductTag.style, 10/2026) ──
   base.css chỉ có .t (viền xám) và .t.o (viền xanh, trước dùng riêng cho
   "Hữu cơ"). Thêm 2 kiểu để nhân viên chọn khi tạo nhãn mới ở /quan-tri/. */
.t.brand{color:var(--ok);border-color:currentColor}
.t.lime{background:var(--lime);border-color:transparent;color:#1E2600}

/* ── thanh danh mục: danh sách nhóm con xếp dọc ngay dưới nhóm cha (10/2026) ──
   Nằm ngoài <ul> cuộn ngang, đặt theo .cnav; shop.js gán left theo nút cha và
   bật/tắt thuộc tính hidden. */
.cnav{position:relative}
.cnav li.has-sub > button{display:inline-flex;align-items:center;gap:3px}
.cnav li.has-sub > button svg{width:13px;height:13px;stroke-width:2;transition:transform .15s}
.cnav li.open > button svg{transform:rotate(180deg)}
.cnsub{position:absolute;top:100%;left:0;min-width:240px;max-width:min(340px,calc(100vw - 16px));
  display:flex;flex-direction:column;padding:6px 0;background:var(--bg);border:1px solid var(--line);
  border-radius:0 0 8px 8px;box-shadow:0 14px 28px rgba(25,27,38,.10)}
.cnsub[hidden]{display:none}
.cnsub a{display:block;font-size:15px;color:var(--ink);padding:9px 18px;line-height:1.35}  /* 13 → 15px (19/10/2026) */
.cnsub a:hover,.cnsub a:focus-visible{background:var(--wash);color:var(--brand)}
.cnsub a[aria-current="true"]{color:var(--brand);font-weight:600}
.cnsub-g{padding-left:34px !important;color:var(--mid) !important;font-size:14px !important}
.cnsub-g[aria-current="true"]{color:var(--brand) !important}
@media (max-width:640px){
  .cnsub{max-height:65vh;overflow-y:auto}
  .cnsub a{padding:11px 18px}
}

/* ── "Giá thị trường" (compare_price) thay cho % giảm (10/2026) ──
   Giá ngoài sàn, gạch ngang, đặt ngay dưới giá bán để khách thấy chênh lệch. */
.mkt{font-size:12px;color:var(--mute);font-variant-numeric:tabular-nums}
.mkt s{color:var(--mid)}
.card .mkt{min-height:1.5em;margin-top:1px}
.pricebox .mkt{font-size:13.5px;color:var(--mid);margin-top:4px}
.pricebox .mkt s{font-size:15px;color:var(--mid)}

/* ── nhãn tình trạng kho (10/2026): còn hàng = xanh thương hiệu, hết hàng =
   đỏ (--warn, vai trò cảnh báo của bảng màu) ── */
.stk{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;line-height:1.4;padding:3px 10px;border-radius:12px}
.stk::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.stk.ok{color:var(--brand);background:var(--brand-tint)}
.stk.no{color:var(--warn);background:color-mix(in srgb,var(--warn) 11%,#fff)}

/* ── khuyến mãi trên website (original_price, 10/2026): giá gốc gạch cạnh giá
   bán trên thẻ; nhãn "−X%" dùng lại .off của base.css ── */
.pz .orig{font-size:12px;color:var(--mute);font-weight:400}
/* Nhãn "−X%" trên thẻ: chữ 18px, đỏ (--warn) trên nền đỏ nhạt như tag "Hết hàng" (10/2026). */
.shot .off{font-size:18px;line-height:1.15;color:var(--warn);background:color-mix(in srgb,var(--warn) 11%,#fff);padding:4px 8px}

/* ── Dải logo thương hiệu trượt vòng lặp dưới lưới sản phẩm (storefront.BrandLogo,
   templates/storefront/_brand_strip.html, 10/2026). Hai bản danh sách nối nhau,
   trượt −50% → liền mạch. Không JS. ── */
.brands{padding:0 0 20px}
.brands-vp{overflow:hidden;-webkit-mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent);mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent)}
.brands-track{display:flex;width:max-content;animation:brands-run var(--dur,40s) linear infinite}
.brands-vp:hover .brands-track,.brands-vp:focus-within .brands-track{animation-play-state:paused}
.brands-set{display:flex;align-items:center;margin:0;padding:0;list-style:none}
.brands-set li{flex:none}
/* Ô ôm sát logo (không khung cố định) — logo rộng/hẹp khác nhau vẫn cách đều 80px.
   Logo đã được cắt viền trống lúc tải lên (storefront/brand_ops.py) nên phủ kín khung tối đa:
   khung tối đa 100×40px (điện thoại 76×30), cách nhau 80px (chốt 10/2026). */
.brands-set a{display:flex;align-items:center;padding:4px 40px}
.brands-set img{display:block;width:auto;height:auto;max-width:100px;max-height:40px}
@keyframes brands-run{to{transform:translateX(-50%)}}
@media (max-width:640px){
  .brands-set a{padding:4px 26px}
  .brands-set img{max-width:76px;max-height:30px}
}
@media (prefers-reduced-motion:reduce){
  .brands-vp{overflow-x:auto;-webkit-mask-image:none;mask-image:none}
  .brands-track{animation:none}
  .brands-set[aria-hidden],.brands-set .rep{display:none}
}

/* Giấy công bố sản phẩm (11/2026, tham khảo Pharmacity): link dưới hàng "Còn hàng | đã bán" ở trang
   sản phẩm, mở <dialog> xem ảnh / mở PDF. Điện thoại: hộp thoại gần như toàn màn hình. */
.cert-link{display:inline-flex;align-items:center;gap:7px;margin-top:12px;font-size:14px;font-weight:600;color:var(--brand)}
.cert-link:hover{text-decoration:underline}
.cert-link svg{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.cert-dlg{width:min(860px,calc(100vw - 32px));max-height:calc(100dvh - 48px);padding:0;border:0;border-radius:10px;background:var(--bg);color:var(--ink);box-shadow:0 20px 60px rgba(25,27,38,.3)}
.cert-dlg::backdrop{background:rgba(25,27,38,.55)}
.cert-box{display:flex;flex-direction:column;max-height:calc(100dvh - 48px)}
.cert-hd{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border-bottom:1px solid var(--line)}
.cert-hd h2{font:700 17px/1.3 var(--f-h)}
.cert-x{width:34px;height:34px;border-radius:50%;font-size:16px;color:var(--mid);display:grid;place-items:center}
.cert-x:hover{background:var(--wash);color:var(--ink)}
.cert-body{overflow-y:auto;padding:16px 18px 20px;display:grid;gap:14px;background:var(--wash)}
.cert-body img{display:block;width:100%;height:auto;border-radius:4px;background:var(--bg);box-shadow:0 1px 3px rgba(25,27,38,.12)}
.cert-pdf{display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:8px;background:var(--bg);border:1px solid var(--line);font-size:14px;color:var(--ink)}
.cert-pdf:hover{border-color:var(--brand);color:var(--brand)}
.cert-pdf b{font:700 13px/1 var(--f-h);color:var(--warn);border:1.5px solid currentColor;border-radius:4px;padding:5px 6px;flex:none}
.cert-pdf span{flex:1;min-width:0;overflow-wrap:anywhere}
.cert-pdf i{font-style:normal;color:var(--mid)}
@media (max-width:620px){
  .cert-dlg{width:100vw;max-width:100vw;max-height:100dvh;height:100dvh;border-radius:0;margin:0}
  .cert-box{max-height:100dvh;height:100%}
  .cert-body{padding:12px}
}
