:root {
  /* Paleta: 5 colores matizados (primario cálido, secundario, 3 neutros) */
  --color-primary: #c1440e;
  --color-secondary: #2f6b4f;
  --color-neutral-100: #faf5ec;
  --color-neutral-600: #6b5c4d;
  --color-neutral-900: #241a12;

  /* Tonos derivados de la misma paleta (profundidad, estados) */
  --color-primary-dark: color-mix(in srgb, var(--color-primary) 80%, black);
  --color-primary-tint: color-mix(in srgb, var(--color-primary) 10%, white);
  --color-secondary-tint: color-mix(in srgb, var(--color-secondary) 12%, white);
  --surface: #ffffff;
  --border-subtle: color-mix(in srgb, var(--color-neutral-900) 13%, var(--color-neutral-100));
  --border-strong: color-mix(in srgb, var(--color-neutral-900) 26%, var(--color-neutral-100));
  --text-muted: var(--color-neutral-600);
  --text-on-dark: color-mix(in srgb, var(--color-neutral-100) 78%, transparent);
  --text-on-dark-strong: color-mix(in srgb, var(--color-neutral-100) 94%, transparent);

  /* Tipografía */
  --font-title: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Escala tipográfica */
  --text-xs: 0.875rem;
  --text-sm: 1rem;
  --text-md: 1.25rem;
  --text-lg: 1.75rem;
  --text-xl: 2.5rem;
  --text-hero: 3.5rem;

  /* Espaciado (múltiplos de 8px) */
  --space-2: 1rem;    /* 16px */
  --space-3: 1.5rem;  /* 24px */
  --space-4: 2rem;    /* 32px */
  --space-6: 3rem;    /* 48px */
  --space-8: 4rem;    /* 64px */

  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --max-width: 1120px;

  --shadow-sm: 0 1px 2px rgba(36,26,18,0.06), 0 2px 6px rgba(36,26,18,0.05);
  --shadow-md: 0 2px 4px rgba(36,26,18,0.05), 0 10px 24px rgba(36,26,18,0.09);
  --shadow-lg: 0 6px 12px rgba(36,26,18,0.08), 0 20px 48px rgba(36,26,18,0.14);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-neutral-900);
  background: var(--color-neutral-100);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-neutral-900);
}

a { text-decoration: none; color: inherit; }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* Icons */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  vertical-align: -0.125em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--color-primary-dark);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--color-neutral-900);
  color: var(--color-neutral-900);
}
.btn-outline:hover {
  background: var(--color-neutral-900);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--color-neutral-100) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: var(--text-md);
  letter-spacing: -0.01em;
  color: var(--color-primary);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-neutral-900);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  background: var(--color-neutral-100);
  border-bottom: 1px solid var(--border-subtle);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.nav.is-open { max-height: 320px; }
.nav a {
  padding: var(--space-2) var(--space-3);
  font-weight: 600;
  border-top: 1px solid var(--border-subtle);
  transition: color 0.15s ease;
}
.nav a:hover { color: var(--color-primary); }

/* Hero */
.hero {
  background: linear-gradient(155deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  padding: var(--space-8) 0;
  text-align: center;
}
.hero-eyebrow {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-on-dark-strong);
  font-size: var(--text-xs);
  margin-bottom: var(--space-2);
}
.hero h1 {
  font-size: clamp(var(--text-xl), 6vw + 1rem, var(--text-hero));
  line-height: 1.08;
  margin-bottom: var(--space-3);
  color: #fff;
}
.hero-text {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  max-width: 40ch;
  margin: 0 auto var(--space-4);
  color: var(--text-on-dark-strong);
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: center;
}
.hero .btn-outline {
  border-color: #fff;
  color: #fff;
}
.hero .btn-outline:hover { background: #fff; color: var(--color-primary-dark); }

/* Sections */
.section { padding: var(--space-8) 0; }
.section-alt { background: color-mix(in srgb, var(--color-primary) 5%, var(--color-neutral-100)); }
.section-title {
  text-align: center;
  font-size: var(--text-lg);
  color: var(--color-neutral-900);
  margin-bottom: 0.5rem;
}
.section-subtitle {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

/* Menu */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
.menu-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--space-3);
  text-align: center;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.menu-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.menu-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  font-size: 1.5rem;
  margin: 0 auto var(--space-2);
  background: var(--color-primary-tint);
  border-radius: var(--radius-pill);
}
.menu-card h3 {
  font-size: var(--text-md);
  color: var(--color-neutral-900);
  margin-bottom: 0.4rem;
}
.menu-card p { color: var(--text-muted); font-size: var(--text-xs); line-height: 1.55; }

/* CTA box */
.cta-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
}
.cta-box p { max-width: 40ch; color: var(--text-muted); }

