/**
 * Yaguar Ofertas - Carrusel de Productos CSS
 * Layout: Banner lateral + Grid/Carrusel de productos
 *
 * @version 5.0.0
 */

/* Wrapper - aprovecha pantallas grandes */
.yaguar-carrusel-wrapper {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Header con título */
.yaguar-carrusel-header {
    text-align: center;
    margin-bottom: 30px;
}

.yaguar-carrusel-titulo {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.yaguar-carrusel-titulo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ff6b00, #ff9500);
    border-radius: 2px;
}

/* Container principal */
.yaguar-carrusel-container {
    display: flex;
    gap: 30px;
    align-items: stretch;
}

.yaguar-carrusel-container.no-banner {
    justify-content: center;
}

/* Banner lateral - mismo ancho que cards de productos para proporción */
.yaguar-carrusel-banner {
    flex: 0 0 280px;
    max-width: 280px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    align-self: stretch;
}

.yaguar-carrusel-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Contenedor de productos */
.yaguar-carrusel-productos {
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* Track de productos */
.yaguar-productos-track {
    display: flex;
    gap: 15px;
    transition: transform 0.4s ease-out;
}

/* Centrar productos cuando hay pocos (sin scroll) */
.yaguar-productos-track.centrado {
    justify-content: center;
}

/* Card de producto - proporcional al banner */
.yaguar-producto-card {
    flex: 0 0 280px;
    min-width: 280px;
    max-width: 280px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.yaguar-producto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Imagen del producto - altura reducida para alinear con banner */
.yaguar-producto-imagen {
    position: relative;
    padding-top: 85%;
    background: #f8f8f8;
    overflow: hidden;
}

.yaguar-producto-imagen img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    transition: transform 0.3s ease;
}

.yaguar-producto-card:hover .yaguar-producto-imagen img {
    transform: scale(1.05);
}

.yaguar-producto-no-imagen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

/* Badge de descuento */
.yaguar-producto-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
}

/* Info del producto */
.yaguar-producto-info {
    padding: 15px;
    text-align: center;
}

.yaguar-producto-titulo {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 39px;
}

.yaguar-producto-sku {
    display: block;
    font-size: 11px;
    color: #888;
    margin-bottom: 10px;
}

/* Precio */
.yaguar-producto-precio {
    margin-top: 10px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}

.yaguar-precio-signo {
    font-size: 14px;
    font-weight: 700;
    color: #D81D14;
}

.yaguar-precio-valor {
    font-size: 24px;
    font-weight: 700;
    color: #D81D14;
}

.yaguar-precio-descuento {
    display: inline-block;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #ff4444, #cc0000);
    padding: 5px 15px;
    border-radius: 20px;
}

/* Botón del producto */
.yaguar-producto-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b00, #ff9500);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(255, 107, 0, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
}

.yaguar-producto-card:hover .yaguar-producto-btn {
    opacity: 1;
    transform: scale(1);
}

.yaguar-producto-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.5);
}

/* Flechas de navegación */
.yaguar-carrusel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    color: #333;
}

.yaguar-carrusel-arrow:hover {
    background: #ff6b00;
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
}

.yaguar-carrusel-prev {
    left: -10px;
}

.yaguar-carrusel-next {
    right: -10px;
}

/* Responsive - pantallas medianas */
@media (max-width: 1200px) {
    .yaguar-producto-card {
        flex: 0 0 240px;
        min-width: 240px;
        max-width: 240px;
    }

    .yaguar-carrusel-banner {
        flex: 0 0 240px;
        max-width: 240px;
    }
}

@media (max-width: 992px) {
    .yaguar-carrusel-container {
        flex-direction: column;
    }

    .yaguar-carrusel-banner {
        flex: none;
        max-width: 100%;
        height: 200px;
    }

    .yaguar-producto-card {
        flex: 0 0 calc(33.333% - 14px);
    }
}

@media (max-width: 768px) {
    .yaguar-carrusel-wrapper {
        padding: 20px 10px;
    }

    .yaguar-carrusel-titulo {
        font-size: 22px;
    }

    .yaguar-producto-card {
        flex: 0 0 calc(50% - 10px);
    }

    /* Flechas sutiles en mobile - sin globo blanco */
    .yaguar-carrusel-arrow {
        width: 30px !important;
        height: 30px !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        color: #D81D14 !important;
        font-size: 24px;
        opacity: 0.8;
    }

    .yaguar-carrusel-arrow svg {
        fill: #D81D14 !important;
        color: #D81D14 !important;
    }

    .yaguar-carrusel-arrow svg path {
        fill: #D81D14 !important;
    }

    .yaguar-carrusel-arrow:hover {
        background: transparent !important;
        color: #D81D14 !important;
        box-shadow: none !important;
        opacity: 1;
    }

    .yaguar-carrusel-prev {
        left: 5px;
    }

    .yaguar-carrusel-next {
        right: 5px;
    }

    .yaguar-producto-btn {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .yaguar-carrusel-container {
        gap: 20px;
    }

    .yaguar-productos-track {
        gap: 10px;
    }

    .yaguar-producto-card {
        flex: 0 0 calc(50% - 5px);
    }

    .yaguar-producto-info {
        padding: 10px;
    }

    .yaguar-producto-titulo {
        font-size: 12px;
        min-height: 34px;
    }

    .yaguar-precio-valor {
        font-size: 18px;
    }

    .yaguar-producto-btn {
        width: 32px;
        height: 32px;
        bottom: 10px;
        right: 10px;
    }
}

/* Sin scroll visible */
.yaguar-productos-track::-webkit-scrollbar {
    display: none;
}

.yaguar-productos-track {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ============================================
   MODO SIN TAPA - Full Width
   ============================================ */
.yaguar-carrusel-wrapper.sin-tapa {
    max-width: 100%;
    padding: 30px 40px;
}

.yaguar-carrusel-wrapper.sin-tapa .yaguar-carrusel-container {
    justify-content: flex-start;
    gap: 20px;
}

.yaguar-carrusel-wrapper.sin-tapa .yaguar-carrusel-productos {
    flex: 1;
    max-width: 100%;
}

/* Productos más anchos en modo sin tapa para aprovechar espacio */
.yaguar-carrusel-wrapper.sin-tapa .yaguar-producto-card {
    flex: 0 0 260px;
    min-width: 260px;
    max-width: 260px;
}

/* Flechas más visibles en modo sin tapa */
.yaguar-carrusel-wrapper.sin-tapa .yaguar-carrusel-arrow {
    width: 50px;
    height: 50px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
}

.yaguar-carrusel-wrapper.sin-tapa .yaguar-carrusel-prev {
    left: 5px;
}

.yaguar-carrusel-wrapper.sin-tapa .yaguar-carrusel-next {
    right: 5px;
}

/* Responsive para modo sin tapa */
@media (max-width: 1200px) {
    .yaguar-carrusel-wrapper.sin-tapa .yaguar-producto-card {
        flex: 0 0 220px;
        min-width: 220px;
        max-width: 220px;
    }
}

@media (max-width: 768px) {
    .yaguar-carrusel-wrapper.sin-tapa {
        padding: 20px 15px;
    }

    .yaguar-carrusel-wrapper.sin-tapa .yaguar-producto-card {
        flex: 0 0 calc(50% - 8px);
        min-width: calc(50% - 8px);
        max-width: calc(50% - 8px);
    }
}

/* Dots de navegación */
.yaguar-carrusel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding: 10px 0;
}

.yaguar-carrusel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.yaguar-carrusel-dot.active {
    background: #D81D14;
    transform: scale(1.2);
}

.yaguar-carrusel-dot:hover {
    background: #999;
}
