/* ==========================================================================
   Blibli clone · 设计系统
   取色与版式参照 www.blibli.com 桌面/移动双端截图（2026-11）
   ========================================================================== */

:root {
  --blue: #0072ff;
  --blue-dark: #0059d6;
  --blue-darker: #0047ad;
  --blue-soft: #e8f1ff;
  --blue-softer: #f3f8ff;
  --ink: #212121;
  --ink-2: #424242;
  --muted: #757575;
  --muted-2: #9e9e9e;
  --line: #e6e6e6;
  --line-2: #f0f0f0;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --bg-soft-2: #fafbfc;
  --red: #e4002b;
  --red-soft: #ffe9ec;
  --orange: #ff6f00;
  --yellow: #ffcd00;
  --green: #00a05a;
  --green-soft: #e7f8ef;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .06), 0 2px 8px rgba(0, 0, 0, .04);
  --shadow-2: 0 4px 16px rgba(0, 0, 0, .1);
  --shadow-pop: 0 8px 28px rgba(0, 0, 0, .16);
  --header-h: 104px;
  --font: Roboto, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; }
p { margin: 0; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

.wrap { width: min(100% - 32px, 1400px); margin: 0 auto; }
.wrap-narrow { width: min(100% - 32px, 1120px); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- top strip */
.topbar { background: #fff; border-bottom: 1px solid var(--line-2); font-size: 11px; color: var(--muted); }
.topbar .wrap { display: flex; justify-content: flex-end; gap: 18px; height: 32px; align-items: center; }
.topbar a { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.topbar a:hover { color: var(--blue); }
.topbar .sep { width: 1px; height: 12px; background: var(--line); }

/* ------------------------------------------------------------------- header */
.header { background: #fff; position: sticky; top: 0; z-index: 900; }
.header-main { display: flex; align-items: center; gap: 18px; height: 72px; }
.logo { display: flex; align-items: center; gap: 8px; flex: none; }
.logo img { height: 34px; width: auto; }
.logo-fallback { font-size: 26px; font-weight: 800; letter-spacing: -.5px; color: var(--blue); }

.search { flex: 1; position: relative; max-width: 720px; }
.search form { display: flex; align-items: center; height: 42px; background: #fff; border: 1px solid #d9d9d9; border-radius: 24px; padding: 0 4px 0 16px; transition: border-color .15s, box-shadow .15s; }
.search form:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 114, 255, .12); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 14px; min-width: 0; }
.search input::placeholder { color: var(--muted-2); }
.search .go { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; flex: none; }
.search .go:hover { background: var(--blue-dark); }
.search-sug { position: absolute; top: 48px; left: 0; right: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-pop); padding: 8px 0; z-index: 950; max-height: 420px; overflow: auto; }
.search-sug .h { font-size: 11px; color: var(--muted); padding: 8px 16px 4px; text-transform: uppercase; letter-spacing: .04em; }
.search-sug a { display: flex; gap: 10px; align-items: center; padding: 8px 16px; font-size: 13px; }
.search-sug a:hover { background: var(--blue-softer); }
.search-sug img { width: 34px; height: 34px; object-fit: contain; border-radius: 6px; background: var(--bg-soft); }
.search-sug .p { margin-left: auto; font-weight: 700; color: var(--blue); }

.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink-2); }
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }
.icon-btn.cart { background: var(--blue); color: #fff; }
.icon-btn.cart:hover { background: var(--blue-dark); }
.cart-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }

