/* ============================================
   RESPONSIVE - GLOBAL STYLES
   ============================================ */

/* Tablets y pantallas medianas */
@media (max-width: 1024px) {
    html {
        font-size: 14px;
    }

    .hero h1 {
        font-size: 3.5rem !important;
    }

    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
        gap: 20px !important;
    }

    .services-modern-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Tablets pequeñas y móviles grandes */
@media (max-width: 768px) {
    html {
        font-size: 13px;
    }

    /* Navbar */
    nav {
        width: 95% !important;
        padding: 0 15px !important;
    }

    nav .logo {
        font-size: 1.4rem !important;
    }

    /* Hero */
    .hero h1 {
        font-size: 2.5rem !important;
        letter-spacing: 0 !important;
    }

    .hero p {
        font-size: 1rem !important;
    }

    /* Features */
    .features {
        grid-template-columns: 1fr !important;
        padding: 50px 5% !important;
        gap: 20px !important;
    }

    .feature-card {
        padding: 25px !important;
    }

    /* Menu Grid */
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
        gap: 15px !important;
        padding: 20px 3% !important;
    }

    .menu-item-content {
        padding: 15px !important;
    }

    .menu-item-content h3 {
        font-size: 1rem !important;
    }

    /* Services */
    .services-modern-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .service-card-image {
        height: 180px !important;
    }

    .service-card-content {
        padding: 20px !important;
    }

    .service-card-content h3 {
        font-size: 1.3rem !important;
    }

    /* Catalog Header */
    .menu-header {
        padding: 80px 5% 30px !important;
    }

    .menu-header h1 {
        font-size: 2.5rem !important;
    }

    .menu-header p {
        font-size: 1rem !important;
    }

    /* Category Filters */
    .category-filters {
        gap: 10px !important;
        margin-bottom: 20px !important;
    }

    .filter-btn {
        padding: 8px 16px !important;
        font-size: 0.85rem !important;
    }

    /* Cart Modal */
    .cart-modal {
        width: 95% !important;
        padding: 20px !important;
    }

    /* Footer */
    footer {
        padding: 40px 15px !important;
        margin-top: 50px !important;
    }
}

/* Móviles */
@media (max-width: 480px) {
    html {
        font-size: 12px;
    }

    /* Navbar */
    nav {
        height: 60px !important;
    }

    nav .logo {
        font-size: 1.2rem !important;
    }

    /* Hero */
    .hero h1 {
        font-size: 2rem !important;
    }

    .hero p {
        font-size: 0.9rem !important;
        margin-bottom: 25px !important;
    }

    .btn {
        padding: 12px 25px !important;
        font-size: 0.85rem !important;
    }

    /* Menu Grid */
    .menu-grid {
        grid-template-columns: 1fr !important;
        padding: 15px 4% !important;
    }

    .menu-item img {
        height: 180px !important;
    }

    /* Services */
    .service-card-image {
        height: 150px !important;
    }

    .service-card-price {
        font-size: 1rem !important;
        padding: 6px 12px !important;
    }

    /* Catalog Header */
    .menu-header h1 {
        font-size: 2rem !important;
    }

    /* Floating Social */
    .floating-social {
        right: 10px !important;
        bottom: 10px !important;
        gap: 10px !important;
    }

    .social-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
    }

    /* Modal arrows */
    .modal-arrow {
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
    }

    .modal-arrow.prev { left: 10px !important; }
    .modal-arrow.next { right: 10px !important; }
}

/* Utilidades responsive */
.hide-mobile {
    display: block;
}

.hide-desktop {
    display: none;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }

    .hide-desktop {
        display: block !important;
    }
}

/* Mejoras de accesibilidad en móviles */
@media (max-width: 768px) {
    button, a {
        min-height: 44px;
        min-width: 44px;
    }

    .filter-btn, .add-to-cart-btn {
        min-height: 36px;
    }
}

/* Corrección para el navbar en móviles */
@media (max-width: 900px) {
    nav .nav-links {
        padding-top: 80px;
    }

    nav .nav-links a {
        font-size: 1.3rem !important;
    }
}

/* Asegurar que las imágenes no desborden */
img {
    max-width: 100%;
    height: auto;
}

/* Mejoras para el scroll horizontal en tablas */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Fix para el modal de producto en móviles */
@media (max-width: 768px) {
    .product-modal-content {
        max-width: 95% !important;
    }

    .product-modal-info {
        padding: 15px !important;
    }

    .product-modal-info h2 {
        font-size: 1.5rem !important;
    }

    .product-modal-info p {
        font-size: 0.9rem !important;
    }
}
