/* =========================================================================
   RESTORE — brand: black & white (from the logo).
   Black header/footer carry the logo; a light body keeps products readable
   (the pattern used by Iranian stores such as Bahamstore & Technolife).
   ========================================================================= */
:root {
  --ink: #000000;           /* brand black */
  --ink-2: #111113;
  --ink-3: #1c1c1f;
  --ink-line: #2a2a2e;
  --paper: #ffffff;         /* brand white */
  --bg: #f3f3f5;
  --surface: #ffffff;
  --surface-2: #f6f6f8;
  --surface-3: #ececef;
  --border: #e5e5e9;
  --border-strong: #cfcfd6;
  --text: #0b0b0c;
  --text-2: #3f3f46;
  --muted: #777780;
  --danger: #e5383b;        /* discounts / urgency */
  --danger-soft: #fdecec;
  --success: #12a150;
  --success-soft: #e7f6ee;
  --warning: #c77700;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05), 0 2px 8px rgba(0, 0, 0, .04);
  --shadow: 0 12px 40px rgba(0, 0, 0, .12);
  --font: "Vazirmatn", "Montserrat", Tahoma, system-ui, sans-serif;
  --font-latin: "Montserrat", "Vazirmatn", system-ui, sans-serif;
  --container: 1280px;
  --bottom-nav-h: 0px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.8;
  -webkit-font-smoothing: antialiased; padding-bottom: var(--bottom-nav-h);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .6em; line-height: 1.45; font-weight: 800; }
