/* ================================================================
   Vastra Vision — Editorial Indian Design System
   Rooted, premium, Indian-modern · Mobile-first
   ================================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* ─── Backgrounds & neutrals ─────────────────────────── */
  --cream:       #F8F4ED;     /* primary background — warm off-white */
  --warm-white:  #F3EEE3;     /* secondary panel background */
  --stone:       #E5DBC8;     /* borders, dividers */
  --taupe:       #8C7E6E;     /* subtle text, icons — darkened for better readability */
  --muted:       #56483C;     /* secondary text — bumped contrast vs cream bg */
  --dark:        #1A1612;     /* headings — near black, slight warmth */
  --charcoal:    #221C18;     /* body text — slightly richer */

  /* ─── Editorial Indian accents ───────────────────────── */
  --accent:      #B85D3D;     /* TERRACOTTA — primary brand accent */
  --accent-dark: #8B3D24;     /* deep terracotta — for hovers */
  --gold:        #C99B3D;     /* MUSTARD — secondary accent */
  --gold-light:  #E8C885;     /* soft mustard — for highlights */
  --gold-dim:    #A07F2E;     /* deep mustard */
  --leaf:        #3D5B3D;     /* FOREST GREEN — trust elements */

  /* ─── Semantic ───────────────────────────────────────── */
  --success:     #3D5B3D;     /* forest green (in stock, paid) */
  --danger:      #B23D3D;     /* deep red */

  /* ─── Typography ─────────────────────────────────────── */
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Jost', system-ui, -apple-system, sans-serif;

  /* ─── Shadows (warmer, with a soft glow) ─────────────── */
  --shadow-sm:     0 2px 10px rgba(45, 37, 32, 0.08);
  --shadow-md:     0 6px 28px rgba(45, 37, 32, 0.12);
  --shadow-lg:     0 14px 44px rgba(45, 37, 32, 0.18);
  --shadow-accent: 0 6px 28px rgba(184, 93, 61, 0.42);   /* terracotta glow */
  --shadow-gold:   0 6px 28px rgba(201, 155, 61, 0.40);  /* mustard glow */

  /* ─── Gradients ──────────────────────────────────────── */
  --grad-cream: linear-gradient(180deg, #F8F4ED 0%, #F3EEE3 100%);
  --grad-dark:  linear-gradient(180deg, #2D2520 0%, #1A1612 100%);
  --grad-accent: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  --grad-mustard: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%);

  /* ─── Layout ─────────────────────────────────────────── */
  --gutter-x: clamp(1.25rem, 4vw, 4rem);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--charcoal);
  font-weight: 400;             /* lighter, more elegant body weight (premium fashion) */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ─── Buttons ──────────────────────────────────────────────────── */
.btn-primary {
  background: var(--dark);
  color: #FFFFFF;
  border: none;
  padding: 0.95rem 2.25rem;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;                 /* bolder for premium feel */
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(.2,.7,.3,1);
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  box-shadow: 0 4px 18px rgba(26, 22, 18, 0.18);
  text-align: center;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: var(--shadow-accent);  /* terracotta glow */
  transform: translateY(-2px);
}
.btn-primary:disabled {
  background: var(--taupe); cursor: not-allowed;
  transform: none; box-shadow: none;
}

.btn-ghost {
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dark);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  padding: 0;
  white-space: nowrap;
  transition: color 0.25s;
}
.btn-ghost::after { content: '→'; transition: transform 0.25s; color: var(--accent); }
.btn-ghost:hover { color: var(--accent); }
.btn-ghost:hover::after { transform: translateX(5px); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
  padding: 0.55rem 1.1rem;
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
  font-weight: 500;
}
.btn-danger:hover {
  background: #8B2D2D;
  box-shadow: 0 4px 16px rgba(178, 61, 61, 0.3);
}

.btn-sm { padding: 0.5rem 1rem; font-size: 0.65rem; }

