/* ============================================================
   Carnicería La Dehesa — Design System
   Mobile-first · CSS Variables · No frameworks
   ============================================================ */

/* ---------- Custom Properties ---------- */
:root {
  /* Palette */
  --c-wine:       #7B2D3B;
  --c-wine-dark:  #5C1F2C;
  --c-wine-light: #A34455;
  --c-cream:      #FAF5EF;
  --c-cream-dark: #EDE6DA;
  --c-black:      #1A1A1A;
  --c-gray-900:   #2C2C2C;
  --c-gray-700:   #555;
  --c-gray-500:   #888;
  --c-gray-300:   #C5C0B8;
  --c-gray-100:   #F0ECE5;
  --c-white:      #fff;
  --c-success:    #2D7B4A;
  --c-warning:    #C68B1E;
  --c-danger:     #B83232;

  /* Typography */
  --ff-heading: 'Playfair Display', Georgia, serif;
  --ff-body:    'Inter', system-ui, -apple-system, sans-serif;
  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-lg:   1.125rem;
  --fs-xl:   1.5rem;
  --fs-2xl:  2rem;
  --fs-3xl:  2.75rem;
  --fs-4xl:  3.5rem;
  --fw-normal:   400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;

  /* Radius */
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  20px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 12px rgba(0,0,0,.1);
  --shadow-lg:  0 8px 30px rgba(0,0,0,.12);
  --shadow-xl:  0 16px 50px rgba(0,0,0,.15);

  /* Transitions */
  --tr-fast: 150ms ease;
  --tr-base: 250ms ease;
  --tr-slow: 400ms ease;

  /* Layout */
  --max-w: 1200px;
  --nav-h: 72px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--c-black);
  background: var(--c-cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea, select {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}
button { cursor: pointer; }
h1, h2, h3, h4, h5 { font-family: var(--ff-heading); line-height: 1.2; }

/* ---------- Utility ---------- */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--sp-6); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.text-center { text-align: center; }
.text-wine  { color: var(--c-wine); }
.text-muted { color: var(--c-gray-500); }
.mt-1 { margin-top: var(--sp-4); }
.mt-2 { margin-top: var(--sp-8); }
.mt-3 { margin-top: var(--sp-12); }

/* ---------- Fonts (Google) ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@600;700;800&display=swap');

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-gray-100);
  transition: box-shadow var(--tr-base);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.navbar__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--ff-heading);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--c-wine);
}
.navbar__brand svg { width: 36px; height: 36px; fill: var(--c-wine); }
.navbar__links { display: flex; gap: var(--sp-6); align-items: center; }
.navbar__links a {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--c-gray-700);
  padding: var(--sp-2) 0;
  position: relative;
  transition: color var(--tr-fast);
}
.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--c-wine);
  border-radius: var(--r-full);
  transition: width var(--tr-base);
}
.navbar__links a:hover,
.navbar__links a.active { color: var(--c-wine); }
.navbar__links a:hover::after,
.navbar__links a.active::after { width: 100%; }
.navbar__links a:focus-visible { outline: 2px solid var(--c-wine); outline-offset: 4px; border-radius: var(--r-sm); }

/* Cart badge */
.navbar__cart-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--c-wine);
  color: var(--c-white);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  transition: background var(--tr-fast), transform var(--tr-fast);
}
.navbar__cart-badge:hover {
  background: var(--c-wine-dark);
  transform: scale(1.05);
}
.navbar__cart-count {
  background: var(--c-white);
  color: var(--c-wine);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
}

/* Mobile hamburger */
.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: var(--sp-2);
}
.navbar__toggle span {
  display: block;
  height: 2px;
  background: var(--c-black);
  border-radius: var(--r-full);
  transition: transform var(--tr-base), opacity var(--tr-fast);
}

