/* ============================================================
   Niko Collection — design tokens
   ============================================================ */
:root {
  color-scheme: light;
  --bg: #faf8f4;
  --ink: #1c1a17;
  --panel: #f4efe6;
  --card: #fff;
  --warm: #f7edd2;
  --border: #e7e1d8;
  --border-input: #d9d1c5;
  --border-search: #e0d8cb;
  --muted: #57504a;
  --faint: #8a827a;
  --faintest: #a89a86;
  --danger: #a05a4a;
  --green-bg: #eef3ec;
  --green-text: #4f7a4a;
  --warm-pill-bg: #f6efe0;
  --accent: #9a7b4f;
  --accent-dark: #6f5836;
  --accent-fg: #fff;
  --accent-tint: #fdfbf7;
  --header-bg: rgba(250, 248, 244, 0.9);
  --hairline: #efe9e0;
  --selection: #e9dcc4;
  --hatch-a: #f0ebe2;
  --hatch-b: #e9e2d7;
  --hero-overlay: linear-gradient(270deg,
    rgba(247, 237, 210, 0.96) 22%, rgba(247, 237, 210, 0.7) 40%, rgba(247, 237, 210, 0) 62%);
  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 6px;
  --tile-radius: 50%;
}

/* Dark theme — token overrides only; every rule below already reads these vars */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17130e;
  --ink: #ece6db;
  --panel: #201b14;
  --card: #221d15;
  --warm: #2a2216;
  --border: #322a1f;
  --border-input: #3b3225;
  --border-search: #362d21;
  --muted: #b3a998;
  --faint: #8f8574;
  --faintest: #6d6454;
  --danger: #d68f7a;
  --green-bg: #1c2a1a;
  --green-text: #8fc088;
  --warm-pill-bg: #2c2313;
  --accent: #c6a670;
  --accent-dark: #dcc08a;
  --accent-fg: #17130e;
  --accent-tint: #241d12;
  --header-bg: rgba(23, 19, 14, 0.85);
  --hairline: #2c2519;
  --selection: #4a3d24;
  --hatch-a: #241e14;
  --hatch-b: #2c2519;
  --hero-overlay: linear-gradient(270deg,
    rgba(23, 19, 14, 0.94) 22%, rgba(23, 19, 14, 0.65) 42%, rgba(23, 19, 14, 0) 64%);
}

/* ============================================================
   Base
   ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Vazirmatn", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
::selection { background: var(--selection); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
h1, h2, h3, h4, p { margin: 0; }

.container { max-width: 1200px; margin: 0 auto; padding-inline: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }

.eyebrow {
  margin-bottom: 16px;
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--accent);
  font-weight: 500;
}

/* Buttons */
.btn {
  display: inline-block;
  border: none;
  border-radius: var(--r-sm);
  font-size: 15px;
  text-align: center;
}
.btn-dark { background: var(--ink); color: var(--bg); padding: 16px 40px; }
.btn-dark:hover { color: var(--bg); opacity: 0.92; }
.btn-outline {
  background: none;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 17px 28px;
}
.btn-accent { background: var(--accent); color: var(--accent-fg); padding: 16px; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-block { display: block; width: 100%; }
/* Buy actions the customer cannot take: a ناموجود product, or a cart still holding one.
   Declared after the variants so it wins on source order — every rule here is one class deep. */
.btn:disabled {
  background: var(--panel);
  color: var(--faint);
  border-color: var(--border);
  cursor: default;
}

/* Form fields */
.field {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border-input);
  border-radius: var(--r-sm);
  font-size: 15px;
  background: var(--card);
  color: var(--ink);
  outline: none;
}
.field::placeholder { color: var(--faint); }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-2 .span-2 { grid-column: 1 / -1; }
.form-errors { margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--danger);
  border-radius: var(--r-sm); color: var(--danger); font-size: 13px; }
.form-errors p { margin: 2px 0; }

