/* Estilos para el indicador de stock */
.stock-indicator {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stock-indicator.in-stock {
    background-color: #28a745; /* Verde éxito */
    color: #fff;
}

.stock-indicator.out-of-stock {
    background-color: #dc3545; /* Rojo peligro */
    color: #fff;
}

/* --- Estilos para la Página de Detalles del Producto --- */

/* --- Estilos para el Loader de Scroll Infinito --- */
.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    width: 100%;
}

.loader-icon {
    border: 4px solid #f3f3f3; /* Gris claro */
    border-top: 4px solid #e63946; /* Rojo de la marca */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.detalle-producto-main {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
    padding: 40px 20px;
    max-width: 1300px;
    margin: 40px auto;
}

/* Galería de Imágenes */
.detalle-images-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: 1px solid #e5e5e5;
}

/* Información del Producto */
.detalle-info {
    font-family: Arial, sans-serif;
}

.detalle-info .product-brand {
    font-size: 1em;
    color: #666;
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: bold;
}

.detalle-info h1 {
    font-size: 2.2em;
    margin: 5px 0;
    text-align: left;
    font-weight: bold;
}

.detalle-info .ref {
    color: #888;
    font-size: 0.9em;
    margin-bottom: 20px;
}

.detalle-info .price {
    font-size: 1.8em;
    font-weight: bold;
    color: #000;
    margin: 20px 0;
}

/* Sección de Tallas */
.sizes-section .section-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.size-box {
    border: 1px solid #ccc;
    padding: 12px 0;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.size-box:hover, .size-box.selected {
    border-color: #000;
    background-color: #fff;
}

/* Enlaces y Opciones Adicionales */
.product-links {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.product-links a {
    color: #000;
    text-decoration: none;
    font-size: 0.9em;
}

.extra-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background-color: #f7f7f7;
    margin: 20px 0;
    font-size: 0.9em;
}

.extra-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.payment-info {
    font-size: 0.9em;
    margin: 20px 0;
}

.payment-info a {
    color: #000;
    font-weight: bold;
}

/* Botón de Agregar al Carrito */
.add-to-cart-btn {
    background-color: #000;
    color: white;
    border: none;
    padding: 18px 25px;
    cursor: pointer;
    font-size: 1em;
    width: 100%;
    transition: background-color 0.3s;
    text-transform: uppercase;
}

.add-to-cart-btn:hover {
    background-color: #333;
}

/* --- Productos Relacionados --- */
.related-products-section {
    padding: 40px 20px;
    max-width: 1300px;
    margin: 40px auto;
}

.related-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.related-header h3 {
    font-size: 1.5em;
    margin: 0;
}

.related-nav .nav-arrow {
    background: none;
    border: 1px solid #ccc;
    padding: 10px 15px;
    cursor: pointer;
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}
.nav-list li {
  margin: 0 15px;
  position: relative;
}
.nav-list a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 5px 0;
}
.dropdown-menu {
  display: none;
  position: absolute;
  background-color: #222;
  list-style: none;
  padding: 10px;
  border-radius: 5px;
}
.dropdown:hover .dropdown-menu {
  display: block;
}
.dropdown-menu li {
  margin-bottom: 5px;
}

/* Layout Principal */
body {
  font-family: Arial, sans-serif;
  background-color: #f2f2f2;
  margin: 0;
}

/* Estilos para páginas de productos */
.productos-pagina {
  background-color: #ffffff;
  min-height: calc(100vh - 90px);
  padding: 40px 20px;
}

.productos-pagina section {
  max-width: 1200px;
  margin: 0 auto;
  background-color: #ffffff;
  padding: 30px;
  border-radius: 10px;
}

.productos-pagina h2 {
  text-align: center;
  color: #666;
  margin-bottom: 20px;
  font-size: 2em;
}

.main-container {
  max-width: 1200px;
  margin: 2em auto;
  padding: 0 2em;
  background-color: white;
  border-radius: 10px;
  padding: 2em;
}

.page-title {
  text-align: center;
  margin-bottom: 1.5em;
  font-size: 2.2em;
  color: #333;
}

/* Grid de Productos */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.5rem;
}

/* Nueva Tarjeta de Producto */
.product-card {
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 0, 0, 0.1);
}

.product-card:hover .product-card__image,
.product-card:hover img {
  transform: scale(1.1);
}

.product-card a {
  text-decoration: none;
  color: inherit;
}

.product-card__image-container {
  position: relative;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  margin-bottom: 0;
  display: block;
  background-color: #f8f9fa;
}

.product-card__image,
.product-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}



.product-card__info {
  flex-grow: 1;
  transition: opacity 0.3s ease-in-out;
  padding: 20px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 1));
}

