/* ============================
           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;
  --cream: #fffdf5;
  --text-muted: #ffe6da;
  --grid-color: #c7352f;
}

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;
}
h1,
h2,
h3 {
  font-family: "Alfa Slab One", serif;
  letter-spacing: 1px;
}
img {
  max-width: 100%;
  display: block;
}

/* ============================
   2. HEADER & NAV (UNIFICADO)
   ============================ */
.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;
}

/* Header 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;
}

.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;
  color: var(--white);
  text-decoration: none;
  position: relative;
  transition: color 0.3s, transform 0.2s ease-out;
  display: inline-block;
}
.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 3px;
  bottom: -5px;
  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;
}
.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;
}

.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. LAYOUT PRINCIPAL
        ============================ */
.main-wrapper {
  max-width: 1300px;
  margin: 0 auto;
  padding: 40px 20px 100px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

/* NOVEDADES (Bloque Independiente) */
.news-section {
  width: 100%;
  position: relative;
  display: none;

  /* Animación de entrada */
  animation: floatY 5s ease-in-out infinite;
}
.news-card {
  background-color: var(--white);
  border-radius: 30px;
  border: 4px solid var(--yellow-main);
  box-shadow: 10px 10px 0 rgba(199, 53, 47, 0.2);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  overflow: hidden;
  min-height: 350px;

  /* Tilt Setup */
  transform-style: preserve-3d;
  transform: perspective(1000px);
  transition: transform 0.1s ease-out, box-shadow 0.3s ease;
}

.news-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  background-color: var(--red-main);
  color: var(--white);
  font-family: "Alfa Slab One", serif;
  font-size: 1.5rem;
  padding: 10px 30px;
  border-radius: 50px;
  border: 3px solid var(--white);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  z-index: 10;
  text-transform: uppercase;
  white-space: nowrap;
}
.news-img-box {
  background-color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.news-img-box::before {
  content: "NEW";
  position: absolute;
  top: 20px;
  left: -30px;
  background: var(--yellow-main);
  color: var(--red-dark);
  font-weight: bold;
  padding: 5px 40px;
  transform: rotate(-45deg);
  border: 2px solid var(--white);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 2;
  font-family: "Press Start 2P", cursive;
  font-size: 0.8rem;
}
.news-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.news-card:hover .news-img {
  transform: scale(1.05);
}
.news-content {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  transform: translateZ(30px); /* Efecto profundidad */
}
.news-label {
  font-family: "Madimi One", sans-serif;
  color: var(--yellow-dark);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}
.news-title {
  font-family: "Alfa Slab One", serif;
  font-size: 3rem;
  color: var(--red-dark);
  margin-bottom: 15px;
  line-height: 1;
}
.news-desc {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 25px;
  line-height: 1.5;
}

/* GRID DE COLUMNAS */
.columns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  position: relative;
}

/* LÍNEA SEPARADORA */
.columns-grid::after {
  content: "";
  position: absolute;
  top: 60px;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  background: repeating-linear-gradient(
    45deg,
    var(--red-main),
    var(--red-main) 10px,
    var(--red-dark) 10px,
    var(--red-dark) 20px
  );
  border-radius: 10px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  z-index: 0;
}

/* BADGE CORAZÓN CENTRAL */
.columns-grid::before {
  content: "❤";
  position: absolute;
  top: 200px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background-color: var(--yellow-main);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border: 4px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  z-index: 1;
  animation: pulseBadge 2s infinite ease-in-out;
}

@keyframes pulseBadge {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

.favorites-section {
  padding-right: 20px;
}
.voting-section {
  padding-left: 20px;
}

.section-title-large,
.section-title-small {
  font-family: "Alfa Slab One", serif;
  color: var(--red-main);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 40px;
  text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.299);
}
.section-title-large {
  font-size: 2.8rem;
  line-height: 1.1;
}
.section-title-small {
  font-size: 2rem;
}

.fav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}
.fav-card {
  background-color: var(--white);
  padding: 15px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  padding-bottom: 30px;
  text-align: center;
  transition: transform 0.3s;

  /* Tilt Setup */
  transform-style: preserve-3d;
  transform: perspective(1000px);
  transition: transform 0.1s ease-out, box-shadow 0.3s ease;
}

.fav-card:hover {
  transform: translateY(-5px) rotate(1deg);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}
.fav-img-box {
  background-color: var(--cream);
  padding: 20px;
  margin-bottom: 20px;
  overflow: hidden;
}
.fav-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
}
.fav-name {
  font-size: 1.4rem;
  color: var(--red-dark);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.fav-quote {
  font-family: "Madimi One", sans-serif;
  font-size: 0.95rem;
  color: #555;
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 20px;
  background-color: #f9f9f9;
  padding: 10px;
  border-radius: 8px;
  position: relative;
  transform: translateZ(20px);
}
.fav-quote::before {
  content: '"';
  font-family: serif;
  font-size: 3rem;
  color: var(--yellow-main);
  position: absolute;
  top: -15px;
  left: -5px;
  opacity: 0.5;
}

.fav-heart-icon {
  color: var(--red-main);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  fill: transparent;
  stroke: var(--red-main);
  width: 32px;
  height: 32px;
  transform: translateZ(30px);
}
.fav-heart-icon:hover {
  transform: scale(1.2) translateZ(30px);
}
.fav-heart-icon.liked {
  fill: var(--red-main);
  transform: scale(1.2) translateZ(30px);
  filter: drop-shadow(0 4px 6px rgba(199, 53, 47, 0.4));
}

.voting-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.vote-card {
  background-color: var(--white);
  padding: 15px;
  text-align: center;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s;

  /* Tilt Setup */
  transform-style: preserve-3d;
  transform: perspective(1000px);
  transition: transform 0.1s ease-out, box-shadow 0.3s ease;
}

.vote-card:hover {
  transform: scale(1.02);
}
.vote-img-box {
  background-color: var(--cream);
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 4px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.vote-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}
.vote-name {
  font-family: "Madimi One", sans-serif;
  font-size: 1rem;
  color: var(--red-dark);
  margin-bottom: 8px;
  text-transform: uppercase;
  line-height: 1.2;
  height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stars-container {
  display: flex;
  justify-content: center;
  gap: 4px;
  font-size: 1.2rem;
  cursor: pointer;
  transform: translateZ(20px);
}
.star-icon {
  stroke: var(--yellow-main);
  fill: transparent;
  width: 20px;
  height: 20px;
  transition: transform 0.1s;
}
.star-icon:hover {
  transform: scale(1.2);
}
.star-filled {
  fill: var(--yellow-main);
}

/* FOOTER */
.footer {
  background-color: var(--red-dark);
  padding: 60px 5% 40px;
  text-align: center;
  color: var(--white);
}
.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;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .header {
    padding: 10px 5%;
  }
  .nav-links-desktop {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }

  .columns-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }
  .columns-grid::after,
  .columns-grid::before {
    display: none;
  }

  .favorites-section {
    padding-right: 0;
  }
  .voting-section {
    padding-left: 0;
  }

  .section-title-large {
    font-size: 2.2rem;
  }

  .news-card {
    grid-template-columns: 1fr;
  }
  .news-img-box {
    height: 250px;
  }
  .news-content {
    text-align: center;
    align-items: center;
  }
  .news-title {
    font-size: 2.2rem;
  }
}

/* =========================================
   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);
}

@keyframes floatY {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-12px);
  }
  100% {
    transform: translateY(0px);
  }
}

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