/* ============================================================
   MiCms — Industrial Theme
   Mobile-first storefront for industrial parts.
   Palette: white surfaces, Letronix green accents (#57a695).
   (The --red* token names are kept for stability; their values are green.)
   ============================================================ */

/* Vazirmatn — self-hosted Persian/Latin font (best free Farsi typeface) */
@font-face { font-family: 'Vazirmatn'; src: url('/static/themes/industrial/fonts/Vazirmatn-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/static/themes/industrial/fonts/Vazirmatn-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/static/themes/industrial/fonts/Vazirmatn-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/static/themes/industrial/fonts/Vazirmatn-ExtraBold.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  --red:        #57a695;
  --red-dark:   #468678;
  --red-light:  #e9f5f1;
  --red-border: #bfe0d8;
  --ink:        #1a1a1a;
  --ink-soft:   #444;
  --muted:      #777;
  --line:       #e6e6e6;
  --line-soft:  #f0f0f0;
  --line-strong:#d8d8d8;
  --bg:         #f5f5f5;
  --white:      #ffffff;
  /* Secondary surface: image wells, table heads, zebra stripes, spec group rows. */
  --surface-2:  #fafafa;
  --surface-3:  #f3f4f6;
  --footer-bg:  #1a1a1a;
  --footer-ink: #cfcfcf;
  --footer-head:#ffffff;
  --footer-base:#888888;
  --footer-line:#333333;
  --ok:         #1a8a3a;
  --ok-bg:      #dcfce7;
  --ok-ink:     #166534;
  --warn:       #c47f00;
  --warn-bg:    #fff3df;
  --radius:     8px;
  --radius-sm:  5px;
  --shadow:     0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);
  /* Content width: 70vw on wide screens (≈15% blank each side) — exactly 15%
     gutters on normal monitors, capped at 1600px so ultra-wide screens don't
     stretch text/grids. Never narrower than 1200px. On phones/tablets
     width:100% wins, so they stay full-screen with only small side padding. */
  --maxw:       clamp(1200px, 70vw, 1600px);
  --tabbar-h:   56px;
}

/* ── Dark mode ──────────────────────────────────────────────────────────────
   Same variables, dark values — no component CSS is duplicated. `data-theme`
   is written by the no-flash script in layout.html <head>; when the attribute
   is absent we follow the OS via prefers-color-scheme. The green accent is kept
   identical in both modes; only surfaces and text move.
   ─────────────────────────────────────────────────────────────────────────── */
:root[data-theme="dark"] {
  --red-light:  #16302a;
  --red-border: #2c4f47;
  --ink:        #f2f2f2;
  --ink-soft:   #cfcfcf;
  --muted:      #9a9a9a;
  --line:       #2c3238;
  --line-soft:  #232a30;
  --line-strong:#3a424a;
  --bg:         #14171a;
  --white:      #1e2226;
  --surface-2:  #191d21;
  --surface-3:  #232a30;
  --footer-bg:  #0f1214;
  --footer-ink: #b9c0c6;
  --footer-head:#ffffff;
  --footer-base:#7d858c;
  --footer-line:#2c3238;
  --ok:         #3fbe63;
  --ok-bg:      #16351f;
  --ok-ink:     #7ee2a0;
  --warn:       #e0a53a;
  --warn-bg:    #3a2c14;
  --shadow:     0 1px 3px rgba(0,0,0,.6);
  --shadow-md:  0 4px 16px rgba(0,0,0,.55);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --red-light:  #16302a;
    --red-border: #2c4f47;
    --ink:        #f2f2f2;
    --ink-soft:   #cfcfcf;
    --muted:      #9a9a9a;
    --line:       #2c3238;
    --line-soft:  #232a30;
    --line-strong:#3a424a;
    --bg:         #14171a;
    --white:      #1e2226;
    --surface-2:  #191d21;
    --surface-3:  #232a30;
    --footer-bg:  #0f1214;
    --footer-ink: #b9c0c6;
    --footer-head:#ffffff;
    --footer-base:#7d858c;
    --footer-line:#2c3238;
    --ok:         #3fbe63;
    --ok-bg:      #16351f;
    --ok-ink:     #7ee2a0;
    --warn:       #e0a53a;
    --warn-bg:    #3a2c14;
    --shadow:     0 1px 3px rgba(0,0,0,.6);
    --shadow-md:  0 4px 16px rgba(0,0,0,.55);
  }
}
/* Let form controls, scrollbars and the like pick the right built-in palette. */
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, "Iranian Sans", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip; /* guard full-bleed 100vw children from adding horizontal scroll */
}
img { display: block; max-width: 100%; }
a { color: var(--red); text-decoration: none; }
h1,h2,h3,h4 { line-height: 1.25; }

/* One font everywhere. Native form controls do NOT inherit font-family by
   default, so any <input>/<select>/<textarea>/<button> — including the many
   inline-styled ones in the seller forms — would otherwise render in the
   browser's UA font instead of Vazirmatn. This makes the whole theme one face. */
button, input, select, textarea, optgroup { font-family: inherit; }

