/* ============================================================================
   Taheri Plastic & Crockery — Redesign layer (2026)
   Loaded AFTER style.css. A premium design system grounded in glazed tableware:
   warm porcelain surfaces, a clay primary, a ceramic-glaze pine secondary, brass
   highlights, and an editorial serif (Fraunces) for display. This layer only
   re-themes and refines — every class contract and JS hook stays intact.
   ============================================================================ */

/* ── Tokens: light (porcelain) ─────────────────────────────────────────── */
:root {
  color-scheme: light;

  --brand: #b0491f;          /* clay — primary actions, emphasis */
  --brand-600: #9a3f18;
  --brand-700: #7e3113;
  --accent: #1f5a4c;         /* ceramic-glaze pine — secondary */
  --accent-600: #184a3e;
  --gold: #a9792a;           /* brass highlight */

  --success: #2e7d52;
  --danger: #c0392f;
  --warning: #b9791c;
  --info: #2563a8;

  --bg-1: #f8f4ed;
  --bg-2: #f2ebe0;
  --bg-3: #efe8dc;
  --text: #241d18;
  --text-soft: #574c43;
  --text-muted: #756a5e;
  --border: rgba(58, 42, 30, 0.12);

  /* Surfaces are near-opaque now (glass dialed right back). */
  --glass-bg: #ffffff;
  --glass-bg-strong: rgba(252, 249, 244, 0.86);
  --glass-border: rgba(58, 42, 30, 0.10);
  --glass-blur: 14px;

  /* Fixed, accessible button fills (independent of --brand lightness). */
  --grad-brand: linear-gradient(180deg, #bd5125 0%, #a0401a 100%);
  --grad-accent: linear-gradient(180deg, #24695a 0%, #184a3e 100%);
  --grad-hero: linear-gradient(135deg, #b0491f, #a9792a 55%, #1f5a4c);

  --shadow-sm: 0 1px 2px rgba(45, 30, 20, 0.05), 0 2px 5px rgba(45, 30, 20, 0.05);
  --shadow-md: 0 2px 8px rgba(45, 30, 20, 0.06), 0 12px 26px rgba(45, 30, 20, 0.09);
  --shadow-lg: 0 8px 20px rgba(45, 30, 20, 0.10), 0 28px 60px rgba(45, 30, 20, 0.16);
  --ring: 0 0 0 3px rgba(176, 73, 31, 0.30);

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --font-display: 'Fraunces', 'Georgia', 'Times New Roman', serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ── Tokens: dark (fired clay at night) ────────────────────────────────── */
[data-theme='dark'] {
  color-scheme: dark;

  --brand: #e07a4a;          /* lighter clay reads as text/accents on dark */
  --brand-600: #cf6a3b;
  --brand-700: #bd5c30;
  --accent: #5fb8a3;         /* lighter pine for dark */
  --accent-600: #49a992;
  --gold: #d2a24f;

  --bg-1: #191310;
  --bg-2: #120d0b;
  --bg-3: #0e0a08;
  --text: #f3ece3;
  --text-soft: #c9bcaf;
  --text-muted: #9a8c7e;
  --border: rgba(255, 238, 222, 0.12);

  --glass-bg: #221a15;
  --glass-bg-strong: rgba(30, 23, 18, 0.9);
  --glass-border: rgba(255, 238, 222, 0.09);

  /* Buttons keep the fixed accessible fills; don't lighten these. */
  --grad-brand: linear-gradient(180deg, #c25526 0%, #a0401a 100%);
  --grad-accent: linear-gradient(180deg, #24695a 0%, #163f35 100%);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 3px 12px rgba(0, 0, 0, 0.45), 0 16px 38px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 26px rgba(0, 0, 0, 0.5), 0 32px 70px rgba(0, 0, 0, 0.6);
  --ring: 0 0 0 3px rgba(224, 122, 74, 0.38);
}

/* ── Base: calmer canvas + editorial type ──────────────────────────────── */
body {
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 620px at 100% -8%, rgba(31, 90, 76, 0.07), transparent 62%),
    radial-gradient(900px 540px at -6% 4%, rgba(176, 73, 31, 0.06), transparent 60%),
    linear-gradient(180deg, #fbf8f2 0%, #f4eee3 100%);
  background-attachment: fixed;
}

[data-theme='dark'] body {
  background:
    radial-gradient(1200px 620px at 100% -8%, rgba(95, 184, 163, 0.07), transparent 62%),
    radial-gradient(900px 540px at -6% 4%, rgba(224, 122, 74, 0.06), transparent 60%),
    linear-gradient(180deg, #17120f 0%, #100c0a 100%);
}

/* Fraunces carries the display voice; weight + size do the emphasis, not colour. */
h1, h2,
.hero h1,
.section__head h2,
.brand-story__body h2,
.panel-head h2,
.auth-card h1 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h3 { text-wrap: balance; }

/* Kill the animated multi-colour headline tell — one calm serif voice. */
.hero h1 .grad {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  color: inherit;
  animation: none;
}

/* Numeric data lines up and reads as data. */
.price, .price--old, .hero__stats, .sum-row, .shop-count,
.discount-pct, .cart-total, .ord-total {
  font-variant-numeric: tabular-nums;
}

/* Comfortable, deliberate focus for keyboard users. */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  box-shadow: none;
  border-radius: var(--radius-sm);
}

/* Snappier taps on touch; no double-tap zoom delay. */
a, button, .btn, .icon-btn, input, select, textarea, [role='button'] {
  touch-action: manipulation;
}

/* ── Glass → premium solid surface ─────────────────────────────────────── */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

/* ── Navbar: quiet, legible chrome (keeps a light blur) ────────────────── */
.navbar {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  backdrop-filter: blur(16px) saturate(135%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border);
}
.brand__logo { filter: none; }
.brand__name small {
  color: var(--accent);
  letter-spacing: 0.26em;
}
.brand__name b { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }
.nav-link { font-weight: 500; }
.nav-link:hover { color: var(--brand); }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn { font-weight: 600; letter-spacing: 0.005em; }
.btn--primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(160, 64, 27, 0.26);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(160, 64, 27, 0.34);
}
.btn--accent {
  background: var(--grad-accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(24, 74, 62, 0.24);
}
.btn--accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(24, 74, 62, 0.32);
}
.btn--ghost {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  color: var(--text);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.btn--ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 6%, var(--glass-bg));
}

.icon-btn {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: var(--text-soft);
}
.icon-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 7%, var(--glass-bg));
}

/* ── Hero: editorial, de-gimmicked ─────────────────────────────────────── */
.hero__inner {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.hero__inner::before {
  background: radial-gradient(560px 340px at 104% -12%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
}
.hero__eyebrow {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  font-weight: 600;
}
.hero h1 { font-weight: 600; font-size: clamp(2.1rem, 4.8vw, 3.4rem); line-height: 1.08; }
.hero p { color: var(--text-soft); }
.hero__stats div b { color: var(--brand); font-family: var(--font-display); font-weight: 600; }

/* Photo-free "plate" stage — reliable, on-brand, never a broken image. */
.hero__art {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  background:
    radial-gradient(closest-side, transparent 58%, color-mix(in srgb, var(--brand) 20%, transparent) 59%, transparent 61%) center / 78% 78% no-repeat,
    radial-gradient(closest-side, transparent 40%, color-mix(in srgb, var(--accent) 22%, transparent) 41%, transparent 43%) center / 78% 78% no-repeat,
    radial-gradient(120% 120% at 20% 10%, color-mix(in srgb, var(--gold) 16%, var(--glass-bg)), transparent 55%),
    linear-gradient(145deg, color-mix(in srgb, var(--brand) 14%, var(--glass-bg)), color-mix(in srgb, var(--accent) 16%, var(--glass-bg)));
}
.hero__art::after {
  content: '🍽️';
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  filter: saturate(0.85);
  opacity: 0.92;
}
.hero__float {
  animation: none;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  color: var(--text);
}

/* ── Section heads + eyebrows ──────────────────────────────────────────── */
.section__head h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); }
.section__head p { color: var(--text-muted); }

/* ── Category tiles ────────────────────────────────────────────────────── */
.cat-card, .category-card {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-spring), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.cat-card:hover, .category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--brand) 26%, var(--border));
}