/* Image placeholder (hatch pattern from the handoff) */
.ph {
  background: repeating-linear-gradient(45deg, var(--hatch-a), var(--hatch-a) 10px, var(--hatch-b) 10px, var(--hatch-b) 20px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ph span { font-family: monospace; font-size: 11px; color: var(--faintest); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.hdr-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo { cursor: pointer; display: flex; align-items: baseline; gap: 8px; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo-fa { font-size: 32px; font-weight: 600; letter-spacing: 0.5px; }
.logo-en { font-size: 13px; color: var(--accent); font-weight: 500; letter-spacing: 2px; }
.desktop-nav { display: flex; align-items: center; gap: 34px; font-size: 15px; }
.desktop-nav a { color: var(--muted); }
.desktop-nav a.active { color: var(--accent); }
.hdr-actions { display: flex; align-items: center; gap: 20px; }
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border-search);
  border-radius: var(--r-sm);
  padding: 0 12px;
  height: 40px;
  width: 220px;
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--ink);
  min-width: 0;
}
.icon-btn {
  position: relative;
  background: none;
  border: none;
  padding: 6px;
  color: var(--ink);
  display: flex;
}
.cart-badge {
  position: absolute;
  top: -2px;
  left: -4px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-weight: 600;
}
.menu-btn { display: none; }

/* Theme toggle — show the icon for the theme you can switch TO */
.theme-btn .moon { display: block; }
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }

.mobile-nav {
  display: none;
  position: sticky;
  top: 76px;
  z-index: 49;
  flex-direction: column;
  gap: 2px;
  padding: 14px 20px 18px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.mobile-nav.open { display: flex; }
.mobile-nav .search-box { width: 100%; height: 44px; margin-bottom: 10px; }
.mobile-nav .search-box input { font-size: 15px; }
.mobile-nav a {
  padding: 12px 4px;
  font-size: 16px;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a.active { color: var(--accent); }

/* ============================================================
   Sections & headings
   ============================================================ */
.section { padding-top: 72px; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-head h2 { font-size: 28px; font-weight: 600; }
.section-head a { font-size: 14px; }
.page-title { margin-bottom: 6px; font-size: 34px; font-weight: 600; }
.page-sub { margin-bottom: 32px; color: var(--faint); font-weight: 300; }

/* ============================================================
   Home
   ============================================================ */
.hero-section { padding-top: 28px; }
.hero-box {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  height: 520px;
  background-color: var(--warm);
  background-image: url("../img/hero.c88b32df29ba.png");
  background-size: cover;
  background-position: center left;
  display: flex;
  align-items: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
}
.hero-text { position: relative; margin-left: auto; padding: 0 64px; max-width: 520px; }
.hero-text h1 { margin-bottom: 20px; font-size: 52px; line-height: 1.25; font-weight: 600; }
.hero-text p {
  margin-bottom: 32px;
  font-size: 17px;
  line-height: 1.9;
  color: var(--muted);
  font-weight: 300;
}

.tile-item { cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.tile {
  width: 100%;
  max-width: 190px;
  aspect-ratio: 1;
  border-radius: var(--tile-radius);
  overflow: hidden;
}
.tile-item > p { margin-top: 14px; text-align: center; font-size: 16px; font-weight: 500; }

.tile-card { display: flex; flex-direction: column; align-items: center; }
.tile-card .tile { cursor: pointer; }
.tile-card-info {
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.trust-grid { border-top: 1px solid var(--border); padding-top: 48px; }
.trust-item { text-align: center; }
.trust-item.bordered { border-inline: 1px solid var(--border); }
.trust-item svg { margin: 0 auto 14px; display: block; color: var(--accent); }
.trust-item h3 { margin-bottom: 8px; font-size: 17px; font-weight: 600; }
.trust-item p { color: var(--faint); font-size: 14px; font-weight: 300; }

.cta-band {
  background: var(--panel);
  border-radius: var(--r-lg);
  padding: 56px;
  text-align: center;
}
.cta-band h2 { margin-bottom: 12px; font-size: 28px; font-weight: 600; }
.cta-band p { margin-bottom: 28px; color: var(--muted); font-weight: 300; }

/* ============================================================
   Product cards (shop grid)
   ============================================================ */
.card { display: flex; flex-direction: column; }
.card-img {
  cursor: pointer;
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-md);
  overflow: hidden;
}
.card-info { padding-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.card-cat { font-size: 12px; color: var(--accent); }
.card-name { cursor: pointer; font-size: 16px; font-weight: 500; color: var(--ink); }
.card-price { font-size: 15px; color: var(--muted); }
/* Availability badge — the pill idiom of .status-pill, in the same token pair as
   .status-pill.pending so it reads as information rather than competing with the red
   .price-off that can sit right above it. A fixed size, not em: it appears at three type
   scales (.card-info, .tile-card-info, .cart-line-info) and should look identical in all
   three. `align-self` because every host is a column flexbox, where it would otherwise
   stretch the full width. */
.stock-out {
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--warm);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

/* ============================================================
   Discounted price — one block, four surfaces
   Sizes are relative (em) so this scales with whatever wrapper it lands in — .card-price (15px),
   .pdp-price (24px, 21px on mobile) or .cart-line-info .card-price (14px) — and the wrapper
   keeps supplying the type scale and colour. Nothing above needs changing.
   ============================================================ */
.price-tag { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.price-now { color: var(--ink); font-weight: 500; }
.price-was {
  color: var(--faint);
  font-size: .82em;
  text-decoration: line-through;
  text-decoration-color: var(--faintest);
  text-decoration-thickness: 1px;   /* the hairline default disappears at 12px in Vazirmatn */
}
.price-off {
  /* Same pill idiom as .status-pill. --danger is the only token pair clearing WCAG AA at this
     size in both themes. `isolate` gives the ٪ its own bidi run so it can never be reordered
     by whatever RTL text ends up beside the badge. */
  unicode-bidi: isolate;
  font-size: .75em;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 20px;
  background: var(--danger);
  color: var(--accent-fg);
  white-space: nowrap;
}

/* ============================================================
   Shop toolbar
   ============================================================ */
.shop-toolbar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}
.chips { display: flex; gap: 12px; flex-wrap: wrap; }
.chip {
  display: inline-block;
  border: 1px solid var(--border-input);
  background: var(--card);
  color: var(--muted);
  padding: 10px 22px;
  border-radius: var(--r-sm);
  font-size: 14px;
}
.chip:hover { color: var(--muted); border-color: var(--faintest); }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.active:hover { color: var(--bg); }
.shop-sort { display: flex; align-items: center; gap: 16px; }
.shop-count { font-size: 14px; color: var(--faint); }
.sort-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--border-input);
  border-radius: var(--r-sm);
  font-size: 14px;
  background-color: var(--card);
  color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%2357504a' stroke-width='1.6'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
}
.empty-state { text-align: center; padding: 72px 0; color: var(--faint); }
.empty-state p { font-size: 17px; margin-bottom: 20px; }
.empty-state .btn-dark { padding: 13px 30px; font-size: 14px; }

/* ============================================================
   Product detail
   ============================================================ */
.breadcrumb { margin-bottom: 28px; font-size: 13px; color: var(--faint); }
.breadcrumb a { color: var(--faint); }
.breadcrumb a:hover { color: var(--muted); }
.breadcrumb .current { color: var(--ink); }
.two-col { display: grid; gap: 56px; }
.pdp-grid { grid-template-columns: 1.1fr 1fr; }
.pdp-gallery { display: flex; flex-direction: column; gap: 14px; }
.pdp-main {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-md);
  background: var(--panel);
}
.pdp-main.ph {
  background: repeating-linear-gradient(45deg, var(--hatch-a), var(--hatch-a) 12px, var(--hatch-b) 12px, var(--hatch-b) 24px);
}
.pdp-main.ph span { font-size: 12px; }

/* Slides are stacked and crossfaded; the active one is set in site.js */
.pdp-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.pdp-slide.is-active { opacity: 1; pointer-events: auto; }
/* Keep a swipe from starting the browser's native image drag */
.pdp-slide img { user-select: none; -webkit-user-drag: none; }

.pdp-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  color: var(--ink);
  cursor: pointer;
}
.pdp-nav.prev { inset-inline-start: 12px; }
.pdp-nav.next { inset-inline-end: 12px; }
.pdp-nav:hover { background: var(--card); border-color: var(--accent); color: var(--accent); }
.pdp-main:focus-visible,
.pdp-nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* auto-fit drops to 3 tracks on a 320px phone and back to 4 on a 375px one, with no
   breakpoint; max-width stops 2-3 shots from stretching into huge thumbs on desktop. */
.pdp-thumbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 14px; }
.pdp-thumbs .thumb {
  max-width: 150px;
  padding: 0;
  border: none;
  background: var(--panel);
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 0.2s ease;
}
.pdp-thumbs .thumb:hover,
.pdp-thumbs .thumb:focus-visible { opacity: 1; }
.pdp-thumbs .thumb.is-active {
  opacity: 1;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.pdp-thumbs .ph {
  aspect-ratio: 1;
  border-radius: var(--r-md);
  background: repeating-linear-gradient(45deg, var(--hatch-a), var(--hatch-a) 8px, var(--hatch-b) 8px, var(--hatch-b) 16px);
}

@media (prefers-reduced-motion: reduce) {
  .pdp-slide, .pdp-thumbs .thumb { transition: none; }
}
.pdp-info { padding-top: 8px; }
.pdp-info .card-cat { font-size: 13px; }
.pdp-info h1 { margin: 8px 0 14px; font-size: 34px; font-weight: 600; }
.pdp-price { margin-bottom: 24px; font-size: 24px; color: var(--ink); }
.pdp-desc {
  margin-bottom: 32px;
  font-size: 16px;
  line-height: 2;
  color: var(--muted);
  font-weight: 300;
}
/* Colour picker: labelled pills wrapping a real radio, so selection needs no JS. */
.color-row { border: 0; padding: 0; margin: 0 0 26px; }
.color-row-label { padding: 0; margin-bottom: 12px; font-size: 14px; color: var(--muted); }
.color-options { display: flex; flex-wrap: wrap; gap: 10px; }
.color-option {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border: 1px solid var(--border-input);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.color-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.color-option:hover { border-color: var(--faintest); }
.color-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--ink);
}
.color-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .color-option { transition: none; } }
.color-dot {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--swatch);
  /* Inset ring rather than a border: keeps ivory swatches visible on the card in both themes. */
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.15);
}
.line-color {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--faint);
}

