/* ============================
           1. BASES & VARIABLES
        ============================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --red-main: #c7352f;
  --red-dark: #9e2a25;
  --yellow-main: #f5b034;
  --yellow-dark: #c98527;
  --white: #ffffff;
  --text-muted: #ffe6da;
  --grid-color: #c7352f;
}

/* Base específica de Crushes (Fondo blanco con grilla) */
body {
  font-family: "Roboto Slab", serif;
  background-color: #ffffff;
  background-image: linear-gradient(var(--grid-color) 2px, transparent 2px),
    linear-gradient(90deg, var(--grid-color) 2px, transparent 2px);
  background-size: 60px 60px;
  color: #333;
  overflow-x: hidden;
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: "Alfa Slab One", serif;
  letter-spacing: 1px;
  line-height: 1.2;
}
img {
  max-width: 100%;
  display: block;
}

/* ============================
           2. HEADER & NAV (IGUAL A INDEX.CSS)
        ============================ */
.header {
  width: 100%;
  background-color: var(--red-main);
  padding: 0.5rem 5%;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Lógica de Logo idéntica a Index */
.logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 80px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-origin: center center;
  will-change: transform;
}

.logo-link:hover .logo-img {
  transform: scale(1.08) rotate(-3deg);
}

@media (min-width: 768px) {
  .logo-img {
    height: 110px;
  }
}

.nav-links-desktop {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
  margin-right: 40px;
}

.nav-link {
  font-family: "Madimi One", sans-serif;
  font-size: 1.1rem; /* Ajustado a 1.1rem para igualar index */
  color: var(--white);
  text-decoration: none;
  position: relative;
  transition: color 0.3s, transform 0.2s ease-out;
  display: inline-block;
  /* Se eliminó el padding general que causaba la diferencia */
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 3px;
  bottom: -5px; /* Ajustado a -5px para igualar index */
  left: 0;
  background-color: var(--yellow-main);
  transition: width 0.3s ease;
}

.nav-links-desktop a:hover::after {
  width: 100%;
}

.nav-link.active {
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 6px 14px; /* Padding solo en el activo, igual que index */
}

.nav-link:hover {
  transform: translateY(-3px);
}

.cart-btn {
  background: var(--yellow-main);
  border: 3px solid var(--white);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s, background 0.2s;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
}

.cart-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.2);
  background: var(--white);
}

.cart-btn:hover svg {
  stroke: var(--red-main);
}

.cart-btn svg {
  stroke: var(--white);
  width: 24px;
  height: 24px;
  transition: stroke 0.2s;
}

.cart-counter {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: var(--red-dark);
  color: var(--white);
  font-family: "Alfa Slab One", cursive;
  font-size: 10px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--white);
  transition: transform 0.2s;
}

.cart-counter.bump {
  transform: scale(1.3);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

.mobile-menu-container {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  background-color: var(--red-dark);
  padding: 20px;
  display: none;
  flex-direction: column;
  gap: 15px;
  z-index: 99;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border-bottom: 4px solid var(--yellow-main);
}

.mobile-menu-container.active {
  display: flex;
  animation: slideDown 0.3s ease;
}

.mobile-link {
  font-family: "Madimi One", sans-serif;
  font-size: 1.5rem;
  color: white;
  text-decoration: none;
  text-align: center;
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

/* ============================
           3. CONTENIDO PRINCIPAL
        ============================ */
.main-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
}
.menu-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Badge con efecto Shimmer */
.section-title-badge {
  background-color: var(--yellow-main);
  padding: 10px 40px;
  border-radius: 15px;
  margin-bottom: 40px;
  box-shadow: 0 6px 0 var(--yellow-dark);
  transform: rotate(-1deg);
  display: inline-block;
  position: relative;
  overflow: hidden;
}
.section-title-badge::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shimmer 3s infinite;
}

.section-title-badge h2 {
  color: var(--white);
  font-size: 2rem;
  margin: 0;
  text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.3);
}
.products-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* --- TARJETA DE PRODUCTO --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card {
  background-color: var(--white);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(199, 53, 47, 0.15);
  display: grid;
  grid-template-columns: 35% 1fr auto;
  align-items: center;
  min-height: 220px;
  transform-style: preserve-3d;
  transform: perspective(1000px);
  transition: transform 0.1s ease-out, box-shadow 0.3s ease;
  will-change: transform, opacity;
  opacity: 0;
  animation: fadeUp 0.6s cubic-bezier(0.5, 0, 0, 1) forwards;
}