.btn-auth { height: 34px; padding: 0 18px; border-radius: 17px; border: 1px solid var(--blue); background: #fff; color: var(--blue); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; }
.btn-auth.solid { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-auth:hover { filter: brightness(.96); }
.header-user { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink); padding: 6px 10px; border-radius: 18px; }
.header-user:hover { background: var(--bg-soft); }
.header-user .av { width: 26px; height: 26px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-weight: 700; font-size: 12px; }

.header-nav { display: flex; align-items: center; gap: 22px; height: 40px; border-bottom: 1px solid var(--line-2); }
.nav-cat { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--ink); height: 100%; }
.nav-cat:hover { color: var(--blue); }
.header-nav .links { display: flex; align-items: center; gap: 18px; font-size: 12px; color: var(--muted); }
.header-nav .links a:hover { color: var(--blue); }
.header-nav .right { margin-left: auto; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.header-nav .right a { display: inline-flex; align-items: center; gap: 6px; }

/* mega menu */
.mega { position: absolute; left: 0; right: 0; top: 100%; background: #fff; box-shadow: var(--shadow-pop); border-top: 1px solid var(--line-2); z-index: 940; display: none; }
.mega.open { display: block; }
.mega-inner { display: grid; grid-template-columns: 240px 1fr; gap: 0; min-height: 420px; max-height: min(70vh, 620px); }
.mega-roots { border-right: 1px solid var(--line-2); overflow: auto; padding: 10px 0; background: var(--bg-soft-2); }
.mega-roots a { display: flex; align-items: center; gap: 9px; padding: 10px 18px; font-size: 13px; color: var(--ink-2); }
.mega-roots a:hover, .mega-roots a.on { background: #fff; color: var(--blue); font-weight: 700; }
.mega-panels { overflow: auto; padding: 18px 26px; }
.mega-panel { display: none; }
.mega-panel.on { display: block; }
.mega-panel h4 { font-size: 13px; color: var(--ink); margin: 0 0 10px; }
.mega-cols { columns: 3; column-gap: 26px; }
.mega-cols a { display: block; font-size: 12px; color: var(--muted); padding: 4px 0; break-inside: avoid; }
.mega-cols a:hover { color: var(--blue); }

.cat-tiles { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.cat-tiles .pcard { align-items: center; text-align: center; gap: 8px; }
.cat-tiles .pcard .name { min-height: 0; font-size: 12px; font-weight: 600; }
.cat-tiles .pcard .thumb { width: 100%; }

/* --------------------------------------------------------------- home hero */
.section { padding: 20px 0; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: 18px; }
.section-head .more { margin-left: auto; font-size: 12px; color: var(--blue); font-weight: 600; }

.hero { padding: 14px 0 6px; }
.hero-carousel { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-soft); }
.hero-track { display: flex; transition: transform .45s cubic-bezier(.2, .7, .3, 1); }
.hero-slide { min-width: 100%; aspect-ratio: 2000 / 500; background: var(--bg-soft); }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-nav { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; pointer-events: none; }
.hero-nav button { pointer-events: auto; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); box-shadow: var(--shadow-1); display: grid; place-items: center; }
.hero-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.hero-dots button { width: 7px; height: 7px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .55); padding: 0; }
.hero-dots button.on { background: #fff; width: 20px; border-radius: 4px; }

.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 14px 0 2px; }
.trust div { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
.trust svg { color: var(--blue); flex: none; }

.quick { display: flex; gap: 10px; overflow: auto; padding: 14px 0 4px; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.quick a { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 92px; font-size: 11px; color: var(--ink-2); text-align: center; }
.quick a .tile { width: 52px; height: 52px; border-radius: 14px; background: var(--bg-soft); display: grid; place-items: center; font-size: 22px; }
.quick a:hover .tile { background: var(--blue-soft); }
.quick a .tile-img { width: 34px; height: 34px; object-fit: contain; }

/* 三连促销 banner */
.promo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.promo-banner { position: relative; display: block; border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-soft); }
.promo-banner img { width: 100%; aspect-ratio: 640 / 240; object-fit: contain; background: #fff; }
.promo-banner .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 16px 12px; color: #fff; background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .55)); }
.promo-banner .cap b { display: block; font-size: 15px; }
.promo-banner .cap span { font-size: 12px; opacity: .92; }

/* Member baru? Ini promo mu! */
.member-panel { background: linear-gradient(180deg, #e8f2ff 0%, #eef6ff 55%, #f5faff 100%); border-radius: 14px; padding: 16px 18px 18px; }
.member-panel .head { display: flex; align-items: center; margin-bottom: 12px; }
.member-panel .head h2 { font-size: 17px; }
.member-panel .head .more { margin-left: auto; font-size: 13px; color: var(--blue); font-weight: 600; }
.member-panel .body { display: grid; grid-template-columns: 190px 1fr; gap: 16px; align-items: center; }
.member-panel .gift { text-align: left; }
.member-panel .gift .ico { font-size: 20px; }
.member-panel .gift .cb { font-size: 19px; line-height: 1.25; color: var(--ink); margin-top: 4px; }
.member-panel .gift .cb b { font-size: 22px; font-weight: 800; }
.member-panel .gift .code { font-size: 11.5px; color: var(--muted); margin: 6px 0 10px; }
.member-panel .gift .btn { width: 100%; }
.member-panel .row { display: flex; gap: 10px; overflow: auto; padding-bottom: 4px; }
.member-panel .row::-webkit-scrollbar { display: none; }
.mcard { flex: none; width: 138px; background: #fff; border-radius: 10px; padding: 8px; display: block; }
.mcard .th { position: relative; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: 8px; }
.mcard .th img { width: 100%; height: 100%; object-fit: contain; }
.mcard .pr { font-size: 13px; font-weight: 800; margin-top: 6px; }
.mcard .st { font-size: 11px; color: var(--muted-2); text-decoration: line-through; }

/* flash sale */
.flash { background: linear-gradient(90deg, #0057ff 0%, #0a3fd8 55%, #0033cc 100%); border-radius: var(--radius-lg); padding: 0; overflow: hidden; }
.flash-head { display: flex; align-items: center; gap: 14px; padding: 12px 16px; color: #fff; }
.flash-head .t { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.flash-head .t .bolt { color: var(--yellow); }
.flash-timer { display: flex; align-items: center; gap: 3px; font-size: 13px; font-variant-numeric: tabular-nums; }
.flash-timer .clock { margin-right: 4px; font-size: 12px; opacity: .9; }
.flash-timer b { font-variant-numeric: tabular-nums; }
.flash-head .note { font-size: 12px; display: inline-flex; align-items: center; gap: 6px; opacity: .95; }
.flash-head .note::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); display: inline-block; }
.flash-head .more { margin-left: auto; font-size: 13px; color: #fff; font-weight: 600; }
.flash-body { position: relative; background: #fff; display: flex; gap: 0; overflow: auto; scroll-behavior: smooth; }
.flash-body::-webkit-scrollbar { display: none; }
.flash-item { flex: none; width: 148px; padding: 10px; border-right: 1px solid var(--line-2); }
.flash-item:hover { background: var(--bg-soft); }
.flash-item .th { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.flash-item .th img { width: 100%; height: 100%; object-fit: contain; }
.flash-item .pr { font-size: 13px; font-weight: 800; margin-top: 6px; }
.flash-item .st { font-size: 11px; color: var(--muted); margin-top: 2px; }
.flash-item .st .hot { color: var(--red); font-weight: 700; }
.row-arrow { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: 0; background: #fff; box-shadow: var(--shadow-1); font-size: 18px; line-height: 1; color: var(--ink-2); }
.progress { height: 4px; border-radius: 3px; background: #ffe0e5; overflow: hidden; margin-top: 6px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #ff8a3d, #ff5a1f); border-radius: 3px; }

/* Lagi disuka di Blibli */
.discuss-row { display: flex; gap: 12px; overflow: auto; padding-bottom: 4px; }
.discuss-row::-webkit-scrollbar { display: none; }
.dcard { flex: none; width: 168px; display: block; }
.dcard .th { aspect-ratio: 1; background: var(--bg-soft); border-radius: 12px; display: grid; place-items: center; overflow: hidden; }
.dcard .th img { width: 100%; height: 100%; object-fit: contain; }
.dcard .lbl { font-size: 11.5px; color: var(--muted); margin-top: 6px; text-align: center; }

/* Special deals 行：1 个 promo 方块 + 5 张商品卡 */
.deals-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.promo-tile { background: linear-gradient(180deg, #fff7db 0%, #fdeec2 100%); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; }
.promo-tile .pt-head .lbl { display: block; font-size: 12px; color: #7a5200; }
.promo-tile .pt-head b { font-size: 19px; line-height: 1.2; color: #4a3200; }
.promo-tile .pt-img { margin-top: 10px; border-radius: 10px; overflow: hidden; background: #fff; }
.promo-tile .pt-img img { width: 100%; aspect-ratio: 1; object-fit: contain; }

/* seller favorit */
.seller-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.scard { background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 10px 12px; text-align: center; }
.scard .thumb { aspect-ratio: 1; background: var(--bg-soft); border-radius: 10px; display: grid; place-items: center; overflow: hidden; }
.scard .thumb img { width: 100%; height: 100%; object-fit: contain; }
.scard .brand { width: 46px; height: 46px; margin: -23px auto 8px; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 800; color: var(--blue); position: relative; }
.scard .lbl { font-size: 11.5px; color: var(--muted); }

/* galeri promo */
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gallery-grid a { border-radius: 12px; overflow: hidden; background: var(--bg-soft); display: block; }
.gallery-grid img { width: 100%; aspect-ratio: 640 / 260; object-fit: cover; }

/* keyword chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-key { border: 1px solid var(--line); background: #fff; border-radius: 18px; padding: 7px 14px; font-size: 12.5px; color: var(--ink-2); }
.chip-key:hover { border-color: var(--blue); color: var(--blue); }

/* product card */
.grid-products { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.grid-products.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-products.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-products.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.pcard { border: 1px solid var(--line-2); border-radius: var(--radius); background: #fff; padding: 10px; display: flex; flex-direction: column; gap: 6px; transition: box-shadow .15s, border-color .15s, transform .15s; position: relative; }
.pcard:hover { box-shadow: var(--shadow-2); border-color: #e0e8f5; transform: translateY(-1px); }
.pcard .thumb { aspect-ratio: 1; background: #fff; border-radius: 6px; overflow: hidden; display: grid; place-items: center; position: relative; }
.pcard .thumb img { width: 100%; height: 100%; object-fit: contain; }
.pcard .pdisc { position: absolute; top: 6px; left: 6px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; border-radius: 4px; padding: 1px 5px; }
.pcard .name { font-size: 12.5px; line-height: 1.35; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 34px; }
.pcard .price { font-size: 15px; font-weight: 800; color: var(--ink); display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.pcard .price s { font-size: 11px; color: var(--muted-2); font-weight: 400; }
.pcard .disc { display: inline-block; font-size: 10px; font-weight: 800; color: var(--red); background: var(--red-soft); border-radius: 4px; padding: 1px 5px; }
.pcard .meta { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.pcard .rate { color: #f5a623; font-weight: 700; }
.pcard .sold { color: var(--muted-2); }
.pcard .loc { font-size: 11px; color: var(--muted-2); }
.pcard .badges { display: flex; gap: 4px; flex-wrap: wrap; }
.badge { font-size: 10px; padding: 1px 5px; border-radius: 3px; background: var(--bg-soft); color: var(--muted); font-weight: 600; }
.badge.ori { background: var(--blue-soft); color: var(--blue); }
.badge.free { background: var(--green-soft); color: var(--green); }

/* ---------------------------------------------------------------- category */
.cat-hero { border-radius: var(--radius-lg); overflow: hidden; margin: 14px 0; background: var(--bg-soft); }
.cat-hero img { width: 100%; max-height: 220px; object-fit: cover; }
.cat-icons { display: flex; gap: 6px; overflow: auto; padding: 10px 0 4px; }
.cat-icons::-webkit-scrollbar { display: none; }
.cat-icons a { flex: none; width: 96px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-2); text-align: center; padding: 8px 6px; border-radius: 10px; }
.cat-icons a:hover { background: var(--bg-soft); }
.cat-icons .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--bg-soft); display: grid; place-items: center; font-size: 20px; }

.listing { display: grid; grid-template-columns: 236px 1fr; gap: 18px; align-items: start; padding: 16px 0 40px; }
.filters { position: sticky; top: calc(var(--header-h) + 8px); }
.filter-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; background: #fff; }
.filter-box h4 { font-size: 13px; margin-bottom: 10px; }
.filter-box .opts { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow: auto; }
.filter-box label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.filter-box input[type=checkbox] { accent-color: var(--blue); }
.filter-box .num { margin-left: auto; color: var(--muted-2); font-size: 11px; }
.price-range { display: flex; gap: 8px; align-items: center; }
.price-range input { width: 100%; height: 32px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; font-size: 12px; }

.listing-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.listing-head h1 { font-size: 18px; }
.listing-head .cnt { color: var(--muted); font-size: 12px; }
.sorts { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.sort-btn { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line); background: #fff; font-size: 12px; color: var(--ink-2); }
.sort-btn.on { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); font-weight: 700; }

.pager { display: flex; justify-content: center; gap: 6px; margin: 24px 0 0; }
.pager button { min-width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 13px; color: var(--ink-2); }
.pager button.on { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }

/* -------------------------------------------------------------------- PDP */
.crumb { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); padding: 14px 0; flex-wrap: wrap; }
.crumb a:hover { color: var(--blue); }
.crumb .sep { color: var(--muted-2); }

.pdp { display: grid; grid-template-columns: 420px 1fr 300px; gap: 24px; align-items: start; padding-bottom: 20px; }
.gallery .main { border: 1px solid var(--line-2); border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 1; display: grid; place-items: center; background: #fff; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; overflow: auto; }
.gallery .thumbs button { flex: none; width: 62px; height: 62px; border: 2px solid transparent; border-radius: 8px; padding: 0; overflow: hidden; background: #fff; }
.gallery .thumbs button.on { border-color: var(--blue); }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: contain; }
.share { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 12px; }
.share a { width: 26px; height: 26px; border-radius: 50%; background: var(--bg-soft); display: grid; place-items: center; }

.pdp-title { font-size: 22px; font-weight: 700; line-height: 1.3; margin: 4px 0 8px; }
.pdp-price { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.pdp-price .cur { font-size: 20px; margin-right: 2px; }
.pdp-sub { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 4px; flex-wrap: wrap; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 12px; color: var(--ink-2); background: #fff; }
.chip.hot { border-color: #ffe0b2; background: #fff8e1; color: #b26a00; }
.chip.blue { border-color: #cfe2ff; background: var(--blue-softer); color: var(--blue); }

.highlight { background: var(--bg-soft); border-radius: 10px; padding: 12px 14px; margin: 14px 0; }
.highlight h5 { font-size: 12px; color: var(--ink-2); margin-bottom: 8px; }
.highlight li { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 8px; padding: 3px 0; }
.highlight li svg { color: var(--blue); flex: none; margin-top: 2px; }

.opt-block { margin: 14px 0; }
.opt-block h5 { font-size: 13px; margin-bottom: 8px; }
.opt-list { display: flex; gap: 8px; flex-wrap: wrap; }
.opt { min-width: 64px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 12.5px; color: var(--ink-2); }
.opt.on { border-color: var(--blue); background: var(--blue-softer); color: var(--blue); font-weight: 700; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; height: 36px; }
.qty button { width: 36px; height: 36px; border: 0; background: #fff; font-size: 16px; color: var(--ink-2); }
.qty button:hover { background: var(--bg-soft); }
.qty input { width: 46px; height: 36px; border: 0; text-align: center; font-size: 13px; outline: 0; }

.pdp-actions { display: flex; gap: 10px; margin-top: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 8px; border: 1px solid transparent; font-size: 14px; font-weight: 700; background: var(--blue); color: #fff; }
.btn:hover { background: var(--blue-dark); }
.btn.ghost { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn.ghost:hover { background: var(--blue-softer); }
.btn.soft { background: var(--bg-soft); color: var(--ink-2); border-color: transparent; }
.btn.block { width: 100%; }
.btn.sm { height: 34px; padding: 0 14px; font-size: 12.5px; border-radius: 6px; }
.btn[aria-busy=true] { opacity: .9; }

.seller-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: #fff; }
.seller-card .top { display: flex; gap: 10px; align-items: center; }
.seller-card .av { width: 38px; height: 38px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-weight: 800; }
.seller-card .nm { font-size: 13px; font-weight: 700; }
.seller-card .sh { font-size: 11.5px; color: var(--muted); }
.seller-card .stats { display: flex; gap: 14px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.seller-card .stats b { display: block; color: var(--ink); font-size: 13px; }

.pickup { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-top: 12px; background: #fff; }
.pickup h5 { font-size: 13px; display: flex; gap: 6px; align-items: center; }
.pickup .pt { display: flex; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--line); font-size: 12px; }
.pickup .pt:first-of-type { border-top: 0; }
.pickup .pt .nm { font-weight: 600; }
.pickup .pt .addr { color: var(--muted); font-size: 11.5px; }
.pickup .pt .ok { margin-left: auto; color: var(--green); font-weight: 700; font-size: 11px; white-space: nowrap; }

.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin-top: 10px; overflow: auto; }
.tabs button { border: 0; background: none; padding: 12px 2px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--blue); border-bottom-color: var(--blue); font-weight: 700; }
.tab-pane { padding: 18px 0 10px; }

.rating-sum { display: grid; grid-template-columns: 190px 1fr; gap: 24px; align-items: center; padding: 8px 0 18px; }
.rating-sum .big { font-size: 40px; font-weight: 800; line-height: 1; }
.rating-sum .stars { color: #f5a623; font-size: 16px; }
.bars { display: flex; flex-direction: column; gap: 6px; }
.bars .row { display: grid; grid-template-columns: 44px 1fr 38px; gap: 8px; align-items: center; font-size: 11.5px; color: var(--muted); }
.bars .bar { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.bars .bar i { display: block; height: 100%; background: #f5a623; }

.review { border-top: 1px solid var(--line-2); padding: 16px 0; }
.review .who { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; }
.review .when { font-size: 11.5px; color: var(--muted-2); margin-left: auto; }
.review .txt { font-size: 13px; color: var(--ink-2); margin: 8px 0; }
.review .imgs { display: flex; gap: 6px; }
.review .imgs img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.review .meta { font-size: 11.5px; color: var(--muted); display: flex; gap: 12px; margin-top: 8px; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.spec-table td { padding: 9px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.spec-table td:first-child { width: 220px; color: var(--muted); }

.sticky-buy { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0, 0, 0, .06); z-index: 800; display: none; }
.sticky-buy .in { display: flex; align-items: center; gap: 14px; height: 68px; }
.sticky-buy img { width: 44px; height: 44px; object-fit: contain; }
.sticky-buy .nm { font-size: 12.5px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sticky-buy .tot { margin-left: auto; text-align: right; font-size: 11px; color: var(--muted); }
.sticky-buy .tot b { display: block; font-size: 16px; color: var(--ink); }

/* --------------------------------------------------------------- cart etc */
.page-head { padding: 22px 0 6px; }
.page-head h1 { font-size: 22px; }
.cart-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; padding-bottom: 40px; }
.cart-list { border: 1px solid var(--line); border-radius: var(--radius); }
.cart-row { display: grid; grid-template-columns: 92px 1fr 120px 130px 40px; gap: 12px; align-items: center; padding: 14px; border-bottom: 1px solid var(--line-2); }
.cart-row:last-child { border-bottom: 0; }
.cart-row img { width: 92px; height: 92px; object-fit: contain; border-radius: 8px; background: var(--bg-soft); }
.cart-row .nm { font-size: 13px; }
.cart-row .pr { font-weight: 700; }
.cart-row .rm { border: 0; background: none; color: var(--muted); }
.sum-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; position: sticky; top: calc(var(--header-h) + 8px); }
.sum-row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; color: var(--ink-2); }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-size: 16px; font-weight: 800; color: var(--ink); }
.checkout-steps { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); padding: 10px 0 16px; }
.checkout-steps b { color: var(--blue); }

/* -------------------------------------------------------------- forms/auth */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; height: 42px; border: 1px solid #d9d9d9; border-radius: 8px; padding: 0 12px; font-size: 14px; outline: 0; background: #fff; }
.field textarea { height: auto; padding: 10px 12px; min-height: 78px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 114, 255, .1); }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.field .err { font-size: 11.5px; color: var(--red); margin-top: 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-line { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--ink-2); }
.check-line input { margin-top: 2px; accent-color: var(--blue); }

.auth-wrap { min-height: calc(100vh - 300px); display: grid; place-items: center; padding: 40px 16px 60px; background: linear-gradient(180deg, var(--blue-softer), #fff 60%); }
.auth-card { width: min(100%, 440px); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-1); padding: 26px; }
.auth-card h1 { font-size: 20px; margin-bottom: 4px; }
.auth-card .sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.auth-alt { text-align: center; font-size: 13px; color: var(--muted); margin-top: 16px; }
.auth-alt a { color: var(--blue); font-weight: 700; }
.alert { border-radius: 8px; padding: 10px 12px; font-size: 12.5px; margin-bottom: 14px; }
.alert.ok { background: var(--green-soft); color: #00753f; }
.alert.err { background: var(--red-soft); color: #b3001f; }
.alert.info { background: var(--blue-soft); color: var(--blue-darker); }

/* ---------------------------------------------------------------- checkout */
.checkout-grid { display: grid; grid-template-columns: 1fr 400px; gap: 20px; align-items: start; padding-bottom: 40px; }
.co-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; background: #fff; }
.co-card h3 { font-size: 14px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.co-card h3 .step { width: 20px; height: 20px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 11px; display: grid; place-items: center; }
.deliv-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.deliv-opt { border: 1px solid var(--line); border-radius: 8px; padding: 12px; cursor: pointer; font-size: 12.5px; }
.deliv-opt.on { border-color: var(--blue); background: var(--blue-softer); }
.deliv-opt b { display: block; margin-bottom: 3px; }
.pay-list { display: flex; flex-direction: column; gap: 8px; }
.pay-opt { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; cursor: pointer; font-size: 13px; }
.pay-opt.on { border-color: var(--blue); background: var(--blue-softer); }
.pay-opt .tag { margin-left: auto; font-size: 11px; color: var(--muted); }
.card-fields { display: grid; grid-template-columns: 1fr 130px 100px; gap: 10px; margin-top: 10px; }
.card-fields input { height: 40px; border: 1px solid #d9d9d9; border-radius: 8px; padding: 0 11px; font-size: 14px; letter-spacing: .02em; outline: 0; }
.card-fields input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 114, 255, .1); }
.co-summary { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: sticky; top: calc(var(--header-h) + 8px); background: #fff; }
.co-summary h3 { font-size: 14px; margin-bottom: 12px; }
.co-items { max-height: 260px; overflow: auto; margin-bottom: 10px; }
.co-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); font-size: 12.5px; }
.co-item img { width: 46px; height: 46px; object-fit: contain; border-radius: 6px; background: var(--bg-soft); }
.co-item .q { color: var(--muted); font-size: 11.5px; }
.co-item .p { margin-left: auto; font-weight: 700; white-space: nowrap; }
#bp-error { color: var(--red); font-size: 12.5px; min-height: 18px; margin: 8px 0; }
.bp-card-fields { transition: opacity .2s; }

/* ------------------------------------------------------------------ policy */
.policy { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; padding: 16px 0 50px; }
.policy-nav { position: sticky; top: calc(var(--header-h) + 8px); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.policy-nav a { display: block; padding: 11px 14px; font-size: 12.5px; color: var(--ink-2); border-bottom: 1px solid var(--line-2); }
.policy-nav a:last-child { border-bottom: 0; }
.policy-nav a.on { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.policy-body { font-size: 13.5px; line-height: 1.75; color: var(--ink-2); }
.policy-body h2 { font-size: 20px; color: var(--ink); margin: 0 0 14px; }
.policy-body h3 { font-size: 15px; color: var(--ink); margin: 22px 0 8px; }
.policy-body p { margin: 0 0 10px; }
.policy-body li { margin: 0 0 6px 18px; list-style: disc; }

/* ------------------------------------------------------------------ footer */
.footer { border-top: 1px solid var(--line-2); background: #fff; margin-top: 30px; padding: 28px 0 20px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin-bottom: 18px; }
.footer-brand img { height: 26px; }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.footer-cols h5 { font-size: 13px; margin-bottom: 10px; }
.footer-cols a { display: block; font-size: 12px; color: var(--muted); padding: 3px 0; }
.footer-cols a:hover { color: var(--blue); }
.footer-cols .grp { margin-top: 14px; }
.footer-cols .grp h5 { font-size: 13px; }
.footer-acc { border-top: 1px solid var(--line-2); margin-top: 22px; }
.footer-acc details { border-bottom: 1px solid var(--line-2); }
.footer-acc summary { padding: 14px 0; font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; display: flex; align-items: center; }
.footer-acc summary::-webkit-details-marker { display: none; }
.footer-acc summary::after { content: '+'; margin-left: auto; color: var(--muted); font-weight: 400; font-size: 18px; }
.footer-acc details[open] summary::after { content: '−'; }
.footer-acc .in { padding: 0 0 14px; font-size: 12px; color: var(--muted); line-height: 1.8; }
.footer-seo { font-size: 12px; color: var(--muted); }
.footer-seo h4 { font-size: 14px; color: var(--ink); margin: 18px 0 8px; }
.footer-bottom { border-top: 1px solid var(--line-2); margin-top: 18px; padding-top: 14px; font-size: 11.5px; color: var(--muted-2); }
.footer-bottom a { color: var(--muted); }

/* ------------------------------------------------------ mobile tab / drawer */
.mtab { display: none; }
.mfilter-btn { display: none; }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: rgba(33, 33, 33, .94); color: #fff; font-size: 13px; padding: 11px 18px; border-radius: 24px; opacity: 0; pointer-events: none; transition: .22s; z-index: 1200; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.sk { background: linear-gradient(90deg, #f2f4f7 25%, #e9edf2 37%, #f2f4f7 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 6px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .ico { font-size: 42px; margin-bottom: 10px; opacity: .5; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .grid-products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .flash-body { grid-template-columns: repeat(4, 1fr); }
  .deals-row, .seller-row, .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pdp { grid-template-columns: 360px 1fr; }
  .pdp .side { grid-column: 1 / -1; }
  .cart-grid, .checkout-grid { grid-template-columns: 1fr; }
  .co-summary, .sum-card { position: static; }
}

@media (max-width: 900px) {
  .cat-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .promo-row { grid-template-columns: 1fr; }
  .member-panel .body { grid-template-columns: 1fr; }
  .deals-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .seller-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { display: none; }
  .header-main { height: 60px; gap: 10px; }
  .logo img { height: 26px; }
  .header-nav { display: none; }
  .listing { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: 0 auto 0 0; width: 84vw; max-width: 330px; background: #fff; z-index: 1000; padding: 14px; overflow: auto; transform: translateX(-102%); transition: transform .25s; box-shadow: var(--shadow-pop); display: block; }
  .filters.open { transform: none; }
  .mfilter-btn { display: inline-flex; position: sticky; top: 62px; z-index: 30; margin: 8px 0; }
  .policy { grid-template-columns: 1fr; }
  .policy-nav { position: static; display: flex; overflow: auto; }
  .policy-nav a { white-space: nowrap; border-bottom: 0; border-right: 1px solid var(--line-2); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .mtab { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: 56px; background: #fff; border-top: 1px solid var(--line); z-index: 850; }
  .mtab a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; color: var(--muted); }
  .mtab a.on { color: var(--blue); }
  .mtab a .b { position: relative; }
  .mtab a .cnt { position: absolute; top: -6px; right: -10px; background: var(--red); color: #fff; font-size: 9px; border-radius: 8px; padding: 0 4px; }
  body { padding-bottom: 56px; }
  .sticky-buy { bottom: 56px; }
}

@media (max-width: 720px) {
  .wrap { width: calc(100% - 20px); }
  .grid-products, .grid-products.g5, .grid-products.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .flash-body { grid-template-columns: repeat(3, 1fr); }
  .pdp { grid-template-columns: 1fr; gap: 14px; }
  .gallery .main { aspect-ratio: 1; }
  .pdp-title { font-size: 17px; }
  .pdp-price { font-size: 24px; }
  .cart-row { grid-template-columns: 72px 1fr 40px; grid-template-areas: 'img nm rm' 'img pr rm' 'img qty rm'; row-gap: 6px; }
  .cart-row img { width: 72px; height: 72px; grid-area: img; }
  .cart-row .nm { grid-area: nm; }
  .cart-row .pr { grid-area: pr; }
  .cart-row .qty { grid-area: qty; }
  .cart-row .rm { grid-area: rm; align-self: start; }
  .card-fields { grid-template-columns: 1fr 1fr; }
  .card-fields input:nth-child(1) { grid-column: 1 / -1; }
  .member-strip { grid-template-columns: 1fr; }
  .trust { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 20px; }
  .section { padding: 14px 0; }
  .hero-slide { aspect-ratio: 2000 / 760; }
  .cat-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .deals-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promo-tile { display: none; }
  .seller-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid { grid-template-columns: 1fr; }
  .pdp-actions .btn { flex: 1; }
  .sticky-buy .in { height: 60px; }
}
