/**
 * Mobile Responsive Fixes - Automotora Useche
 * v8 - Vertical Logo Centering & Gap Fixes
 */

/* ========================================
   1. GLOBAL IMMERSIVE CAROUSEL (BASE STYLES)
   ======================================== */

.carousel-container {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.prize-carousel-wrapper {
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative;
}

/* Altura Base (Móvil/Default) */
/* Altura Base (Móvil/Default) - Se sobreescribe con media queries */
.carousel-slides {
    height: 50vh !important;
    /* Fallback */
    padding-bottom: 0 !important;
    background: transparent !important;
}

/* Imagen Base (Contain por defecto para móvil) */
/* Imagen Base (Contain para móvil y asegurar ancho completo) */
.carousel-slide img {
    padding: 0 !important;
    object-fit: contain !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    transition: transform 0.5s ease;
}

/* Ajuste específico para móvil: Permitir que la imagen decida la altura si es necesario, pero manteniendo límites */
@media (max-width: 768px) {
    .carousel-slides {
        height: auto !important;
        aspect-ratio: 4/3 !important;
        /* Proporción más cuadrada para móvil */
        max-height: 60vh !important;
    }
}

/* Carousel buttons removed to allow style.css to control them */

/* Indicators removed to allow style.css to control them */


/* ========================================
   2. DESKTOP SPECIFIC OVERRIDES (MIN-WIDTH: 769px)
   ======================================== */

@media (min-width: 769px) {

    /* Más altura en PC */
    .carousel-slides {
        height: 75vh !important;
    }

    /* FIX: CONTAIN para mostrar todo el auto sin cortes en PC */
    .carousel-slide img {
        object-fit: contain !important;
        object-position: center center !important;
        background: rgba(0, 0, 0, 0.02);
        /* Fondo sutil para espacios vacíos */
    }

    /* Zonas de clic más anchas */
    .carousel-prev,
    .carousel-next {
        width: 100px !important;
    }

    /* Hover effects */
    .carousel-prev:hover i,
    .carousel-next:hover i {
        transform: scale(1.3);
        color: #fff !important;
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.6) !important;
    }

    /* Iconos más grandes */
    .carousel-prev i,
    .carousel-next i {
        font-size: 3rem !important;
    }
}


/* ========================================
   3. MOBILE SPECIFIC FIXES (MAX-WIDTH: 768px)
   ======================================== */

@media (max-width: 768px) {

    /* HEADER & COUNTDOWN GAP FIXES */
    #top-countdown.top-countdown-bar {
        position: relative !important;
        top: auto !important;
        padding: 0.25rem 0 !important;
        min-height: 35px;
        z-index: 1010 !important;
        margin-bottom: 0 !important;
    }

    /* Keep reservation countdown in normal flow to avoid stacking over header */
    #countdown-container.top-countdown-bar {
        position: relative !important;
        top: auto !important;
        z-index: 1010 !important;
        margin-top: 0 !important;
    }

    .countdown-content {
        justify-content: center !important;
        flex-wrap: nowrap !important;
        gap: 0.5rem !important;
    }

    .countdown-label {
        display: inline-block !important;
        font-size: 0.72rem !important;
        font-weight: 700 !important;
        letter-spacing: 0.4px !important;
    }

    .time-block {
        min-width: 25px !important;
        padding: 0.1rem 0.2rem !important;
        margin: 0 1px !important;
        background: rgba(255, 255, 255, 0.15) !important;
    }

    .time-block span {
        font-size: 0.85rem !important;
        line-height: 1 !important;
    }

    .separator {
        font-size: 0.9rem !important;
    }

    .time-block .label {
        display: block !important;
        font-size: 0.52rem !important;
        line-height: 1 !important;
        opacity: 0.92 !important;
        margin-top: 0.1rem !important;
    }

    .header {
        position: relative !important;
        top: auto !important;
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
        margin-top: 0 !important;
        z-index: 1000 !important;
        display: block !important;
    }

    .header-content {
        width: 100% !important;
        justify-content: center !important;
        align-items: center !important;
        /* Centrado Vertical Vital */
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    /* Logotipo Container */
    .logo {
        flex: 0 0 auto;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        /* Centrado Vertical Vital */
        margin: 0 !important;
    }

    .main-nav {
        display: flex !important;
        width: 100% !important;
        justify-content: center !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 0.5rem 0.85rem !important;
        padding: 0.2rem 0.5rem !important;
    }

    .main-nav .nav-link {
        font-size: 0.85rem !important;
        min-height: auto !important;
        min-width: auto !important;
        padding: 0.2rem 0.1rem !important;
    }

    .logo a {
        display: flex !important;
        align-items: center !important;
    }

    .logo img {
        max-height: 85px !important;
        display: block !important;
    }

    /* ALINEACIÓN STATS */
    .hero-stats {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.75rem !important;
        width: 100% !important;
        margin-bottom: 2rem !important;
    }

    .stat-pill {
        width: 90% !important;
        margin: 0 auto !important;
    }
}