h1 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
del { color: var(--muted); font-size: .85em; }
code { background: var(--surface-3); padding: .1em .4em; border-radius: 6px; font-family: monospace; }
[hidden] { display: none !important; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 16px; }
.narrow { max-width: 560px; }
.site-main { flex: 1; padding-bottom: 56px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; justify-content: center; }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }
.text-danger { color: var(--danger) !important; }
.text-accent { color: var(--success); }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.hide-sm { display: inline; }
.eyebrow { display: inline-block; font-family: var(--font-latin); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.lead { color: var(--text-2); font-size: 1.02rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent; background: none;
  font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: transform .15s, background .2s, color .2s, border-color .2s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover:not(:disabled) { background: #26262a; }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #e9e9ec; }
.btn-outline { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.btn-outline:hover { border-color: var(--ink); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-sm { height: 36px; padding: 0 14px; font-size: .85rem; border-radius: 10px; }
.btn-lg { height: 54px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn.is-loading { pointer-events: none; opacity: .7; }
.btn.is-loading::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { color: var(--text); background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }
.icon-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px; border-radius: 12px; border: 0; background: none; cursor: pointer; position: relative; color: inherit; }
.icon-btn:hover { background: rgba(127, 127, 127, .14); }

/* ---------- Header (black — carries the logo) ---------- */
.announce { background: var(--ink-2); color: #c9c9cf; font-size: .8rem; }
.announce-inner { display: flex; justify-content: center; gap: 22px; height: 34px; align-items: center; overflow: hidden; white-space: nowrap; }
.announce b { color: var(--paper); font-weight: 700; }
.announce .dot-sep { width: 4px; height: 4px; border-radius: 50%; background: #55555c; }

.site-header { position: sticky; top: 0; z-index: 50; background: var(--ink); color: var(--paper); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 76px; }
.menu-toggle { display: none; }
.brand-mark { display: inline-block; position: relative; overflow: hidden; width: 98px; height: 64px; flex-shrink: 0; }
.brand-mark img { position: absolute; width: 140px; height: 140px; max-width: none; left: 50%; top: 50%; transform: translate(-48.5%, -48.5%); }
.brand-mark-lg { width: 160px; height: 104px; }
.brand-mark-lg img { width: 232px; height: 232px; }
.on-light .brand-mark, .brand-mark.on-light { background: var(--ink); border-radius: 16px; }

.search { position: relative; flex: 1; max-width: 620px; }
.search input { width: 100%; height: 46px; border-radius: 12px; border: 1px solid transparent; background: var(--ink-3); color: var(--paper); padding: 0 46px 0 16px; outline: none; transition: background .2s, border-color .2s; }
.search input::placeholder { color: #8b8b93; }
.search input:focus { background: var(--paper); color: var(--text); border-color: var(--paper); }
.search-icon { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: #8b8b93; pointer-events: none; }
.search-results { position: absolute; top: calc(100% + 8px); inset-inline: 0; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); overflow-y: auto; max-height: 440px; z-index: 5; }
.search-result { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.search-result:last-child { border-bottom: 0; }
.search-result:hover, .search-result.active { background: var(--surface-2); }
.search-result img, .search-result .img-placeholder { width: 46px; height: 46px; border-radius: var(--radius-xs); object-fit: cover; background: var(--surface-3); font-size: .7rem; flex-shrink: 0; }
.search-result .sr-name { font-weight: 700; font-size: .92rem; }
.search-result .sr-meta { color: var(--muted); font-size: .8rem; }
.search-empty { padding: 14px; color: var(--muted); font-size: .9rem; }

.header-actions { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.header-actions .btn-outline { background: transparent; color: var(--paper); border-color: #3a3a40; }
.header-actions .btn-outline:hover { border-color: var(--paper); }
.badge { position: absolute; top: 0; left: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 800; display: grid; place-items: center; line-height: 1; }
.badge.is-empty { display: none; }
.badge.bump { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.35); } }

.category-nav { border-top: 1px solid var(--ink-line); }
.category-nav-inner { display: flex; align-items: center; gap: 4px; height: 48px; }
.nav-item { position: relative; height: 100%; display: flex; align-items: center; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; color: #cfcfd5; font-size: .9rem; white-space: nowrap; transition: background .2s, color .2s; }
.nav-link:hover, .nav-link.active { background: var(--ink-3); color: var(--paper); }
.nav-link.is-hot { color: var(--paper); font-weight: 700; }
.nav-link.is-hot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); }
.nav-spacer { flex: 1; }
.mega { position: absolute; top: 100%; right: 0; min-width: 560px; background: var(--surface); color: var(--text); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow); padding: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 18px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility 0s .18s; }
.nav-item:hover .mega, .nav-item:focus-within .mega { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .18s; }
.mega-col { display: flex; flex-direction: column; gap: 2px; }
.mega-col > a:first-child { font-weight: 800; padding: 6px 8px; border-inline-start: 2px solid var(--ink); }
.mega-col a { padding: 4px 8px; border-radius: 8px; font-size: .9rem; color: var(--text-2); }
.mega-col a:hover { background: var(--surface-2); color: var(--text); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 100; bottom: calc(20px + var(--bottom-nav-h)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 10px; width: min(92vw, 420px); pointer-events: none; }
.toast { pointer-events: auto; background: var(--ink); color: var(--paper); padding: 14px 18px; border-radius: var(--radius-sm); box-shadow: var(--shadow); font-weight: 600; animation: toast-in .3s ease; border-inline-start: 5px solid var(--paper); }
.toast-success { border-color: var(--success); }
.toast-error { border-color: var(--danger); }
.toast-warning { border-color: var(--warning); }
.toast.is-leaving { animation: toast-out .3s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(16px); } }

/* ---------- Cart drawer ---------- */
body.drawer-open { overflow: hidden; }
.drawer-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .45); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.drawer-overlay.is-open { opacity: 1; visibility: visible; transition: opacity .3s; }
.drawer { position: fixed; z-index: 95; top: 0; bottom: 0; left: 0; width: min(420px, 92vw); display: flex; flex-direction: column; background: var(--surface); box-shadow: 20px 0 60px rgba(0, 0, 0, .2); outline: none; transform: translateX(-105%); visibility: hidden; transition: transform .35s cubic-bezier(.2, .8, .2, 1), visibility 0s .35s; }
.drawer.is-open { transform: none; visibility: visible; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--ink); color: var(--paper); }
.drawer-head h3 { margin: 0; }
.drawer-head .muted { color: #9a9aa2; }
.drawer-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.drawer-skeleton { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.drawer-skeleton span { height: 76px; border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.mini-cart-list { list-style: none; margin: 0; padding: 4px 20px; overflow-y: auto; flex: 1; }
.mini-cart-item { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); transition: opacity .2s; }
.mini-cart-item:last-child { border-bottom: 0; }
.mini-cart-item.is-loading { opacity: .45; pointer-events: none; }
.mini-cart-media { width: 76px; height: 76px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.mini-cart-media img { width: 100%; height: 100%; object-fit: cover; }
.mini-cart-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mini-cart-title { font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-cart-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.mini-cart-row .price strong { font-size: .92rem; }
.mini-cart-footer { border-top: 1px solid var(--border); padding: 16px 20px 20px; background: var(--surface); }
.mini-cart-footer .summary-list { margin-bottom: 0; }
.mini-cart-footer .summary-total { border-top: 0; padding-top: 6px; }
.mini-cart-actions { display: flex; gap: 10px; }
.free-ship { margin-bottom: 10px; }
.free-ship-bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin-top: 6px; }
.free-ship-bar span { display: block; height: 100%; background: var(--ink); border-radius: 6px; transition: width .5s ease; }
.free-ship.is-done { color: var(--success); }
.mini-cart-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 40px 20px; color: var(--muted); text-align: center; }
.mini-cart-empty svg { color: var(--border-strong); margin-bottom: 6px; }

/* ---------- Generic sections ---------- */
.section { margin-top: 36px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.section-head h2::before { content: ""; width: 4px; height: 22px; border-radius: 4px; background: var(--ink); }
.section-head .more { display: inline-flex; align-items: center; gap: 4px; font-size: .9rem; font-weight: 700; color: var(--text-2); }
.section-head .more:hover { color: var(--text); }
.card-panel { background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.slider-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm); transition: background .2s, color .2s, transform .15s; }
.slider-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.slider-btn:active { transform: scale(.94); }
.rail-nav { display: flex; align-items: center; gap: 8px; }

/* ---------- Hero banners (full width, admin managed) ---------- */
.hero { margin-top: 20px; }
.hero-slider { position: relative; border-radius: 24px; overflow: hidden; background: var(--ink); color: var(--paper); user-select: none; touch-action: pan-y; }
.hero-slides { position: relative; height: clamp(400px, 36vw, 470px); }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s .6s; }
.hero-slide.is-active { opacity: 1; visibility: visible; transition: opacity .6s ease; }
.hero-slide > img.cover { width: 100%; height: 100%; object-fit: cover; }
.hero-compose { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; height: 100%; padding-inline: clamp(24px, 5vw, 72px); background: radial-gradient(ellipse at 25% 50%, #2a2a2e 0%, #000 65%); }
.hero-copy h2 { font-size: clamp(1.4rem, 3vw, 2.3rem); line-height: 1.4; margin-bottom: 10px; }
.hero-copy p { color: #b9b9c0; max-width: 460px; }
.hero-copy .eyebrow { color: #9a9aa2; }
.hero-copy .price { align-items: flex-start; margin-bottom: 18px; }
.hero-copy .price strong { font-size: 1.3rem; }
.hero-visual { height: 100%; display: grid; place-items: center; padding-block: 24px; }
.hero-visual img { max-height: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.hero-slider .slider-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; background: rgba(255, 255, 255, .12); border-color: transparent; color: var(--paper); box-shadow: none; }
.hero-slider .slider-btn:hover { background: var(--paper); color: var(--ink); }
.slider-prev { right: 16px; }
.slider-next { left: 16px; }
.slider-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 2; }
.dot { width: 22px; height: 4px; border: 0; padding: 0; border-radius: 4px; background: rgba(255, 255, 255, .3); cursor: pointer; overflow: hidden; transition: width .3s; }
.dot span { display: block; width: 0; height: 100%; background: var(--paper); }
.dot.is-active { width: 40px; }
.dot.is-active span { animation: dot-progress var(--slide-interval, 5s) linear forwards; }
.hero-slider.is-paused .dot.is-active span { animation-play-state: paused; }
@keyframes dot-progress { to { width: 100%; } }

/* ---------- Service shortcuts / trust strip ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.service { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); transition: transform .2s; }
.service:hover { transform: translateY(-2px); }
.service-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: var(--paper); display: grid; place-items: center; flex-shrink: 0; }
.service b { display: block; font-size: .92rem; }
.service span { color: var(--muted); font-size: .8rem; }

/* ---------- Category circles ---------- */
.cat-circles { display: flex; gap: 18px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; justify-content: space-between; }
.cat-circles::-webkit-scrollbar { display: none; }
.cat-circle { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 92px; text-align: center; font-size: .86rem; font-weight: 600; color: var(--text-2); }
.cat-circle-img { width: 88px; height: 88px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-sm); display: grid; place-items: center; overflow: hidden; border: 2px solid transparent; transition: border-color .2s, transform .2s; }
.cat-circle-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-circle-img .initial { font-size: 1.6rem; font-weight: 800; color: var(--ink); }
.cat-circle:hover .cat-circle-img { border-color: var(--ink); transform: translateY(-2px); }
.cat-circle:hover { color: var(--text); }

/* ---------- Flash sale (countdown) ---------- */
.flash { background: var(--ink); color: var(--paper); border-radius: 24px; padding: 18px; display: grid; grid-template-columns: 210px 1fr; gap: 16px; align-items: stretch; }
.flash-intro { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 10px; padding: 10px; }
.flash-intro h2 { margin: 0; font-size: 1.45rem; line-height: 1.4; }
.flash-intro h2 em { font-style: normal; color: var(--danger); }
.flash-intro .btn-light { height: 38px; font-size: .85rem; }
.countdown { display: inline-flex; gap: 6px; direction: ltr; }
.countdown span { min-width: 40px; height: 40px; border-radius: 10px; background: var(--paper); color: var(--ink); display: grid; place-items: center; font-weight: 800; font-family: var(--font-latin); font-size: 1.05rem; }
.countdown i { font-style: normal; align-self: center; font-weight: 800; }
.flash .rail { padding: 2px; }
.flash .product-card { box-shadow: none; }

/* ---------- Product rails ---------- */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, calc((100% - 4 * 12px) / 5)); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; min-width: 0; }
.rail .product-card { height: 100%; }

/* ---------- Best sellers (numbered) ---------- */
.bestsellers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; }
.bs-item { display: grid; grid-template-columns: 72px 32px 1fr; gap: 10px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.bs-item:hover .bs-name { text-decoration: underline; text-underline-offset: 3px; }
.bs-img { width: 72px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.bs-img img { width: 100%; height: 100%; object-fit: cover; }
.bs-rank { font-family: var(--font-latin); font-size: 1.7rem; font-weight: 800; color: var(--ink); text-align: center; }
.bs-name { font-weight: 700; font-size: .9rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bs-price { font-size: .85rem; color: var(--text-2); }

/* ---------- Promo banners ---------- */
.promos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.promo-card { position: relative; border-radius: 22px; overflow: hidden; min-height: 200px; display: flex; align-items: center; background: var(--ink); color: var(--paper); }
.promo-card > img.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.promo-card.is-light { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.promo-body { position: relative; padding: 28px; max-width: 62%; }
.promo-body h3 { font-size: 1.35rem; margin-bottom: 6px; }
.promo-body p { opacity: .75; font-size: .9rem; }
.promo-thumb { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); width: 34%; aspect-ratio: 1; border-radius: 18px; overflow: hidden; }
.promo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.promo-steps { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); display: grid; grid-template-columns: repeat(2, 54px); gap: 8px; }
.promo-steps span { aspect-ratio: 1; border-radius: 14px; border: 1.5px solid currentColor; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; }
.promo-steps span:first-child { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Price tiers ---------- */
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tier { background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 2px; border: 1px solid transparent; transition: border-color .2s, transform .2s; }
.tier:hover { border-color: var(--ink); transform: translateY(-2px); }
.tier b { font-size: 1.05rem; }
.tier span { color: var(--muted); font-size: .85rem; }
.tier:nth-child(4) { background: var(--ink); color: var(--paper); }
.tier:nth-child(4) span { color: #a6a6ae; }

/* ---------- Brands ---------- */
.brand-row { display: flex; flex-wrap: wrap; gap: 12px; }
.brand-chip { height: 72px; min-width: 130px; flex: 1; padding: 0 20px; border-radius: var(--radius-sm); display: grid; place-items: center; font-family: var(--font-latin); font-weight: 800; font-size: 1.05rem; background: var(--surface); box-shadow: var(--shadow-sm); border: 1px solid transparent; filter: grayscale(1); transition: border-color .2s, filter .2s; }
.brand-chip img { max-height: 38px; width: auto; }
.brand-chip:hover { border-color: var(--ink); filter: none; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; align-items: start; }
.faq-intro { background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: 26px; }
.faq-intro p { color: #b4b4bb; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.faq-item summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; line-height: 1; transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-answer { padding: 0 18px 16px; color: var(--text-2); }

/* ---------- Product card ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.product-card { position: relative; color: var(--text); background: var(--surface); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); border: 1px solid transparent; transition: border-color .2s, box-shadow .2s, transform .2s; }
.product-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.product-card.is-out .product-card-media img { filter: grayscale(1); opacity: .6; }
.product-card-media { position: relative; aspect-ratio: 1; background: var(--surface-2); display: grid; place-items: center; margin: 8px 8px 0; border-radius: 14px; overflow: hidden; }
.product-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.product-card:hover .product-card-media img { transform: scale(1.04); }
.swatches { position: absolute; bottom: 8px; left: 8px; display: flex; gap: 3px; padding: 4px 6px; border-radius: 999px; background: rgba(255, 255, 255, .9); }
.swatches .swatch { width: 12px; height: 12px; }
.swatches small { font-size: .7rem; color: var(--muted); line-height: 12px; }
.product-card-body { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.product-card-brand { font-family: var(--font-latin); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.product-card-title { font-size: .92rem; font-weight: 700; margin: 0; line-height: 1.7; min-height: 3.2em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.low-stock { color: var(--danger); font-size: .78rem; font-weight: 600; }
.price-row { margin-top: auto; padding-top: 8px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.price { display: flex; flex-direction: column; align-items: flex-end; }
.price strong { font-size: 1rem; font-weight: 800; }
.price-lg strong { font-size: 1.6rem; }
.off-badge { background: var(--danger); color: #fff; font-size: .78rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; align-self: center; }
.tag { position: absolute; top: 10px; right: 10px; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 800; }
.tag-discount { background: var(--danger); color: #fff; }
.tag-muted { background: var(--ink); color: var(--paper); }
.tag-outline { position: static; border: 1px solid var(--border-strong); color: var(--text-2); font-weight: 600; font-size: .72rem; }
.tag-lg { font-size: .9rem; padding: 4px 14px; }
.card-timer { font-size: .75rem; color: var(--danger); font-weight: 700; direction: ltr; display: inline-flex; gap: 4px; align-items: center; }
.img-placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--font-latin); font-weight: 800; font-size: 2.2rem; color: var(--border-strong); background: var(--surface-2); }
.img-placeholder-lg { font-size: 5rem; aspect-ratio: 1; }
.swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); display: inline-block; vertical-align: middle; }
.swatch-sm { width: 12px; height: 12px; }

/* ---------- Page head / breadcrumb ---------- */
.page-head { padding-top: 24px; padding-bottom: 6px; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb > *:not(:last-child)::after { content: "‹"; margin-inline-start: 8px; color: var(--border-strong); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .85rem; color: var(--text-2); }
.chip:hover, .chip.active { border-color: var(--ink); color: var(--text); }
.chip.active { background: var(--ink); color: var(--paper); }

/* ---------- Catalog ---------- */
.catalog { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; margin-top: 12px; }
.filters { position: sticky; top: 140px; background: var(--surface); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow-sm); }
.filters-head { display: flex; align-items: center; justify-content: space-between; }
.filters-head h3 { margin: 0; }
.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-title { font-weight: 700; font-size: .9rem; color: var(--text-2); }
.catalog-results { min-height: 300px; transition: opacity .2s; }
.catalog-results.is-loading { opacity: .4; pointer-events: none; }
.grid-meta { display: flex; justify-content: space-between; margin-bottom: 12px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: .88rem; color: var(--text-2); font-weight: 600; }
.field input, .field select, .field textarea, .input {
  width: 100%; min-height: 46px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2);
  padding: 10px 14px; outline: none; transition: border-color .2s, background .2s;
}
.field textarea, textarea.input { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--ink); background: var(--surface); }
.field input:disabled { opacity: .6; }
.field input.is-invalid { border-color: var(--danger); background: var(--danger-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-row > * { min-width: 0; width: 100%; box-sizing: border-box; } /* inputs have an intrinsic width; without this the 2nd one overflows narrow columns */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-full { grid-column: 1 / -1; }
.check, .switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: .92rem; }
.check input, .switch input, .option-card input { accent-color: var(--ink); width: 18px; height: 18px; }
.form-error { color: var(--danger); font-size: .9rem; margin: 10px 0 0; }
.otp-input { text-align: center; letter-spacing: .6em; font-size: 1.4rem !important; font-family: var(--font-latin); direction: ltr; }
.debug-code { background: #fff8e6; border: 1px dashed #e8b84a; border-radius: var(--radius-xs); padding: 8px 12px; font-size: .85rem; color: var(--warning); margin: 0; }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.panel-compact { padding: 18px; }
.empty-state { text-align: center; padding: 56px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--text-2); background: var(--surface); }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 8px; background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.gallery-main { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); aspect-ratio: 1; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.thumb { width: 72px; height: 72px; border-radius: var(--radius-sm); border: 2px solid transparent; overflow: hidden; padding: 0; background: var(--surface-2); cursor: pointer; flex-shrink: 0; opacity: .7; transition: opacity .2s, border-color .2s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active, .thumb:hover { opacity: 1; border-color: var(--ink); }
.product-title { font-size: clamp(1.3rem, 2.6vw, 1.9rem); }
.variant-picker { margin: 16px 0; display: flex; flex-direction: column; gap: 10px; }
.variant-list { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; font-size: .88rem; transition: border-color .2s; }
.variant-chip:hover { border-color: var(--border-strong); }
.variant-chip.active { border-color: var(--ink); background: var(--surface-2); }
.variant-chip.is-out { opacity: .45; text-decoration: line-through; }
.buy-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; background: var(--surface-2); display: flex; flex-direction: column; gap: 14px; }
.buy-box .price { align-items: flex-start; }
.stock-line { margin: 0; color: var(--success); font-size: .92rem; font-weight: 600; }
.stock-line.is-low { color: var(--warning); }
.stock-line.is-out { color: var(--danger); }
.buy-actions { display: flex; gap: 12px; align-items: center; }
.buy-perks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--text-2); font-size: .85rem; }
.buy-perks li::before { content: "✓"; margin-inline-end: 6px; color: var(--success); font-weight: 800; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 12px; height: 54px; overflow: hidden; background: var(--surface); }
.qty button { width: 44px; height: 100%; border: 0; background: none; cursor: pointer; font-size: 1.2rem; }
.qty button:hover:not(:disabled) { background: var(--surface-3); }
.qty button:disabled { opacity: .3; cursor: not-allowed; }
.qty input { width: 40px; text-align: center; border: 0; background: none; outline: none; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm { height: 38px; border-radius: 10px; }
.qty-sm button { width: 34px; }
.qty-sm span, .qty-xs span { min-width: 24px; text-align: center; }
.qty-xs { height: 32px; border-radius: 9px; }
.qty-xs button { width: 30px; font-size: 1rem; display: grid; place-items: center; }
.product-tabs { margin-top: 20px; display: grid; gap: 16px; }
.prose { color: var(--text-2); }
.spec-group h3 { color: var(--muted); font-size: .9rem; margin-top: 12px; }
.spec-table { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; margin: 0; }
.spec-table dt, .spec-table dd { padding: 10px 12px; margin: 0; border-bottom: 1px solid var(--border); }
.spec-table dt { color: var(--muted); background: var(--surface-2); }

/* ---------- Cart / checkout ---------- */
.cart-layout, .checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; margin-top: 8px; }
/* grid columns may shrink below their content, so a wide table scrolls inside its panel instead of widening the page */
.cart-layout > *, .checkout-layout > * { min-width: 0; }
.cart-aside { position: sticky; top: 140px; display: flex; flex-direction: column; gap: 12px; }
.cart-items { padding: 6px 22px; transition: opacity .2s; }
.cart-items.is-loading { opacity: .5; pointer-events: none; }
.cart-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); align-items: center; }
.cart-item:last-child { border-bottom: 0; }
.cart-item.is-unavailable { opacity: .75; }
.cart-item-media { width: 96px; height: 96px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.cart-item-media img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart-item-info .price { align-items: flex-start; }
.cart-item-title { font-weight: 700; }
.cart-item-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.summary-card { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.summary-list { display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; margin: 0 0 12px; font-size: .92rem; }
.summary-list dt { color: var(--text-2); }
.summary-list dd { margin: 0; text-align: end; }
.summary-total { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--border); margin-top: 6px; }
.summary-total strong { font-size: 1.25rem; }
.coupon-box { display: flex; gap: 8px; margin-top: 8px; }
.coupon-box input { flex: 1; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); padding: 0 14px; outline: none; text-transform: uppercase; direction: ltr; text-align: right; }
.coupon-box input:focus { border-color: var(--ink); }
.option-list { display: flex; flex-direction: column; gap: 10px; }
.option-card { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer; transition: border-color .2s, background .2s; }
.option-card:hover { border-color: var(--border-strong); }
.option-card:has(input:checked) { border-color: var(--ink); background: var(--surface-2); }
.option-card.is-disabled { opacity: .5; cursor: not-allowed; }
.option-card input { margin-top: 5px; flex-shrink: 0; }
.option-body { display: flex; flex-direction: column; gap: 2px; }
.new-address { margin-top: 16px; }
.mini-items { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: .88rem; }
.mini-items li { display: flex; justify-content: space-between; gap: 12px; }
.steps { display: flex; gap: 8px; margin-bottom: 14px; font-size: .85rem; }
.step { padding: 4px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.step.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.step.done { color: var(--text); }

/* ---------- Orders ---------- */
.order-list { display: flex; flex-direction: column; gap: 10px; }
.order-row { display: grid; grid-template-columns: 1.2fr auto 1fr auto; gap: 16px; align-items: center; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); transition: border-color .2s; }
.order-row:hover { border-color: var(--ink); }
.order-row > div { display: flex; flex-direction: column; }
.order-items { list-style: none; padding: 0; margin: 0; }
.order-items li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.order-items li:last-child { border-bottom: 0; }
.status { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.status-paid, .status-delivered, .status-p-success { background: var(--success-soft); color: var(--success); }
.status-pending, .status-p-initiated { background: #fff4e0; color: var(--warning); }
.status-cancelled, .status-refunded, .status-p-failed, .status-p-cancelled, .status-p-refunded { background: var(--danger-soft); color: var(--danger); }
.status-processing, .status-shipped { background: var(--ink); color: var(--paper); }
.table-wrap { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; padding-bottom: 2px; }
.table-wrap::-webkit-scrollbar { height: 6px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: start; vertical-align: middle; white-space: nowrap; }
.table td[colspan] { white-space: normal; } /* instalment cards under a payment */
@media (max-width: 640px) { .table { font-size: .82rem; } .table th, .table td { padding: 10px 6px; } }
/* phones: a stacked table — each row is a block, each cell a "label … value" line */
@media (max-width: 560px) {
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: 4px 0; border-bottom: 1px solid var(--border); }
  .table-stack tr:last-child { border-bottom: 0; }
  .table-stack td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 0; }
  .table-stack td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; }
  .table-stack td[colspan] { display: block; }
  .table-stack td[colspan]::before { content: none; }
}
.table th { color: var(--muted); font-weight: 600; }
.installments { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 8px 0 16px; }
.installment { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: .88rem; background: var(--surface); }
.installment.paid { border-color: var(--success); background: var(--success-soft); }

/* ---------- Payment gateway / result ---------- */
.gateway-card, .result-card { margin-top: 40px; background: var(--surface); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.gateway-head { text-align: center; margin-bottom: 20px; }
.gateway-head .tag-outline { display: inline-block; margin-bottom: 8px; }
.gateway-actions { display: flex; gap: 10px; margin-top: 20px; }
.result-card { text-align: center; }
.result-card .summary-list { text-align: start; margin-top: 18px; }
.result-icon { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; border: 2px solid currentColor; }
.result-card.is-success .result-icon { color: var(--success); background: var(--success-soft); }
.result-card.is-failed .result-icon { color: var(--danger); background: var(--danger-soft); }
.error-code { font-family: var(--font-latin); font-size: 5rem; font-weight: 800; letter-spacing: -.05em; line-height: 1; margin-bottom: 12px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ---------- Auth ---------- */
.auth { display: grid; place-items: center; padding-top: 40px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border-radius: 24px; padding: 30px 26px; box-shadow: var(--shadow); }
.auth-card h1 { text-align: center; font-size: 1.35rem; }
.auth-logo { display: block; margin: 0 auto 10px; background: var(--ink); border-radius: 20px; }
.auth-switch { text-align: center; margin: 22px 0 0; color: var(--text-2); font-size: .92rem; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-3); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.tab { border: 0; background: none; height: 38px; border-radius: 9px; cursor: pointer; color: var(--text-2); font-weight: 600; font-size: .9rem; }
.tab.active { background: var(--ink); color: var(--paper); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- Profile ---------- */
.profile-layout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.profile-nav { position: sticky; top: 140px; display: flex; flex-direction: column; gap: 4px; background: var(--surface); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow-sm); }
.profile-nav a { padding: 10px 14px; border-radius: var(--radius-sm); color: var(--text-2); }
.profile-nav a:hover { background: var(--surface-2); color: var(--text); }
.address-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.address-card { display: flex; justify-content: space-between; gap: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.address-card p { margin: 4px 0 0; }
.address-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.add-address summary { list-style: none; display: inline-flex; }
.add-address summary::-webkit-details-marker { display: none; }
.add-address[open] summary { margin-bottom: 16px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.page-link { min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; font-size: .9rem; }
.page-link:hover { border-color: var(--ink); }
.page-link.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.page-link.dots { border: 0; background: none; }

/* ---------- Footer (black) ---------- */
.site-footer { background: var(--ink); color: #c9c9cf; padding-top: 40px; margin-top: 24px; }
.footer-top { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding-bottom: 28px; border-bottom: 1px solid var(--ink-line); }
.footer-identity { display: flex; align-items: center; gap: 14px; }
.footer-identity > div { display: flex; flex-direction: column; line-height: 1.5; }
.footer-tagline { font-size: .85rem; color: #9a9aa2; }
.footer-name { font-size: 1.5rem; color: #fff; }
.footer-name-en { font-family: var(--font-latin); letter-spacing: .3em; font-size: .78rem; color: #c9c9cf; }
.contact-strip { display: flex; align-items: stretch; }
.contact-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 28px; color: #fff; text-align: center; }
.contact-item + .contact-item { border-inline-start: 1px solid #3a3a40; }
.contact-item b { font-family: var(--font-latin); font-size: .95rem; letter-spacing: .02em; }
.contact-item small { font-family: var(--font-latin); font-size: .65rem; letter-spacing: .3em; color: #8b8b93; }
.contact-item:hover b { text-decoration: underline; text-underline-offset: 4px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; padding-top: 28px; }
.footer-grid h4 { font-size: .95rem; color: var(--paper); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: .9rem; }
.footer-grid a:hover { color: var(--paper); }
.footer-brand p { max-width: 360px; font-size: .88rem; color: #9a9aa2; }
.socials { display: flex; gap: 8px; }
.social { width: 40px; height: 40px; border-radius: 12px; background: var(--ink-3); display: grid; place-items: center; color: var(--paper); transition: background .2s, color .2s; }
.social:hover { background: var(--paper); color: var(--ink); }
.footer-bottom { border-top: 1px solid var(--ink-line); margin-top: 32px; padding-block: 18px; color: #77777f; font-size: .82rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Floating support & mobile bottom nav ---------- */
.support-fab { position: fixed; z-index: 60; left: 18px; bottom: calc(18px + var(--bottom-nav-h)); width: 54px; height: 54px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; box-shadow: var(--shadow); border: 2px solid var(--paper); transition: transform .2s; }
.support-fab:hover { transform: scale(1.06); }
.bottom-nav { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .rail { grid-auto-columns: minmax(190px, calc((100% - 3 * 12px) / 4)); }
  .bestsellers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bestsellers .bs-item:nth-child(n+7) { display: none; }
}
@media (max-width: 1024px) {
  .catalog { grid-template-columns: 1fr; }
  .filters { position: static; }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .cart-aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .services, .tiers { grid-template-columns: repeat(2, 1fr); }
  .flash { grid-template-columns: 1fr; }
  .flash-intro { flex-direction: row; justify-content: space-between; flex-wrap: wrap; text-align: start; }
  .faq { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  :root { --bottom-nav-h: 64px; }
  .announce-inner { justify-content: flex-start; }
  .menu-toggle { display: inline-flex; }
  .category-nav { display: none; }
  .category-nav.is-open { display: block; }
  .category-nav-inner { flex-direction: column; align-items: stretch; height: auto; padding-block: 8px; }
  .nav-item { height: auto; flex-direction: column; align-items: stretch; }
  .mega { display: none; }
  .nav-spacer { display: none; }
  .header-inner { flex-wrap: wrap; height: auto; padding-block: 8px; gap: 8px 12px; }
  .search { order: 5; flex-basis: 100%; max-width: none; }
  .hide-sm { display: none; }
  .header-actions .cart-btn { display: none; }
  .hero-slides { height: 470px; }
  .hero-compose { grid-template-columns: 1fr; grid-template-rows: auto 1fr; text-align: center; padding: 26px 20px 46px; gap: 10px; }
  .hero-copy p { margin-inline: auto; }
  .hero-copy .price { align-items: center; }
  .hero-visual { padding: 0; order: -1; }
  .hero-visual img { max-height: 150px; }
  .hero-copy p { display: none; }
  .hero-copy h2 { font-size: 1.3rem; }
  .hero-copy .price { margin-bottom: 12px; }
  .hero-slider .slider-btn { display: none; }
  .product-detail { grid-template-columns: 1fr; gap: 18px; padding: 14px; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-nav { position: static; flex-direction: row; overflow-x: auto; }
  .profile-nav a { white-space: nowrap; }
  .order-row { grid-template-columns: 1fr auto; }
  .promos { grid-template-columns: 1fr; }
  .bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; z-index: 70; inset-inline: 0; bottom: 0; height: var(--bottom-nav-h); background: var(--ink); color: #a6a6ae; border-top: 1px solid var(--ink-line); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .72rem; background: none; border: 0; color: inherit; cursor: pointer; position: relative; }
  .bottom-nav .is-active { color: var(--paper); }
  .bottom-nav .badge { top: 6px; left: calc(50% - 20px); }
}
@media (max-width: 560px) {
  body { font-size: 14px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .rail { grid-auto-columns: 46%; gap: 8px; }
  .product-card-body { padding: 8px 10px 12px; }
  .product-card-title { font-size: .84rem; }
  .price strong { font-size: .9rem; }
  .form-grid, .field-row { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 72px 1fr; }
  .cart-item-media { width: 72px; height: 72px; }
  .cart-item-actions { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .buy-actions { flex-wrap: wrap; }
  .gateway-actions { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  /* phones: contacts in a 2-column grid so handles and the website never break mid-word */
  .contact-strip { width: 100%; display: grid; grid-template-columns: 1fr 1fr; row-gap: 18px; }
  .contact-item { padding: 4px 6px; min-width: 0; }
  .contact-item:nth-child(odd) { border-inline-start: 0; }
  .contact-item:nth-child(even) { border-inline-start: 1px solid #3a3a40; }
  .contact-item b { font-size: .8rem; overflow-wrap: anywhere; }
  .services { grid-template-columns: 1fr 1fr; gap: 8px; }
  .service { flex-direction: column; text-align: center; padding: 12px 8px; gap: 6px; }
  .tiers { gap: 8px; }
  .bestsellers { grid-template-columns: minmax(0, 1fr); }
  .bestsellers .bs-item:nth-child(n+6) { display: none; }
  .brand-mark { width: 82px; height: 54px; }
  .brand-mark img { width: 116px; height: 116px; }
  .brand-mark-lg { width: 160px; height: 104px; }
  .brand-mark-lg img { width: 232px; height: 232px; }
  .panel, .gateway-card, .result-card, .card-panel { padding: 16px; }
  .cat-circle { min-width: 76px; font-size: .8rem; }
  .cat-circle-img { width: 70px; height: 70px; }
  .flash { padding: 12px; border-radius: 20px; }
  .countdown span { min-width: 34px; height: 34px; font-size: .95rem; }
  .promo-body { max-width: 60%; padding: 20px; }
  .promo-body h3 { font-size: 1.1rem; }
  .promo-steps { grid-template-columns: repeat(2, 40px); }
  .promo-steps span { font-size: 1rem; border-radius: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* =========================================================================
   English (LTR) — mirror the few physically-positioned elements
   ========================================================================= */
html[lang="en"] { --font: "Montserrat", "Vazirmatn", system-ui, sans-serif; }
html[lang="en"] body { line-height: 1.65; }
html[dir="ltr"] .search input { padding: 0 16px 0 46px; }
html[dir="ltr"] .search-icon { right: auto; left: 16px; }
html[dir="ltr"] .badge { left: auto; right: 0; }
html[dir="ltr"] .bottom-nav .badge { left: calc(50% + 4px); right: auto; }
html[dir="ltr"] .mega { right: auto; left: 0; }
html[dir="ltr"] .drawer { left: auto; right: 0; transform: translateX(105%); box-shadow: -20px 0 60px rgba(0, 0, 0, .2); }
html[dir="ltr"] .drawer.is-open { transform: none; }
html[dir="ltr"] .slider-prev { right: auto; left: 16px; }
html[dir="ltr"] .slider-next { left: auto; right: 16px; }
html[dir="ltr"] :is(.slider-btn, .rail-nav .slider-btn) svg { transform: scaleX(-1); }
html[dir="ltr"] :is(.promo-thumb, .promo-steps) { left: auto; right: 22px; }
html[dir="ltr"] .promo-body { margin-inline-end: auto; }
html[dir="ltr"] .swatches { left: auto; right: 8px; }
html[dir="ltr"] .tag { right: auto; left: 10px; }
html[dir="ltr"] .tag-muted { left: 10px; }
html[dir="ltr"] .breadcrumb > *:not(:last-child)::after { content: "›"; }
html[dir="ltr"] .coupon-box input { text-align: left; }
html[dir="ltr"] .support-fab { left: auto; right: 18px; }
html[dir="ltr"] .slider-dots { direction: ltr; }
.lang-switch { display: inline-grid; place-items: center; min-width: 38px; height: 34px; padding: 0 8px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .22); color: #fff; font-family: var(--font-latin), "Vazirmatn", sans-serif; font-weight: 800; font-size: .8rem; letter-spacing: .04em; transition: background .2s, color .2s; }
.lang-switch:hover { background: #fff; color: #000; }
.nav-lang { display: none; }
@media (max-width: 820px) {
  .nav-lang { display: inline-flex; }
}

/* Category links scroll sideways when they don't fit (longer English names). */
.nav-scroll { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px); mask-image: linear-gradient(to right, transparent 0, #000 28px); }
html[dir="ltr"] .nav-scroll { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 28px); mask-image: linear-gradient(to left, transparent 0, #000 28px); }
.nav-scroll::-webkit-scrollbar { display: none; }
@media (max-width: 820px) {
  .nav-scroll, html[dir="ltr"] .nav-scroll { flex-direction: column; align-items: stretch; overflow: visible; -webkit-mask-image: none; mask-image: none; }
}