/* ── Variables de color de marca ── */
:root {
  --naranja:      #F7941D;
  --naranja-dark: #D97B0A;
  --naranja-light:#FFA84A;
  --verde:        #1B5E1B;
  --verde-dark:   #124012;
  --verde-light:  #2A7A2A;
  --verde-medio:  #5CB85C;
  --gris-claro:   #F5F6FA;
  --borde:        #E5E7EB;
}

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: 'Nunito', sans-serif;
  background-image: url('/imagenes/bg-cuerpo2026.jpg');
  background-repeat: repeat;
  background-attachment: fixed;
  background-size: auto;
}

/* ── Product card ── */
.prod-card {
  transition: transform .2s ease, box-shadow .2s ease;
}
.prod-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(27,94,27,.13);
}
.prod-card .prod-img {
  transition: transform .35s ease;
}
.prod-card:hover .prod-img {
  transform: scale(1.06);
}

/* ── Badge oferta ── */
.badge-oferta {
  background: var(--naranja);
  color: white;
  font-size: .65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: .03em;
}
/* ── Precio ── */
.precio-original {
  color: #9ca3af;
  text-decoration: line-through;
  font-size: .8em;
}
.precio-final {
  color: var(--naranja);
  font-weight: 800;
  font-size: 1.15rem;
}

/* ── Botón agregar al carrito ── */
.btn-carrito {
  background: var(--naranja);
  color: white;
  border: none;
  border-radius: 999px;
  padding: .5rem 1.2rem;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .15s;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
  text-decoration: none;
}
.btn-carrito:hover {
  background: var(--naranja-dark);
  transform: scale(1.03);
}
.btn-carrito:active { transform: scale(.97); }
.btn-carrito.verde {
  background: var(--verde);
}
.btn-carrito.verde:hover {
  background: var(--verde-dark);
}

/* ── Hero ── */
.hero-slide {
  background: linear-gradient(135deg, #1B5E1B 0%, #2A7A2A 45%, #F7941D 100%);
  min-height: 420px;
}

/* ── Category card ── */
.cat-card {
  transition: transform .2s, box-shadow .2s;
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(27,94,27,.14);
}

/* ── Section title ── */
.section-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--verde);
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  background: var(--naranja);
  border-radius: 2px;
  margin-top: 4px;
}

/* ── Filter ── */
.filtro-activo {
  color: var(--naranja);
  font-weight: 700;
}

/* ── Qty ── */
.qty-input {
  width: 3rem;
  text-align: center;
  border: 1.5px solid var(--borde);
  border-radius: .4rem;
  padding: .25rem;
  font-weight: 700;
}
.qty-btn {
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: #f3f4f6;
  border: none;
  font-weight: 700; font-size: 1rem;
  cursor: pointer;
  transition: background .15s;
  display: flex; align-items: center; justify-content: center;
}
.qty-btn:hover { background: #e5e7eb; }

/* ── Cart ── */
.cart-img {
  width: 72px; height: 72px;
  object-fit: contain;
}

/* ── Toast ── */
.toast {
  background: var(--verde);
  color: white;
  border-radius: 12px;
  padding: .75rem 1.25rem;
  font-size: .85rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  animation: slideUp .3s ease;
  display: flex; align-items: center; gap: .5rem;
}
.toast.success { background: var(--verde-medio); }
.toast.error   { background: #dc2626; }

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Forms ── */
.form-input {
  width: 100%;
  border: 1.5px solid var(--borde);
  border-radius: .6rem;
  padding: .65rem 1rem;
  font-size: .9rem;
  font-family: 'Nunito', sans-serif;
  transition: border-color .2s;
  outline: none;
}
.form-input:focus { border-color: var(--naranja); }
.form-label {
  font-size: .8rem;
  font-weight: 700;
  color: #4b5563;
  margin-bottom: .3rem;
  display: block;
}

/* ── Paginación ── */
.pag-btn {
  width: 2.2rem; height: 2.2rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  transition: all .2s;
  border: 1.5px solid var(--borde);
  background: white; color: #374151;
}
.pag-btn:hover, .pag-btn.activa {
  background: var(--naranja);
  color: white;
  border-color: var(--naranja);
}

/* ── Buscador focus ── */
#buscador-input:focus {
  border-color: var(--naranja);
  box-shadow: 0 0 0 3px rgba(247,148,29,.15);
}

/* ── Nav accent ── */
.nav-oferta {
  color: var(--naranja);
  font-weight: 800;
}

/* ── Animación pulse stock ── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .5; }
}
.animate-pulse { animation: pulse 2s cubic-bezier(.4,0,.6,1) infinite; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .section-title { font-size: 1.2rem; }
  .hero-slide    { min-height: 280px; }
  .precio-final  { font-size: 1rem; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* Alpine cloak */
[x-cloak] { display: none !important; }