/* ── Product cards ─────────────────────────────────────────────────────── */
.product-card {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--brand) 28%, var(--border));
}
.product-card__media { background: var(--bg-2); }
.product-card__cat {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.product-card__name { font-weight: 600; letter-spacing: -0.005em; }
.product-card__name:hover { color: var(--brand); }
.price { color: var(--text); font-weight: 700; }
.price--old { color: var(--text-muted); }
.discount-pct { color: var(--brand); font-weight: 700; }
.badge {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
  letter-spacing: 0.01em;
}
.badge--stock { background: #52443b; }
.wish-btn {
  background: var(--glass-bg-strong);
  border: 1px solid var(--border);
  color: var(--brand);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.wish-btn.active { color: #fff; background: var(--brand); border-color: transparent; }

/* ── Chips / filters / toolbar ─────────────────────────────────────────── */
.chip { background: var(--glass-bg); border: 1px solid var(--border); color: var(--text-soft); }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active {
  background: var(--grad-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(160, 64, 27, 0.26);
}
.filter-cat.active, .filter-cats .active {
  background: var(--grad-brand) !important;
  color: #fff !important;
}
.view-btn.active { color: var(--brand); }

/* ── Inputs ────────────────────────────────────────────────────────────── */
.input, .select, .nav-search {
  background: var(--glass-bg);
  border: 1px solid var(--border);
}
.input:focus, .select:focus {
  border-color: var(--brand);
  box-shadow: var(--ring);
}
.nav-search button { background: var(--grad-brand); }

/* ── Trust bar ─────────────────────────────────────────────────────────── */
.trust-item__icon {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}
.trust-item b { font-weight: 600; }

/* ── Brand story + value chips + newsletter ────────────────────────────── */
.value-chip {
  background: color-mix(in srgb, var(--accent) 10%, var(--glass-bg));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent);
  font-weight: 600;
}
.newsletter { background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 10%, var(--glass-bg)), color-mix(in srgb, var(--gold) 10%, var(--glass-bg))); }

/* ── Cart badge ────────────────────────────────────────────────────────── */
.cart-badge { background: var(--brand); border-color: var(--glass-bg-strong); }

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); }
.footer h5 { color: var(--text); font-weight: 600; letter-spacing: 0.02em; }
.footer a:hover { color: var(--brand); }

