/**
 * Yaguar Ofertas - Slider CSS
 * Estilo del carrusel de imágenes del home - FULL WIDTH
 *
 * @version 5.0.0
 */

/* Wrapper - Full Width con JS */
.yaguar-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0; /* Elimina espacio de inline-block */
    font-size: 0; /* Elimina espacio de whitespace */
}

/* Reset para contenedores padres comunes (Elementor, etc) */
.elementor-widget-shortcode:has(.yaguar-slider-wrapper),
.elementor-element:has(.yaguar-slider-wrapper),
[class*="elementor"]:has(.yaguar-slider-wrapper) {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Reset margin del slider */
.yaguar-slider-wrapper > * {
    margin: 0;
    padding: 0;
}

/* Cuando tiene clase de stretch (agregada por JS) */
.yaguar-slider-wrapper.yaguar-stretch-full {
    width: 100vw;
    max-width: none !important;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* Slider container */
.yaguar-slider {
    position: relative;
    width: 100%;
    line-height: normal; /* Restaurar para elementos internos */
    font-size: 16px; /* Restaurar para elementos internos */
}

/* Track */
.yaguar-slider-track {
    position: relative;
    width: 100%;
    min-height: 200px; /* Altura mínima mientras carga */
}

/* Cuando la imagen cargó, el track se ajusta automáticamente */
.yaguar-slider-track.loaded {
    min-height: 0;
}

/* Slide */
.yaguar-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
    z-index: 1;
}

.yaguar-slide.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Imágenes - Full width responsive */
.yaguar-slide picture,
.yaguar-slide img {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    vertical-align: top; /* Elimina espacio inferior de inline */
    line-height: 0;
}

.yaguar-slide img {
    object-fit: cover;
    object-position: center;
}

/* Link en slide */
.yaguar-slide a.yaguar-slide-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.yaguar-slide a.yaguar-slide-link picture,
.yaguar-slide a.yaguar-slide-link img {
    display: block;
    width: 100%;
    height: auto;
}

/* Prevenir scroll horizontal */
html:has(.yaguar-slider-wrapper.yaguar-stretch-full),
html:has(.yaguar-slider-wrapper.yaguar-stretch-full) body {
    overflow-x: hidden;
}

/* Flechas de navegación */
.yaguar-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    color: #333;
}

.yaguar-slider-arrow:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.05);
}

.yaguar-slider-arrow:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.yaguar-slider-prev {
    left: 20px;
}

.yaguar-slider-next {
    right: 20px;
}

.yaguar-slider-arrow svg {
    width: 24px;
    height: 24px;
    fill: #333;
}

.yaguar-slider-arrow svg path {
    fill: #333;
}

/* Dots de navegación */
.yaguar-slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
}

.yaguar-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.yaguar-slider-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.yaguar-slider-dot.active {
    background: #fff;
    transform: scale(1.2);
}

.yaguar-slider-dot:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    /* Flechas slider mobile - blancas y con contraste */
    .yaguar-slider-arrow {
        width: 44px;
        height: 44px;
        background: rgba(0, 0, 0, 0.4) !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
        border-radius: 50% !important;
        color: #fff !important;
    }

    .yaguar-slider-arrow:hover {
        background: rgba(0, 0, 0, 0.5) !important;
        transform: translateY(-50%);
    }

    .yaguar-slider-arrow svg {
        width: 26px;
        height: 26px;
        color: #fff !important;
        filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
    }

    .yaguar-slider-arrow svg path {
        fill: #fff !important;
        stroke: #fff !important;
        stroke-width: 1px;
    }

    .yaguar-slider-prev {
        left: 10px;
    }

    .yaguar-slider-next {
        right: 10px;
    }

    .yaguar-slider-dots {
        bottom: 15px;
        padding: 6px 12px;
        gap: 8px;
    }

    .yaguar-slider-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .yaguar-slider-arrow {
        width: 40px;
        height: 40px;
        background: rgba(0, 0, 0, 0.45) !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.3) !important;
    }

    .yaguar-slider-arrow svg {
        width: 24px;
        height: 24px;
    }

    .yaguar-slider-prev {
        left: 8px;
    }

    .yaguar-slider-next {
        right: 8px;
    }

    .yaguar-slider-dots {
        bottom: 10px;
        padding: 5px 10px;
        gap: 6px;
    }

    .yaguar-slider-dot {
        width: 8px;
        height: 8px;
    }
}

/* Animación de fade */
@keyframes yaguarSlideFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.yaguar-slide.fade-in {
    animation: yaguarSlideFadeIn 0.5s ease-in-out;
}