.qty-row { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.qty-row > span { font-size: 14px; color: var(--muted); }
.stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-input);
  border-radius: var(--r-sm);
}
.stepper button {
  width: 44px;
  height: 46px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--muted);
}
.stepper output {
  width: 48px;
  text-align: center;
  font-size: 16px;
}
/* Wrap rather than a breakpoint: the two buttons also overflow just above 820px, where the
   info column is ~340px wide but the pair needs ~350px. Below ~374px they stack full-width. */
.pdp-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.pdp-actions .btn { flex: 1 1 180px; padding-block: 17px; padding-inline: 20px; }
.pdp-unavailable { margin-top: 14px; font-size: 14px; line-height: 1.9; color: var(--muted); }
.pdp-meta {
  margin-top: 36px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 300;
}
.pdp-meta div { display: flex; justify-content: space-between; }
.pdp-meta div span:last-child { color: var(--ink); }

/* ============================================================
   Cart
   ============================================================ */
.narrow-container { max-width: 1080px; margin: 0 auto; padding-inline: 32px; }
.cart-grid { grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: start; }
.cart-line {
  display: flex;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.cart-line .ph {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  border-radius: var(--r-md);
  background: repeating-linear-gradient(45deg, var(--hatch-a), var(--hatch-a) 8px, var(--hatch-b) 8px, var(--hatch-b) 16px);
}
.cart-line .ph span { font-size: 9px; }
.cart-line-info { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.cart-line-info .card-price { font-size: 14px; }
.cart-line-actions { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.cart-line-actions .stepper button { width: 34px; height: 34px; font-size: 17px; }
.cart-line-actions .stepper output { width: 38px; font-size: 14px; }
.remove-btn { background: none; border: none; color: var(--danger); font-size: 13px; padding: 0; }
.cart-line-total { text-align: left; font-size: 16px; font-weight: 500; }
/* An unavailable line stays legible — it is still the customer's choice — but recedes, so the
   eye reads the basket it is actually being charged for. */
.line-qty { font-size: 14px; color: var(--muted); }
.cart-line.is-unavailable .cart-thumb img { opacity: .45; }
.cart-line.is-unavailable .cart-line-total { color: var(--faint); }

.summary-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 28px;
}
.summary-card h3 { margin-bottom: 22px; font-size: 19px; font-weight: 600; }
.summary-rows { display: flex; flex-direction: column; gap: 14px; font-size: 15px; color: var(--muted); }
.summary-rows div { display: flex; justify-content: space-between; }
.summary-rows div span:last-child { color: var(--ink); }
.summary-total {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 18px;
  font-weight: 600;
}
/* Keeps «مبلغ قابل پرداخت» on the cart page honest while the destination is still unknown. */
.summary-note { margin-top: 10px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.summary-note.error { color: var(--danger); }
.summary-card .btn { margin-top: 24px; padding: 16px; font-size: 15px; }
.back-link {
  display: block;
  width: 100%;
  margin-top: 12px;
  background: none;
  color: var(--muted);
  border: none;
  padding: 8px;
  font-size: 14px;
  text-align: center;
}
.back-link:hover { color: var(--ink); }
.cart-empty { text-align: center; padding: 80px 0; }
.cart-empty p { font-size: 18px; color: var(--faint); margin-bottom: 24px; }
.cart-empty .btn-dark { padding: 15px 36px; }

/* ============================================================
   Checkout
   ============================================================ */
.checkout-grid { grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; }
.checkout-form { display: flex; flex-direction: column; gap: 32px; }
.checkout-form h3 { margin-bottom: 18px; font-size: 18px; font-weight: 600; }
/* One payment route, so this states it rather than asking. */
.pay-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--accent-tint);
  font-size: 15px;
}
.pay-notice svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.pay-notice small { display: block; margin-top: 4px; font-size: 13px; color: var(--faint); }
/* The gateway choice on the checkout page: one framed row per درگاه. */
.pay-options { display: flex; flex-direction: column; gap: 10px; }
.pay-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 15px;
  cursor: pointer;
}
.pay-option:has(:checked) { border-color: var(--accent); background: var(--accent-tint); }
.pay-option svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.pay-option input { accent-color: var(--accent); }
.pay-options small { font-size: 13px; color: var(--faint); }
.order-lines {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
  max-height: 260px;
  overflow: auto;
}
.order-lines div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.order-lines .l-name { color: var(--muted); }
.order-lines .l-total { color: var(--ink); white-space: nowrap; }
.summary-card .summary-rows.tight { gap: 12px; padding-top: 18px; border-top: 1px solid var(--border); }

