/* Default storefront theme. Colours, radius, container and fonts come from CSS variables printed
   in <head> from the admin's Appearance settings — edit those before editing this file. */
@font-face { font-family: "Vazirmatn"; src: url("../../fonts/vazirmatn.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Lalezar"; src: url("../../fonts/lalezar-arabic.woff2") format("woff2"); font-display: swap; unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Lalezar"; src: url("../../fonts/lalezar-latin.woff2") format("woff2"); font-display: swap; unicode-range: U+0000-00FF; }
/* more heading fonts for the skins (all SIL OFL, see public/fonts/FONTS-LICENSES.txt); a browser downloads only the one in use */
@font-face { font-family: "Estedad"; src: url("../../fonts/estedad.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Markazi Text"; src: url("../../fonts/markazi-arabic.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Markazi Text"; src: url("../../fonts/markazi-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF; }
@font-face { font-family: "Aref Ruqaa"; src: url("../../fonts/ruqaa-arabic.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Aref Ruqaa"; src: url("../../fonts/ruqaa-latin.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF; }
@font-face { font-family: "Noto Kufi Arabic"; src: url("../../fonts/notokufi-arabic.woff2") format("woff2"); font-weight: 400 900; font-display: swap; unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Noto Kufi Arabic"; src: url("../../fonts/notokufi-latin.woff2") format("woff2"); font-weight: 400 900; font-display: swap; unicode-range: U+0000-00FF; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../../fonts/plex-arabic.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../../fonts/plex-latin.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF; }

:root {
  --brand-soft: color-mix(in srgb, var(--brand) 12%, var(--surface));
  --accent-soft: color-mix(in srgb, var(--accent) 18%, var(--surface));
  --sale-soft: color-mix(in srgb, var(--sale) 12%, var(--surface));
  --success-soft: color-mix(in srgb, var(--success) 12%, var(--surface));
  --shadow: 0 1px 2px rgb(0 0 0 / .05), 0 6px 18px rgb(0 0 0 / .05);
  --font-body: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.75 var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: var(--brand-fg); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { text-wrap: balance; margin: 0; line-height: 1.4; }
p { margin: 0 0 .8em; }
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { flex: none; vertical-align: -4px; }
.skip { position: absolute; right: 8px; top: -60px; background: var(--brand); color: var(--brand-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }
.hide-sm { }
@media (max-width: 860px) { .hide-sm { display: none !important; } }
.only-sm { display: none !important; }
@media (max-width: 860px) { .only-sm { display: inline-flex !important; } }

/* ---------- buttons, pills, inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius-s); border: 1px solid transparent; font-weight: 600; white-space: nowrap; text-decoration: none !important; background: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-line { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-line:hover { border-color: var(--brand); color: var(--brand-fg); }
.btn-ghost { color: var(--brand-fg); }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.8; }
.pill-sale { background: var(--sale); color: #fff; }
.pill-brand { background: var(--brand-soft); color: var(--brand-fg); }
.pill-accent { background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 60%, var(--text)); }
.pill-success { background: var(--success-soft); color: var(--success); }
.pill-gray { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); }
.input, .select, .textarea { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); padding: 0 12px; outline: none; }
.textarea { padding: 10px 12px; min-height: 88px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); }
.check { display: flex; align-items: center; gap: 8px; min-height: 32px; font-size: 13px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.error { color: var(--sale); font-size: 13px; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-s); background: var(--accent-soft); font-size: 13px; }
.note .i { color: color-mix(in srgb, var(--accent) 65%, var(--text)); margin-top: 3px; }
.note-brand { background: var(--brand-soft); }
.note-brand .i { color: var(--brand-fg); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pad { padding: 16px; }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 12px; align-items: center; }
.wrap-row { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
.divider { height: 1px; background: var(--line); margin: 12px 0; border: 0; }
.price { font-weight: 800; font-size: 16px; }
.price small { font-weight: 400; font-size: 11px; color: var(--muted); }
.old { color: var(--muted); text-decoration: line-through; font-size: 12px; }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; list-style: none; }
.crumbs li + li::before { content: "/"; margin-left: 4px; }
.crumbs a { color: var(--muted); }

/* ---------- topbar & headers ---------- */
.topbar { background: var(--brand); color: var(--brand-ink); font-size: 12.5px; }
.topbar .wrap { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 34px; }
.topbar a { color: inherit; text-decoration: underline; }
.hdr { background: var(--surface); border-bottom: 1px solid var(--line); z-index: 40; }
.hdr.sticky { position: sticky; top: 0; }
.hdr-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; flex: none; }
.logo img { height: 44px; width: auto; }
.logo-mark { width: 42px; height: 42px; flex: none; }
.logo-text { display: grid; }
.logo-name { font-family: var(--font-display); font-size: 26px; line-height: 1.1; color: var(--brand-fg); }
.logo-tag { font-size: 11px; color: var(--muted); line-height: 1.5; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0 12px; min-height: 46px; position: relative; }
.search:focus-within { border-color: var(--brand); background: var(--surface); }
.search input { flex: 1; border: 0; background: transparent; outline: none; min-height: 44px; min-width: 0; }
.search .i { color: var(--muted); }
.suggest { position: absolute; top: calc(100% + 6px); right: 0; left: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; display: none; z-index: 60; max-height: 70vh; overflow: auto; }
.suggest.open { display: block; }
.suggest a { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 8px; color: var(--text); }
.suggest a:hover, .suggest a.on { background: var(--brand-soft); text-decoration: none; }
.suggest .pic { width: 40px; height: 40px; border-radius: 8px; flex: none; }
.suggest small { color: var(--muted); }
.hbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-s); color: var(--text); white-space: nowrap; text-decoration: none !important; }
.hbtn small { display: block; font-size: 11px; color: var(--muted); line-height: 1.3; }
.hbtn b { display: block; font-weight: 600; font-size: 13px; line-height: 1.4; }
.hbtn.icon-only { padding: 0; width: 44px; justify-content: center; }
.cart-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: var(--radius-s); background: var(--brand); color: var(--brand-ink); font-weight: 600; text-decoration: none !important; }
.cart-btn .count { background: var(--accent); color: var(--accent-ink); border-radius: 999px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: 12px; padding: 0 6px; }
.catnav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.catnav::-webkit-scrollbar { display: none; }
.catnav a { padding: 6px 12px; border-radius: 999px; color: var(--text); white-space: nowrap; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.catnav a:hover { background: var(--brand-soft); text-decoration: none; }
.catnav a.on { background: var(--brand-soft); color: var(--brand-fg); font-weight: 600; }
.catnav .pic { width: 26px; height: 26px; border-radius: 6px; }
.hdr-market .catnav a { background: var(--bg); }
.hdr-centered .hdr-row { display: grid; grid-template-columns: 1fr auto 1fr; }
.hdr-centered .hdr-row > :first-child { justify-self: start; }
.hdr-centered .hdr-row > :last-child { justify-self: end; display: flex; gap: 8px; }
.hdr-centered .catnav { justify-content: center; }
.hdr-centered .search { max-width: 280px; }
.hdr-compact .hdr-row { padding: 8px 0; }
.hdr-compact .catnav { display: none; }
.menu-btn { display: inline-flex; }
@media (max-width: 860px) {
  .hdr-row { flex-wrap: wrap; gap: 10px; padding: 10px 0; }
  .hdr-row .search { order: 10; flex-basis: 100%; max-width: none; }
  .logo-tag { display: none; }
  .logo-name { font-size: 22px; }
  .hdr-centered .hdr-row { display: flex; }
  .hdr .catnav { display: none; }
  .grow-sm { flex: 1; }
}

/* drawer (mobile menu + "all categories") */
.drawer { position: fixed; inset: 0; z-index: 80; display: none; }
.drawer.open { display: block; }
.drawer .shade { position: absolute; inset: 0; background: rgb(0 0 0 / .45); }
.drawer .panel { position: absolute; top: 0; bottom: 0; right: 0; width: min(340px, 88vw); background: var(--surface); overflow: auto; padding: 16px; display: grid; gap: 8px; align-content: start; }
.drawer .panel a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; color: var(--text); }
.drawer .panel a:hover { background: var(--brand-soft); text-decoration: none; }
.drawer .pic { width: 36px; height: 36px; border-radius: 8px; }

/* bottom nav on phones */
.bnav { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 45; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.bnav a { flex: 1; display: grid; justify-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 4px 0; position: relative; }
.bnav a.on { color: var(--brand-fg); font-weight: 600; }
.bnav a:hover { text-decoration: none; }
.bnav .dot { position: absolute; top: 0; right: calc(50% - 22px); background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 10px; min-width: 18px; height: 18px; display: grid; place-items: center; }
@media (max-width: 860px) { .bnav { display: flex; } body { padding-bottom: 70px; } }

/* ---------- main, sections ---------- */
main { padding: 20px 0 48px; min-height: 50vh; }
.section { margin-top: 32px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-title { font-family: var(--font-display); font-size: 24px; font-weight: 400; line-height: 1.35; }
.sec-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.page-title { font-family: var(--font-display); font-weight: 400; font-size: 28px; }

/* hero */
.hero { display: grid; grid-template-columns: 1.65fr 1fr; gap: 16px; }
.hero.full, .hero.minimal { grid-template-columns: 1fr; }
.hero.cards { grid-template-columns: repeat(3, 1fr); }
.slider { position: relative; border-radius: calc(var(--radius) + 4px); overflow: hidden; min-height: 280px; background: var(--brand); }
.slide { position: absolute; inset: 0; padding: 32px; display: flex; flex-direction: column; justify-content: center; gap: 10px; color: var(--brand-ink); opacity: 0; visibility: hidden; transition: opacity .5s ease; }
.slide.on { opacity: 1; visibility: visible; position: relative; }
/* soft studio light instead of a flat fill: a glow behind the art, depth toward the far corner */
.slide.tone-brand { background: radial-gradient(70% 90% at 22% 50%, color-mix(in srgb, var(--brand) 62%, #fff) 0, transparent 62%), radial-gradient(60% 80% at 100% 0, color-mix(in srgb, var(--brand) 85%, #fff) 0, transparent 70%), linear-gradient(160deg, var(--brand), color-mix(in srgb, var(--brand) 72%, #000)); color: var(--brand-ink); }
.slide.tone-accent { background: radial-gradient(70% 90% at 22% 50%, color-mix(in srgb, var(--accent) 60%, #fff) 0, transparent 62%), linear-gradient(160deg, var(--accent), color-mix(in srgb, var(--accent) 78%, #000)); color: var(--accent-ink); }
.slide.tone-dark { background: radial-gradient(70% 90% at 22% 50%, color-mix(in srgb, var(--text) 70%, #fff) 0, transparent 62%), var(--text); color: var(--bg); }
.slide.tone-success { background: radial-gradient(70% 90% at 22% 50%, color-mix(in srgb, var(--success) 60%, #fff) 0, transparent 62%), linear-gradient(160deg, var(--success), color-mix(in srgb, var(--success) 72%, #000)); color: #fff; }
.slide.tone-sale { background: radial-gradient(70% 90% at 22% 50%, color-mix(in srgb, var(--sale) 60%, #fff) 0, transparent 62%), linear-gradient(160deg, var(--sale), color-mix(in srgb, var(--sale) 72%, #000)); color: #fff; }
/* a fine dot grid that fades out before the text */
.slide:not(.has-img):not(.tone-light)::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgb(255 255 255 / .16) 1px, transparent 1.4px); background-size: 16px 16px; -webkit-mask-image: linear-gradient(to right, #000, transparent 70%); mask-image: linear-gradient(to right, #000, transparent 70%); pointer-events: none; }
.slide > * { position: relative; }
.slide-art { position: absolute !important; left: 2.5%; top: 50%; transform: translateY(-50%); width: min(39%, 330px); aspect-ratio: 1.3; pointer-events: none; }
.art-tile { position: absolute; width: 44%; aspect-ratio: 1; border-radius: 22px; overflow: hidden; background: #fff; box-shadow: 0 22px 44px -16px rgb(0 0 0 / .5), 0 2px 6px rgb(0 0 0 / .12); transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.art-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-tile.t0 { left: 0; top: 26%; transform: rotate(-8deg); }
.art-tile.t1 { left: 26%; top: 2%; width: 52%; z-index: 2; transform: rotate(2deg); }
.art-tile.t2 { left: 60%; top: 30%; width: 40%; transform: rotate(9deg); }
.slide.on .art-tile.t0 { transform: rotate(-6deg) translateY(-4px); }
.slide.on .art-tile.t2 { transform: rotate(7deg) translateY(4px); }
.slide.has-art > :not(.slide-art) { max-width: 52%; }
@media (max-width: 640px) { .slide-art { display: none; } .slide.has-art > :not(.slide-art) { max-width: none; } }
@media (prefers-reduced-motion: reduce) { .art-tile { transition: none; } }
.slide.tone-light { background: var(--surface); color: var(--text); }
/* a photo behind a slide: white words over a shade on the text side (the right, in Persian), readable on any picture */
.hero.minimal .slide.has-img, .hero .slide.has-img, .slide.has-img { background-size: cover; background-position: center; color: #fff; text-shadow: 0 1px 3px rgb(0 0 0 / .35); }
.slide.has-img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to left, rgb(0 0 0 / .68), rgb(0 0 0 / .4) 45%, rgb(0 0 0 / .06) 85%); pointer-events: none; }
@media (max-width: 640px) { .slide.has-img::before { background: rgb(0 0 0 / .52); } }
.hero.minimal .slide.has-img::before { background: rgb(0 0 0 / .52); }
.slide .slide-title, .slide h2 { font-family: var(--font-display); font-weight: 400; font-size: 38px; line-height: 1.3; max-width: 18ch; }
.slide p { margin: 0; max-width: 46ch; opacity: .92; }
.slide .kicker { align-self: flex-start; background: rgb(255 255 255 / .18); border-radius: 999px; padding: 2px 12px; font-size: 12px; font-weight: 600; }
.slide .btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.slide .btn-line { color: var(--text); }
.dots { position: absolute; bottom: 14px; left: 16px; display: flex; gap: 6px; z-index: 2; }
.dots button { width: 10px; height: 10px; border-radius: 999px; border: 0; background: rgb(255 255 255 / .5); padding: 0; }
.dots button.on { background: #fff; width: 22px; }
.hero-side { display: grid; gap: 12px; }
.promise { display: flex; gap: 12px; align-items: center; padding: 14px 16px; color: var(--text); }
.promise .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(160deg, color-mix(in srgb, var(--brand-soft) 55%, var(--surface)), var(--brand-soft)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand-fg); flex: none; }
.promise b { display: block; }
.promise span { color: var(--muted); font-size: 13px; }
.hero.cards .slide { position: relative; opacity: 1; visibility: visible; border-radius: var(--radius); min-height: 200px; }
.hero.cards .slide h2 { font-size: 26px; }
.hero.minimal .slide { position: relative; opacity: 1; visibility: visible; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; align-items: center; }
@media (max-width: 900px) { .hero, .hero.cards { grid-template-columns: 1fr; } .slide .slide-title, .slide h2 { font-size: 28px; } .slide { padding: 24px; } }

/* categories */
.cats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.cat { display: grid; justify-items: center; gap: 6px; padding: 12px 8px; text-align: center; color: var(--text); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.cat { transition: border-color .2s, box-shadow .2s, transform .2s; }
.cat:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--brand) 55%, transparent); transform: translateY(-2px); text-decoration: none; }
.cat .pic, .cat img { width: 76px; height: 76px; border-radius: 16px; object-fit: cover; }
.cat b { font-size: 13px; font-weight: 600; line-height: 1.5; }
.cats.circles .cat { border: 0; background: none; }
.cats.circles .cat .pic, .cats.circles .cat img { width: 76px; height: 76px; border-radius: 999px; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--brand); }
.cats.rail { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 120px; overflow-x: auto; padding-bottom: 4px; }
@media (max-width: 900px) { .cats:not(.rail) { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px) { .cats:not(.rail) { grid-template-columns: repeat(3, 1fr); } }

/* product grid & rail */
.pgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.pgrid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .pgrid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 860px) { .pgrid, .pgrid.cols-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .pgrid, .pgrid.cols-4 { grid-template-columns: repeat(var(--m-cols), 1fr); gap: 10px; } }
.prail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(172px, 200px); gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.prail > * { scroll-snap-align: start; }

/* card: standard (shared base) */
.pc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 6px; position: relative; min-width: 0; }
.pc .media { display: block; position: relative; }
.pc .pic, .pc .media img { width: 100%; height: auto; aspect-ratio: 1; border-radius: calc(var(--radius) - 4px); display: block; object-fit: cover; background: var(--bg); }
.pc .badges { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.pc .name { font-size: 13px; font-weight: 600; line-height: 1.55; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.pc .name:hover { color: var(--brand-fg); text-decoration: none; }
.pc .meta { font-size: 11px; color: var(--muted); line-height: 1.6; }
.pc .buy { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin-top: auto; flex-wrap: wrap; }
.pc.out .pic, .pc.out .media img { filter: grayscale(1); opacity: .6; }
.pc .stars { font-size: 11px; color: var(--muted); display: flex; gap: 2px; align-items: center; }
.pc .stars .i { color: var(--accent); }
.add { width: 40px; height: 40px; border-radius: var(--radius-s); border: 1px solid var(--brand); background: var(--surface); color: var(--brand-fg); display: grid; place-items: center; flex: none; }
.add:hover { background: var(--brand); color: var(--brand-ink); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--brand); border-radius: var(--radius-s); overflow: hidden; background: var(--surface); flex: none; }
.stepper button { width: 34px; height: 38px; border: 0; background: transparent; color: var(--brand-fg); display: grid; place-items: center; }
.stepper button:hover { background: var(--brand-soft); }
.stepper output { min-width: 44px; text-align: center; font-weight: 700; font-size: 13px; }
.stepper.lg button { width: 44px; height: 46px; }
.stepper.lg output { min-width: 70px; font-size: 15px; }
/* card: bordered */
.pc-bordered { border-width: 1.5px; }
.pc-bordered .buy .add { width: 100%; height: 40px; display: flex; gap: 6px; font-weight: 600; font-size: 13px; }
.pc-bordered .buy .add::after { content: attr(data-label); }
/* card: minimal */
.pc-minimal { border: 0; background: none; padding: 0; }
.pc-minimal .pic, .pc-minimal .media img { aspect-ratio: 4 / 5; }
.pc-minimal .name { min-height: 0; -webkit-line-clamp: 1; }
/* card: compact */
.pc-compact { padding: 8px; gap: 4px; }
.pc-compact .name { font-size: 12px; min-height: 36px; }
.pc-compact .price { font-size: 14px; }

/* offer band, banners, features */
.offer-band { background: var(--sale-soft); border-radius: calc(var(--radius) + 4px); padding: 16px; display: grid; grid-template-columns: 190px 1fr; gap: 16px; align-items: center; }
.offer-band .lead { display: grid; gap: 8px; justify-items: start; }
.offer-band h2 { font-family: var(--font-display); font-weight: 400; font-size: 28px; color: var(--sale); line-height: 1.25; }
@media (max-width: 760px) { .offer-band { grid-template-columns: 1fr; } }
.timer { display: inline-flex; gap: 4px; direction: ltr; }
.timer b { background: var(--sale); color: #fff; border-radius: 6px; padding: 0 6px; font-size: 13px; min-width: 30px; text-align: center; }
.banners { display: grid; gap: 16px; }
.banners.two { grid-template-columns: 1fr 1fr; }
.banners.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .banners.two, .banners.three { grid-template-columns: 1fr; } }
.banner { border-radius: var(--radius); padding: 22px; display: flex; gap: 14px; align-items: center; min-height: 120px; color: var(--text); background: var(--brand-soft); background-size: cover; background-position: center; }
.banner:hover { text-decoration: none; filter: brightness(.98); }
.banner.tone-accent { background-color: var(--accent-soft); }
.banner.tone-success { background-color: var(--success-soft); }
.banner.tone-sale { background-color: var(--sale-soft); }
.banner .ic { width: 52px; height: 52px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; color: var(--brand-fg); flex: none; }
.banner b { font-size: 17px; display: block; }
.banner span { color: var(--muted); font-size: 13px; }
/* a banner with a photo: white words over a shade on the text side */
.banner.has-img { position: relative; isolation: isolate; overflow: hidden; min-height: 150px; color: #fff; text-shadow: 0 1px 3px rgb(0 0 0 / .35); }
.banner.has-img::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to left, rgb(0 0 0 / .64), rgb(0 0 0 / .18) 75%); }
.banner.has-img span { color: rgb(255 255 255 / .88); }
.banner.has-img b { color: #fff; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .features { grid-template-columns: 1fr; } }
.feature { display: grid; gap: 6px; align-content: start; }
.feature .ic { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(160deg, color-mix(in srgb, var(--brand-soft) 50%, var(--surface)), var(--brand-soft)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 14%, transparent), 0 6px 14px -8px color-mix(in srgb, var(--brand) 60%, transparent); color: var(--brand-fg); }
.feature span { color: var(--muted); font-size: 13px; }
.features.row .feature { display: flex; gap: 12px; align-items: center; }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .posts { grid-template-columns: 1fr; } }
.post-card { display: grid; gap: 6px; padding: 16px; color: var(--text); }
.post-card:hover { border-color: var(--brand); text-decoration: none; }
.post-card b { font-size: 15px; }
.post-card .post-cover { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-s); margin-bottom: 4px; background: var(--bg); }
.brands { display: flex; gap: 10px; flex-wrap: wrap; }
.brands a { padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--text); font-weight: 600; font-size: 13px; }
.rich { max-width: 75ch; }
.rich h2 { font-size: 18px; margin: 1.2em 0 .4em; }
.rich img { border-radius: var(--radius); }

/* ---------- listing ---------- */
.listing { display: grid; grid-template-columns: 250px 1fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .listing { grid-template-columns: 1fr; } .filters { display: none; } .filters.open { display: grid; } }
.filters { padding: 16px; gap: 14px; display: grid; position: sticky; top: 150px; }
.filters h2 { font-size: 14px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sorts { display: flex; gap: 4px; flex-wrap: wrap; }
.sorts a { padding: 6px 10px; border-radius: 8px; color: var(--muted); font-size: 13px; }
.sorts a.on { color: var(--brand-fg); background: var(--brand-soft); font-weight: 600; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 0 10px; }
.pager .on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.empty { text-align: center; padding: 40px 16px; display: grid; gap: 12px; justify-items: center; }

/* ---------- product page ---------- */
.pdp { display: grid; grid-template-columns: 1fr 1.15fr 320px; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .pdp { grid-template-columns: 1fr 1fr; } .buybox { grid-column: 1 / -1; position: static !important; } }
@media (max-width: 640px) { .pdp { grid-template-columns: 1fr; } }
.gallery .main { border-radius: calc(var(--radius) + 2px); overflow: hidden; background: var(--bg); }
.gallery .main .pic, .gallery .main img { width: 100%; height: auto; aspect-ratio: 1; display: block; object-fit: contain; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.thumbs button { width: 64px; height: 64px; border-radius: 10px; border: 1px solid var(--line); padding: 0; overflow: hidden; background: var(--surface); }
.thumbs button.on { border: 2px solid var(--brand); }
.thumbs .pic, .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp h1 { font-size: 22px; line-height: 1.6; }
.specs { width: 100%; border-collapse: collapse; font-size: 13px; }
.specs th, .specs td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; text-align: right; font-weight: 400; }
.specs th { color: var(--muted); width: 40%; }
.buybox { padding: 16px; display: grid; gap: 12px; position: sticky; top: 150px; }
.radio-list { display: grid; gap: 8px; }
.radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); cursor: pointer; background: var(--surface); }
.radio input { margin-top: 5px; accent-color: var(--brand); width: 16px; height: 16px; flex: none; }
.radio:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.radio:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.radio b { display: block; font-size: 13px; }
.radio span { font-size: 12px; color: var(--muted); }
.tabs-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; }
.tabs-nav a { padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs-nav a:hover { color: var(--brand-fg); text-decoration: none; }
.review { padding: 12px 0; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; }

/* ---------- cart & checkout ---------- */
.two-col { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.steps { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; font-size: 13px; padding: 0; list-style: none; }
.steps li { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.steps li + li::before { content: ""; width: 24px; height: 1px; background: var(--line); margin-left: 2px; }
.steps i { width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; background: var(--line); font-style: normal; font-size: 12px; }
.steps .on { color: var(--text); font-weight: 600; }
.steps .on i { background: var(--brand); color: var(--brand-ink); }
.line-item { display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.line-item > * { min-width: 0; }
.line-item:last-child { border-bottom: 0; }
.line-item .pic, .line-item img { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; }
.line-item h3 { font-size: 14px; font-weight: 600; }
.line-item .end { display: grid; gap: 6px; justify-items: end; }
.line-item select { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-height: 34px; font-size: 12px; padding: 0 6px; max-width: 100%; }
@media (max-width: 560px) { .line-item { grid-template-columns: 64px 1fr; } .line-item .pic, .line-item img { width: 64px; height: 64px; } .line-item .end { grid-column: 2; justify-items: start; } }
.summary { padding: 16px; display: grid; gap: 10px; position: sticky; top: 150px; }
.sum-row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.sum-row.total { font-size: 16px; font-weight: 800; }
.meter { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--success); border-radius: 999px; }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.days label { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-s); padding: 8px 14px; min-width: 104px; display: grid; text-align: center; line-height: 1.6; cursor: pointer; }
.days label small { color: var(--muted); font-size: 11px; }
.days input { position: absolute; opacity: 0; pointer-events: none; }
.days label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-fg); font-weight: 600; }
.wins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 640px) { .wins { grid-template-columns: repeat(2, 1fr); } }
.wins label { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-s); padding: 10px; display: grid; gap: 2px; text-align: center; cursor: pointer; }
.wins input { position: absolute; opacity: 0; pointer-events: none; }
.wins b { font-size: 14px; }
.wins small { font-size: 11px; color: var(--muted); }
.wins label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.wins label:has(input:disabled) { opacity: .5; cursor: not-allowed; text-decoration: line-through; }
.day-panel { display: none; }
.day-panel.on { display: grid; }

/* ---------- auth, account ---------- */
.auth { max-width: 420px; margin: 24px auto; padding: 28px; display: grid; gap: 16px; }
.otp { display: flex; gap: 8px; direction: ltr; justify-content: center; }
.otp input { width: 52px; height: 56px; text-align: center; font-size: 22px; font-weight: 700; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); outline: none; }
.otp input:focus { border-color: var(--brand); }
.acct { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .acct { grid-template-columns: 1fr; } }
.side-menu { padding: 8px; display: grid; gap: 2px; }
.side-menu a, .side-menu button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text); background: none; border: 0; width: 100%; text-align: right; }
.side-menu a.on { background: var(--brand-soft); color: var(--brand-fg); font-weight: 600; }
.side-menu a:hover, .side-menu button:hover { text-decoration: none; background: var(--bg); }
.track { display: grid; grid-template-columns: repeat(4, 1fr); margin: 8px 0; padding: 0; list-style: none; }
.track li { display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 12px; color: var(--muted); position: relative; }
.track li::before { content: ""; position: absolute; top: 13px; right: 50%; left: -50%; height: 2px; background: var(--line); }
.track li:first-child::before { display: none; }
.track li.done::before, .track li.now::before { background: var(--brand); }
.track i { width: 28px; height: 28px; border-radius: 999px; background: var(--line); display: grid; place-items: center; position: relative; z-index: 1; color: var(--brand-ink); font-style: normal; }
.track li.done i, .track li.now i { background: var(--brand); }
.track li.now { color: var(--text); font-weight: 600; }
.track li.now i { box-shadow: 0 0 0 4px var(--brand-soft); }
.mini-pics { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-pics .pic, .mini-pics img { width: 44px; height: 44px; border-radius: 8px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
.t th { text-align: right; font-weight: 600; color: var(--muted); font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }

/* ---------- footers ---------- */
.ftr { background: var(--surface); border-top: 1px solid var(--line); padding: 32px 0 20px; margin-top: 40px; font-size: 13px; }
.ftr-cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 170px; gap: 24px; }
@media (max-width: 860px) { .ftr-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .ftr-cols { grid-template-columns: 1fr; } }
.ftr h2 { font-size: 14px; margin-bottom: 8px; }
.ftr ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.ftr a { color: var(--muted); }
.ftr a:hover { color: var(--brand-fg); }
.ftr-bottom { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.trust { border: 1px dashed var(--line); border-radius: var(--radius-s); min-height: 120px; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 12px; padding: 8px; }
.socials { display: flex; gap: 8px; }
.socials a { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); }
.ftr-simple .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.ftr-simple nav { display: flex; gap: 16px; flex-wrap: wrap; }
.ftr-dark { background: var(--text); color: var(--bg); border: 0; }
.ftr-dark a, .ftr-dark .muted, .ftr-dark .ftr-bottom { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.ftr-dark .ftr-bottom { border-color: color-mix(in srgb, var(--bg) 20%, transparent); }
.ftr-dark .trust { border-color: color-mix(in srgb, var(--bg) 30%, transparent); color: color-mix(in srgb, var(--bg) 70%, transparent); }
.club { display: flex; gap: 8px; max-width: 420px; }
.club .input { background: var(--surface); color: var(--text); }

/* ---------- toast & modal ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 90; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 13px; display: flex; gap: 8px; align-items: center; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
@media (max-width: 860px) { .toast { bottom: 86px; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .hdr, .ftr, .bnav, .topbar, .no-print { display: none !important; } body { background: #fff; } }

/* grid children must be allowed to shrink, or a scrolling rail inside them widens the whole page on phones */
.hero > *, .offer-band > *, .listing > *, .two-col > *, .pdp > *, .acct > *, .grid2 > *, .hdr-row > *, .section > * { min-width: 0; }
.hdr-row .search { min-width: 0; }

/* ---------- product variants: option chips on the product page ---------- */
.variant-form .opt { border: 0; margin: 0; padding: 0; min-width: 0; }
.variant-form legend { font-size: 13px; color: var(--muted); margin-bottom: 8px; padding: 0; }
.variant-form legend b { color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; min-width: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--text); font-size: 14px; }
.chip input:checked + span { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-soft); color: var(--brand-fg); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.variant-form button[disabled] { opacity: .55; cursor: not-allowed; }

/* the hidden attribute always wins over display rules such as .row { display: flex } */
[hidden] { display: none !important; }