@media (max-width: 768px) {
  .navbar__toggle { display: flex; }
  .navbar__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--c-white);
    flex-direction: column;
    padding: var(--sp-8) var(--sp-6);
    gap: var(--sp-6);
    box-shadow: var(--shadow-lg);
    transform: translateY(-110%);
    transition: transform var(--tr-slow);
    z-index: 999;
  }
  .navbar__links.open { transform: translateY(0); }
  .navbar__links a { font-size: var(--fs-lg); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--c-wine) 0%, var(--c-wine-dark) 100%);
  color: var(--c-white);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 75%, rgba(255,255,255,.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.04) 0%, transparent 40%);
  pointer-events: none;
}
.hero__content { position: relative; z-index: 1; max-width: 640px; }
.hero__tag {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 2px;
  text-transform: uppercase;
  background: rgba(255,255,255,.15);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-full);
  margin-bottom: var(--sp-6);
}
.hero__title {
  font-size: var(--fs-3xl);
  font-weight: 800;
  margin-bottom: var(--sp-6);
  line-height: 1.1;
}
.hero__subtitle {
  font-size: var(--fs-lg);
  opacity: .85;
  margin-bottom: var(--sp-8);
  line-height: 1.6;
}
.hero__actions { display: flex; gap: var(--sp-4); flex-wrap: wrap; }

@media (min-width: 768px) {
  .hero__title { font-size: var(--fs-4xl); }
}

/* Pattern deco */
.hero__deco {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  width: 500px;
  height: 500px;
  border-radius: 50%;
  border: 60px solid rgba(255,255,255,.04);
  pointer-events: none;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  border-radius: var(--r-md);
  transition: all var(--tr-fast);
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--c-wine); outline-offset: 3px; }