/* ============================================================
   Account
   ============================================================ */
.order-success {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 36px;
  margin-bottom: 32px;
  text-align: center;
}
.check-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--green-bg);
  color: var(--green-text);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 26px;
}
.order-success h2 { margin-bottom: 8px; font-size: 24px; font-weight: 600; }
.order-success p { color: var(--muted); font-weight: 300; }

.account-grid { grid-template-columns: 0.9fr 1.6fr; gap: 40px; align-items: start; }
.profile-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 28px;
}
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 20px;
  font-weight: 600;
}
.profile-head p:first-child { font-size: 16px; font-weight: 600; }
.profile-head p:last-child { margin-top: 2px; font-size: 13px; color: var(--faint); }
.account-nav { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.account-nav span, .account-nav button {
  padding: 11px 14px;
  color: var(--muted);
  text-align: right;
  background: none;
  border: none;
  font-size: 15px;
}
.account-nav .active { background: var(--panel); border-radius: var(--r-sm); color: var(--ink); }
.account-nav .logout { color: var(--danger); cursor: pointer; }

.orders-list h3 { margin-bottom: 18px; font-size: 19px; font-weight: 600; }
.order-cards { display: flex; flex-direction: column; gap: 14px; }
.order-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.order-card .o-code { margin-bottom: 6px; font-size: 15px; font-weight: 500; }
.order-card .o-meta { font-size: 13px; color: var(--faint); }
.order-card .o-side { text-align: left; }
.order-card .o-total { margin-bottom: 8px; font-size: 15px; font-weight: 500; }
/* The transparent border keeps every pill the same height as the outlined .failed one. */
.status-pill { font-size: 12px; padding: 4px 12px; border: 1px solid transparent; border-radius: 20px; }
.status-pill.processing { background: var(--warm); color: var(--accent-dark); }
.status-pill.shipping { background: var(--warm-pill-bg); color: var(--accent); }
.status-pill.delivered { background: var(--green-bg); color: var(--green-text); }
/* Payment states, shown instead of the fulfillment pill until the money arrives. */
.status-pill.pending { background: var(--warm); color: var(--muted); }
.status-pill.failed { border-color: var(--danger); color: var(--danger); }
.retry-pay {
  margin-top: 8px;
  padding: 0;
  background: none;
  border: none;
  border-bottom: 1px solid var(--accent);
  color: var(--accent);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.no-orders { color: var(--faint); font-weight: 300; }

/* Gateway feedback on the account page: red when the payment failed, plain when it is a note. */
.payment-note {
  margin-bottom: 24px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}
.payment-note.error { border-color: var(--danger); color: var(--danger); }

/* ============================================================
   Auth
   ============================================================ */
.auth-container { max-width: 460px; margin: 0 auto; padding: 64px 32px 96px; }
.auth-head { text-align: center; margin-bottom: 36px; }
.auth-head h1 { margin-bottom: 8px; font-size: 30px; font-weight: 600; }
.auth-head p { color: var(--faint); font-weight: 300; }
.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 32px;
}
.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--panel);
  border-radius: var(--r-sm);
  padding: 4px;
  margin-bottom: 28px;
}
.auth-tabs a {
  flex: 1;
  padding: 11px;
  border-radius: var(--r-sm);
  font-size: 14px;
  text-align: center;
  color: var(--faint);
}
.auth-tabs a.active { background: var(--card); color: var(--ink); }
.auth-fields { display: flex; flex-direction: column; gap: 16px; }
.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.auth-row label { display: flex; align-items: center; gap: 8px; color: var(--muted); cursor: pointer; }
.auth-fields .btn-dark { padding: 16px; margin-top: 4px; }
.divider { display: flex; align-items: center; gap: 14px; margin: 24px 0; }
.divider div { flex: 1; height: 1px; background: var(--border); }
.divider span { font-size: 12px; color: var(--faintest); }
.otp-btn {
  width: 100%;
  background: none;
  border: 1px solid var(--border-input);
  padding: 14px;
  font-size: 14px;
  border-radius: var(--r-sm);
  color: var(--ink);
}
.auth-terms {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--faint);
  font-weight: 300;
}