/* Estado normal sin Tilt (si JS falla) */
.product-card:hover {
  box-shadow: 0 20px 50px rgba(199, 53, 47, 0.3);
}

.product-img-container {
  height: 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
}
.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-img {
  transform: scale(1.1);
}

.product-info {
  padding: 25px;
  transform: translateZ(20px);
}
.product-name {
  font-size: 1.8rem;
  color: var(--red-dark);
  margin-bottom: 10px;
  line-height: 1.1;
}
.product-desc {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 15px;
  line-height: 1.5;
}
.product-price {
  font-family: "Alfa Slab One", serif;
  font-size: 1.8rem;
  color: var(--red-dark);
}
.promo-tag {
  display: inline-block;
  background-color: var(--red-main);
  color: white;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: "Madimi One", sans-serif;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.btn-add-container {
  padding: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateZ(30px);
}
.btn-add {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--yellow-main);
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 5px 0 var(--yellow-dark);
  transition: all 0.2s;
}
.btn-add:hover {
  background-color: #ffd68a;
  transform: scale(1.1);
}
.btn-add:active {
  transform: scale(0.95);
  box-shadow: 0 2px 0 var(--yellow-dark);
  translate: 0 3px;
}
.btn-text {
  font-family: "Madimi One", sans-serif;
  color: var(--white);
  font-size: 0.9rem;
}

/* Toast */
.toast {
  visibility: hidden;
  min-width: 250px;
  background-color: var(--red-dark);
  color: #fff;
  text-align: center;
  border-radius: 8px;
  padding: 16px;
  position: fixed;
  z-index: 1000;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Madimi One", sans-serif;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.toast.show {
  visibility: visible;
  animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

/* ============================
           6. FOOTER (IGUAL A INDEX.CSS)
        ============================ */
.footer {
  background-color: var(--red-dark);
  padding: 60px 5% 40px;
  text-align: center;
  color: var(--white);
  position: relative;
  z-index: 10;
}
.logo-placeholder {
  font-family: "Alfa Slab One", serif;
}
.footer-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.footer-social {
  display: flex;
  gap: 20px;
  margin: 20px 0;
}
.social-icon {
  width: 45px;
  height: 45px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  color: var(--red-main);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.social-icon:hover {
  background: var(--yellow-main);
  color: var(--white);
}
.footer_tagline {
  font-family: "Press Start 2P", cursive;
  font-size: 0.7rem;
  color: var(--yellow-main);
  margin-top: 10px;
  animation: blinkRetro 1s step-end infinite;
}

/* ============================
           7. MEDIA QUERIES (RESPONSIVE)
        ============================ */
@media (max-width: 768px) {
  /* Reglas del Header (Iguales a index) */
  .header {
    padding: 10px 5%;
  }
  .nav-links-desktop {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }

  /* Reglas específicas de Crushes */
  .section-title-badge {
    width: 90%;
    text-align: center;
    padding: 10px;
  }
  .section-title-badge h2 {
    font-size: 1.5rem;
  }
  .product-card {
    grid-template-columns: 1fr;
    grid-template-rows: 200px auto auto;
    text-align: center;
  }
  .product-img-container {
    height: 200px;
  }
  .product-info {
    padding: 20px;
  }
  .btn-add-container {
    padding: 0 0 25px 0;
  }
  .btn-add {
    width: 100%;
    max-width: 180px;
    height: 45px;
    border-radius: 25px;
    flex-direction: row;
  }
  .btn-add .btn-text {
    font-size: 1.1rem;
    margin: 0;
  }
}

/* =========================================
   8. ANIMACIONES Y EFECTOS
   ========================================= */

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
  will-change: opacity, transform;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Header Flotante Glassmorphism */
.header.scrolled {
  background-color: rgba(199, 53, 47, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
  transition: all 0.3s ease;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  20% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

@keyframes blinkRetro {
  50% {
    opacity: 0;
  }
}

@keyframes fadein {
  from {
    bottom: 0;
    opacity: 0;
  }
  to {
    bottom: 30px;
    opacity: 1;
  }
}
@keyframes fadeout {
  from {
    bottom: 30px;
    opacity: 1;
  }
  to {
    bottom: 0;
    opacity: 0;
  }
}
