
/* ----------------------------------------------------------------
 * VARIABLES CSS
 * ----------------------------------------------------------------
 */
:root {
    /* Colores principales */
    --color-bg-dark: #121212;
    --color-bg-card: #1a1a1a;
    --color-bg-black: #000000;
    --color-gold: #f1ad2e;
    --color-gold-dark: #AA955F;
    --color-text-light: #f8f9fa;
    --color-text-gray: #adb5bd;
    --color-border: #2c2c2c;
    --color-success: #28a745;
    --color-info: #17a2b8;
    
    /* Sombras */
    --shadow-card: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 25px rgba(255, 215, 0, 0.15);
    --shadow-gold: 0 0 15px rgba(255, 215, 0, 0.3);
    
    /* Bordes */
    --border-radius: 10px;
    --border-radius-lg: 15px;
    
    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Transiciones */
    --transition-normal: all 0.3s ease;
}

/* ----------------------------------------------------------------
 * CLASES DE UTILIDAD
 * ----------------------------------------------------------------
 */
.bg-black {
    background-color: var(--color-bg-black) !important;
    width: 100%;
    height: 8%;
}

.text-gold {
    color: var(--color-gold) !important;
    
}

.border-gold {
    border-color: var(--color-gold-dark) !important;
    font-size: 175%;
}

.btn-outline-gold {
    color: var(--color-gold);
    border-color: var(--color-gold);
    background-color: transparent;
    transition: var(--transition-normal);
    position: relative;
    top: -32;
    left: 1250px;
}

.btn-outline-gold:hover {
    background-color: var(--color-gold);
    color: var(--color-bg-black);
    border-color: var(--color-gold);
}

.btn-gold {
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
    color: var(--color-bg-black);
    border: none;
    font-weight: 600;
    padding: 0.75rem 2rem;
    transition: var(--transition-normal);
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--color-gold-dark), var(--color-gold));
    color: var(--color-bg-black);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

/* ----------------------------------------------------------------
 * GRID DE 3 COLUMNAS
 * ----------------------------------------------------------------
 */
.products-3x3-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas iguales */
    gap: var(--spacing-lg);
    width: 100%;
    margin: 0 auto;
}

/* ----------------------------------------------------------------
 * TARJETA DE PRODUCTO INDIVIDUAL
 * ----------------------------------------------------------------
 */
.product-card-3col {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow-card);
    position: relative;
}

/* Efecto hover para la tarjeta */
.product-card-3col:hover {
    transform: translateY(-5px);
    border-color: var(--color-gold);
    box-shadow: var(--shadow-hover);
}

/* Borde dorado superior al hacer hover */
.product-card-3col:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-gold), var(--color-gold-dark));
    z-index: 2;
}

/* ----------------------------------------------------------------
 * IMÁGENES DEL PRODUCTO
 * ----------------------------------------------------------------
 */
.product-images {
    height: 200px;
    overflow: hidden;
    position: relative;
    background-color: var(--color-bg-black);
}

.product-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.product-card-3col:hover .product-images img {
    transform: scale(1.05);
}

/* Indicadores del carrusel */
.carousel-indicators {
    margin-bottom: 0;
    bottom: 10px;
}

.carousel-indicators button {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    margin: 0 3px !important;
}

.carousel-indicators .active {
    background-color: var(--color-gold);
    transform: scale(1.2);
}

