/* Public catalog — photo first, made for phones on mobile data. */
:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --ink: #1b1a18;
  --ink-2: #3c3a35;
  --muted: #74706a;
  --line: #e7e3db;
  --accent: #0e6b5e;
  --accent-hover: #0a564b;
  --accent-soft: #e3f1ee;
  --wa: #1fa855;
  --tag: #fff6dd;
  --tag-line: #e9d49a;
  --danger: #b42318;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Bengali", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 700; }
.ic { flex: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
button { font: inherit; }

/* header */
.site-head { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 10px; height: 58px; }
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; font-weight: 700; }
.brand img { width: 32px; height: 32px; object-fit: contain; border-radius: 7px; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 800; flex: none; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head-search { flex: 1; display: none; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); color: var(--muted); max-width: 420px; margin-left: auto; }
.head-search input { border: 0; background: transparent; outline: 0; flex: 1; min-width: 0; font: 15px var(--font); color: var(--ink); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--ink-2); margin-left: -8px; }
.cart-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; margin-left: auto; color: var(--ink); }
.head-search + .cart-btn { margin-left: 0; }
.cart-count { position: absolute; top: 3px; right: 1px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: #fff; font: 700 11px/19px var(--font); text-align: center; }
@media (min-width: 720px) { .head-search { display: flex; } }
.site-main { padding-top: 16px; padding-bottom: 32px; min-height: 60vh; }
.mobile-search { display: flex; margin-bottom: 14px; }
.mobile-search .head-search { display: flex; max-width: none; margin: 0; background: var(--surface); }
@media (min-width: 720px) { .mobile-search { display: none; } }

/* category tiles */
.section { margin-top: 22px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.section-head a { color: var(--accent); font-weight: 600; font-size: 14px; }
.cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .cats { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.cat-tile { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: #d9d4ca; }
.cat-tile img { width: 100%; height: 100%; object-fit: cover; }
.cat-tile .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.62)); }
.cat-tile .label { position: absolute; left: 12px; right: 12px; bottom: 10px; color: #fff; }
.cat-tile .label b { display: block; font-size: 17px; line-height: 1.2; }
.cat-tile .label span { font-size: 12.5px; opacity: .9; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip small { font-weight: 500; opacity: .7; }

/* lot grid */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.lot-card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: transform .15s ease, box-shadow .15s ease; }
.lot-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(27,26,24,.08); }
.lot-img { position: relative; aspect-ratio: 1; background: #ece8e0; }
.lot-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lot-img .ph { position: absolute; inset: 0; display: grid; place-items: center; color: #b3ada2; }
.lot-img .tag { position: absolute; top: 8px; left: 8px; }
.pcount { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 11px; background: rgba(0,0,0,.6); color: #fff; font: 600 11.5px var(--font); }
.lot-body { padding: 9px 11px 11px; display: grid; gap: 3px; }
.lot-title { font-weight: 600; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.lot-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.price { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.price small { font-weight: 500; font-size: 12px; color: var(--muted); margin-left: 1px; }
.pcs { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lot-mode { color: var(--muted); font-size: 12px; }

/* hang tag chip */
.tag { position: relative; display: inline-flex; align-items: center; height: 24px; padding: 0 9px 0 16px; font: 700 12px/1 var(--mono); color: #6b4e00; background: var(--tag); border: 1px solid var(--tag-line); border-radius: 3px 5px 5px 3px; clip-path: polygon(7px 0, 100% 0, 100% 100%, 7px 100%, 0 50%); white-space: nowrap; }
.tag::before { content: ""; position: absolute; left: 6px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px var(--tag-line); }

/* lot page */
.lot-page { display: grid; gap: 18px; }
@media (min-width: 900px) { .lot-page { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: start; } .lot-info { position: sticky; top: 74px; } }
.gallery { position: relative; margin: -16px -16px 0; }
@media (min-width: 720px) { .gallery { margin: 0; border-radius: var(--radius); overflow: hidden; } }
.g-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: #ece8e0; }
.g-track::-webkit-scrollbar { display: none; }
.g-track img { flex: none; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; scroll-snap-align: center; cursor: zoom-in; }
.g-count { position: absolute; right: 12px; bottom: 12px; padding: 3px 9px; border-radius: 12px; background: rgba(0,0,0,.6); color: #fff; font: 600 12.5px var(--font); }
.g-thumbs { display: none; }
@media (min-width: 720px) {
  .g-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; scrollbar-width: thin; }
  .g-thumbs button { flex: none; width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; cursor: pointer; }
  .g-thumbs button.on { border-color: var(--ink); }
  .g-thumbs img { width: 100%; height: 100%; object-fit: cover; }
}
.lot-info h1 { margin: 8px 0 4px; }
.lot-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 6px 0 14px; }
.lot-price .price { font-size: 26px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; font-weight: 600; }
.features { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 4px; }
.features li { display: flex; gap: 8px; align-items: flex-start; }
.features li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: 9px; }
.ratio-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-weight: 700; }
.ratio { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 8px; margin-bottom: 16px; }
.ratio .sz { text-align: center; padding: 8px 4px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.ratio .sz b { display: block; font-size: 15px; }
.ratio .sz span { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ratio .sz.out { opacity: .45; }
.buy { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 12px; }
.buy-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.buy-row .sz-name { font-weight: 700; min-width: 44px; }
.buy-row .left { font-size: 12.5px; color: var(--muted); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.stepper button { width: 40px; height: 40px; border: 0; background: var(--bg); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.stepper button:active { background: var(--line); }
.stepper input { width: 58px; height: 40px; border: 0; text-align: center; font: 600 16px var(--font); font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.buy-sum { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px dashed var(--line); font-weight: 700; }
.buy-sum .total { font-size: 19px; font-variant-numeric: tabular-nums; }
.hint { font-size: 13px; color: var(--muted); }
.err { color: var(--danger); font-size: 13.5px; font-weight: 600; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 700 16px var(--font); cursor: pointer; width: 100%; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn[disabled] { opacity: .55; cursor: wait; }
.sticky-buy { position: sticky; bottom: 0; z-index: 20; margin: 0 -16px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.sticky-buy .sb-total { flex: none; }
.sticky-buy .sb-total small { display: block; color: var(--muted); font-size: 12px; }
.sticky-buy .sb-total b { font-size: 18px; font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .sticky-buy { position: static; margin: 12px 0 0; padding: 0; border: 0; background: none; } }
.added { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--accent-soft); color: #064e45; font-weight: 600; }
.added a { margin-left: auto; color: var(--accent); text-decoration: underline; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 80; background: #000; display: flex; flex-direction: column; }
.lightbox[hidden] { display: none; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; color: #fff; }
.lb-top button { width: 44px; height: 44px; border: 0; border-radius: 22px; background: rgba(255,255,255,.14); color: #fff; font-size: 22px; cursor: pointer; }
.lb-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-track div { flex: none; width: 100%; height: 100%; display: grid; place-items: center; scroll-snap-align: center; overflow: auto; }
.lb-track img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* cart */
.cart-page { display: grid; gap: 18px; max-width: 980px; }
@media (min-width: 900px) { .cart-page { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; padding: 12px; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item img, .cart-item .ph { width: 72px; height: 72px; border-radius: 9px; object-fit: cover; background: #ece8e0; }
.cart-item .t { font-weight: 600; font-size: 14.5px; line-height: 1.3; margin: 4px 0; }
.cart-item .lines { font-size: 13px; color: var(--ink-2); }
.cart-item .amt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cart-item .rm { margin-top: 6px; border: 0; background: none; color: var(--danger); font-size: 13px; cursor: pointer; padding: 0; }
.cart-item .edit { font-size: 13px; color: var(--accent); }
.form { display: grid; gap: 12px; padding: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--ink-2); }
.field input, .field textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: 16px var(--font); background: #fff; color: var(--ink); }
.field textarea { min-height: 70px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; padding: 12px 14px; border-top: 1px solid var(--line); }
.total-row .v { font-size: 20px; font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty h2 { color: var(--ink); margin-bottom: 6px; }
.empty .btn { width: auto; margin-top: 14px; }
.done { text-align: center; padding: 32px 18px; display: grid; gap: 12px; justify-items: center; }
.done .tick { width: 56px; height: 56px; border-radius: 28px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.pager { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.pager a { padding: 9px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--accent); }

/* footer */
.site-foot { border-top: 1px solid var(--line); background: var(--surface); padding: 22px 0 calc(22px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 14px; }
.site-foot strong { color: var(--ink); }
.site-foot strong { display: block; }
.wa-link { display: flex; width: fit-content; align-items: center; gap: 6px; margin-top: 8px; color: var(--wa); font-weight: 700; }
body.has-sticky .site-foot { padding-bottom: 96px; }
@media (min-width: 900px) { body.has-sticky .site-foot { padding-bottom: 22px; } }

.price.ask { color: var(--wa); font-size: 15px; }
.lot-price .price.ask { font-size: 22px; }
.row-share { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); color: var(--ink-2); font: 600 13.5px var(--font); cursor: pointer; }

.g-video { flex: none; width: 100%; aspect-ratio: 4 / 5; display: grid; place-items: center; background: #000; scroll-snap-align: center; }
.g-video video, .g-video iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; display: block; }
