/* ===== PRODUCTOS DESTACADOS - IMPLEMENTACIÓN UNIFICADA ===== */

/* Sección principal */
.products-carousel-section {
    padding: 60px 0;
    background: #f5f5f5;
}

.products-carousel-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
}

.section-title p {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

/* Contenedor del carrusel */
.products-carousel-wrapper {
    position: relative;
    margin: 0 auto;
    max-width: 1400px;
    width: 100%;
    overflow: hidden;
}

.products-carousel {
    display: flex;
    gap: 25px;
    padding: 0 20px;
    transition: transform 0.4s ease;
    width: 100%;
}

.product-slide {
    flex: 0 0 280px;
    min-width: 280px;
    max-width: 280px;
    transition: all 0.4s ease;
}

/* Tarjeta de producto */
.product-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 400px;
    width: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Imagen del producto */
.product-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* Badge de producto */
.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.product-badge.featured {
    background: #FFD700;
    color: #000;
}

.product-badge.discount {
    background: #e74c3c;
    color: white;
}

.product-badge.new {
    background: #27ae60;
    color: white;
}

.product-badge.out-of-stock {
    background: #95a5a6;
    color: white;
}

/* Información del producto */
.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000000;
    margin: 0 0 10px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.6em;
}

.product-name a {
    color: #000000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-name a:hover {
    color: #FFD700;
}

/* Precio */
.product-price {
    margin: 15px 0;
}

.price-current {
    font-size: 1.4rem;
    font-weight: 700;
    color: #27ae60;
}

.price-original {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}

/* Botones */
.product-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.btn-add-cart {
    flex: 1;
    background: #FFD700;
    color: #000;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-cart:hover {
    background: #e6c200;
    transform: translateY(-2px);
}

.btn-favorite {
    width: 45px;
    height: 45px;
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.btn-favorite:hover {
    background: #FFD700;
    border-color: #FFD700;
    color: #000;
    transform: scale(1.1);
}

.btn-favorite.active {
    background: #e74c3c;
    border-color: #e74c3c;
    color: white;
}

/* Controles del carrusel */
.products-carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.carousel-btn {
    width: 50px;
    height: 50px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    color: #666;
}

.carousel-btn:hover {
    background: #FFD700;
    border-color: #FFD700;
    color: #000;
    transform: scale(1.1);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.products-carousel-indicators {
    display: flex;
    gap: 8px;
}

.products-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.products-indicator.active {
    background: #FFD700;
    transform: scale(1.2);
}

.products-indicator:hover {
    background: #FFD700;
    transform: scale(1.1);
}

/* Estados de carga */
.products-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.products-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.products-empty h3 {
    color: #333;
    margin-bottom: 10px;
}

/* Responsivo */
@media (max-width: 768px) {
    .product-slide {
        flex: 0 0 280px;
        min-width: 280px;
        max-width: 280px;
    }
    
    .product-card {
        height: 380px;
    }
    
    .product-image {
        height: 200px;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .products-carousel-container {
        padding: 0 15px;
    }
    
    .products-carousel {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .product-slide {
        flex: 0 0 260px;
        min-width: 260px;
        max-width: 260px;
    }
    
    .product-card {
        height: 360px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .products-carousel {
        gap: 15px;
    }
}

/* ===== NUEVO GRID DE PRODUCTOS DESTACADOS ===== */

/* Sección de productos destacados */
.featured-products-section {
    padding: 60px 0;
    background: #f5f5f5;
}

/* Grid de productos destacados */
.featured-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Ocultar indicadores en pantallas grandes */
.carousel-indicators {
    display: none;
}

/* Responsive para el grid */
@media (min-width: 1200px) {
    .featured-products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .featured-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media (min-width: 480px) and (max-width: 767px) {
    .featured-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Carrusel móvil para productos destacados */
@media (max-width: 767px) {
    .featured-products-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 20px;
        padding: 0 20px;
        margin: 0 -20px;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    .featured-products-grid::-webkit-scrollbar {
        display: none; /* Chrome, Safari and Opera */
    }
    
    .featured-products-grid .product-card {
        flex: 0 0 280px;
        scroll-snap-align: start;
        margin: 0;
    }
    
    /* Indicadores de carrusel */
    .featured-products-section {
        position: relative;
    }
    
    .carousel-indicators {
        display: flex !important;
        justify-content: center;
        gap: 8px;
        margin-top: 20px;
    }
    
    .carousel-indicator {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #ddd;
        cursor: pointer;
        transition: all 0.3s ease;
        border: none;
        padding: 0;
    }
    
    .carousel-indicator.active {
        background: #FFD700;
        transform: scale(1.2);
    }
    
    .carousel-indicator:hover {
        background: #FFD700;
        transform: scale(1.1);
    }
    
    /* Mejorar experiencia de scroll */
    .featured-products-grid {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Cursor para indicar que se puede deslizar */
    .featured-products-grid {
        cursor: grab;
    }
    
    .featured-products-grid:active {
        cursor: grabbing;
    }
}

@media (max-width: 479px) {
    .featured-products-grid .product-card {
        flex: 0 0 260px;
    }
}