/* Controles del carrusel */
.carousel-control-prev,
.carousel-control-next {
    width: 35px;
    height: 35px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card-3col:hover .carousel-control-prev,
.product-card-3col:hover .carousel-control-next {
    opacity: 1;
}

.carousel-control-prev {
    left: 10px;
}

.carousel-control-next {
    right: 10px;
}

/* ----------------------------------------------------------------
 * INFORMACIÓN DEL PRODUCTO
 * ----------------------------------------------------------------
 */
.product-info {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Nombre del producto */
.product-name {
    color: var(--color-gold);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
    min-height: 2.8em;
}

/* Precio */
.product-price {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.price-label {
    color: var(--color-text-gray);
    font-size: 0.9rem;
}

.price-value {
    color: var(--color-success);
    font-size: 1.3rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Descripción */
.product-description {
    color: var(--color-text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Botón Ver Producto */
.btn-view-product {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
    color: var(--color-bg-black);
    text-decoration: none;
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    border: none;
    transition: var(--transition-normal);
    margin-top: auto;
    width: 100%;
    text-align: center;
}

.btn-view-product:hover {
    background: linear-gradient(135deg, var(--color-gold-dark), var(--color-gold));
    color: var(--color-bg-black);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

/* Fechas */
.product-dates {
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--color-border);
}

.product-dates small {
    color: var(--color-text-gray);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.product-dates i {
    color: var(--color-info);
    margin-right: 5px;
}

/* ----------------------------------------------------------------
 * TÍTULO DE SECCIÓN
 * ----------------------------------------------------------------
 */
.section-title {
    color: var(--color-gold);
    font-size: 2rem;
    font-weight: 700;
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

/* ----------------------------------------------------------------
 * CONTADOR DE PRODUCTOS
 * ----------------------------------------------------------------
 */
.product-counter-container {
    margin-top: var(--spacing-xl);
}

.product-counter-badge {
    display: inline-flex;
    align-items: center;
    background-color: var(--color-info);
    color: white;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.counter-number {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0 3px;
}

/* ----------------------------------------------------------------
 * MENSAJE SIN PRODUCTOS
 * ----------------------------------------------------------------
 */
.no-products-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--spacing-xl);
    background-color: rgba(42, 42, 42, 0.5);
    border-radius: var(--border-radius);
    border: 2px dashed var(--color-border);
}

.no-products-message i {
    color: var(--color-text-gray);
    opacity: 0.5;
}

.no-products-message h3 {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-sm);
}

.no-products-message p {
    color: var(--color-text-gray);
}


.placeholder-card {
    visibility: hidden;
    pointer-events: none;
}

/* ----------------------------------------------------------------
 * MODAL DE OFERTAS
 * ----------------------------------------------------------------
 */
.epic-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.epic-modal-content {
    background-color: var(--color-bg-card);
    border: 2px solid var(--color-gold);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.2);
}

.epic-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--color-gold);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-normal);
}

.epic-close-btn:hover {
    color: white;
    background-color: rgba(255, 215, 0, 0.1);
}

.promociones-container {
    padding: var(--spacing-sm);
}

/* ----------------------------------------------------------------
 * RESPONSIVE DESIGN
 * ----------------------------------------------------------------
 */

/* Tablet: 2 columnas */
@media (max-width: 992px) {
    .products-3x3-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas */
        gap: var(--spacing-md);
    }
    
    .product-images {
        height: 180px;
    }
    
    .product-name {
        font-size: 1rem;
        min-height: 2.6em;
    }
    
    .price-value {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 1.7rem;
    }
}

/* Móvil: 1 columna */
@media (max-width: 768px) {
    .products-3x3-grid {
        grid-template-columns: 1fr; /* 1 columna */
        gap: var(--spacing-md);
    }
    
    .product-images {
        height: 160px;
    }
    
    .product-name {
        font-size: 1rem;
        min-height: auto;
    }
    
    .product-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .price-value {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .product-counter-badge {
        font-size: 1rem;
        padding: var(--spacing-xs) var(--spacing-md);
    }
    
    /* Modal responsive */
    .epic-modal-content {
        width: 95%;
        padding: var(--spacing-md);
    }
}

/* Pantallas muy pequeñas */
@media (max-width: 480px) {
    .products-3x3-grid {
        gap: var(--spacing-sm);
    }
    
    .product-images {
        height: 140px;
    }
    
    .product-info {
        padding: var(--spacing-sm);
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 30px;
        height: 30px;
    }
}

/* Pantallas grandes (más de 1200px) */
@media (min-width: 1200px) {
    .products-3x3-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-xl);
        max-width: 1400px;
    }
    
    .product-images {
        height: 220px;
    }
    
    .product-name {
        font-size: 1.2rem;
    }
    
    .price-value {
        font-size: 1.4rem;
    }
}

/* ----------------------------------------------------------------
 * ANIMACIONES PARA LAS TARJETAS
 * ----------------------------------------------------------------
 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card-3col {
    animation: slideIn 0.5s ease-out forwards;
    opacity: 0;
}

/* Animaciones escalonadas para efecto cascada */
.product-card-3col:nth-child(3n+1) { animation-delay: 0.1s; }
.product-card-3col:nth-child(3n+2) { animation-delay: 0.2s; }
.product-card-3col:nth-child(3n+3) { animation-delay: 0.3s; }