/* Contact */
.contact-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-align: center;
  font-weight: 600;
  font-size: var(--text-xs);
}
.contact-grid p {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.contact-grid .icon { color: var(--color-primary); }

/* Footer */
.site-footer {
  background: var(--color-neutral-900);
  color: var(--text-on-dark);
  padding: var(--space-6) 0 var(--space-3);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  text-align: center;
}
.footer-brand .logo { color: #fff; }
.footer-brand p { margin-top: 0.4rem; color: var(--text-on-dark); font-size: var(--text-xs); }
.footer-social {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  font-weight: 700;
  font-size: var(--text-xs);
}
.footer-social a { transition: color 0.15s ease; }
.footer-social a:hover { color: var(--color-primary); }
.footer-contact p { color: var(--text-on-dark); font-size: var(--text-xs); margin-bottom: 0.25rem; }
.footer-copy {
  text-align: center;
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: color-mix(in srgb, var(--color-neutral-100) 45%, transparent);
}

/* Tablet and up */
@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .nav {
    position: static;
    flex-direction: row;
    max-height: none;
    overflow: visible;
    background: transparent;
    border: none;
    gap: var(--space-4);
  }
  .nav a { border: none; padding: 0.5rem 0; }

  .hero { padding: calc(var(--space-8) * 1.5) 0; }
  .hero-text { max-width: 50ch; font-size: var(--text-md); }
  .hero-actions { flex-direction: row; justify-content: center; }

  .menu-grid { grid-template-columns: repeat(2, 1fr); }

  .section-title { font-size: var(--text-xl); }

  .contact-grid {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-4);
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
  .footer-social { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
}

@media (min-width: 1024px) {
  .menu-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Menu page (pages/menu.html) */
.menu-hero { padding-bottom: 0; }
.category-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: var(--text-lg);
  color: var(--color-neutral-900);
  margin-bottom: var(--space-3);
  text-align: center;
}
.category-title .icon { color: var(--color-primary); width: 1.2em; height: 1.2em; }
.dish-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
.dish-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--space-3);
  text-align: center;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.dish-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.dish-photo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.75rem;
  margin: 0 auto var(--space-2);
  background: var(--color-primary-tint);
  border-radius: var(--radius-pill);
}
.dish-name {
  font-size: var(--text-md);
  color: var(--color-neutral-900);
  margin-bottom: 0.4rem;
}
.dish-desc { color: var(--text-muted); font-size: var(--text-xs); line-height: 1.55; margin-bottom: var(--space-2); }
.dish-price {
  display: inline-block;
  font-family: var(--font-title);
  font-weight: 700;
  color: #fff;
  background: var(--color-primary);
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
}

@media (min-width: 768px) {
  .dish-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .dish-grid { grid-template-columns: repeat(4, 1fr); }
}

/* QR Mesa component */
.qr-mesa-card {
  max-width: 360px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-3);
  text-align: center;
  box-shadow: var(--shadow-md);
}
.qr-mesa-title {
  font-size: var(--text-lg);
  color: var(--color-neutral-900);
  margin-bottom: 0.5rem;
}
.qr-mesa-text { color: var(--text-muted); font-size: var(--text-xs); margin-bottom: var(--space-3); }
.qr-mesa-code {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-2);
}
.qr-mesa-code img,
.qr-mesa-code canvas { border-radius: var(--radius-sm); }
.qr-mesa-link {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-primary);
  word-break: break-all;
  margin-bottom: var(--space-3);
}

@media print {
  body * { visibility: hidden; }
  .qr-mesa-card, .qr-mesa-card * { visibility: visible; }
  .qr-mesa-card {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: none;
    border: 2px solid #000;
  }
  .qr-mesa-print { display: none; }
}

/* Reservas form */
.reserva-form {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: var(--shadow-md);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.form-group { display: flex; flex-direction: column; }
.form-group-full { margin-bottom: var(--space-3); }
.form-group label {
  font-weight: 700;
  margin-bottom: 0.4rem;
  font-size: var(--text-xs);
  color: var(--color-neutral-900);
}
.form-group input,
.form-group textarea {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  padding: 0.7rem var(--space-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-neutral-100);
  color: var(--color-neutral-900);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-tint);
}
.form-group input.is-invalid,
.form-group textarea.is-invalid {
  border-color: var(--color-primary);
}
.form-error {
  color: var(--color-primary);
  font-size: var(--text-xs);
  margin-top: 0.3rem;
  min-height: 1em;
}
.reserva-form .btn { width: 100%; justify-content: center; text-align: center; border: none; cursor: pointer; }
.reserva-form .btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.form-message {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  margin-bottom: var(--space-3);
  font-weight: 600;
  font-size: var(--text-xs);
}
.form-message[hidden] { display: none; }
.form-message-error {
  background: var(--color-primary-tint);
  color: var(--color-primary-dark);
  border: 1px solid var(--color-primary);
}
.form-confirmation {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  box-shadow: var(--shadow-md);
}
.confirmation-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  color: var(--color-secondary);
  background: var(--color-secondary-tint);
  border-radius: var(--radius-pill);
  margin: 0 auto var(--space-2);
}
.confirmation-icon .icon { width: 1.75rem; height: 1.75rem; }
.form-confirmation h3 {
  font-size: var(--text-lg);
  color: var(--color-neutral-900);
  margin-bottom: var(--space-2);
}
.form-confirmation p { color: var(--text-muted); margin-bottom: var(--space-3); }
.form-confirmation .btn {
  border: none;
  background: var(--color-neutral-900);
  color: #fff;
  cursor: pointer;
}

