/*
 * LANDING PAGE — front-page.css
 * Bodega Quinta Santero
 *
 * Estructura:
 *   1. Variables CSS
 *   2. Hero Carousel
 *   3. Banner Próximos Eventos (full-bleed)
 *   4. Sección Vinos & Frizzantes
 *   5. Sección Quiénes Somos (carousel)
 *   6. Timeline Vino Cultura (horizontal)
 *   7. Sección Puntos de Venta
 *   8. Footer
 *   9. Carrito Lateral (globo flotante + progress bar)
 *  10. Media queries
 */

/* ==========================================================================
   1. VARIABLES CSS
   ========================================================================== */

:root {
    --ag-cream:   #f4eedd;
    --ag-black:   #111111;
    --ag-dark:    #000000;
    --ag-gold:    #cda47b;
    --ag-gold-lt: #e0b488;
    --ag-text:    #333333;
    --ag-muted:   #555555;
    --ag-white:   #ffffff;
    --ag-wp-green: #25D366;
}

/* ==========================================================================
   2. HERO CAROUSEL
   ========================================================================== */

.ag-hero-carousel {
    width: 100%;
    height: 100vh;
    min-height: 937px;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .ag-hero-carousel {
        height: 60vh;
        min-height: 450px;
    }
}

/* Contenedor relativo para los slides apilados */
.ag-hero-swiper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Todos los slides absolutamente posicionados */
.ag-hero-swiper .swiper-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.2s;
    overflow: hidden;
    z-index: 1;
}

/* Slide activo visible arriba */
.ag-hero-swiper .swiper-slide.ag-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Slide saliente para transición suave */
.ag-hero-swiper .swiper-slide.ag-leaving {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

/* Definición de la animación de Zoom In (Ken Burns) continuo */
@keyframes agHeroZoomIn {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.08);
    }
}

/* Elementos de imagen y fondo con efecto de escala / zoom */
.ag-hero-swiper .ag-hero-img,
.ag-hero-swiper .ag-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1);
    will-change: transform;
}

/* Slide inactivo fuera de vista: reset instantáneo a scale(1) sin animación para evitar zoom-out */
.ag-hero-swiper .swiper-slide:not(.ag-active):not(.ag-leaving) .ag-hero-img,
.ag-hero-swiper .swiper-slide:not(.ag-active):not(.ag-leaving) .ag-hero-bg {
    transform: scale(1);
    animation: none;
    transition: none !important;
}

/* Efecto de Zoom In continuo (Ken Burns) cuando el slide está activo (arranca de inmediato en la primera carga y en cada ciclo) */
.ag-hero-swiper .swiper-slide.ag-active .ag-hero-img,
.ag-hero-swiper .swiper-slide.ag-active .ag-hero-bg {
    animation: agHeroZoomIn 6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Durante la transición de salida, la imagen saliente MANTIENE su escala para no hacer zoom-out */
.ag-hero-swiper .swiper-slide.ag-leaving .ag-hero-img,
.ag-hero-swiper .swiper-slide.ag-leaving .ag-hero-bg {
    transform: scale(1.08);
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .ag-hero-swiper .swiper-slide.ag-active .ag-hero-img,
    .ag-hero-swiper .swiper-slide.ag-active .ag-hero-bg {
        animation: none !important;
        transform: scale(1) !important;
    }
}

/* ==========================================================================
   3. BANNER PRÓXIMOS EVENTOS (full-bleed oscuro)
   ========================================================================== */

.ag-full-bleed-banner {
    position: relative;
    padding: 80px 20px;
    background-color: var(--ag-dark);
    text-align: center;
    overflow: hidden;
}

.ag-full-bleed-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(205, 164, 123, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

/* ==========================================================================
   4. SECCIÓN VINOS & FRIZZANTES (Elementor inline override mínimo)
   ========================================================================== */

#vinosFrizzantes {
    background-color: var(--ag-cream);
    padding-top: 60px;
    padding-bottom: 20px;
}

#grillaProductos {
    background-color: var(--ag-cream);
    padding-bottom: 60px;
}

#vinosFrizzantes .elementor-widget-heading {
    text-align: center;
    margin-bottom: 20px;
}

#vinosFrizzantes .elementor-widget-container h2.elementor-heading-title {
    color: #1a1a1a;
    font-family: 'ITC Avant Garde Gothic Std', sans-serif;
    font-size: 2.2rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

#vinosFrizzantes .elementor-widget-text-editor {
    text-align: center;
    margin-bottom: 40px;
}

#vinosFrizzantes .elementor-widget-text-editor p {
    color: #333333;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

#vinosFrizzantes .elementor-widget-button {
    text-align: center;
}

