/* Mobile Menu Styles - Optimizado para velocidad */

/* Ocultar el menú original en dispositivos móviles */
@media (max-width: 767.98px) {
    .mainmenu-area .navbar-nav {
        display: none !important;
    }
    
    /* Ocultar toda la navbar en la página home para móviles */
    .mainmenu-area .navbar {
        display: none !important;
    }
    
    /* Ocultar completamente la columna del navbar en móviles */
    .mainmenu-area .col-12.col-md-7 {
        display: none !important;
    }
    
    /* Ocultar también el botón hamburguesa */
    .mainmenu-area .navbar-toggler {
        display: none !important;
    }
    
    /* Ajustar el layout cuando no hay navbar - SIN ESPACIOS */
    .mainmenu-area .row {
        justify-content: center;
        align-items: center;
        margin: 0 !important;
    }
    
    /* Minimizar el área completa del mainmenu en móviles */
    .mainmenu-area {
        padding: 8px 0 !important;
        margin-bottom: 0 !important;
    }
    
    /* Mejorar el espacio del logo cuando no hay navbar - SIN MARGEN */
    .mainmenu-area .col-12.col-md-2 {
        margin-bottom: 0 !important;
        padding: 0 !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    /* Logo centrado y compacto */
    .mainmenu-area .logo {
        text-align: center;
        margin: 0 auto;
        padding: 5px 0;
    }
    
    /* Centrar las redes sociales cuando no hay navbar */
    .mainmenu-area .col-12.col-md-3 {
        margin-top: 10px;
    }
    
    /* Mostrar la sección social del mainmenu en móviles */
    .mainmenu-area .social-media-section {
        display: flex !important;
    }
    
    /* ========== SLIDER OPTIMIZADO PARA MÓVILES ========== */
    
    /* Slider principal - ancho completo en móviles */
    .slider-area {
        width: 100% !important;
        margin: 0 !important;
        padding: 8px !important;
        background: #f8f9fa;
    }
    
    /* Contenedor del slider con borde agradable */
    .block-slider {
        margin: 0;
        padding: 0;
        overflow: hidden;
        border-radius: 8px;
        border: 1px solid #e9ecef;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        background: white;
        position: relative;
    }
    
    /* Agregar efecto de hover al slider */
    .block-slider:hover {
        box-shadow: 0 3px 12px rgba(0,0,0,0.12);
        transition: all 0.3s ease;
    }
    
    /* Imágenes del slider optimizadas para móviles */
    .block-slider img {
        width: 100% !important;
        height: 220px !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block;
        border-radius: 7px;
    }
    
    /* Lista del slider */
    .block-slider ul {
        margin: 0;
        padding: 0;
    }
    
    .block-slider ul li {
        margin: 0;
        padding: 0;
        position: relative;
        overflow: hidden;
    }
    
    /* Captions optimizados para móviles - OCULTOS */
    .block-slider .caption-group {
        display: none !important;
    }
    
    /* Navegación del slider para móviles */
    .block-slider .bx-prev,
    .block-slider .bx-next {
        width: 32px !important;
        height: 32px !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border-radius: 50%;
        color: #333 !important;
        font-size: 16px !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.8);
        transition: all 0.3s ease;
    }
    
    .block-slider .bx-prev:hover,
    .block-slider .bx-next:hover {
        background: white !important;
        transform: scale(1.1);
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    }
    
    .block-slider .bx-prev {
        left: 8px !important;
    }
    
    .block-slider .bx-next {
        right: 8px !important;
    }
    
    /* Indicadores del slider */
    .block-slider .bx-pager {
        bottom: 8px !important;
        text-align: center;
        z-index: 10;
    }
    
    .block-slider .bx-pager-item {
        display: inline-block;
        margin: 0 2px;
    }
    
    .block-slider .bx-pager-item a {
        width: 8px !important;
        height: 8px !important;
        background: rgba(255, 255, 255, 0.6) !important;
        border-radius: 50%;
        display: block;
        text-indent: -9999px;
        border: 1px solid rgba(255, 255, 255, 0.8);
        transition: all 0.3s ease;
    }
    
    .block-slider .bx-pager-item a.active {
        background: white !important;
        border-color: white;
        transform: scale(1.2);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    }
    
    .block-slider .bx-pager-item a:hover {
        background: rgba(255, 255, 255, 0.9) !important;
    }
    
    .mobile-menu-overlay {
        background: #ffffff;
        padding: 15px;
        margin-bottom: 0;
        border-bottom: 2px solid #e8f4fd;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .mobile-menu-container {
        max-width: 100%;
        margin: 0 auto;
        padding: 0;
    }
    
    .mobile-menu-header {
        text-align: center;
        margin-bottom: 20px;
        padding: 20px 15px 15px 15px;
        border: 2px solid #e8f4fd;
        border-radius: 12px;
        background: linear-gradient(135deg, #f8fffe 0%, #e8f4fd 100%);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        position: relative;
        overflow: hidden;
    }
    
    .mobile-menu-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, transparent, #3498db, transparent);
        animation: shimmer 3s infinite;
    }
    
    @keyframes shimmer {
        0% { left: -100%; }
        100% { left: 100%; }
    }
    
    .mobile-text-content {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .mobile-content-border {
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        padding: 15px;
        margin: 0 auto;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .mobile-title {
        font-size: 22px;
        font-weight: bold;
        color: #2c3e50;
        margin: 0 0 8px 0;
        text-transform: uppercase;
        letter-spacing: 1px;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-subtitle {
        font-size: 15px;
        font-weight: 600;
        color: #3498db;
        margin: 0 0 12px 0;
        line-height: 1.3;
        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
    }
    
    .mobile-description {
        font-size: 12px;
        color: #7f8c8d;
        margin: 0 0 10px 0;
        line-height: 1.4;
        text-align: justify;
    }
    
    .mobile-slogan {
        font-size: 14px;
        font-weight: 600;
        color: #e74c3c;
        margin: 0;
        font-style: italic;
        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
        padding: 8px 12px;
        background: rgba(231, 76, 60, 0.1);
        border-radius: 6px;
        border-left: 3px solid #e74c3c;
    }
    
    .mobile-logo img {
        max-height: 45px !important;
        transition: transform 0.2s ease;
    }
    
    .mobile-logo img:hover {
        transform: scale(1.02);
    }
    
    .mobile-menu-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        gap: 10px;
        max-width: 300px;
        margin: 0 auto;
        padding: 0 10px;
    }
    
    .mobile-menu-btn {
        width: 100%;
        padding: 12px 8px;
        color: #2c3e50 !important;
        text-decoration: none;
        font-weight: 500;
        font-size: 13px;
        border-radius: 8px;
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        transition: all 0.3s ease;
        text-align: center;
        white-space: nowrap;
        cursor: pointer;
        min-height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }
    
    /* Estilos para los iconos dentro de los botones */
    .mobile-menu-btn i {
        font-size: 14px;
        margin-right: 4px;
        transition: all 0.3s ease;
    }
    
    /* Colores específicos para cada icono */
    .mobile-menu-btn i.fa-shopping-bag {
        color: #e67e22;
    }
    
    .mobile-menu-btn i.fa-tags {
        color: #e74c3c;
    }
    
    .mobile-menu-btn i.fa-images {
        color: #9b59b6;
    }
    
    .mobile-menu-btn i.fa-envelope {
        color: #3498db;
    }
    
    .mobile-menu-btn i.fa-home {
        color: #2ecc71;
    }
    
    /* Botón Contacto que ocupa toda la fila */
    .mobile-menu-btn:nth-child(5) {
        grid-column: 1 / -1;
        max-width: 140px;
        margin: 0 auto;
    }
    
    .mobile-menu-btn:hover {
        background: #3498db;
        color: white !important;
        border-color: #3498db;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    }
    
    /* Los iconos se vuelven blancos en hover */
    .mobile-menu-btn:hover i {
        color: white !important;
        transform: scale(1.1);
    }
    
    .mobile-menu-btn.active {
        background: #2ecc71;
        color: white !important;
        border-color: #2ecc71;
        box-shadow: 0 3px 10px rgba(46, 204, 113, 0.4);
    }
    
    /* Los iconos se vuelven blancos cuando están activos */
    .mobile-menu-btn.active i {
        color: white !important;
        transform: scale(1.1);
    }
    
    .mobile-menu-btn.active:hover {
        background: #27ae60;
        border-color: #27ae60;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
    }
    
    .mobile-menu-btn:active {
        transform: translateY(0);
    }
    
    /* Responsive adjustments para pantallas pequeñas */
    @media (max-width: 480px) {
        .mobile-menu-buttons {
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            max-width: 280px;
        }
        
        .mobile-menu-btn {
            font-size: 12px;
            padding: 10px 6px;
            min-height: 40px;
        }
        
        .mobile-menu-btn:nth-child(5) {
            max-width: 120px;
        }
        
        .mobile-menu-overlay {
            padding: 10px;
        }
        
        .mobile-menu-header {
            margin-bottom: 12px;
        }
        
        .mobile-title {
            font-size: 18px;
        }
        
        .mobile-subtitle {
            font-size: 13px;
        }
        
        .mobile-description {
            font-size: 11px;
        }
        
        .mobile-slogan {
            font-size: 12px;
        }
    }
    
    @media (max-width: 360px) {
        .mobile-menu-buttons {
            max-width: 250px;
            gap: 6px;
        }
        
        .mobile-menu-btn {
            font-size: 11px;
            padding: 8px 4px;
            min-height: 38px;
        }
        
        .mobile-menu-btn:nth-child(5) {
            max-width: 100px;
        }
        
        .mobile-title {
            font-size: 16px;
            margin-bottom: 6px;
        }
        
        .mobile-subtitle {
            font-size: 12px;
            margin-bottom: 8px;
        }
        
        .mobile-description {
            font-size: 10px;
            margin-bottom: 8px;
        }
        
        .mobile-slogan {
            font-size: 11px;
        }
    }
}

/* Ocultar el menú móvil en desktop */
@media (min-width: 768px) {
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* Optimizaciones adicionales para performance */
.mobile-menu-btn {
    will-change: transform;
}

.mobile-logo img {
    will-change: transform;
}

/* ========== MEJORAS PARA TABLETS ========== */
@media (min-width: 768px) and (max-width: 991.98px) {
    .slider-area {
        width: 95% !important;
        margin: 0 auto !important;
        padding: 12px !important;
    }
    
    .block-slider {
        border-radius: 10px;
        border: 1px solid #e9ecef;
        box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    }
    
    .block-slider img {
        height: 220px !important;
        border-radius: 9px;
    }
    
    /* Ocultar captions también en tablets */
    .block-slider .caption-group {
        display: none !important;
    }
    
    .block-slider .bx-prev,
    .block-slider .bx-next {
        width: 36px !important;
        height: 36px !important;
        font-size: 18px !important;
    }
}

/* ========== MEJORAS PARA PANTALLAS MUY PEQUEÑAS ========== */
@media (max-width: 480px) {
    .slider-area {
        padding: 5px !important;
    }
    
    .block-slider {
        border-radius: 6px;
        border-width: 1px;
    }
    
    .block-slider img {
        height: 150px !important;
        border-radius: 5px;
    }
    
    /* Asegurar que los captions estén ocultos */
    .block-slider .caption-group {
        display: none !important;
    }
    
    .block-slider .bx-prev,
    .block-slider .bx-next {
        width: 28px !important;
        height: 28px !important;
        font-size: 14px !important;
    }
    
    .block-slider .bx-prev {
        left: 6px !important;
    }
    
    .block-slider .bx-next {
        right: 6px !important;
    }
    
    .block-slider .bx-pager {
        bottom: 6px !important;
    }
    
    .block-slider .bx-pager-item a {
        width: 6px !important;
        height: 6px !important;
    }
}

/* ========== DESKTOP - MANTENER DISEÑO ORIGINAL ========== */
@media (min-width: 992px) {
    .slider-area {
        width: 80% !important;
        margin: 0 auto !important;
        padding: 5px !important;
    }
    
    /* Restablecer estilos originales para desktop */
    .block-slider {
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }
    
    .block-slider img {
        width: auto !important;
        height: auto !important;
        object-fit: initial !important;
        border-radius: 0;
    }
    
    /* Mostrar captions en desktop */
    .block-slider .caption-group {
        display: block !important;
        position: absolute;
        bottom: auto;
        left: auto;
        right: auto;
        background: transparent;
        padding: 0;
        border-radius: 0;
        color: inherit;
        backdrop-filter: none;
        border: none;
    }
}

/* ========== LAZY LOADING PARA IMÁGENES DEL SLIDER ========== */
.block-slider img[loading="lazy"] {
    background: #f8f9fa;
    min-height: 180px;
}

.block-slider img:not([src]),
.block-slider img[src=""] {
    background: #f8f9fa url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ccc"><path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/></svg>') center/60px no-repeat;
}