.btn--primary {
  background: var(--c-wine);
  color: var(--c-white);
}
.btn--primary:hover { background: var(--c-wine-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn--secondary {
  background: var(--c-white);
  color: var(--c-wine);
  border: 1px solid var(--c-gray-300);
}
.btn--secondary:hover { border-color: var(--c-wine); background: var(--c-cream); }

.btn--outline {
  border: 2px solid rgba(255,255,255,.4);
  color: var(--c-white);
  background: transparent;
}
.btn--outline:hover { border-color: var(--c-white); background: rgba(255,255,255,.1); }

.btn--ghost {
  color: var(--c-wine);
  padding: var(--sp-2) var(--sp-3);
}
.btn--ghost:hover { background: var(--c-gray-100); }

.btn--sm { padding: var(--sp-2) var(--sp-4); font-size: var(--fs-xs); }
.btn--lg { padding: var(--sp-4) var(--sp-8); font-size: var(--fs-base); }
.btn--full { width: 100%; }

.btn--danger { background: var(--c-danger); color: var(--c-white); }
.btn--danger:hover { background: #9A2828; }

.btn--success { background: var(--c-success); color: var(--c-white); }
.btn--success:hover { background: #246A3E; }

.btn:disabled, .btn[disabled] {
  opacity: .5;
  pointer-events: none;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: var(--sp-16) 0;
}
.section--alt { background: var(--c-white); }
.section__header {
  text-align: center;
  margin-bottom: var(--sp-12);
}
.section__tag {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--c-wine);
  margin-bottom: var(--sp-3);
}
.section__title {
  font-size: var(--fs-2xl);
  color: var(--c-black);
  margin-bottom: var(--sp-4);
}
.section__subtitle {
  font-size: var(--fs-base);
  color: var(--c-gray-500);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================================
   PRODUCT CARDS
   ============================================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-6);
}
.product-card {
  background: var(--c-white);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--c-gray-100);
  transition: transform var(--tr-base), box-shadow var(--tr-base);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.product-card__img {
  height: 200px;
  background: linear-gradient(135deg, var(--c-cream-dark) 0%, var(--c-gray-100) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
}
.product-card__body {
  padding: var(--sp-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card__category {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-wine);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-2);
}
.product-card__name {
  font-family: var(--ff-heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-2);
}
.product-card__desc {
  font-size: var(--fs-sm);
  color: var(--c-gray-500);
  margin-bottom: var(--sp-4);
  flex: 1;
}
.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.product-card__price {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--c-wine);
}
.product-card__unit {
  font-size: var(--fs-xs);
  color: var(--c-gray-500);
  font-weight: var(--fw-normal);
}

/* Stock badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}
.badge--ok     { background: #E8F5E9; color: var(--c-success); }
.badge--low    { background: #FFF3E0; color: var(--c-warning); }
.badge--out    { background: #FFEBEE; color: var(--c-danger); }
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ============================================================
   BENEFITS / FEATURES
   ============================================================ */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-6);
}
.benefit-card {
  text-align: center;
  padding: var(--sp-8) var(--sp-6);
  border-radius: var(--r-lg);
  background: var(--c-white);
  border: 1px solid var(--c-gray-100);
  transition: transform var(--tr-base), box-shadow var(--tr-base);
}
.benefit-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.benefit-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--sp-4);
  background: linear-gradient(135deg, var(--c-wine), var(--c-wine-light));
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--c-white);
}
.benefit-card__title {
  font-family: var(--ff-heading);
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-2);
}
.benefit-card__text {
  font-size: var(--fs-sm);
  color: var(--c-gray-500);
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-6);
}
.testimonial {
  background: var(--c-white);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  border: 1px solid var(--c-gray-100);
  position: relative;
}
.testimonial__quote {
  font-size: var(--fs-base);
  color: var(--c-gray-700);
  font-style: italic;
  margin-bottom: var(--sp-6);
  line-height: 1.7;
}
.testimonial__quote::before {
  content: '"';
  font-family: var(--ff-heading);
  font-size: 4rem;
  color: var(--c-wine);
  opacity: .2;
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-5);
  line-height: 1;
}
.testimonial__author {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
}
.testimonial__role {
  font-size: var(--fs-xs);
  color: var(--c-gray-500);
}
.testimonial__stars {
  color: var(--c-warning);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-2);
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--c-gray-100);
}
.faq-item__question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: var(--sp-5) 0;
  font-family: var(--ff-heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  text-align: left;
  cursor: pointer;
  transition: color var(--tr-fast);
}
.faq-item__question:hover { color: var(--c-wine); }
.faq-item__question:focus-visible { outline: 2px solid var(--c-wine); outline-offset: 2px; }
.faq-item__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform var(--tr-base);
}
.faq-item.open .faq-item__icon { transform: rotate(45deg); }
.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--tr-slow), padding var(--tr-slow);
}
.faq-item.open .faq-item__answer {
  max-height: 300px;
  padding-bottom: var(--sp-5);
}
.faq-item__answer p {
  color: var(--c-gray-700);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  margin-bottom: var(--sp-5);
}
.form-group label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  margin-bottom: var(--sp-2);
  color: var(--c-gray-700);
}
.form-control {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--c-gray-300);
  border-radius: var(--r-md);
  font-size: var(--fs-base);
  background: var(--c-white);
  transition: border-color var(--tr-fast), box-shadow var(--tr-fast);
}
.form-control:focus {
  border-color: var(--c-wine);
  box-shadow: 0 0 0 3px rgba(123,45,59,.15);
}
.form-control::placeholder { color: var(--c-gray-300); }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23555' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ============================================================
   CART / ORDER
   ============================================================ */
