*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; margin: 0; }

body {
  background: #212121;
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: 24px 16px;
}

/* Fondo animado */
.fondo {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: #212121;
}
.fondo span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.85;
}
.fondo span:nth-child(1) {
  width: 60vmax; height: 60vmax;
  background: #9d0000;
  top: -20vmax; left: -15vmax;
  animation: flota1 18s ease-in-out infinite alternate;
}
.fondo span:nth-child(2) {
  width: 45vmax; height: 45vmax;
  background: #d65e66;
  bottom: -15vmax; right: -10vmax;
  animation: flota2 22s ease-in-out infinite alternate;
}
.fondo span:nth-child(3) {
  width: 40vmax; height: 40vmax;
  background: #6a0000;
  top: 30%; left: 40%;
  animation: flota3 26s ease-in-out infinite alternate;
}

@keyframes flota1 { to { transform: translate(25vmax, 20vmax) scale(1.15); } }
@keyframes flota2 { to { transform: translate(-25vmax, -15vmax) scale(0.9); } }
@keyframes flota3 { to { transform: translate(-20vmax, 18vmax) scale(1.2); } }

@media (prefers-reduced-motion: reduce) {
  .fondo span { animation: none; }
}

.contenedor-sitio {
  max-width: 1000px;
  margin: 0 auto;
}

/* HERO */
.hero {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.logo {
  display: block;
  width: 160px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 24px;
}

h1 {
  font-size: clamp(2.4rem, 9vw, 4.5rem);
  line-height: 1.05;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

p {
  font-size: clamp(1.05rem, 3.2vw, 1.35rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.botones-hero {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 32px;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 99px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-principal {
  background: #d65e66;
  color: #fff;
}
.btn-secundario {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}

/* ESTILO PERFECTO PARA EL BOTÓN CON ÍCONO DE WHATSAPP */
.btn-whatsapp-hero {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
}

.icono-img {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  object-fit: contain !important;
  display: block !important;
  flex-shrink: 0 !important;
}

.redes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 40px;
}
.redes a {
  display: block;
  width: 40px;
  height: 40px;
  opacity: 0.85;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.redes a:hover,
.redes a:focus-visible {
  transform: translateY(-3px);
  opacity: 1;
}
.redes img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* CATÁLOGO */
.seccion-catalogo {
  padding-top: 60px;
  padding-bottom: 80px;
}
.seccion-catalogo h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 24px;
}

#mensaje-estado {
  text-align: center;
  color: #aaa;
  margin: 20px 0;
}

.figura {
  position: relative;
  padding: 14px;
  border-radius: 16px;
  background: rgba(30, 30, 30, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.figura img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  background: #2a2a2a;
}
.figura h3 { margin: 12px 0 6px; font-size: 0.95rem; font-weight: 600; }
.precio { margin: 0 0 8px 0; font-weight: 700; color: #d65e66; font-size: 1.1rem; }
.stock { margin: 4px 0 12px; font-size: .8rem; opacity: .7; }

.agotado img { filter: grayscale(1); opacity: .35; }
.etiqueta {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #9d0000;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
}

.cantidad {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.cantidad button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #444;
  color: #fff;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
}

.agregar {
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: #9d0000;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.agregar:hover { background: #b50000; }

/* CARRITO STICKY */
#carrito {
  position: sticky;
  bottom: 0;
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px 20px;
  border-top: 2px solid #9d0000;
  border-radius: 16px 16px 0 0;
  background: #151515;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.8);
  z-index: 100;
}
#carrito h2 { margin: 0 0 10px; font-size: 1.1rem; color: #d65e66; }
#carrito ul { margin: 0 0 12px; padding: 0; list-style: none; max-height: 120px; overflow-y: auto; }
#carrito li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid #2a2a2a; font-size: 0.9rem; }
#carrito li button { border: 0; background: none; color: #d65e66; cursor: pointer; font-size: 0.85rem; }
#total-carrito { margin: 0 0 14px; font-weight: 700; font-size: 1.1rem; }
.btn-whatsapp { display: block; text-align: center; width: 100%; background: #25d366; color: #fff; }

/* BOTONES DE FILTRO DE CATEGORÍA */
.filtros-categorias {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filtro-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 8px 18px;
  border-radius: 99px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filtro-btn:hover {
  background: rgba(214, 94, 102, 0.2);
  border-color: #d65e66;
}

.filtro-btn.activo {
  background: #d65e66;
  border-color: #d65e66;
  color: #fff;
}

/* ESTILOS PARA CATEGORÍAS AGRUPADAS (APILADAS UNA ABAJO DE OTRA) */
.catalogo-agrupado {
  display: flex !important;
  flex-direction: column !important;
  gap: 40px;
  width: 100%;
  margin-top: 24px;
}

.grupo-categoria {
  width: 100%;
}

.titulo-categoria {
  font-size: 1.4rem;
  font-weight: 700;
  color: #d65e66;
  text-align: left;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.grid-categoria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.catalogo-normal {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 24px;
}