/* ── Buttons (shared base classes used across all templates) ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--white); color: var(--ink); font-size: .9rem; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: all .15s; text-align: center;
}
.btn:hover { border-color: var(--red); color: var(--red); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 10px; font-size: .8rem; }
.flash { background: var(--red-light); border: 1px solid var(--red-border); color: var(--red-dark);
  padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: .9rem; }

/* ── Announcement ── */
.ind-announce { color: #fff; text-align: center; padding: 7px 14px; font-size: .8rem; }
.ind-announce a { color: #fff; text-decoration: underline; }

/* ── Header ── */
.ind-header { position: sticky; top: 0; z-index: 200; background: var(--white); box-shadow: var(--shadow); }
/* Three zones on one row: logo · nav · search · actions. The search is a flex
   item of the header row so it sits *between* the nav/account side and the
   cart/login buttons on desktop; on mobile it wraps to a full-width row below. */
.ind-header-inner {
  max-width: var(--maxw); margin: 0 auto; min-height: 52px; padding: 4px 12px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.ind-logo { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.ind-logo-img { height: 34px; width: auto; flex-shrink: 0; }
/* Hidden on mobile (logo image alone); the site title returns on desktop (≥900). */
.ind-logo-text { display: none; font-size: 1.15rem; font-weight: 800; color: var(--red); letter-spacing: -.3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ind-menu-btn { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
  width: 38px; height: 38px; padding: 8px; background: none; border: none; cursor: pointer; flex-shrink: 0; }
.ind-menu-btn span { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: .2s; }
.ind-menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.ind-menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.ind-menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.ind-header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-inline-start: auto; }
/* Icon + text label. The label is hidden on the narrowest screens (the bottom
   tab bar covers navigation there) and shown from 600px up. */
.ind-action-label { display: none; white-space: nowrap; }
.ind-cart { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 40px; height: 40px; padding: 0 6px; color: var(--ink); font-size: .85rem; font-weight: 600;
  border-radius: var(--radius-sm); }
.ind-cart:hover { color: var(--red); }
.ind-cart-ico { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.ind-cart-badge, .ind-tab-badge { position: absolute; top: -5px; right: -6px; min-width: 17px; height: 17px;
  padding: 0 4px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; line-height: 17px;
  border-radius: 9999px; text-align: center; align-items: center; justify-content: center; }
.ind-user { display: inline-flex; align-items: center; gap: 6px; }
.ind-user svg { flex-shrink: 0; }
.ind-signin { font-size: .85rem; font-weight: 600; padding: 7px 14px; }
/* Theme (sun/moon) toggle — same visual weight as the other icon actions. */
.ind-theme-toggle { display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0; background: none; border: none; cursor: pointer;
  color: var(--ink); border-radius: var(--radius-sm); flex-shrink: 0; }
.ind-theme-toggle:hover { color: var(--red); background: var(--line-soft); }
.ind-theme-toggle .ind-icon-moon { display: none; }
:root[data-theme="dark"] .ind-theme-toggle .ind-icon-sun { display: none; }
:root[data-theme="dark"] .ind-theme-toggle .ind-icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ind-theme-toggle .ind-icon-sun { display: none; }
  :root:not([data-theme="light"]) .ind-theme-toggle .ind-icon-moon { display: block; }
}
/* Admin / seller panel shortcut. Hidden inside the portals, which carry their
   own nav (.sp-nav for sellers, the admin shell for admins). */
.ind-panel-btn { white-space: nowrap; }
body:has(.sp-nav) .ind-panel-btn { display: none; }
/* Desktop horizontal nav; hidden on mobile where the drawer + bottom tab bar cover navigation */
.ind-topnav { display: none; }
.ind-toplink { font-size: .9rem; font-weight: 600; color: var(--ink-soft); padding: 6px 10px; border-radius: var(--radius-sm); white-space: nowrap; text-decoration: none; }
.ind-toplink:hover { color: var(--red); }

/* Search bar — always visible. Lives inside the header row; on mobile it wraps
   onto its own full-width line beneath the logo/actions. */
/* Mobile: logo + action buttons share row 1; search wraps to its own row below. */
.ind-searchbar { order: 5; flex: 0 0 100%; padding: 6px 0 0; margin: 0; background: transparent; }
.ind-search-form { display: flex; align-items: center; background: var(--bg); border: 1.5px solid var(--line);
  border-radius: 9999px; overflow: hidden; transition: border-color .15s; }
.ind-search-form:focus-within { border-color: var(--red); }
.ind-search-input { flex: 1; border: none; background: transparent; outline: none; padding: 9px 16px; font-size: .9rem; color: var(--ink); }
.ind-search-go { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 38px;
  border: none; background: var(--red); color: #fff; cursor: pointer; }
.ind-search-go:hover { background: var(--red-dark); }

/* ── Drawer menu ── */
.ind-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 300; opacity: 0; visibility: hidden; transition: .2s; }
.ind-drawer-overlay.open { opacity: 1; visibility: visible; }
.ind-drawer { position: fixed; top: 0; left: 0; bottom: 0; width: 82%; max-width: 320px; background: var(--white);
  z-index: 301; transform: translateX(-100%); transition: transform .25s ease; overflow-y: auto;
  display: flex; flex-direction: column; box-shadow: var(--shadow-md); }
.ind-drawer.open { transform: translateX(0); }
/* Brand lockup pinned to the top of the drawer (side panel). */
.ind-drawer-brand { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.ind-drawer-brand-link { display: flex; align-items: center; gap: 10px; }
.ind-drawer-brand-link img { height: 32px; width: auto; }
.ind-drawer-brand-link span { font-size: 1.15rem; font-weight: 800; color: var(--red); letter-spacing: -.3px; }
.ind-drawer-head { background: var(--red); color: #fff; padding: 22px 20px; }
.ind-drawer-head strong { display: block; font-size: 1.05rem; }
.ind-drawer-head small { opacity: .85; text-transform: capitalize; }
.ind-drawer > a { padding: 14px 20px; color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--line-soft); }
.ind-drawer > a:hover { background: var(--red-light); color: var(--red); }
.ind-drawer-out { color: var(--red) !important; }
.ind-drawer-langs { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px; }
.ind-drawer-langs a { padding: 4px 12px; border: 1px solid var(--line); border-radius: 9999px; font-size: .8rem; color: var(--ink-soft); }
.ind-drawer-langs a.active { background: var(--red); color: #fff; border-color: var(--red); }

/* ── Main ── */
.ind-main { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 14px 12px calc(var(--tabbar-h) + 24px); flex: 1 0 auto; }

/* ── Section heading ── */
.ind-sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 12px; }
.ind-sec-head h2 { font-size: 1.15rem; font-weight: 800; position: relative; padding-left: 12px; }
.ind-sec-head h2::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 4px; background: var(--red); border-radius: 2px; }
.ind-sec-head a { font-size: .82rem; font-weight: 600; }

/* ── Product card grid ── */
.ind-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ind-pcard { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s; }
.ind-pcard:hover { box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.ind-pcard-img { position: relative; aspect-ratio: 1/1; background: var(--surface-2); }
.ind-pcard-img img { width: 100%; height: 100%; object-fit: cover; }
.ind-pcard-tag { position: absolute; top: 8px; left: 8px; background: var(--red); color: #fff;
  font-size: .65rem; font-weight: 700; padding: 2px 7px; border-radius: 3px; text-transform: uppercase; letter-spacing: .3px; }
.ind-pcard-body { padding: 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ind-pcard-name { font-size: .85rem; font-weight: 500; color: var(--ink); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ind-pcard-price { font-size: 1.05rem; font-weight: 800; color: var(--ink); margin-top: auto; }
.ind-pcard-price small { font-size: .7rem; font-weight: 500; color: var(--muted); }
.ind-pcard-meta { font-size: .72rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.ind-pcard-rate { color: var(--warn); }
.ind-pcard-link { display: flex; flex-direction: column; flex: 1; color: inherit; }
.ind-pcard-foot { padding: 0 10px 10px; }
.ind-pcard-foot .btn { width: 100%; gap: 6px; }
.ind-pcard-foot .btn svg { flex-shrink: 0; }
.btn.added { background: var(--ok); border-color: var(--ok); color: #fff; }
.ind-empty { grid-column: 1/-1; text-align: center; padding: 48px 0; color: var(--muted); }

/* ── Hero / banner ── */
.ind-hero { position: relative; background: linear-gradient(135deg, #1a1a1a, #3a0d0f); color: #fff;
  background-size: cover; background-position: center; overflow: hidden;
  padding: 36px 20px; margin-bottom: 8px;
  /* full-bleed: break out of .ind-main's max-width / side padding */
  margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); border-radius: 0; }
.ind-hero h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; }
.ind-hero p { opacity: .9; margin-bottom: 16px; font-size: .95rem; }
.ind-hero .btn { background: var(--red); border-color: var(--red); color: #fff; }
.ind-banner { margin: 14px 0; border-radius: var(--radius); overflow: hidden; }
.ind-banner img { width: 100%; }

/* ── Category chips ── */
.ind-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.ind-cat { padding: 8px 14px; background: var(--white); border: 1px solid var(--line);
  border-radius: 9999px; color: var(--ink-soft); font-size: .82rem; font-weight: 600; }
.ind-cat:hover { border-color: var(--red); color: var(--red); }

/* ── Trust strip ── */
.ind-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.ind-trust div { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 6px; text-align: center; font-size: .72rem; color: var(--ink-soft); font-weight: 600; }
.ind-trust strong { display: block; color: var(--red); font-size: .82rem; margin-bottom: 2px; }

/* ── Shop / catalog page ── */
.ind-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.ind-toolbar::-webkit-scrollbar { display: none; }
.ind-toolbar select, .ind-toolbar input { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--white); font-size: .82rem; font-family: inherit; color: var(--ink); flex-shrink: 0; }
.ind-filter-toggle { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ind-result-count { font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
.ind-layout { display: block; }
.ind-filters { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 14px; }
.ind-filters h3 { font-size: .9rem; margin-bottom: 10px; }
.ind-filters .ind-fgroup { margin-bottom: 12px; }
.ind-filters label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.ind-filters input, .ind-filters select { width: 100%; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: .85rem; font-family: inherit; background: var(--white); }
.ind-price-row { display: flex; gap: 8px; align-items: center; }

/* ── Pagination ── */
.ind-pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 28px 0 0; flex-wrap: wrap; }
.ind-pager a, .ind-pager span { display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--white); color: var(--ink); font-weight: 600; font-size: .85rem; }
.ind-pager a:hover { border-color: var(--red); color: var(--red); }
.ind-pager .active { background: var(--red); border-color: var(--red); color: #fff; pointer-events: none; }

/* ════════════ PRODUCT DETAIL — built to flood with data ════════════ */
.pd { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
/* Mobile-first: gallery, info and buy-box stack; desktop switches to a 3-column
   grid (see the ≥1024px block). */
.pd-top { padding: 14px; display: flex; flex-direction: column; gap: 16px; }
/* Keep the square gallery from ballooning when stacked on a wide-but-not-desktop
   screen (the page content runs nearly edge-to-edge). */
.pd-gallery { width: 100%; max-width: 460px; margin-inline: auto; }
.pd-gallery-main { aspect-ratio: 1/1; background: var(--surface-2); border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line-soft); }
.pd-gallery-main img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.pd-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 400; display: none; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.pd-lightbox.open { display: flex; }
.pd-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.pd-lightbox-close { position: absolute; top: 14px; right: 20px; color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; opacity: .85; }
.pd-lightbox-close:hover { opacity: 1; }
.pd-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.pd-thumbs img { width: 78px; height: 78px; object-fit: cover; background: var(--surface-2); border-radius: var(--radius-sm); border: 2px solid var(--line); cursor: pointer; flex-shrink: 0; }
.pd-thumbs img:hover, .pd-thumbs img.active { border-color: var(--red); }
.pd-info { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pd-title { font-size: 1.2rem; font-weight: 700; line-height: 1.35; }
.pd-excerpt { color: var(--ink-soft); font-size: .9rem; line-height: 1.7; margin: 0; }
.pd-subhead { font-size: .95rem; font-weight: 700; margin-bottom: 10px; }
.pd-brandrow { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.pd-brandrow a { color: var(--ink-soft); display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.pd-brandrow img { height: 20px; width: auto; }
.pd-rate { color: var(--warn); font-weight: 600; }
.pd-pricebox { background: var(--red-light); border: 1px solid var(--red-border); border-radius: var(--radius); padding: 14px; margin: 12px 0; }
.pd-price { font-size: 1.9rem; font-weight: 800; color: var(--ink); line-height: 1; }
.pd-price small { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.pd-pricenote { font-size: .78rem; color: var(--ink-soft); margin-top: 4px; }
.pd-stock { font-weight: 700; font-size: .9rem; }
.pd-stock.in { color: var(--ok); }
.pd-stock.out { color: var(--red); }
.pd-keyfacts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pd-keyfacts div { background: var(--white); padding: 9px 12px; font-size: .8rem; }
.pd-keyfacts span { display: block; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 1px; }
.pd-buy { display: flex; flex-direction: column; gap: 12px; }
.pd-variant { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .9rem; font-family: inherit; background: var(--white); width: 100%; }
.pd-qtyrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pd-qtyrow label { font-size: .85rem; color: var(--muted); }
.pd-qtyrow input[type=number] { width: 88px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .9rem; font-family: inherit; }
.pd-buy .pd-actions { display: flex; gap: 10px; }
/* The buy button: a proper sized red button with a cart icon — not a giant slab. */
.pd-addcart { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; font-size: .95rem; font-weight: 700; border-radius: var(--radius); }
.pd-addcart svg { flex-shrink: 0; }
.pd-wish { width: 46px; flex-shrink: 0; font-size: 1.1rem; border-radius: var(--radius); }
.pd-wish.on { color: var(--red); border-color: var(--red); }

/* Buy box — the sticky purchase card (right side on desktop, Digikala-style) */
.pd-buybox { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); padding: 14px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.pd-buybox .pd-pricebox { margin: 0; }
.pd-buybox-seller { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .82rem; color: var(--muted); padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.pd-buybox-seller a { color: var(--ink-soft); font-weight: 700; }
.pd-assurance { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 9px; }
.pd-assurance li { display: flex; align-items: center; gap: 9px; font-size: .8rem; color: var(--ink-soft); }
.pd-assurance svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--red); }

/* Data sections — specs, description */
.pd-section { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 12px; overflow: hidden; }
.pd-section-head { padding: 12px 14px; font-size: 1rem; font-weight: 700; border-bottom: 2px solid var(--red); display: flex; align-items: center; gap: 8px; }
.pd-section-head::before { content: ""; width: 4px; height: 16px; background: var(--red); border-radius: 2px; }
.pd-section-body { padding: 4px 14px 14px; }
.pd-section-body.rich { padding: 14px; font-size: .92rem; line-height: 1.75; color: var(--ink-soft); }
.pd-section-body.rich img { border-radius: var(--radius-sm); margin: 10px 0; }
.pd-section-body.rich h2, .pd-section-body.rich h3 { margin: 18px 0 8px; color: var(--ink); }
.pd-section-body.rich table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.pd-section-body.rich td, .pd-section-body.rich th { border: 1px solid var(--line); padding: 8px 10px; }

/* Spec table — the data flood */
.spec-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.spec-table tr { border-bottom: 1px solid var(--line-soft); }
.spec-table tr:last-child { border-bottom: none; }
.spec-group td { background: var(--surface-2); font-weight: 700; padding: 9px 0; color: var(--ink); border-top: 1px solid var(--line); }
.spec-table .spec-k { width: 42%; padding: 9px 12px 9px 0; color: var(--muted); vertical-align: top; }
.spec-table .spec-v { padding: 9px 0; color: var(--ink); font-weight: 500; vertical-align: top; }

/* Reviews */
.pd-review { border-top: 1px solid var(--line-soft); padding: 12px 0; }
.pd-review:first-of-type { border-top: none; }
.pd-review-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.pd-review-stars { color: var(--warn); font-weight: 700; }
.pd-review-reply { margin: 6px 0 0 14px; padding: 8px 12px; background: var(--bg); border-radius: var(--radius-sm); font-size: .85rem; color: var(--ink-soft); }
.pd-form select, .pd-form input, .pd-form textarea { padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: inherit; font-size: .9rem; margin-bottom: 8px; }
.pd-form input, .pd-form textarea { width: 100%; }

/* ── Cart ── */
.ind-cart-wrap { max-width: 760px; margin: 0 auto; }
.ind-cart-group { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.ind-cart-group-name { font-weight: 700; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.ind-cart-line { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); align-items: center; }
.ind-cart-line:last-child { border-bottom: none; }
.ind-cart-line img { width: 60px; height: 60px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.ind-cart-line-info { flex: 1; min-width: 0; }
.ind-cart-line-info a { color: var(--ink); font-weight: 600; font-size: .88rem; }
.ind-cart-line-info small { color: var(--ink); font-weight: 700; }
.ind-cart-qty { display: flex; gap: 4px; align-items: center; }
.ind-cart-qty input { width: 52px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-align: center; }
.ind-cart-sub { text-align: right; font-size: .82rem; color: var(--muted); margin-top: 8px; }
.ind-cart-total { font-size: 1.3rem; font-weight: 800; text-align: right; margin: 14px 0; }
.ind-cart-total span { color: var(--ink); }

/* ── Checkout ── */
.ind-co { max-width: 680px; margin: 0 auto; }
.ind-co-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.ind-co-box h3 { font-size: 1rem; margin-bottom: 10px; }
.ind-co-box label { display: block; font-size: .8rem; color: var(--muted); margin-top: 10px; margin-bottom: 3px; }
.ind-co-box input, .ind-co-box select, .ind-co-box textarea { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: inherit; font-size: .9rem; }
.ind-co-radio { display: flex; gap: 8px; align-items: center; padding: 8px 0; }
.ind-co-radio input { width: auto; }

/* ── Store / category headers ── */
.ind-store-head { display: flex; gap: 14px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.ind-store-head img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.ind-store-head h1 { font-size: 1.2rem; }
.ind-store-head p { color: var(--muted); font-size: .85rem; }
.ind-page-head { margin-bottom: 14px; }
.ind-page-head h1 { font-size: 1.4rem; font-weight: 800; }
.ind-page-head p { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.ind-crumbs { font-size: .78rem; color: var(--muted); margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 4px; }
.ind-crumbs a { color: var(--muted); }
.ind-crumbs a:hover { color: var(--red); }

/* ── Blog post cards (reused for latest_posts) ── */
.ind-posts { display: grid; grid-template-columns: 1fr; gap: 12px; }
.ind-post { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; }
.ind-post img { width: 110px; height: 100px; object-fit: cover; flex-shrink: 0; }
.ind-post-body { padding: 10px 12px; }
.ind-post-body h3 { font-size: .95rem; margin-bottom: 4px; }
.ind-post-body h3 a { color: var(--ink); }
.ind-post-body p { font-size: .82rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Bottom tab bar (mobile) ── */
.ind-tabbar { position: fixed; bottom: 0; left: 0; right: 0; height: var(--tabbar-h); background: var(--white);
  border-top: 1px solid var(--line); display: flex; z-index: 150;
  padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 10px rgba(0,0,0,.05); }
.ind-tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--muted); font-size: .65rem; font-weight: 600; position: relative; }
.ind-tab svg { width: 22px; height: 22px; }
.ind-tab:active, .ind-tab:hover { color: var(--red); }
.ind-tab-cart .ind-tab-badge { position: absolute; top: 4px; left: 50%; margin-left: 4px; }

/* ── Footer ── */
.ind-footer { background: var(--footer-bg); color: var(--footer-ink); margin-top: 28px; padding: 28px 16px calc(var(--tabbar-h) + 20px); }
.ind-footer-cols { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ind-footer-cols > div:first-child { grid-column: 1/-1; }
.ind-footer h4 { color: var(--footer-head); font-size: .9rem; margin-bottom: 8px; }
.ind-footer-logo { display: block; height: 48px; width: auto; max-width: 100%; margin-bottom: 10px; }
.ind-footer p { font-size: .8rem; line-height: 1.6; }
.ind-footer a { display: block; color: var(--footer-ink); font-size: .82rem; padding: 3px 0; }
.ind-footer a:hover { color: var(--footer-head); }
.ind-footer-contact a { display: flex; align-items: center; gap: 8px; }
.ind-footer-contact svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--footer-head); }
.ind-footer-contact .ltr { direction: ltr; unicode-bidi: embed; }
.ind-footer-base { text-align: center; font-size: .75rem; color: var(--footer-base); margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--footer-line); }

/* ── Ad zones ── */
.ad-zone { max-width: var(--maxw); margin: 0 auto; padding: 8px 12px; text-align: center; }
.ad-zone-header { border-bottom: 1px solid var(--line); background: var(--white); }
.ad-zone-footer { border-top: 1px solid var(--line); background: var(--white); }
.ad-unit { display: inline-block; max-width: 100%; }
.ad-referral-link { display: inline-block; padding: 6px 18px; background: var(--red-light); color: var(--red); border-radius: var(--radius-sm); font-size: .85rem; font-weight: 600; }

/* ════════════ TABLET / DESKTOP ════════════ */
@media (min-width: 600px) {
  body { font-size: 16px; }
  .ind-action-label { display: inline; }
  /* auto-fill so column count follows the available width: more columns on wide
     full-width grids (home/category), fewer in the sidebar-constrained shop grid.
     The minmax minimum (260px) sets the card size — raise it for bigger cards /
     fewer columns, lower it for smaller cards / more columns. */
  .ind-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
  .ind-trust { gap: 12px; }
  .ind-footer-cols { grid-template-columns: 2fr 1fr 1fr 1.4fr; }
  .ind-footer-cols > div:first-child { grid-column: auto; }
  .ind-posts { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .ind-menu-btn { display: none; }
  .ind-topnav { display: flex; align-items: center; gap: 2px; }
  /* One row: logo · nav · search · actions — search between the two sides. */
  .ind-header-inner { min-height: 64px; gap: 16px; padding: 0 20px; flex-wrap: nowrap; }
  .ind-logo { flex: 0 0 auto; }
  .ind-logo-img { height: 40px; }
  .ind-logo-text { display: block; font-size: 1.4rem; }
  .ind-searchbar { order: 0; flex: 1 1 auto; min-width: 180px; max-width: 520px; padding: 0; }
  /* On a one-row header the nav is the item that gives way: it scrolls rather
     than pushing the search or the action buttons off the page. */
  .ind-topnav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .ind-topnav::-webkit-scrollbar { display: none; }
  .ind-tabbar { display: none; }
  /* Central content: small fixed side gutter (not a %) so the content runs nearly
     edge-to-edge on every screen. Bump the clamp's max (48px) up for more breathing
     room, or down toward 16px for even wider. Column count is not fixed here — the
     auto-fill .ind-grid rule (600px breakpoint) scales it with the available width. */
  .ind-main { max-width: none; padding: 20px clamp(16px, 2.5vw, 48px) 40px; }
  :root { --tabbar-h: 0px; }
  /* full-bleed background, but keep inner text aligned to the 15% content gutter */
  .ind-hero { padding: 60px 15%; }
  .ind-hero h1 { font-size: 2.2rem; }

  /* Two-column catalog: filter sidebar + grid */
  .ind-layout.with-sidebar { display: grid; grid-template-columns: 230px 1fr; gap: 20px; align-items: start; }
  .ind-filters { position: sticky; top: 80px; margin-bottom: 0; }
  .ind-filter-toggle { display: none; }

}

/* ════════ PRODUCT DETAIL — desktop 3-column: gallery · info · sticky buy-box ════════ */
@media (min-width: 1024px) {
  .pd-top {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr) minmax(300px, 340px);
    grid-template-areas: "gallery info buy";
    gap: 24px; padding: 20px; align-items: start;
  }
  /* Gallery (start side) and buy-box (end side) stay in view while the middle
     info column scrolls. Direction handles RTL/LTR placement automatically. */
  .pd-gallery { grid-area: gallery; max-width: none; margin: 0; position: sticky; top: 84px; }
  .pd-info    { grid-area: info; }
  .pd-buybox  { grid-area: buy; position: sticky; top: 84px; }
}

/* ════════════════════════════════════════════════════════════
   RTL — Farsi / Persian / Arabic support
   Activated by <html dir="rtl">. Everything below mirrors the
   LTR layout: drawer from the right, flipped accents, tables,
   alignment, and a Persian-capable font stack.
   ════════════════════════════════════════════════════════════ */
[dir="rtl"] body {
  /* font-family is set once on the base body rule (Vazirmatn-first); RTL only adjusts spacing */
  line-height: 1.75;
}
[dir="rtl"] { text-align: right; }

/* Drawer slides in from the right */
[dir="rtl"] .ind-drawer { left: auto; right: 0; transform: translateX(100%); }
[dir="rtl"] .ind-drawer.open { transform: translateX(0); }

/* Section heading accent bar moves to the right edge */
[dir="rtl"] .ind-sec-head h2 { padding-left: 0; padding-right: 12px; }
[dir="rtl"] .ind-sec-head h2::before { left: auto; right: 0; }

/* Product card tag */
[dir="rtl"] .ind-pcard-tag { left: auto; right: 8px; }

/* Cart / tab badges */
[dir="rtl"] .ind-cart-badge { right: auto; left: -6px; }
[dir="rtl"] .ind-tab-cart .ind-tab-badge { left: auto; right: 50%; margin-left: 0; margin-right: 4px; }

/* Toolbar: push the sort control to the left edge */
[dir="rtl"] .ind-toolbar form[style*="margin-left:auto"],
[dir="rtl"] .ind-toolbar > form { margin-left: 0 !important; margin-right: auto; }

/* Breadcrumbs read right-to-left automatically; keep wrapping tidy */
[dir="rtl"] .ind-crumbs { direction: rtl; }

/* Specification table — keys on the right */
[dir="rtl"] .spec-table .spec-k { padding: 9px 0 9px 12px; text-align: right; }
[dir="rtl"] .spec-table .spec-v { text-align: right; }
[dir="rtl"] .spec-group td { text-align: right; }
[dir="rtl"] .pd-keyfacts div { text-align: right; }

/* Product detail */
[dir="rtl"] .pd-section-head::before { /* flex order handles side; nothing needed */ }
[dir="rtl"] .pd-section-body.rich { text-align: right; }
[dir="rtl"] .pd-review-reply { margin-left: 0; margin-right: 14px; }

/* Forms & labels align right */
[dir="rtl"] .ind-filters label,
[dir="rtl"] .ind-co-box label,
[dir="rtl"] .ind-filters input,
[dir="rtl"] .ind-filters select,
[dir="rtl"] .ind-co-box input,
[dir="rtl"] .ind-co-box select,
[dir="rtl"] .ind-co-box textarea,
[dir="rtl"] .sp-form input,
[dir="rtl"] .sp-form select,
[dir="rtl"] .sp-form textarea,
[dir="rtl"] .sp-table input,
[dir="rtl"] .sp-table select,
[dir="rtl"] .ind-search-input { text-align: right; }
[dir="rtl"] .sp-form input[type=number] { direction: rtl; }

/* Totals/subtotals flip from right to left edge */
[dir="rtl"] .ind-cart-total,
[dir="rtl"] .ind-cart-sub { text-align: left; }

/* Hero / page heads / footer align right */
[dir="rtl"] .ind-hero,
[dir="rtl"] .ind-page-head,
[dir="rtl"] .ind-store-head,
[dir="rtl"] .ind-footer { text-align: right; }
[dir="rtl"] .ind-footer-base,
[dir="rtl"] .ind-announce { text-align: center; }

/* Keep numerals (prices, SKUs, dimensions) left-to-right inside RTL flow */
[dir="rtl"] .ind-pcard-price,
[dir="rtl"] .pd-price,
[dir="rtl"] .ind-cart-total span { direction: ltr; unicode-bidi: embed; display: inline-block; }

/* ── Seller portal navigation tabs ─────────────────────────────────────── */
.sp-nav {
    display: flex; flex-wrap: wrap; gap: 4px;
    margin-bottom: 22px;
    border-bottom: 2px solid var(--line);
}
.sp-nav a {
    padding: 9px 14px;
    font-size: .9rem; font-weight: 600; color: var(--ink-soft);
    text-decoration: none;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}
.sp-nav a:hover { color: var(--red); }
.sp-nav a.active { color: var(--red); border-bottom-color: var(--red); }
.sp-nav a.sp-nav-ext { margin-inline-start: auto; color: var(--muted); font-weight: 500; }
.sp-nav a.sp-nav-ext:hover { color: var(--red); }

/* ── Seller portal shared layout (used by every /seller/* page) ─────────── */
.sp { max-width: var(--maxw); margin: 0 auto; padding: 20px; }

/* Horizontal scroll wrapper so wide tables never break the page on small screens */
.sp-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 20px; }
.sp-scroll .sp-table { margin-bottom: 0; }
.sp-table {
    width: 100%; min-width: 480px; border-collapse: collapse; background: var(--white);
    border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow);
}
.sp-table th, .sp-table td {
    padding: 16px 22px; border-bottom: 1px solid var(--line-soft);
    text-align: start; font-size: .9rem; vertical-align: middle;
}
.sp-table thead th {
    background: var(--surface-3); font-weight: 700; color: var(--ink-soft);
    font-size: .82rem; white-space: nowrap;
}
/* Zebra striping + hover */
.sp-table tbody tr { transition: background .12s; }
.sp-table tbody tr:nth-child(even) { background: var(--surface-2); }
.sp-table tbody tr:hover { background: var(--red-light); }
.sp-table tbody td { color: var(--ink); }
.sp-table tr:last-child td { border-bottom: none; }
.sp-muted { color: var(--muted); }

/* Centered-columns variant (everything centered except the first/label column) */
.sp-table-c th, .sp-table-c td { text-align: center; }
.sp-table-c th:first-child, .sp-table-c td:first-child { text-align: start; }

/* Product cell with thumbnail */
.sp-prod { display: flex; align-items: center; gap: 12px; }
/* `contain`, not `cover`: a management list must show the real image, even when
   it is portrait or panoramic. Cropping here reads as a broken upload. */
.sp-thumb {
    width: 48px; height: 48px; flex-shrink: 0; border-radius: 8px; padding: 2px;
    object-fit: contain; background: var(--surface-2); border: 1px solid var(--line);
}
.sp-thumb-ph { display: flex; align-items: center; justify-content: center; font-size: 18px; }
.sp-prod-name { font-weight: 600; }

/* Management thumbnails (uploads/media) — never crop. A supplier must see the
   whole image, whatever its aspect ratio, before and after upload. */
.sp-uploads { display: flex; gap: 10px; flex-wrap: wrap; }
.sp-upload-thumb {
    width: 128px; height: 96px; object-fit: contain; background: var(--surface-2);
    border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px;
}
.sp-upload-preview { margin-top: 10px; display: none; }
.sp-upload-preview.on { display: block; }
.sp-upload-hint { font-size: .78rem; color: var(--muted); margin-top: 6px; }

.pill { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok-ink); }
.pill.pend { background: var(--red-light); color: var(--red-dark); }
.pill.warn, .pill.part { background: var(--warn-bg); color: var(--warn); }
.pill.muted { background: var(--line-soft); color: var(--muted); }

.sp-back { display: inline-block; margin-bottom: 10px; font-size: .85rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.sp-back:hover { color: var(--red); }

@media (max-width: 600px) {
    .sp { padding: 16px 14px 48px; }
    .sp-form { grid-template-columns: 1fr; }
    /* Tabs become a single swipeable row instead of wrapping into a tall block */
    .sp-nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .sp-nav::-webkit-scrollbar { display: none; }
    .sp-nav a.sp-nav-ext { margin-inline-start: 0; }
}

/* Seller money figures stay LTR even inside RTL tables */
[dir="rtl"] .sp-money { direction: ltr; unicode-bidi: embed; display: inline-block; }

/* ════════════════════════════════════════════════════════════
   Standalone auth pages (login / register / verify / result)
   These pages render without layout.html, so they link this same
   stylesheet instead of redeclaring @font-face and a base body.
   One font, one token set, dark mode included.
   ════════════════════════════════════════════════════════════ */
body.auth-page {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px 16px; background: var(--bg); color: var(--ink);
}
.auth-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-md); padding: 32px 26px; width: 100%; max-width: 400px;
}
.auth-card-wide { max-width: 440px; }
.auth-card-narrow { max-width: 380px; }
.auth-card-center { text-align: center; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 20px; }
.auth-logo { width: 56px; height: 56px; border-radius: 15px; background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 800; text-transform: uppercase; }
.auth-site { font-size: 1.15rem; font-weight: 800; color: var(--red); }
.auth-title { font-size: 1.15rem; font-weight: 700; text-align: center; margin-bottom: 4px; }
.auth-subtitle { color: var(--muted); font-size: .85rem; text-align: center; margin-bottom: 20px; }
.auth-icon { font-size: 3rem; margin-bottom: 1rem; }
.auth-card h1 { font-size: 1.3rem; font-weight: 800; margin-bottom: .5rem; }
.auth-card-center p { color: var(--muted); font-size: .92rem; line-height: 1.8; }
.auth-card-center p a { color: var(--red); font-weight: 700; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
.form-group input, .form-group select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--white); color: var(--ink); font-size: .92rem; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(87,166,149,.12); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-submit {
  width: 100%; background: var(--red); color: #fff; border: none; padding: 12px; border-radius: 9px;
  font-size: 1rem; font-weight: 700; font-family: inherit; cursor: pointer; transition: background .15s; margin-top: 6px;
}
.auth-submit:hover { background: var(--red-dark); }
.auth-link-btn { display: inline-block; margin-top: 1.5rem; background: var(--red); color: #fff;
  padding: 11px 28px; border-radius: 9px; font-weight: 700; }
.auth-link-btn:hover { background: var(--red-dark); color: #fff; }
.auth-link-btn.outline { background: transparent; border: 1px solid var(--red); color: var(--red); margin-inline-end: .5rem; }
.auth-link-btn.outline:hover { background: var(--red-light); color: var(--red); }
.auth-footer { text-align: center; margin-top: 18px; font-size: .85rem; color: var(--muted); }
.auth-footer a { color: var(--red); font-weight: 700; }
.alert-error { background: var(--red-light); border: 1px solid var(--red-border); color: var(--red-dark);
  border-radius: 9px; padding: 10px 12px; margin-bottom: 14px; font-size: .85rem; }
.auth-back { display: block; text-align: center; margin-top: 14px; font-size: .82rem; color: var(--muted); }
.auth-back:hover { color: var(--red); }
/* Password reveal toggle */
.pw-wrap { position: relative; }
.pw-wrap input { padding-left: 42px; }
.pw-toggle { position: absolute; top: 50%; left: 8px; transform: translateY(-50%); background: none;
  border: none; padding: 4px; cursor: pointer; color: var(--muted); display: flex; align-items: center;
  justify-content: center; border-radius: 6px; }
.pw-toggle:hover, .pw-toggle:focus { outline: none; color: var(--red); }
/* Credentials always read left-to-right, even on an RTL page */
.auth-latin, .form-group input[type=email], .form-group input[type=tel] { direction: ltr; text-align: left; }

/* ── Category map (/shop/categories) ──────────────────────────────────────
   The complete tree. Nesting is real <ul> nesting, so any depth renders. */
.ind-catmap { background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; }
.ind-catmap-list { list-style: none; margin: 0; padding: 0; }
.ind-catmap-list .ind-catmap-list {
  margin-inline-start: 14px; padding-inline-start: 12px;
  border-inline-start: 2px solid var(--line-soft);
}
.ind-catmap-list li { padding: 3px 0; }
.ind-catmap-list > li > a { font-weight: 700; color: var(--ink); }
.ind-catmap-list .ind-catmap-list a { font-weight: 500; color: var(--ink-soft); font-size: .92rem; }
.ind-catmap-list a:hover { color: var(--red); }

/* Subcategory chips on a category page */
.ind-subcats { margin-bottom: 14px; }
/* Spec unit sits alongside the value, dimmed so the number stays dominant. */
.spec-u { color: var(--muted); font-weight: 500; }