.cart-table {
  width: 100%;
  border-collapse: collapse;
}
.cart-table th {
  text-align: left;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-gray-500);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 2px solid var(--c-gray-100);
}
.cart-table td {
  padding: var(--sp-4);
  border-bottom: 1px solid var(--c-gray-100);
  vertical-align: middle;
}
.cart-table .qty-control {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  border: 1px solid var(--c-gray-300);
  border-radius: var(--r-md);
  overflow: hidden;
}
.qty-control button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-lg);
  transition: background var(--tr-fast);
}
.qty-control button:hover { background: var(--c-gray-100); }
.qty-control span {
  min-width: 28px;
  text-align: center;
  font-weight: var(--fw-semibold);
}
.cart-total {
  text-align: right;
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--c-wine);
  padding: var(--sp-6) 0;
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-8);
}
.filter-bar__search {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.filter-bar__search input {
  width: 100%;
  padding: var(--sp-3) var(--sp-4) var(--sp-3) 40px;
  border: 1px solid var(--c-gray-300);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  background: var(--c-white);
  transition: border-color var(--tr-fast), box-shadow var(--tr-fast);
}
.filter-bar__search input:focus {
  border-color: var(--c-wine);
  box-shadow: 0 0 0 3px rgba(123,45,59,.12);
}
.filter-bar__search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--c-gray-500);
}
.filter-chip {
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  border: 1px solid var(--c-gray-300);
  background: var(--c-white);
  cursor: pointer;
  transition: all var(--tr-fast);
}
.filter-chip:hover { border-color: var(--c-wine); color: var(--c-wine); }
.filter-chip.active {
  background: var(--c-wine);
  color: var(--c-white);
  border-color: var(--c-wine);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.toast {
  background: var(--c-gray-900);
  color: var(--c-white);
  padding: var(--sp-4) var(--sp-6);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  animation: toastIn var(--tr-base) ease, toastOut var(--tr-base) ease forwards;
  animation-delay: 0s, 3.5s;
  max-width: 360px;
}
.toast--success { border-left: 4px solid var(--c-success); }
.toast--error   { border-left: 4px solid var(--c-danger); }
.toast--info    { border-left: 4px solid var(--c-wine); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-login {
  max-width: 400px;
  margin: var(--sp-20) auto;
  padding: var(--sp-10);
  background: var(--c-white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}
.admin-login h1 {
  text-align: center;
  margin-bottom: var(--sp-8);
  color: var(--c-wine);
}
.admin-panel {
  display: none;
}
.admin-panel.visible { display: block; }
.admin-toolbar {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-6);
  padding: var(--sp-4) var(--sp-6);
  background: var(--c-white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.admin-table-wrap {
  overflow-x: auto;
  background: var(--c-white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}
.admin-table th {
  text-align: left;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-gray-500);
  padding: var(--sp-4) var(--sp-4);
  border-bottom: 2px solid var(--c-gray-100);
  white-space: nowrap;
}
.admin-table td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--c-gray-100);
  font-size: var(--fs-sm);
  vertical-align: middle;
}
.admin-table tr:hover td { background: var(--c-cream); }
.admin-table .inactive { opacity: .5; }

/* Admin modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 5000;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--c-white);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--sp-8);
  box-shadow: var(--shadow-xl);
  animation: modalIn var(--tr-base) ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-6);
}
.modal__header h2 {
  font-size: var(--fs-xl);
  color: var(--c-wine);
}
.modal__close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xl);
  border-radius: var(--r-md);
  transition: background var(--tr-fast);
}
.modal__close:hover { background: var(--c-gray-100); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--c-gray-900);
  color: var(--c-gray-300);
  padding: var(--sp-16) 0 var(--sp-8);
}
.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-10);
  margin-bottom: var(--sp-12);
}
.footer__brand {
  font-family: var(--ff-heading);
  font-size: var(--fs-xl);
  color: var(--c-white);
  margin-bottom: var(--sp-4);
}
.footer__text {
  font-size: var(--fs-sm);
  line-height: 1.7;
}
.footer h4 {
  font-family: var(--ff-heading);
  font-size: var(--fs-base);
  color: var(--c-white);
  margin-bottom: var(--sp-4);
}
.footer ul li {
  margin-bottom: var(--sp-2);
}
.footer ul li a {
  font-size: var(--fs-sm);
  transition: color var(--tr-fast);
}
.footer ul li a:hover { color: var(--c-white); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: var(--sp-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-4);
  font-size: var(--fs-xs);
}

/* ============================================================
   MAP
   ============================================================ */
.map-container {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.map-container iframe {
  width: 100%;
  height: 350px;
  border: 0;
}

/* ============================================================
   CONTACT INFO SIDEBAR
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
}
@media (min-width: 768px) {
  .contact-layout { grid-template-columns: 1fr 1fr; }
}
.contact-info-card {
  background: var(--c-white);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  border: 1px solid var(--c-gray-100);
}
.contact-info-card h3 {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-6);
  color: var(--c-wine);
}
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
.contact-info-item__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: var(--c-cream);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-lg);
}
.contact-info-item__text h4 {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-1);
}
.contact-info-item__text p {
  font-size: var(--fs-sm);
  color: var(--c-gray-500);
}

/* ============================================================
   PAGE HEADER (inner pages)
   ============================================================ */
.page-header {
  background: linear-gradient(135deg, var(--c-wine) 0%, var(--c-wine-dark) 100%);
  color: var(--c-white);
  padding: var(--sp-12) 0;
  text-align: center;
}
.page-header h1 {
  font-size: var(--fs-2xl);
  margin-bottom: var(--sp-3);
}
.page-header p {
  opacity: .8;
  font-size: var(--fs-base);
}

/* ============================================================
   ORDER LAYOUT
   ============================================================ */
.order-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
}
@media (min-width: 900px) {
  .order-layout { grid-template-columns: 1.4fr 1fr; }
}
.order-cart, .order-form-wrapper {
  background: var(--c-white);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  box-shadow: var(--shadow-sm);
}
.order-cart h2, .order-form-wrapper h2 {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-6);
  color: var(--c-wine);
}

/* Empty cart */
.empty-state {
  text-align: center;
  padding: var(--sp-12) var(--sp-6);
  color: var(--c-gray-500);
}
.empty-state__icon { font-size: 3rem; margin-bottom: var(--sp-4); }
.empty-state__text { font-size: var(--fs-base); margin-bottom: var(--sp-6); }

/* ============================================================
   SPINNER / LOADING
   ============================================================ */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--c-gray-100);
  border-top-color: var(--c-wine);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  margin: var(--sp-8) auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-16);
}

