/* Reset y estilos base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #000000;
  color: #ffffff;
  font-family: "Roboto Condensed", sans-serif; /* Corregido */
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- ESTILOS PARA NOTIFICACIONES POP-UP (AÑADIDOS) --- */
#popup-notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.popup {
    padding: 12px 20px;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    animation: slide-in 0.5s forwards;
}

.popup.fade-out {
    opacity: 0;
    transform: translateX(100%);
}

.popup-success {
    background-color: #28a745;
    border-left: 5px solid #218838;
}

.popup-error {
    background-color: #dc3545;
    border-left: 5px solid #c82333;
}

.popup-info {
    background-color: #17a2b8;
    border-left: 5px solid #138496;
}

@keyframes slide-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Contenedor principal */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  padding: 24px 16px;
  position: relative;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left,
.header-right {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.header-left {
    justify-content: flex-start;
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.logo-link img {
  max-height: 80px;
  width: auto;
  display: block;
}

.icon {
  width: 24px;
  height: 24px;
  color: #ffffff;
  transition: color 0.3s ease;
}

.icon-link:hover .icon {
  color:#757575;
}

.cart-icon-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    display: none;
    justify-content: center;
    align-items: center;
    min-width: 18px;
    height: 18px;
    line-height: 1;
}

/* Hamburger Menu */
.hamburger-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 100;
  font-size: 24px;
  color: #ffffff;
  transition: color 0.3s ease;
  display: none;
}

.hamburger-btn:hover {
  color:#757575;
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 99;
  display: none;
  overflow-y: auto;
}

.mobile-menu.active {
  display: block;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 30px;
  position: relative;
  padding-top: 60px;
}

.close-menu {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  color: #ffffff;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-menu:hover {
  color:#757575;
}

.mobile-nav-link {
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #ffffff;
  transition: color 0.3s ease;
}

.mobile-nav-link:hover {
  color:#757575;
}

/* Contenido principal */
main {
  flex: 1;
  padding: 48px 16px;
}

/* Grid de productos */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.product-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  margin-bottom: 12px;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-link:hover .product-image {
  transform: scale(1.05);
}

.product-name {
  text-align: center;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
  font-weight: normal;
}

.product-status {
  margin-top: 8px;
  margin-bottom: 24px;
}

.status-label {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid #757575;
  font-size: 12px;
  background-color: #000000;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* --- ESTILOS PARA PÁGINAS DE POLÍTICAS --- */
.policy-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 15px;
}

.policy-section h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 1px solid #333;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.policy-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 35px;
  margin-bottom: 15px;
}

.policy-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 25px;
  margin-bottom: 10px;
  color: #cccccc;
}

.policy-section p,
.policy-section ul {
  margin-bottom: 1.2em;
  line-height: 1.7;
  color: #dddddd;
}

.policy-section ul {
  list-style-position: inside;
  padding-left: 10px;
}

.policy-section li {
  margin-bottom: 8px;
}

.policy-section a {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-color: #757575;
  transition: color 0.3s ease;
}

.policy-section a:hover {
  color: #bbbbbb;
}

.policy-section strong {
  color: #ffffff;
}

/* --- Footer --- */
footer {
  padding: 32px 16px;
  border-top: 1px solid #333333;
}

.footer-content {
  display: flex;
  flex-direction: column; /* Apilado vertical en móvil (por defecto) */
  align-items: center;
  gap: 20px;
  width: 100%;
}

.footer-social {
  display: flex;
  gap: 24px;
}

.footer-links {
  display: flex;
  flex-direction: column; /* Apilado vertical de enlaces en móvil */
  align-items: center;
  gap: 15px; /* Espacio entre los enlaces de políticas */
  text-align: center;
}

.social-icon {
  width: 30px;
  height: 30px;
  color: #ffffff;
  transition: color 0.3s ease;
}

.social-link:hover .social-icon {
  color: #757575;
}

.footer-link {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #757575;
}

.footer-copyright {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: #757575;
}


/* --- Media Queries (Responsive) --- */