@media (min-width: 768px) {
  .form-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Pickup page (pages/pickup.html) */
.pickup-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: start;
}
.pickup-category { margin-bottom: var(--space-6); }
.pickup-category:last-child { margin-bottom: 0; }

.product-card { padding-bottom: var(--space-3); }
.product-card.in-cart { border-color: var(--color-primary); box-shadow: var(--shadow-md); }

.qty-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: var(--space-2);
}
.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--color-neutral-900);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.qty-btn:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.qty-input {
  width: 3rem;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-sm);
  padding: 0.35rem 0.25rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-neutral-100);
  color: var(--color-neutral-900);
}
.qty-input:focus { outline: none; border-color: var(--color-primary); }

.cart-panel {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: var(--shadow-md);
}
.cart-title {
  font-size: var(--text-lg);
  color: var(--color-neutral-900);
  margin-bottom: var(--space-2);
}
.cart-empty {
  color: var(--text-muted);
  font-size: var(--text-xs);
  margin-bottom: var(--space-2);
}
.cart-items {
  list-style: none;
  margin-bottom: var(--space-2);
}
.cart-item {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--text-xs);
}
.cart-item-qty { color: var(--text-muted); font-weight: 400; }
.cart-item-price { font-weight: 700; white-space: nowrap; }
.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: var(--text-md);
  color: var(--color-neutral-900);
  padding: var(--space-2) 0;
  border-top: 2px solid var(--color-neutral-900);
  margin-bottom: var(--space-3);
}

.pickup-checkout-form .form-group { margin-bottom: var(--space-3); }
.pickup-checkout-form select {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  padding: 0.7rem var(--space-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-neutral-100);
  color: var(--color-neutral-900);
}
.pickup-checkout-form select:focus { outline: none; border-color: var(--color-primary); }
.pickup-checkout-form textarea {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  padding: 0.7rem var(--space-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-neutral-100);
  color: var(--color-neutral-900);
}
.pickup-checkout-form textarea:focus { outline: none; border-color: var(--color-primary); }
.pickup-checkout-form .btn {
  width: 100%;
  justify-content: center;
  text-align: center;
  border: none;
  cursor: pointer;
}
.pickup-checkout-form .btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.order-number {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-2) !important;
}
.order-summary {
  list-style: none;
  text-align: left;
  max-width: 360px;
  margin: 0 auto var(--space-3);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-2);
}
.order-summary li {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  color: var(--text-muted);
  font-size: var(--text-xs);
}
.order-summary-total {
  font-weight: 700;
  color: var(--color-neutral-900) !important;
  border-top: 1px solid var(--border-subtle);
  margin-top: 0.5rem;
  padding-top: 0.75rem !important;
}

@media (min-width: 1024px) {
  .pickup-layout { grid-template-columns: 2fr 1fr; }
  .cart-panel { position: sticky; top: 6rem; }
}

/* Delivery page (pages/delivery.html) */
.cart-form-subtitle {
  font-size: var(--text-md);
  font-family: var(--font-title);
  color: var(--color-neutral-900);
  margin: var(--space-3) 0 var(--space-2);
}
.cart-total-row-shipping {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-xs);
  color: var(--text-muted);
  border-top: none;
  padding: 0.15rem 0;
  margin-bottom: 0;
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}
.payment-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem var(--space-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-xs);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.payment-option-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.payment-option .icon { color: var(--color-primary); }
.payment-option:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-tint);
}
.payment-option input { accent-color: var(--color-primary); }

.card-fields {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px dashed var(--border-subtle);
}
.card-fields .form-group { margin-bottom: var(--space-3); }

/* Tracking view */
.tracking-panel {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.tracking-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: var(--space-3);
}
.tracking-status-badge {
  display: inline-block;
  font-family: var(--font-title);
  font-weight: 700;
  color: #fff;
  background: var(--color-primary);
  padding: 0.45rem 1.15rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
}
.tracking-status-badge.tracking-status-entregado { background: var(--color-secondary); }
.tracking-eta {
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  min-height: 1.2em;
}

