/* ===== ESTILOS RESPONSIVE ESPECÍFICOS PARA MÓVILES ===== */

/* Optimizaciones para dispositivos móviles */
@media (max-width: 767px) {
    /* Mejorar la experiencia de scroll */
    body {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Optimizar imágenes para móviles */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Mejorar botones para touch */
    button, .btn, input[type="button"], input[type="submit"] {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }
    
    /* Optimizar formularios para móviles */
    input, textarea, select {
        font-size: 16px; /* Previene zoom en iOS */
        padding: 12px;
        border-radius: 6px;
    }
    
    /* Mejorar navegación móvil */
    .main-navigation {
        position: relative;
        background: #666666;
        padding: 10px 0;
        margin-bottom: 20px;
    }
    
    .main-navigation > li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .main-navigation > li:last-child {
        border-bottom: none;
    }
    
    .main-navigation > li > a {
        color: #ffffff;
        padding: 15px 20px;
        display: block;
        text-decoration: none;
        transition: background-color 0.3s ease;
    }
    
    .main-navigation > li > a:hover {
        background-color: rgba(0, 194, 203, 0.2);
        color: #c0cd29ff;
    }
    
    /* Optimizar tarjetas de productos para móviles */
    .product-thumb {
        border: 1px solid #e9ecef;
        border-radius: 8px;
        margin-bottom: 20px;
        background: #ffffff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .product-thumb .image {
        border-radius: 8px 8px 0 0;
        overflow: hidden;
    }
    
    .product-thumb .image img {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }
    
    /* Mejorar botones de productos en móviles */
    .product-thumb .button-group {
        display: flex;
        gap: 8px;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 0 0 8px 8px;
    }
    
    .product-thumb .button-group button {
        flex: 1;
        min-height: 44px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 600;
    }
    
    .product-thumb .button-group input {
        flex: 1;
        min-height: 44px;
        border-radius: 6px;
        text-align: center;
        font-size: 14px;
    }
    
    /* Optimizar carrusel para móviles */
    #latest-slidertab {
        margin: 0 -15px;
        padding: 0 15px;
    }
    
    #latest-slidertab .owl-item {
        padding: 0 5px;
    }
    
    #latest-slidertab .owl-buttons {
        display: none; /* Ocultar flechas en móviles para mejor UX */
    }
    
    /* Mejorar filtros para móviles */
    .filter-panel {
        background: #ffffff;
        border-radius: 8px;
        padding: 20px;
        margin-bottom: 20px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .filter-section {
        margin-bottom: 25px;
    }
    
    .filter-title {
        font-size: 16px;
        font-weight: 600;
        color: #666666;
        margin-bottom: 15px;
        padding-bottom: 8px;
        border-bottom: 2px solid #c0cd29ff;
    }
    
    .filter-options {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-item {
        display: flex;
        align-items: center;
        padding: 12px 15px;
        background: #f8f9fa;
        border-radius: 6px;
        border: 1px solid #e9ecef;
        transition: all 0.3s ease;
    }
    
    .filter-item:hover {
        background: #e9ecef;
        border-color: #c0cd29ff;
    }
    
    .filter-item input[type="checkbox"] {
        margin-right: 12px;
        transform: scale(1.2);
    }
    
    .filter-item label {
        font-size: 14px;
        color: #495057;
        margin: 0;
        cursor: pointer;
        flex: 1;
    }
    
    /* Botón de limpiar filtros para móviles */
    .filter-clear-btn {
        width: 100%;
        padding: 15px;
        font-size: 16px;
        font-weight: 600;
        background: #dc3545;
        color: #ffffff;
        border: none;
        border-radius: 8px;
        margin-top: 20px;
    }
    
    .filter-clear-btn:hover {
        background: #c82333;
        transform: translateY(-1px);
    }
    
    /* Optimizar modales para móviles */
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-content {
        border-radius: 12px;
        border: none;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }
    
    .modal-header {
        border-bottom: 1px solid #e9ecef;
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        border-top: 1px solid #e9ecef;
        padding: 20px;
    }
    
    /* Mejorar botones de modal para móviles */
    .modal-footer .btn {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 8px;
    }
}

/* Optimizaciones para tablets */
@media (min-width: 768px) and (max-width: 991px) {
    /* Mejorar navegación en tablets */
    .main-navigation {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .main-navigation > li {
        flex: 0 0 auto;
        min-width: 140px;
    }
    
    .main-navigation > li > a {
        padding: 12px 18px;
        font-size: 15px;
    }
    
    /* Optimizar tarjetas para tablets */
    .product-thumb {
        margin: 0 10px 25px;
    }
    
    .product-thumb .image img {
        height: 180px;
    }
    
    /* Mostrar flechas del carrusel en tablets */
    #latest-slidertab .owl-buttons {
        display: block;
    }
    
    #latest-slidertab .owl-buttons div {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

/* Mejoras para pantallas grandes */
@media (min-width: 1200px) {
    /* Optimizar espaciado en desktop */
    .container {
        padding: 0 30px;
    }
    
    .product-thumb {
        margin: 0 15px 30px;
    }
    
    .product-thumb .image img {
        height: 220px;
    }
    
    /* Mejorar carrusel en desktop */
    #latest-slidertab .owl-buttons div {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    #latest-slidertab .owl-buttons .owl-prev {
        left: -25px;
    }
    
    #latest-slidertab .owl-buttons .owl-next {
        right: -25px;
    }
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mejoras para alto contraste */
@media (prefers-contrast: high) {
    .product-thumb {
        border: 2px solid #000000;
    }
    
    .btn {
        border: 2px solid #000000;
    }
    
    .filter-item {
        border: 2px solid #000000;
    }
}

/* Mejoras para usuarios que prefieren texto más grande */
@media (prefers-reduced-data: no-preference) {
    .product-name {
        font-size: 16px;
        font-weight: 600;
    }
    
    .product-price {
        font-size: 18px;
        font-weight: 700;
        color: #666666;
    }
}
