/* ============================================
   La Estancia Gourmet — design tokens & base
   ============================================ */

:root {
  /* Brand */
  --terracotta:    #E36953;
  --terracotta-dk: #C5503D;
  --terracotta-lt: #EE8A78;

  /* Neutrals */
  --cream:         #F8F1E8;
  --paper:         #FBF6EE;
  --sand:          #EFE4D2;
  --sand-dk:       #E2D2B6;
  --ink:           #2A1F1A;
  --ink-soft:      #5A4A40;
  --ink-mute:      #8A776A;
  --line:          rgba(42, 31, 26, 0.12);
  --line-strong:   rgba(42, 31, 26, 0.22);

  /* Accent for tags / chips */
  --olive:         #6B6B3A;
  --olive-soft:    #B6B486;
  --plum:          #6E2A3E;

  /* Type */
  --font-display: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-script:  'Pinyon Script', 'Allura', cursive;
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing scale (multiples of 4) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px;  --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px;  --s-10: 40px;
  --s-12: 48px;--s-16: 64px;--s-20: 80px; --s-24: 96px;
  --s-32:128px;

  /* Radii */
  --r-sm: 4px;  --r-md: 8px; --r-lg: 14px; --r-xl: 22px; --r-pill: 999px;

  /* Shadows */
  --shadow-card: 0 1px 2px rgba(42,31,26,.04), 0 8px 24px rgba(42,31,26,.06);
  --shadow-pop:  0 4px 12px rgba(42,31,26,.08), 0 24px 48px rgba(42,31,26,.12);
  --shadow-cta:  0 6px 20px rgba(197, 80, 61, 0.32);

  /* Container */
  --max-w: 1280px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--terracotta); color: var(--cream); }

/* Display heading utilities */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--ink);
}
.script {
  font-family: var(--font-script);
  font-weight: 400;
}
.eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terracotta-dk);
}
.eyebrow.muted { color: var(--ink-mute); }

/* Numerals */
.tnum { font-variant-numeric: tabular-nums; }

/* ============================================
   Layout helpers
   ============================================ */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s-8);
}
@media (max-width: 720px) {
  .container { padding: 0 var(--s-5); }
}

section { position: relative; }

.section-pad { padding-block: var(--s-24); }
.section-pad-sm { padding-block: var(--s-16); }
@media (max-width: 720px) {
  .section-pad { padding-block: var(--s-16); }
  .section-pad-sm { padding-block: var(--s-12); }
}

/* ============================================
   Topbar
   ============================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 241, 232, 0.92);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-8);
  height: 72px;
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.brand-logo {
  height: 52px;
  width: auto;
  display: block;
}
.brand-logo-lg { height: 72px; }

.nav {
  display: flex;
  gap: var(--s-8);
  align-items: center;
}
.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color .15s;
}
.nav a:hover { color: var(--terracotta-dk); }
.nav a.active { color: var(--ink); }
.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1.5px;
  background: var(--terracotta);
}
@media (max-width: 880px) {
  .nav { display: none; }
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--cream);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: transform .15s, background .15s;
}
.cart-btn:hover { background: var(--terracotta-dk); transform: translateY(-1px); }
.cart-btn .count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--terracotta);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 600;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: transform .15s, background .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--terracotta);
  color: var(--cream);
  box-shadow: var(--shadow-cta);
}
.btn-primary:hover { background: var(--terracotta-dk); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-whatsapp {
  background: #25D366;
  color: white;
  box-shadow: 0 6px 20px rgba(37, 211, 102, .32);
}
.btn-whatsapp:hover { background: #1FB855; transform: translateY(-1px); }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-lg { padding: 16px 28px; font-size: 15px; }

/* ============================================
   Tag / chip
   ============================================ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--sand);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.chip-active { background: var(--ink); color: var(--cream); }
.chip-outline { background: transparent; border: 1px solid var(--line-strong); }

/* ============================================
   Mobile tweaks (≤720px) and small phones (≤480px)
   ============================================ */
@media (max-width: 720px) {
  .topbar-inner { height: 64px; }
  .brand-logo { height: 40px; }
  .cart-btn { padding: 8px 12px; font-size: 12.5px; gap: 6px; }
}
@media (max-width: 480px) {
  .cart-btn { padding: 8px 10px; }
  .cart-btn .cart-btn-text { display: none; }
  .cart-btn .count { margin-left: 0; }
  .btn-lg { padding: 14px 22px; font-size: 14.5px; }
}

/* iOS: keep input font ≥16px so Safari doesn't auto-zoom on focus */
@media (max-width: 720px) {
  input, textarea, select { font-size: 16px !important; }
}