/* Dispositivos Móviles y Tablets */
@media (max-width: 768px) {
  /* Mostrar el botón hamburguesa en móvil */
  .hamburger-btn {
    display: block;
  }
}

/* Escritorio */
@media (min-width: 769px) {
    /* Ocultar el botón hamburguesa en desktop */
    .hamburger-btn {
        display: none;
    }

    /* Estilos del Footer para Escritorio */
    .footer-content {
      flex-direction: row; /* En desktop, se ponen en horizontal */
      justify-content: space-between;
    }

    .footer-links {
      flex-direction: row; /* Enlaces en horizontal en desktop */
      gap: 20px;
    }

    /* Añadir separador '|' solo en desktop usando CSS */
    .footer-links a + a::before {
      content: '|';
      margin-right: 20px;
      color: #555555;
    }
}

/* Grid de Productos Responsive */
@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1280px) {
  .product-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.back-button {
        background-color: #333;
        color: white;
        padding: 10px 20px;
        border: none;
        cursor: pointer;
        font-size: 16px;
        margin-bottom: 20px;
        font-weight: bold;
        text-transform: uppercase;
      }
.back-button:hover { background-color: #ffffff; color: #000000;}

      .back-button2 {
        background-color: #333;
        color: white;
        padding: 10px 20px;
        border: none;
        cursor: pointer;
        font-size: 16px;
        margin-bottom: 20px;
        margin-top: 20px;
        font-weight: bold;
        text-transform: uppercase;
      }
      .back-button2:hover { background-color: #ffffff; color: #000000; }
/* --- ESTILOS PARA ENLACE TOP SPENDERS (INDEX) --- */
.top-spenders-link-container {
  text-align: center;
  padding: 20px 16px 0;
}

.top-spenders-link {
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: inline-block;
  padding-bottom: 5px;
  border-bottom: 2px solid #555;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.top-spenders-link:hover {
  color: #ccc;
  border-color: #fff;
}


/* --- ESTILOS PARA PÁGINA DE RANKING --- */
.ranking-main {
  padding: 20px 16px;
}

.ranking-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: 4px;
  margin-bottom: 40px;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.ranking-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: #0a0a0a;
  border: 1px solid #222;
  border-radius: 8px;
  padding: 20px;
}

.ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ranking-item {
  display: flex;
  align-items: center;
  padding: 15px 10px;
  border-bottom: 1px solid #222;
  transition: background-color 0.3s ease;
}

.ranking-item:last-child {
  border-bottom: none;
}

.ranking-item:hover {
  background-color: #111;
}

.rank-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #777;
  width: 80px;
  text-align: center;
  flex-shrink: 0;
}

.rank-number .medal {
  font-size: 2.5rem;
  line-height: 1;
}

.spender-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.spender-name {
  font-size: 1.2rem;
  font-weight: 500;
  color: #eee;
}

.spender-insta {
  font-size: 0.9rem;
  color: #888;
  transition: color 0.3s ease;
}

.spender-insta:hover {
  color: #fff;
}

.spender-amount {
  font-size: 1.3rem;
  font-weight: 700;
  color: #757575; /* Verde dinero */
}

.no-spenders {
  text-align: center;
  color: #888;
  padding: 40px 0;
}

.back-button-ranking {
  font-size: 0.9rem;
  color: #aaa;
  transition: color 0.3s ease;
}

.back-button-ranking:hover {
  color: #fff;
}
/* --- AJUSTES RESPONSIVE PARA HEADER DE LA PÁGINA DE RANKING --- */

.back-button-ranking {
  font-size: 1rem; /* Un poco más grande para mejor legibilidad */
  color: #aaa;
  transition: color 0.3s ease;
  white-space: nowrap; /* Evita que el texto se parta en dos líneas */
  display: inline-block;
}

.back-button-ranking:hover {
  color: #fff;
}

.ranking-logo {
    max-height: 80px; /* Ajusta el tamaño del logo en esta página si es necesario */
}

.p-center{
  grid-column: 1 / -1; 
  text-align: center;
  padding: 50px 20px;
}

/* Media Query para dispositivos móviles */
@media (max-width: 768px) {
  .ranking-header-content {
      flex-direction: column; /* Apila el logo y el botón verticalmente */
      gap: 20px; /* Espacio entre el logo y el botón */
  }

  .ranking-header-content .header-left {
      order: 2; /* Mueve el botón debajo del logo */
      flex-grow: 0; /* Evita que el contenedor del botón crezca */
      justify-content: center; /* Centra el botón */
      width: 100%; /* Ocupa todo el ancho para centrar correctamente */
  }

  .ranking-header-content .header-center {
      order: 1; /* Mueve el logo arriba */
      flex-grow: 0;
  }
}
/* Puesto 1 - El más grande y destacado */
.ranking-item.rank-1 .spender-name {
  font-size: 2rem;
  font-weight: 900;
  color: #ffffff; /* Blanco puro para máxima visibilidad */
}
.ranking-item.rank-1 .spender-amount {
  font-size: 1.8rem;
  color: #757575; /* Verde más brillante */
}

/* Puesto 2 - Un poco más pequeño */
.ranking-item.rank-2 .spender-name {
  font-size: 1.7rem;
  font-weight: 700;
  color: #f0f0f0;
}
.ranking-item.rank-2 .spender-amount {
  font-size: 1.6rem;
}

/* Puesto 3 - Sigue la jerarquía */
.ranking-item.rank-3 .spender-name {
  font-size: 1.4rem;
  font-weight: 600;
  color: #e0e0e0;
}
.ranking-item.rank-3 .spender-amount {
  font-size: 1.4rem;
}

/* A partir del 4, todos tendrán el mismo tamaño base para no saturar */
.ranking-item:not(.rank-1):not(.rank-2):not(.rank-3) .spender-name {
  font-size: 1.2rem;
  font-weight: 500;
  color: #dddddd;
}
.ranking-item:not(.rank-1):not(.rank-2):not(.rank-3) .spender-amount {
  font-size: 1.3rem;
  font-weight: 700;
  color: #757575; /* Verde dinero original */
}
/* --- ESTILOS PARA CORONAS DEL RANKING --- */
.rank-number .rank-icon {
  font-size: 2.5rem;
  line-height: 1;
  text-shadow: 0px 2px 5px rgba(0, 0, 0, 0.5); /* Sombra para que destaque */
}
/* ### INICIO DE NUEVOS ESTILOS PARA MÓVILES ### */
@media (max-width: 500px) {
  .ranking-title {
    font-size: 1.8rem;
    letter-spacing: 2px;
  }

  .ranking-item {
    flex-wrap: wrap;
    align-items: center;
  }

  .rank-number {
    width: 60px; /* Se reduce el espacio de la medalla */
  }

  .rank-number .medal {
    font-size: 2rem; /* Se ajusta el tamaño de la medalla */
  }

  .spender-info {
    flex-grow: 1;
  }

  .spender-amount {
    flex-basis: 100%; /* Fuerza al monto a ocupar una nueva línea */
    padding-left: 60px; /* Lo indenta para alinearlo con la información de arriba */
    margin-top: -5px; /* Ajuste vertical para que quede más cerca */
    font-size: 1.2rem;
    font-weight: 600;
  }

  /* Ajustes de fuente para legibilidad */
  .spender-name,
  .ranking-item:not(.rank-1):not(.rank-2):not(.rank-3) .spender-name {
    font-size: 1.1rem;
  }

  .spender-insta {
    font-size: 0.8rem;
  }

  /* Ajustes para los 3 primeros puestos en móvil */
  .ranking-item.rank-1 .spender-name,
  .ranking-item.rank-2 .spender-name,
  .ranking-item.rank-3 .spender-name {
    font-size: 1.3rem;
  }

  .ranking-item.rank-1 .spender-amount,
  .ranking-item.rank-2 .spender-amount,
  .ranking-item.rank-3 .spender-amount {
    font-size: 1.4rem;
    font-weight: 700;
  }
}
/* ### FIN DE NUEVOS ESTILOS PARA MÓVILES ### */