/* ============================================================
   About
   ============================================================ */
.about-intro { text-align: center; max-width: 680px; margin: 0 auto; padding-top: 56px; }
.about-intro .eyebrow { margin-bottom: 14px; }
.about-intro h1 { margin-bottom: 20px; font-size: 44px; line-height: 1.3; font-weight: 600; }
.about-intro p { font-size: 17px; line-height: 2; color: var(--muted); font-weight: 300; }
.about-image {
  height: 360px;
  border-radius: var(--r-lg);
  background-color: var(--warm);
  background-image: url("../img/about.9536c19add0e.png");
  background-size: cover;
  background-position: center 28%;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 32px;
}
.stat-card .stat-num { font-size: 30px; font-weight: 600; color: var(--accent); margin-bottom: 8px; }
.stat-card h3 { margin-bottom: 6px; font-size: 17px; font-weight: 600; }
.stat-card p { color: var(--faint); font-size: 14px; font-weight: 300; line-height: 1.9; }
.values-head { margin-bottom: 28px; font-size: 28px; font-weight: 600; text-align: center; }
.value-item { text-align: center; }
.value-item.bordered { border-inline: 1px solid var(--border); }
.value-item h3 { margin-bottom: 8px; font-size: 17px; font-weight: 600; }
.value-item p { color: var(--faint); font-size: 14px; font-weight: 300; line-height: 1.9; }

/* ============================================================
   Contact
   ============================================================ */
