/* ═══════════════════════════════════════════════════════════════════════════
   ABARROTES PLUS — Hoja de Estilos Principal
   Paleta: Naranja #F27A1A | Azul Marino #1C3D5A | Blanco/Crema #FAFAF8
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── RESET Y VARIABLES ─────────────────────────────────────────────────── */
:root {
  --naranja:       #F27A1A;
  --naranja-dark:  #D96A10;
  --naranja-light: #FFF3E8;
  --azul:          #1C3D5A;
  --azul-light:    #2A5580;
  --azul-xlight:   #EBF2FA;
  --fondo:         #FAFAF8;
  --blanco:        #FFFFFF;
  --gris-100:      #F4F4F2;
  --gris-200:      #E8E8E4;
  --gris-400:      #9CA3AF;
  --gris-600:      #6B7280;
  --gris-800:      #1F2937;
  --exito:         #16A34A;
  --error:         #DC2626;
  --advertencia:   #D97706;

  --radio:         10px;
  --radio-lg:      16px;
  --sombra-sm:     0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --sombra:        0 4px 6px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.05);
  --sombra-lg:     0 10px 25px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.06);
  --trans:         all .2s ease;

  --header-h:      120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--fondo);
  color: var(--gris-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ── TIPOGRAFÍA ─────────────────────────────────────────────────────────── */
.section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--azul);
}
.section-subtitle { color: var(--gris-600); margin-top: 4px; font-size: .95rem; }

/* ── BOTONES ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radio);
  font-weight: 600; font-size: .9rem;
  transition: var(--trans); white-space: nowrap;
}
.btn-primary {
  background: var(--naranja); color: var(--blanco);
}
.btn-primary:hover { background: var(--naranja-dark); transform: translateY(-1px); box-shadow: var(--sombra); }
.btn-secondary {
  background: var(--gris-100); color: var(--gris-800); border: 1px solid var(--gris-200);
}
.btn-secondary:hover { background: var(--gris-200); }
.btn-lg { padding: 13px 26px; font-size: 1rem; }
.btn-xl { padding: 16px 32px; font-size: 1.05rem; }
.btn-full { width: 100%; justify-content: center; }
.btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.link-btn {
  color: var(--naranja); font-weight: 600; text-decoration: underline;
  background: none; border: none; padding: 0; cursor: pointer; font-size: inherit;
}
.link-btn:hover { color: var(--naranja-dark); }

/* ── HEADER ──────────────────────────────────────────────────────────────── */
.header {
  background: var(--azul);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--sombra-lg);
}

.header-top { padding: 14px 0; }

.header-top-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center; gap: 20px;
}

.logo {
  display: flex; align-items: center; gap: 10px;
}
.logo-img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; }
.logo-text {
  color: var(--blanco); font-weight: 800; font-size: 1.2rem;
  line-height: 1.2;
}

/* Buscador */
.search-wrapper {
  position: relative; display: flex; align-items: center;
}
.search-input {
  width: 100%; padding: 10px 44px 10px 16px;
  border-radius: 50px; border: none;
  background: rgba(255,255,255,.12);
  color: var(--blanco); font-size: .95rem;
  transition: var(--trans);
}
.search-input::placeholder { color: rgba(255,255,255,.55); }
.search-input:focus {
  outline: none; background: rgba(255,255,255,.2);
  box-shadow: 0 0 0 3px rgba(242,122,26,.5);
}
.search-btn {
  position: absolute; right: 12px;
  color: rgba(255,255,255,.7); display: flex;
}
.search-btn svg { width: 20px; height: 20px; }
.search-btn:hover { color: var(--blanco); }

/* Acciones */
.header-actions { display: flex; align-items: center; gap: 12px; }

.btn-mis-pedidos {
  display: flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,.8); font-size: .85rem; font-weight: 600;
  padding: 8px 12px; border-radius: var(--radio);
  transition: var(--trans);
}
.btn-mis-pedidos svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-mis-pedidos:hover { background: rgba(255,255,255,.1); color: var(--blanco); }

.btn-carrito {
  display: flex; align-items: center; gap: 8px;
  background: var(--naranja); color: var(--blanco);
  padding: 10px 16px; border-radius: var(--radio);
  font-weight: 700; font-size: .95rem; position: relative;
  transition: var(--trans);
}
.btn-carrito svg { width: 22px; height: 22px; }
.btn-carrito:hover { background: var(--naranja-dark); }
.carrito-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--error); color: var(--blanco);
  border-radius: 50%; width: 20px; height: 20px;
  font-size: .7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--azul);
}
.carrito-total { font-size: .9rem; }