/* Removido el efecto de opacidad en hover para mejor legibilidad */

.product-card__brand {
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-card__brand.rgb-text {
  font-weight: bold;
}

.product-card__name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #212529;
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
}

.product-card__price {
  font-size: 1.3rem;
  font-weight: 700;
  color: #d9534f; /* Tono rojo/coral */
  margin: 0 0 1.5rem 0;
}

.product-card__btn {
  background-color: #212529;
  color: #fff;
  border: 1px solid #212529;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

/* Removido el efecto de opacidad en hover para mejor legibilidad */

.product-card__btn:hover {
  background-color: #fffbea; /* Amarillo pálido */
  color: #212529; /* Texto oscuro para contraste */
  border-color: #EADD9A; /* Borde sutil en tono amarillo */
}

/* Efecto Hover en Tarjeta - Clonado de index.html */
.producto .overlay-text {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  background-color: rgba(17, 17, 17, 0.8);
  color: white;
  padding: 0.5em 1.2em;
  border-radius: 5px;
  font-weight: bold;
  opacity: 0;
  transition: 
    opacity 0.3s ease,
    transform 0.3s ease,
    top 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.producto:hover .overlay-text {
  opacity: 1;
  top: 50%;
  transform: translate(-50%, -50%) scale(1.1);
  pointer-events: auto;
}

.producto .overlay-text:hover {
  animation: bounce 0.6s;
}

@keyframes bounce {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1.1);
  }
  50% {
    transform: translate(-50%, -60%) scale(1.2);
  }
}

/* Botón Ver Más */
.ver-mas-container {
  text-align: center;
  margin: 40px 0 20px 0;
  padding: 0 15px;
}

.btn-ver-mas {
  background-color: #111;
  color: white;
  border: 2px solid #111;
  padding: 0.8em 2.5em;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  font-size: 1em;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  min-width: 200px;
}

.btn-ver-mas:hover {
  background-color: white;
  color: #111;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .ver-mas-container {
    margin: 30px 0 15px 0;
    padding: 0 10px;
  }

  .btn-ver-mas {
    padding: 0.7em 2em;
    font-size: 0.95em;
    min-width: 180px;
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .btn-ver-mas {
    padding: 0.6em 1.5em;
    font-size: 0.9em;
    min-width: 160px;
  }
}

/* === RGB Text Effect (MACS Brand) === */
.rgb-text {
    animation: rgb-animation 4s infinite linear;
    font-weight: bold;
}

@keyframes rgb-animation {
    0% { color: #ff0000; }
    15% { color: #ff7f00; }
    30% { color: #ffff00; }
    45% { color: #00ff00; }
    60% { color: #0000ff; }
    75% { color: #4b0082; }
    90% { color: #9400d3; }
    100% { color: #ff0000; }
}

/* Estilos para el contenedor de productos en páginas de categorías */

.product-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    font-weight: bold;
    border-radius: 12px 12px 0 0;
    gap: 8px;
    backdrop-filter: blur(2px);
}

.product-card__overlay i {
    font-size: 2rem;
}

.product-card__image-container:hover .product-card__overlay,
.product-card:hover .product-card__overlay {
    opacity: 1;
}

.product-card__overlay:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Estilos para el indicador de stock */
.product-card__stock {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    color: #fff;
    text-align: center;
    margin: 8px auto 4px;
    display: inline-block;
    letter-spacing: 0.5px;
}

.product-card__stock.available {
    background-color: #28a745; /* Verde */
}

.product-card__stock.unavailable {
    background-color: #dc3545; /* Rojo */
}


/* --- Estilos para la sección de Stock y Cantidad --- */

.stock-section {
    margin: 25px 0;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.stock-title {
    font-weight: bold;
    font-size: 0.9em;
    margin: 0 0 10px 0;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-selector label {
    font-size: 0.9em;
}

#quantity-select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
}

.stock-available {
    font-size: 0.85em;
    color: #666;
}

.stock-agotado {
    font-weight: bold;
    color: #d9534f; /* Rojo */
    font-size: 1.1em;
}

.add-to-cart-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    color: #666;
}

/* Responsive para productos */
@media (max-width: 1200px) {
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .product-card {
        border-radius: 12px;
    }

    .product-card__info {
        padding: 15px;
    }

    .product-card__name {
        font-size: 1rem;
    }

    .product-card__price {
        font-size: 1.1rem;
    }

    .product-card__overlay i {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .productos-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .product-card {
        border-radius: 12px;
    }

    .product-card__info {
        padding: 15px;
    }

    .page-title {
        font-size: 1.5rem;
    }
}