/* Footer contact block */
.footer-contact { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; max-width: 36ch; }
.footer-contact li { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.86rem; line-height: 1.4; }
.footer-contact li span { flex: none; }
.footer-contact a { color: var(--text-soft); }
.footer-contact a:hover { color: var(--brand); }

/* Contact page "Get directions" link */
.contact-directions { display: block; margin-top: 0.4rem; color: var(--accent); font-weight: 600; font-size: 0.86rem; }
.contact-info__list li > div { display: flex; flex-direction: column; }
.contact-directions:hover { color: var(--brand); }

/* ── OTP verification UI ───────────────────────────────────────────────── */
.otp-input {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.5em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding-left: 0.5em; /* optically centre with the letter-spacing */
}
.otp-input::placeholder { color: var(--text-muted); letter-spacing: 0.4em; }
.auth-or {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1rem 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.auth-or::before, .auth-or::after { content: ''; height: 1px; flex: 1; background: var(--border); }

/* ── Motion discipline: honour reduced-motion for every effect ─────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Brand logo image (the real TAHERI mark, replacing the emoji) ──────────── */
.brand { gap: 0.4rem; }
.brand__logo-img {
  height: 46px;
  width: auto;
  max-width: 190px;
  display: block;
  object-fit: contain;
}
.brand__logo-img--footer { height: 88px; max-width: 260px; }
@media (max-width: 560px) { .brand__logo-img { height: 40px; } }

/* Dark theme: the master mark is dark artwork — seat it on a soft cream chip so it stays legible. */
[data-theme='dark'] .brand__logo-img {
  background: #f4ece0;
  border-radius: 10px;
  padding: 5px 9px;
}
[data-theme='dark'] .brand__logo-img--footer { padding: 7px 12px; }