/* ─── Typography helpers ──────────────────────────────────────── */
.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 700;             /* bolder eyebrow */
  position: relative;
  display: inline-block;
  padding-left: 1.5rem;
}
.section-label::before {
  content: ''; position: absolute;
  left: 0; top: 50%;
  width: 1rem; height: 1.5px;
  background: var(--accent);
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(1.95rem, 4vw, 3.2rem);
  font-weight: 500;             /* bumped from 400 for richer reading */
  line-height: 1.15;
  color: var(--dark);
  margin-bottom: 0.6rem;
  letter-spacing: -0.015em;       /* tighter tracking — more refined serif display */
}
.section-title em {
  font-style: italic;
  color: var(--accent);          /* terracotta italic accent */
  font-weight: 500;
}

.section-sub {
  font-size: 0.95rem;
  color: var(--charcoal);        /* was --muted; now matches body */
  font-weight: 400;
  max-width: 540px;
  line-height: 1.75;
}

/* ─── Animations ──────────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ─── Status Badges ───────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}
.badge-pending    { background: #F4E6D5; color: var(--accent-dark); }
.badge-confirmed  { background: var(--dark); color: var(--gold-light); }
.badge-shipped    { background: var(--accent); color: #fff; }
.badge-delivered  { background: var(--leaf); color: #fff; }
.badge-cancelled  { background: #6B3D3D; color: #fff; }

/* ─── Form Elements ───────────────────────────────────────────── */
.form-group { margin-bottom: 1.15rem; }
.form-group label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-weight: 700;             /* clearly bold for premium feel */
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: #FFFFFF;
  border: 1px solid var(--stone);
  border-radius: 0;
  font-family: var(--sans);
  font-size: 0.94rem;
  color: var(--dark);
  font-weight: 500;
  outline: none;
  transition: all 0.25s;
  -webkit-appearance: none;
  appearance: none;
}
.form-group select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%236B5F52' stroke-width='1.5' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 93, 61, 0.12);
}
.form-group textarea { resize: vertical; min-height: 90px; }