.tracking-map {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 auto var(--space-4);
  max-width: 420px;
}
.tracking-map-point {
  display: inline-flex;
  color: var(--color-neutral-900);
  flex: none;
}
.tracking-map-point .icon { width: 1.4rem; height: 1.4rem; }
.tracking-map-route {
  position: relative;
  flex: 1;
  height: 6px;
  background: var(--border-subtle);
  border-radius: var(--radius-pill);
}
.tracking-map-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--color-primary);
  border-radius: var(--radius-pill);
  transition: width 1.2s ease;
}
.tracking-map-rider {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  color: var(--color-primary);
  transition: left 1.2s ease;
}
.tracking-map-rider .icon { width: 1.5rem; height: 1.5rem; }

.tracking-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-align: left;
  max-width: 360px;
  margin: 0 auto var(--space-4);
}
.tracking-step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.65rem var(--space-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--border-strong);
  font-weight: 600;
  font-size: var(--text-xs);
}
.tracking-step-icon {
  display: inline-flex;
  flex: none;
}
.tracking-step-icon .icon { width: 1.2rem; height: 1.2rem; }
.tracking-step-label { flex: 1; }
.tracking-step-time { font-size: 0.8rem; font-weight: 700; }
.tracking-step.is-done {
  border-color: var(--color-secondary);
  color: var(--color-neutral-900);
}
.tracking-step.is-done .tracking-step-icon { color: var(--color-secondary); }
.tracking-step.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary-tint);
  color: var(--color-neutral-900);
}
.tracking-step.is-active .tracking-step-icon { color: var(--color-primary); }

.tracking-details { text-align: left; margin-bottom: var(--space-4); }
.tracking-address p { color: var(--text-muted); font-size: var(--text-xs); margin-bottom: 0.2rem; }
.tracking-address .cart-form-subtitle { margin-top: 0; }

.tracking-panel .btn {
  border: none;
  background: var(--color-neutral-900);
  color: #fff;
  cursor: pointer;
}

/* Chatbot widget */
.chatbot-toggle {
  position: fixed;
  right: var(--space-3);
  bottom: var(--space-3);
  width: 60px;
  height: 60px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}
.chatbot-toggle .icon { width: 1.6rem; height: 1.6rem; }
.chatbot-toggle:hover { transform: translateY(-2px); background: var(--color-primary-dark); }
.chatbot-toggle.is-open { background: var(--color-neutral-900); }

.chatbot-panel {
  position: fixed;
  right: var(--space-3);
  bottom: 5.5rem;
  width: min(340px, calc(100vw - 2.5rem));
  max-height: min(520px, calc(100vh - 8rem));
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 200;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.chatbot-panel.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.chatbot-header {
  background: linear-gradient(155deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  padding: var(--space-2) var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-title);
}
.chatbot-header-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-sm);
  font-weight: 700;
}
.chatbot-header-subtitle { font-family: var(--font-body); font-size: 0.75rem; font-weight: 400; opacity: 0.9; }
.chatbot-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}
.chatbot-close .icon { width: 1.1rem; height: 1.1rem; }

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--color-neutral-100);
}

.chatbot-msg {
  max-width: 85%;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  line-height: 1.5;
}
.chatbot-msg-bot {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  color: var(--color-neutral-900);
  border-bottom-left-radius: 4px;
}
.chatbot-msg-user {
  align-self: flex-end;
  background: var(--color-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chatbot-msg a { text-decoration: underline; font-weight: 700; }
.chatbot-msg-bot a { color: var(--color-primary); }

.chatbot-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 var(--space-2) var(--space-2);
  background: var(--color-neutral-100);
}
.chatbot-chip {
  border: 1px solid var(--color-primary);
  background: var(--surface);
  color: var(--color-neutral-900);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.chatbot-chip:hover { background: var(--color-primary); color: #fff; }

.chatbot-form {
  display: flex;
  gap: 0.5rem;
  padding: var(--space-2);
  border-top: 1px solid var(--border-subtle);
  background: var(--surface);
}
.chatbot-input {
  flex: 1;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--color-neutral-900);
}
.chatbot-input:focus { outline: none; border-color: var(--color-primary); }
.chatbot-send {
  border: none;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 0 var(--space-2);
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.15s ease;
}
.chatbot-send:hover { background: var(--color-primary-dark); }

@media (max-width: 420px) {
  .chatbot-panel {
    right: 0.6rem;
    left: 0.6rem;
    width: auto;
    bottom: 5.25rem;
  }
  .chatbot-toggle { right: 1rem; bottom: 1rem; }
}