/* Nav de categorías */
.header-nav {
  background: rgba(0,0,0,.15);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.header-nav::-webkit-scrollbar { display: none; }

.categorias-nav {
  display: flex; gap: 4px; padding: 8px 0;
}
.cat-btn {
  white-space: nowrap; padding: 6px 16px; border-radius: 50px;
  color: rgba(255,255,255,.75); font-size: .85rem; font-weight: 500;
  transition: var(--trans);
}
.cat-btn:hover { background: rgba(255,255,255,.12); color: var(--blanco); }
.cat-btn.active {
  background: var(--naranja); color: var(--blanco); font-weight: 700;
}

/* ── HERO ─────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--azul) 0%, #2A5580 60%, #1a4a70 100%);
  padding: 60px 0 50px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr auto;
  gap: 40px; align-items: center;
}
.hero-tag {
  display: inline-block; background: rgba(242,122,26,.2);
  color: #FFB46A; font-size: .85rem; font-weight: 600;
  padding: 4px 12px; border-radius: 50px; margin-bottom: 12px;
  border: 1px solid rgba(242,122,26,.3);
}
.hero-title {
  color: var(--blanco); font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800; line-height: 1.15; margin-bottom: 14px;
}
.hero-subtitle { color: rgba(255,255,255,.75); font-size: 1.05rem; margin-bottom: 28px; }

.hero-badges {
  display: flex; flex-direction: column; gap: 14px;
}
.badge-item {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radio); padding: 10px 16px;
  color: rgba(255,255,255,.9); font-size: .9rem; font-weight: 500;
  white-space: nowrap;
}
.badge-item svg { width: 18px; height: 18px; color: var(--naranja); flex-shrink: 0; }

/* ── CATÁLOGO ─────────────────────────────────────────────────────────── */
.main { padding: 48px 0 80px; }

.catalogo-header { margin-bottom: 32px; }

/* Loading */
.loading-state {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding: 80px 0; color: var(--gris-600);
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--gris-200);
  border-top-color: var(--naranja);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Grid */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* Tarjeta de producto */
.producto-card {
  background: var(--blanco); border-radius: var(--radio-lg);
  box-shadow: var(--sombra-sm); border: 1px solid var(--gris-200);
  display: flex; flex-direction: column;
  transition: var(--trans); overflow: hidden;
}
.producto-card:hover {
  box-shadow: var(--sombra-lg); transform: translateY(-3px);
  border-color: var(--naranja);
}
.producto-card.sin-stock { opacity: .6; }

.producto-img-wrap {
  position: relative; aspect-ratio: 1;
  background: var(--gris-100); overflow: hidden;
}
.producto-img {
  width: 100%; height: 100%; object-fit: contain;
  padding: 16px; transition: transform .3s ease;
}
.producto-card:hover .producto-img { transform: scale(1.04); }

.badge-stock-out {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
}
.badge-stock-out span {
  background: var(--error); color: var(--blanco);
  font-weight: 700; font-size: .8rem; padding: 4px 10px;
  border-radius: 50px;
}

.badge-mayor {
  position: absolute; top: 10px; right: 10px;
  background: var(--naranja); color: var(--blanco);
  font-size: .7rem; font-weight: 700; padding: 3px 8px;
  border-radius: 50px;
}

.producto-body {
  padding: 14px; flex: 1; display: flex; flex-direction: column;
}
.producto-categoria {
  font-size: .72rem; font-weight: 600; color: var(--naranja);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px;
}
.producto-nombre {
  font-weight: 700; font-size: .95rem; color: var(--gris-800);
  margin-bottom: 6px; line-height: 1.3; flex: 1;
}
.producto-escalas {
  font-size: .75rem; color: var(--gris-600); margin-bottom: 10px;
  line-height: 1.5;
}
.producto-escalas strong { color: var(--azul); }

.producto-precio-actual {
  font-size: 1.3rem; font-weight: 800; color: var(--azul);
  margin-bottom: 2px;
}
.producto-precio-label { font-size: .72rem; color: var(--gris-600); margin-bottom: 12px; }

/* Controles de cantidad */
.cantidad-control {
  display: flex; align-items: center; gap: 0;
  border: 2px solid var(--gris-200); border-radius: var(--radio);
  overflow: hidden;
}
.btn-qty {
  width: 36px; height: 36px; font-size: 1.1rem; font-weight: 700;
  color: var(--azul); background: var(--gris-100);
  display: flex; align-items: center; justify-content: center;
  transition: var(--trans); flex-shrink: 0;
}
.btn-qty:hover:not(:disabled) { background: var(--naranja); color: var(--blanco); }
.btn-qty:disabled { opacity: .4; cursor: not-allowed; }
.qty-input {
  width: 44px; text-align: center; border: none;
  font-weight: 700; font-size: .95rem; color: var(--gris-800);
  background: var(--blanco); padding: 6px 0;
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.btn-agregar {
  width: 100%; margin-top: 10px;
  background: var(--azul); color: var(--blanco);
  padding: 10px; border-radius: var(--radio);
  font-weight: 700; font-size: .9rem;
  transition: var(--trans); display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-agregar:hover:not(:disabled) { background: var(--azul-light); }
.btn-agregar:disabled { background: var(--gris-200); color: var(--gris-400); cursor: not-allowed; }
.btn-agregar.en-carrito { background: var(--exito); }
.btn-agregar.en-carrito:hover { background: #15803d; }

/* Empty state */
.empty-state {
  text-align: center; padding: 80px 0; color: var(--gris-600);
}
.empty-state svg { width: 60px; height: 60px; margin: 0 auto 16px; }
.empty-state p { font-size: 1.05rem; margin-bottom: 20px; }

/* ── CARRITO DRAWER ───────────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 200; backdrop-filter: blur(2px);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.carrito-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: var(--blanco); z-index: 300;
  display: flex; flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,.15);
  transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.carrito-drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--gris-200);
  background: var(--azul); color: var(--blanco);
}
.drawer-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.15rem; font-weight: 700;
}
.drawer-title svg { width: 22px; height: 22px; }
.btn-close-drawer {
  color: rgba(255,255,255,.7); padding: 6px; border-radius: 8px;
  transition: var(--trans); display: flex;
}
.btn-close-drawer svg { width: 22px; height: 22px; }
.btn-close-drawer:hover { background: rgba(255,255,255,.15); color: var(--blanco); }

.carrito-items {
  flex: 1; overflow-y: auto; padding: 0;
}
.carrito-vacio {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 60px 24px; text-align: center; color: var(--gris-600);
}
.carrito-vacio svg { width: 56px; height: 56px; }

/* Items lista */
.items-lista { padding: 0; }
.item-carrito {
  display: grid; grid-template-columns: 60px 1fr auto;
  gap: 12px; align-items: center;
  padding: 14px 24px; border-bottom: 1px solid var(--gris-100);
  transition: background .15s;
}
.item-carrito:hover { background: var(--gris-100); }
.item-img {
  width: 60px; height: 60px; object-fit: contain;
  background: var(--gris-100); border-radius: 8px; padding: 4px;
}
.item-info { min-width: 0; }
.item-nombre { font-weight: 600; font-size: .88rem; line-height: 1.3; }
.item-precio-unit { font-size: .8rem; color: var(--gris-600); }
.item-escala-badge {
  font-size: .72rem; background: var(--naranja-light);
  color: var(--naranja); border-radius: 50px; padding: 2px 8px;
  font-weight: 600; display: inline-block; margin-top: 4px;
}
.item-acciones {
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.item-subtotal { font-weight: 800; font-size: .95rem; color: var(--azul); }
.item-qty-control {
  display: flex; align-items: center; gap: 4px;
}
.item-qty-btn {
  width: 26px; height: 26px; border-radius: 6px;
  background: var(--gris-100); color: var(--azul);
  font-weight: 700; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--trans);
}
.item-qty-btn:hover { background: var(--naranja); color: var(--blanco); }
.item-qty-num { font-weight: 700; font-size: .9rem; min-width: 20px; text-align: center; }
.item-eliminar {
  color: var(--gris-400); transition: color .2s;
  font-size: .75rem; display: flex; align-items: center; gap: 3px;
}
.item-eliminar:hover { color: var(--error); }
.item-eliminar svg { width: 14px; height: 14px; }

/* Progreso envío */
.progreso-envio {
  padding: 12px 24px; background: var(--naranja-light);
  border-top: 1px solid rgba(242,122,26,.2);
}
.progreso-texto { font-size: .8rem; color: var(--naranja-dark); font-weight: 600; margin-bottom: 6px; }
.progreso-bar { height: 6px; background: rgba(242,122,26,.2); border-radius: 50px; overflow: hidden; }
.progreso-fill { height: 100%; background: var(--naranja); border-radius: 50px; transition: width .4s ease; }

/* Resumen carrito */
.carrito-resumen {
  padding: 20px 24px; border-top: 2px solid var(--gris-200);
  background: var(--gris-100);
}
.resumen-linea {
  display: flex; justify-content: space-between;
  font-size: .9rem; padding: 4px 0;
}
.resumen-flete { color: var(--gris-600); }
.resumen-total {
  font-weight: 800; font-size: 1.1rem; color: var(--azul);
  border-top: 1px solid var(--gris-200); margin-top: 8px; padding-top: 12px;
}
.text-muted { color: var(--gris-600); font-style: italic; font-size: .85rem; }
.carrito-resumen .btn { margin-top: 14px; }

[hidden] {
  display: none !important;
}

/* ── MODALES ─────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  z-index: 400; display: flex; align-items: flex-start; justify-content: center;
  padding: 20px; overflow-y: auto;
  backdrop-filter: blur(3px);
  animation: fadeIn .2s ease;
}
.modal-overlay[hidden] {
  display: none !important;
}

.modal {
  background: var(--blanco); border-radius: var(--radio-lg);
  box-shadow: var(--sombra-lg); width: 100%;
  animation: slideUp .25s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.checkout-modal { max-width: 640px; }
.pedidos-modal  { max-width: 560px; }
.terminos-modal { max-width: 640px; }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px; border-bottom: 1px solid var(--gris-200);
  background: var(--azul); border-radius: var(--radio-lg) var(--radio-lg) 0 0;
  color: var(--blanco);
}
.modal-title { font-size: 1.2rem; font-weight: 700; }
.btn-close-modal {
  color: rgba(255,255,255,.7); padding: 6px; border-radius: 8px;
  display: flex; transition: var(--trans);
}
.btn-close-modal svg { width: 22px; height: 22px; }
.btn-close-modal:hover { background: rgba(255,255,255,.15); color: var(--blanco); }

.modal-body { padding: 28px; }
.modal-footer {
  padding: 16px 28px; border-top: 1px solid var(--gris-200);
  display: flex; justify-content: flex-end;
}

.modal-desc { color: var(--gris-600); margin-bottom: 20px; }

/* ── FORMULARIOS ─────────────────────────────────────────────────────── */
.fieldset {
  border: 1px solid var(--gris-200); border-radius: var(--radio);
  padding: 20px; margin-bottom: 20px; background: var(--fondo);
}
.fieldset-legend {
  font-weight: 700; font-size: .85rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--azul);
  padding: 0 8px; background: var(--fondo);
}

.form-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin-top: 12px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--gris-800); }
.form-group input,
.form-group select {
  padding: 10px 14px; border: 2px solid var(--gris-200);
  border-radius: var(--radio); font-size: .9rem;
  transition: border-color .2s;
  background: var(--blanco);
}
.form-group input:focus,
.form-group select:focus {
  outline: none; border-color: var(--naranja);
  box-shadow: 0 0 0 3px rgba(242,122,26,.15);
}
.form-group input.error,
.form-group select.error { border-color: var(--error); }

.form-group-check { margin: 16px 0; }
.check-label {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .88rem; cursor: pointer; line-height: 1.4;
}
.check-label input[type="checkbox"] {
  width: 18px; height: 18px; flex-shrink: 0;
  accent-color: var(--naranja); margin-top: 1px;
}

/* Radio cards */
.radio-group { display: flex; gap: 12px; margin-top: 12px; }
.radio-card {
  flex: 1; cursor: pointer;
}
.radio-card input[type="radio"] { display: none; }
.radio-card-content {
  padding: 12px 16px; border: 2px solid var(--gris-200);
  border-radius: var(--radio); transition: var(--trans);
  display: flex; flex-direction: column; gap: 2px;
  background: var(--blanco);
}
.radio-card:hover .radio-card-content { border-color: var(--naranja); }
.radio-card input:checked + .radio-card-content {
  border-color: var(--naranja); background: var(--naranja-light);
}
.radio-title { font-weight: 700; font-size: .9rem; }
.radio-desc { font-size: .78rem; color: var(--gris-600); }

/* Sección despacho */
.despacho-section { margin-top: 16px; }
.retiro-info {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--azul-xlight); border-radius: var(--radio);
  padding: 14px; margin-bottom: 16px; font-size: .88rem; color: var(--azul);
}
.retiro-info svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--naranja); }