/* ─── Toggle Switch ───────────────────────────────────────────── */
.toggle {
  position: relative;
  width: 44px; height: 24px;
  flex-shrink: 0;
  display: inline-block;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--stone);
  cursor: pointer;
  transition: all 0.25s;
  border-radius: 12px;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px; bottom: 3px;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle input:checked + .toggle-slider {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 93, 61, 0.12);
}
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ─── Toast notification ──────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--dark);
  color: #FFFFFF;
  padding: 0.9rem 1.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  max-width: calc(100vw - 2rem);
  text-align: center;
  box-shadow: 0 6px 32px rgba(45, 37, 32, 0.35);
  border-left: 3px solid var(--accent);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { background: #6B3D3D; border-left-color: #FFB3A8; }

@media (min-width: 768px) {
  #toast { left: auto; right: 1.5rem; bottom: 1.5rem; transform: translateY(10px); }
  #toast.show { transform: translateY(0); }
}

/* ─── Loading skeleton ────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--stone) 25%, var(--warm-white) 50%, var(--stone) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Utility ─────────────────────────────────────────────────── */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.text-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Focus ring ──────────────────────────────────────────────── */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─── Selection ───────────────────────────────────────────────── */
::selection { background: var(--gold-light); color: var(--dark); }

/* ════════════════════════════════════════════════════════════════
   PRODUCT TYPOGRAPHY — global override
   Applies across homepage, shop, product page, cart, quick-view
   so prices and product names are always confidently readable.
   ════════════════════════════════════════════════════════════════ */

/* Product card name (cards on home + shop) */
.product-name {
  font-family: var(--serif) !important;
  font-size: 1.15rem !important;
  font-weight: 500 !important;
  color: var(--dark) !important;
  line-height: 1.25 !important;
  letter-spacing: 0.005em !important;
  margin-bottom: 0.3rem !important;
}

/* Product card material line */
.product-material {
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  color: var(--muted) !important;
  letter-spacing: 0.04em !important;
  line-height: 1.45 !important;
  margin-bottom: 0.55rem !important;
}

/* Product card price */
.product-price {
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: var(--dark) !important;
  letter-spacing: 0.01em !important;
  margin-bottom: 0.85rem !important;
}
.price-old {
  font-size: 0.78rem !important;
  font-weight: 400 !important;
  color: var(--taupe) !important;
  opacity: 0.7 !important;          /* quieter strikethrough — less discount-store feel */
}

/* Add-to-cart button on cards */
.add-btn {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.22em !important;
  padding: 0.85rem !important;
}

/* Product tag chip */
.product-tag {
  font-size: 0.62rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.18em !important;
  padding: 0.32rem 0.7rem !important;
}
/* "Sale" reads quieter than New/Bestseller — premium labels don't shout discounts.
   Two-class specificity (0,2,0) overrides the page-local .product-tag fill without !important. */
.product-tag.tag-sale {
  background: rgba(248, 244, 237, 0.92);   /* cream, not solid terracotta */
  color: var(--accent-dark);
  border: 1px solid var(--stone);
}

/* ─── Product Detail Page ───────────────────────────────────── */
.p-name { font-weight: 500 !important; }
.p-material {
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  color: var(--charcoal) !important;
  letter-spacing: 0.02em !important;
  line-height: 1.65 !important;
}
.p-price {
  font-weight: 600 !important;
}
.p-tax-note {
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  color: var(--muted) !important;
}
.stock-row {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.18em !important;
}

/* Pick labels (Select Size / Select Colour) */
.pick-label {
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.22em !important;
}
.pick-label .chosen-val {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
  color: var(--dark) !important;
}

/* Pick chips (size + colour buttons) */
.pick-size, .pick-swatch {
  font-size: 0.82rem !important;
  font-weight: 500 !important;
}
.pick-swatch .name {
  font-size: 0.78rem !important;
  font-weight: 500 !important;
}

/* Buy buttons */
.add-cart-btn, .buy-now-btn {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.24em !important;
  padding: 1rem !important;
}

/* ─── Cart line items ───────────────────────────────────────── */
.cart-item-name {
  font-size: 1.05rem !important;
  font-weight: 500 !important;
  color: var(--dark) !important;
  letter-spacing: 0.005em !important;
}
.cart-item-variant {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: var(--accent) !important;
  letter-spacing: 0.02em !important;
  line-height: 1.45 !important;
}
.cart-item-variant strong {
  font-weight: 700 !important;
  color: var(--charcoal) !important;
}
.cart-item-price {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: var(--muted) !important;
}
.cart-item-total {
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: var(--dark) !important;
}
.qty-num {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: var(--dark) !important;
}

/* Summary rows */
.summary-row {
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  color: var(--charcoal) !important;
}
.summary-total {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: var(--dark) !important;
}

/* ─── Quick-view modal ──────────────────────────────────────── */
.qv-name {
  font-weight: 500 !important;
  letter-spacing: 0.005em !important;
}
.qv-material {
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  color: var(--charcoal) !important;
  letter-spacing: 0.02em !important;
}
.qv-price {
  font-weight: 600 !important;
}
.qv-price-old {
  font-weight: 500 !important;
  color: var(--taupe) !important;
}

/* Related products row */
.rel-price {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: var(--dark) !important;
}
.rel-price-old {
  font-size: 0.82rem !important;
  font-weight: 500 !important;
}

/* Search dropdown results */
.search-result-price {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: var(--dark) !important;
}

/* Highlights list on PDP */
.highlights h4 {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.22em !important;
  text-transform: uppercase !important;
}
.highlights li {
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  color: var(--charcoal) !important;
  line-height: 1.7 !important;
}

/* ─── Account slot in nav (Login / Hi, Name) ───────────────────── */
[data-account-slot] {
  display: inline-flex; align-items: center;
}
[data-account-slot] a {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--charcoal);
  text-decoration: none;
  transition: color 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid transparent;
  white-space: nowrap;
}
[data-account-slot] a:hover {
  color: var(--accent);
  border-color: var(--accent);
}