/* ============================================================
   CONFIRMATION
   ============================================================ */
.confirmation-card {
  max-width: 500px;
  margin: var(--sp-12) auto;
  padding: var(--sp-10);
  text-align: center;
  background: var(--c-white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}
.confirmation-card__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--sp-6);
  background: #E8F5E9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
.confirmation-card h2 {
  margin-bottom: var(--sp-4);
  color: var(--c-success);
}
.confirmation-card p {
  color: var(--c-gray-500);
  margin-bottom: var(--sp-6);
}
.confirmation-card .order-number {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--c-black);
  background: var(--c-cream);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-md);
  display: inline-block;
  margin-bottom: var(--sp-6);
}

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  background: linear-gradient(135deg, var(--c-wine), var(--c-wine-dark));
  color: var(--c-white);
  border-radius: var(--r-lg);
  padding: var(--sp-12) var(--sp-8);
  text-align: center;
}
.cta-banner h2 {
  font-size: var(--fs-2xl);
  margin-bottom: var(--sp-4);
}
.cta-banner p {
  opacity: .85;
  margin-bottom: var(--sp-8);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   RESPONSIVE HELPERS
   ============================================================ */
@media (max-width: 480px) {
  .hero { min-height: 60vh; }
  .hero__title { font-size: var(--fs-2xl); }
  .section { padding: var(--sp-10) 0; }
  .section__title { font-size: var(--fs-xl); }
  .products-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .cart-table th:nth-child(3),
  .cart-table td:nth-child(3) { display: none; }
}