/* Botón "Ir a la Tienda" */
#vinosFrizzantes a.elementor-button {
    background-color: transparent;
    color: #1a1a1a;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 15px 40px;
    display: inline-block;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#vinosFrizzantes a.elementor-button:hover {
    background-color: #1a1a1a;
    color: #ffffff;
}

/* ==========================================================================
   5. SECCIÓN QUIÉNES SOMOS — Carousel "Quiénes Somos"
   ========================================================================== */

#nosotros {
    background-color: #000000;
    background-image: none;
    padding: 60px 0;
    border-top: 1px solid rgba(205, 164, 123, 0.2);
}

#nosotros .elementor-container {
    max-width: 100%;
    width: 100%;
    padding: 0 20px;
}

#nosotros .elementor-heading-title {
    text-align: center;
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 30px;
}

#nosotros .ag-qs-carousel {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

#nosotros .ag-qs-carousel .swiper {
    overflow: hidden;
}

#nosotros .ag-qs-slide-layout {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: center;
    padding: 20px 0;
}

#nosotros .ag-qs-slide-img {
    flex: 1;
    max-width: 500px;
}

#nosotros .ag-qs-slide-img img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

#nosotros .ag-qs-slide-text {
    flex: 1;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #f0e8e0;
}

#nosotros .ag-qs-slide-text p {
    color: #f0e8e0;
    margin: 0;
}

/* ==========================================================================
   6. TIMELINE VINO CULTURA — Vista horizontal (landing)
   ========================================================================== */

.ag-timeline-section {
    padding: 80px 20px;
    background-color: var(--ag-cream);
    overflow: hidden;
}

.ag-timeline-header {
    text-align: center;
    margin-bottom: 60px;
}

.ag-timeline-title {
    font-family: 'ITC Avant Garde Gothic Std', sans-serif;
    font-size: 2.2rem;
    color: #111111 !important;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.ag-timeline-subtitle {
    font-family: 'Montserrat', sans-serif;
    color: var(--ag-muted);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

.ag-timeline-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 0;
}

/* Línea horizontal central */
.ag-timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--ag-gold);
    transform: translateY(-50%);
    z-index: 1;
}

.ag-timeline-events {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    gap: 15px;
}

.ag-timeline-item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 180px;
    height: 440px;
}

.ag-timeline-item--top { justify-content: flex-start; }
.ag-timeline-item--bottom { justify-content: flex-end; }

.ag-timeline-dot {
    width: 20px;
    height: 20px;
    background-color: var(--ag-dark);
    border: 3px solid var(--ag-gold);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.ag-timeline-item:hover .ag-timeline-dot {
    transform: translate(-50%, -50%) scale(1.3);
    background-color: var(--ag-gold);
}

.ag-timeline-card {
    background-color: var(--ag-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.06);
    width: 100%;
    max-width: 200px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-align: center;
    position: absolute;
    left: 50%;
}

.ag-timeline-item--top .ag-timeline-card {
    bottom: calc(50% + 35px);
    transform: translateX(-50%);
}

.ag-timeline-item--bottom .ag-timeline-card {
    top: calc(50% + 35px);
    transform: translateX(-50%);
}

.ag-timeline-item--top:hover .ag-timeline-card {
    transform: translateX(-50%) translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.ag-timeline-item--bottom:hover .ag-timeline-card {
    transform: translateX(-50%) translateY(5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.ag-timeline-img {
    width: 100%;
    height: 120px;
    background-size: cover;
    background-position: center;
    background-color: #eaeaea;
}

.ag-timeline-content {
    padding: 15px;
}

.ag-timeline-date {
    display: block;
    font-size: 0.85rem;
    color: #7a5a1e;
    font-weight: 700;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
}

.ag-timeline-event-title {
    font-size: 1rem;
    color: #111111 !important;
    margin: 0;
    font-weight: 600;
    line-height: 1.2;
    font-family: 'ITC Avant Garde Gothic Std', sans-serif;
}

/* Modal del timeline por defecto oculto */
.ag-timeline-modal {
    display: none;
}
.ag-timeline-modal.ag-modal-open {
    display: flex;
}

/* ==========================================================================
   7. SECCIÓN PUNTOS DE VENTA
   ========================================================================== */

#puntosVenta {
    padding: 60px 0 0;
    background-color: #050505;
}

#puntosVenta .ag-pv-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

#puntosVenta h2 {
    text-align: center;
    margin-bottom: 40px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-size: 2.8rem;
    color: var(--ag-white);
    letter-spacing: 1px;
}

#puntosVenta .ag-pv-map {
    width: 100%;
    height: 550px;
    border-top: 3px solid var(--ag-gold);
    background-color: #222;
}

#puntosVenta .ag-pv-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ==========================================================================
   8. CARRITO — Globo flotante y panel lateral
   ========================================================================== */

/* Barra de progreso (visible en el panel del carrito) */
.ag-cart-progress-container {
    padding: 0 0 20px;
}

.ag-progress-wrapper {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px 30px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.ag-progress-text {
    font-family: 'ITC Avant Garde Gothic Std', sans-serif;
    font-size: 1rem;
    color: #111111 !important;
    margin-bottom: 15px;
}

.ag-progress-text i {
    color: var(--ag-gold);
}

.ag-progress-bar {
    width: 100%;
    height: 10px;
    background-color: rgba(205, 164, 123, 0.2);
    border-radius: 5px;
    overflow: hidden;
}

.ag-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ag-gold), var(--ag-gold-lt));
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}