.contact-intro { max-width: 720px; }
.contact-section { padding-top: 56px; padding-bottom: 96px; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 920px;
  margin: 0 auto;
}
.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  min-height: 172px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card);
}
.contact-icon {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--accent-dark);
  background: var(--accent-tint);
}
.contact-card h2 { margin: 5px 0 13px; font-size: 17px; font-weight: 600; }
.contact-value,
.contact-phone-list p { color: var(--muted); font-size: 15px; line-height: 2; font-weight: 300; }
.contact-phone-list { display: flex; flex-direction: column; gap: 7px; }
.contact-phone-list p { display: flex; flex-wrap: wrap; gap: 5px 12px; }
.contact-phone-list span { color: var(--faint); }
.contact-phone-list a,
a.contact-value { color: var(--ink); direction: ltr; unicode-bidi: embed; }
.contact-phone-list a:hover,
a.contact-value:hover { color: var(--accent-dark); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { border-top: 1px solid var(--border); background: var(--panel); }
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 32px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand { font-size: 22px; font-weight: 600; margin-bottom: 12px; }
.footer-blurb { font-size: 14px; line-height: 2; color: var(--faint); font-weight: 300; }
.footer-grid h4 { margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-social-blurb { margin-bottom: 14px; font-size: 13px; color: var(--faint); font-weight: 300; }
.insta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border: 1px solid var(--border-input);
  border-radius: var(--r-sm);
  font-size: 14px;
  background: var(--card);
}
.footer-badges {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 0 32px 24px;
}
.footer-badges a {
  display: inline-block;
  padding: 8px;
  border-radius: var(--r-sm);
  background: #fff;
  line-height: 0;
}
.footer-badges img { max-width: 100px; height: auto; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 32px;
  text-align: center;
  font-size: 13px;
  color: var(--faint);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 820px) {
  .hdr-inner { padding-inline: 20px; gap: 12px; }
  .desktop-nav { display: none; }
  .site-header .search-box { display: none; }
  .menu-btn { display: flex; align-items: center; }
  .logo-fa { font-size: 24px; }
  .hero-box { height: auto; min-height: 440px; }
  .hero-text { max-width: 100%; padding: 36px 26px; }
  .hero-text h1 { font-size: 36px; }
  .hero-text p { font-size: 15px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .form-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .trust-item.bordered, .value-item.bordered { border-inline: none; }
  /* Stacked single column: cap the gallery so a square frame can't swallow the screen.
     width:100% is load-bearing — auto margins alone make this grid item shrink-to-fit, and
     its content has no intrinsic width (the slides are absolutely positioned). */
  .pdp-gallery { width: 100%; max-width: 480px; margin-inline: auto; }
  .pdp-info h1 { font-size: 28px; }
  .pdp-price { font-size: 21px; }
  .about-image { height: 260px; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-text h1 { font-size: 30px; }
  .container, .narrow-container { padding-inline: 20px; }
  /* The logo + four icon buttons need ~355px, so every page scrolled sideways at 320px */
  .logo-fa { font-size: 20px; }
  .logo-en { letter-spacing: 1px; }
  .hdr-actions { gap: 10px; }
  .icon-btn { padding: 4px; }
  .pdp-info h1 { font-size: 24px; }
  .pdp-thumbs { gap: 10px; }
  .pdp-nav { width: 38px; height: 38px; }
  .pdp-nav.prev { inset-inline-start: 8px; }
  .pdp-nav.next { inset-inline-end: 8px; }
  /* Thumb + info + total won't fit one row once the stepper hits its min width, so the
     total drops to its own line instead of pushing the page sideways. */
  .cart-line { gap: 14px; flex-wrap: wrap; }
  .cart-line .ph { width: 84px; height: 84px; }
  .cart-line-total { width: 100%; }
  /* The shop grid goes 2-up here, so the three price pieces need to sit tighter. */
  .price-tag { gap: 6px; }
  .about-image { height: 200px; }
  .contact-section { padding-top: 36px; padding-bottom: 72px; }
  .contact-card { min-height: 0; padding: 24px 20px; }
}

/* ============================================================
   Uploaded images (admin-managed media)
   ============================================================ */
.tile img,
.card-img img,
.pdp-slide img,
.pdp-thumbs .thumb img,
.cart-thumb img,
.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pdp-main { overflow: hidden; }
.pdp-thumbs .thumb {
  aspect-ratio: 1;
  border-radius: var(--r-md);
  overflow: hidden;
}
.cart-line .cart-thumb {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  border-radius: var(--r-md);
  overflow: hidden;
}
/* Kept here, not in the Responsive section: the rule above is later in the file and
   would otherwise win on source order (same specificity). */
@media (max-width: 480px) {
  .cart-line .cart-thumb { width: 84px; height: 84px; }
}