.costo-envio-info {
  display: flex; align-items: center; gap: 8px;
  background: var(--naranja-light); border: 1px solid rgba(242,122,26,.3);
  border-radius: var(--radio); padding: 10px 14px; margin-top: 12px;
}
.costo-label { font-weight: 600; font-size: .88rem; color: var(--azul); }
.costo-valor { font-weight: 800; font-size: 1rem; color: var(--naranja); }

/* Resumen checkout */
.checkout-resumen {
  background: var(--azul-xlight); border-radius: var(--radio);
  padding: 16px; margin-bottom: 16px;
}

.pago-seguro-nota {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; font-size: .78rem; color: var(--gris-600);
  margin-top: 12px; text-align: center;
}
.pago-seguro-nota svg { width: 14px; height: 14px; color: var(--exito); }

/* Términos */
.terminos-body h3 { font-size: 1rem; font-weight: 700; color: var(--azul); margin: 20px 0 8px; }
.terminos-body p, .terminos-body li { font-size: .9rem; color: var(--gris-600); line-height: 1.6; }
.terminos-body ul { list-style: disc; padding-left: 20px; margin: 8px 0; }
.terminos-body h3:first-child { margin-top: 0; }

/* ── MIS PEDIDOS ─────────────────────────────────────────────────────── */
.pedido-card {
  border: 1px solid var(--gris-200); border-radius: var(--radio);
  margin-bottom: 16px; overflow: hidden;
}
.pedido-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--gris-100);
  border-bottom: 1px solid var(--gris-200);
}
.pedido-id { font-weight: 700; font-size: .88rem; color: var(--azul); }
.pedido-fecha { font-size: .78rem; color: var(--gris-600); }
.pedido-estado {
  font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 50px;
}
.estado-completado { background: #D1FAE5; color: var(--exito); }
.estado-pendiente  { background: #FEF3C7; color: var(--advertencia); }
.estado-fallido    { background: #FEE2E2; color: var(--error); }

.pedido-body { padding: 14px 16px; }
.pedido-items-list { margin-bottom: 10px; }
.pedido-item { font-size: .85rem; color: var(--gris-600); padding: 2px 0; }
.pedido-item strong { color: var(--gris-800); }
.pedido-total {
  display: flex; justify-content: space-between;
  font-weight: 700; font-size: .95rem; border-top: 1px solid var(--gris-200);
  padding-top: 10px; margin-top: 10px;
}
.btn-repetir {
  width: 100%; margin-top: 10px;
  background: var(--naranja); color: var(--blanco);
  padding: 10px; border-radius: var(--radio); font-weight: 700;
  font-size: .9rem; transition: var(--trans);
}
.btn-repetir:hover { background: var(--naranja-dark); }

/* ── FOOTER ──────────────────────────────────────────────────────────── */
.footer {
  background: var(--azul); color: rgba(255,255,255,.8);
  padding-top: 48px;
}
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 40px; padding-bottom: 40px;
}
.footer-logo { width: 48px; height: 48px; object-fit: contain; margin-bottom: 12px; }
.footer-desc { font-size: .88rem; line-height: 1.6; max-width: 280px; }
.footer-links h4,
.footer-contacto h4 {
  color: var(--blanco); font-weight: 700; margin-bottom: 14px;
  font-size: .95rem;
}
.footer-links ul { display: flex; flex-direction: column; gap: 8px; }
.footer-links .link-btn {
  color: rgba(255,255,255,.7); font-weight: 400;
  text-decoration: none;
}
.footer-links .link-btn:hover { color: var(--naranja); }
.footer-contacto p { font-size: .88rem; margin-bottom: 6px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 0;
}
.footer-bottom .container {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .8rem; color: rgba(255,255,255,.5);
}
.footer-secure {
  display: flex; align-items: center; gap: 6px;
}
.footer-secure svg { width: 14px; height: 14px; color: var(--exito); }

/* ── TOAST ───────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 500; display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--gris-800); color: var(--blanco);
  padding: 12px 24px; border-radius: 50px;
  font-size: .9rem; font-weight: 600;
  box-shadow: var(--sombra-lg);
  animation: toastIn .25s ease, toastOut .3s ease 2.7s forwards;
  pointer-events: auto;
}
.toast.toast-exito { background: var(--exito); }
.toast.toast-error { background: var(--error); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* ── RESPONSIVE ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .header-top-inner {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .search-wrapper { grid-column: 1 / -1; }
  .header-actions { grid-row: 1; grid-column: 2; justify-content: flex-end; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-badges { flex-direction: row; flex-wrap: wrap; }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .radio-group { flex-direction: column; }
  .productos-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .footer-inner { grid-template-columns: 1fr; }
  .btn-mis-pedidos span { display: none; }
  .footer-bottom .container { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 380px) {
  .productos-grid { grid-template-columns: 1fr; }
}