/* ==========================================================================
   10. MEDIA QUERIES
   ========================================================================== */

/* Tablets y pantallas medianas */
@media (max-width: 992px) {

    /* Timeline horizontal → scroll lateral en tablets */
    .ag-timeline-wrapper {
        overflow-x: auto;
        padding-bottom: 20px;
        -webkit-overflow-scrolling: touch;
    }

    .ag-timeline-events {
        width: max-content;
        min-width: 100%;
        padding: 0 20px;
    }

    .ag-timeline-item {
        min-width: 220px;
    }

    .ag-timeline-line {
        width: 10000px;
    }
}

/* Mobile */
@media (max-width: 768px) {

    /* Quiénes Somos: apilado vertical en mobile */
    #nosotros .ag-qs-slide-layout {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    /* Timeline: tarjetas con margen en mobile */
    .ag-timeline-item--top .ag-timeline-card,
    .ag-timeline-item--bottom .ag-timeline-card {
        margin: 40px 0;
    }

    /* Puntos de venta: mapa más chico en mobile */
    #puntosVenta .ag-pv-map {
        height: 350px;
    }
}


/* Grilla Dinamica Vinos */
.vinos-grid-dinamica {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px; /* Despegar de los bordes exteriores */
}
@media (max-width: 992px) {
    .vinos-grid-dinamica {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 20px;
    }
}
@media (max-width: 576px) {
    .vinos-grid-dinamica {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
}
.wine-card-dinamica {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: #000;
    border-radius: 8px;
}
.wine-card-dinamica img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.4s ease, filter 0.4s ease, transform 0.4s ease;
}
.wine-card-dinamica .wine-desc-dinamica {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    text-align: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    color: #fff;
    pointer-events: none;
}
.wine-card-dinamica:hover img {
    opacity: 0.2;
    filter: blur(6px);
    transform: scale(1.05);
}
.wine-card-dinamica:hover .wine-desc-dinamica {
    opacity: 1;
}
.wine-desc-dinamica h4 {
    color: #cda47b;
    margin-bottom: 10px;
    font-size: 1.2rem;
    text-transform: uppercase;
    font-family: 'ITC Avant Garde Gothic Std', sans-serif;
    letter-spacing: 2px;
}
.wine-desc-dinamica p {
    font-size: 0.95rem;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.5;
}

/* Optimización de Accesibilidad para Swiper Bullets (Touch Targets) */
.ag-hero-carousel .swiper-pagination-bullet {
    position: relative;
}
.ag-hero-carousel .swiper-pagination-bullet::before {
    content: '';
    position: absolute;
    top: -15px;
    bottom: -15px;
    left: -15px;
    right: -15px;
    cursor: pointer;
}

/* Estilos de botón dorado para la portada (.ag-btn-reservar) */
.ag-btn-reservar,
a.ag-btn-reservar,
button.ag-btn-reservar {
    display: inline-block !important;
    background: linear-gradient(135deg, #cda47b 0%, #b8905f 100%) !important;
    color: #0a0000 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    padding: 15px 40px !important;
    text-align: center !important;
    transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease !important;
    box-shadow: 0 4px 15px rgba(205, 164, 123, 0.25) !important;
}

.ag-btn-reservar::after,
a.ag-btn-reservar::after,
button.ag-btn-reservar::after {
    content: none !important;
    display: none !important;
}

.ag-btn-reservar:hover:not(:disabled):not(.ag-btn-reservar--agotado),
a.ag-btn-reservar:hover:not(:disabled):not(.ag-btn-reservar--agotado),
button.ag-btn-reservar:hover:not(:disabled):not(.ag-btn-reservar--agotado) {
    background: linear-gradient(135deg, #e8c9a0 0%, #cda47b 100%) !important;
    color: #0a0000 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(205, 164, 123, 0.5) !important;
    text-decoration: none !important;
}


