/* =====================================================
   MENU.CSS - Ligero y rápido para móviles
   Luna Leones Marisquería
   ===================================================== */

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =====================================================
   HERO 
=====================================================
.menu-hero {
    position: relative;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(77, 44, 6, 0.315);
    background-image: url('/images/menu-hero-bg.jpg');
    background-size: cover;
    background-position: center;
}

.menu-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(77, 44, 6, 0.315);
}
    
*/

.menu-content {
    position: relative;
    z-index: 2;
    color: var(--blanco);
    padding: 20px;
}

.menu-logo {
    width: 70px;
    margin: 0 auto 15px;
}

.menu-content h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    margin-bottom: 8px;
}

.menu-content p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* =====================================================
   SECCIONES
===================================================== */
.section {
    padding: 40px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
}

.section-title span {
    color: var(--dorado);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
    font-weight: 600;
}

.section-title h2 {
    color: var(--verde);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    margin-top: 5px;
}

/* =====================================================
   PRODUCTOS GRID
===================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--blanco);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:active {
    background: #fafafa;
}

.product-image {
    height: 180px;
    overflow: hidden;
    background: var(--gris-claro);
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Badges */
.badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 6px;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-best {
    background: #fff3d6;
    color: #b87c00;
}

.badge-new {
    background: #e6f8eb;
    color: #0e6b32;
}

.product-info {
    padding: 15px;
}

.product-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    color: var(--verde);
    margin-bottom: 6px;
}

.product-description {
    color: var(--gris);
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    margin-top: auto;
}

.price-group {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dorado);
}

.old-price {
    text-decoration: line-through;
    color: #aaa;
    font-size: 0.85rem;
}

/* =====================================================
   CATEGORÍAS
===================================================== */
.category-group {
    margin-bottom: 40px;
}

.category-group h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    color: var(--verde);
    border-left: 4px solid var(--dorado);
    padding-left: 15px;
    margin-bottom: 20px;
}

/* =====================================================
   MODAL
===================================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 15px;
    z-index: 9999;
}

.modal.show {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--blanco);
    border-radius: 16px;
    position: relative;
}

.close-modal {
    position: sticky;
    top: 10px;
    right: 0;
    float: right;
    width: 36px;
    height: 36px;
    margin: 10px;
    border: none;
    border-radius: 50%;
    background: var(--blanco);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--verde);
    z-index: 10;
}

.modal-carousel {
    padding: 15px 15px 0;
}

.modal-main-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
}

.carousel-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.carousel-thumbs img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
}

.carousel-thumbs img.active {
    border-color: var(--dorado);
}

.modal-info {
    padding: 0 20px 20px;
}

.modal-info h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    color: var(--verde);
    margin: 10px 0 8px;
}

.modal-info .product-description {
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.modal-price {
    font-size: 1.8rem;
    color: var(--dorado);
    font-weight: 700;
}

.tiempo-preparacion {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--gris-claro);
    padding: 6px 12px;
    border-radius: 30px;
    margin-top: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

.instrucciones {
    margin-top: 15px;
    padding: 12px;
    border-left: 3px solid var(--dorado);
    background: #faf7f0;
    border-radius: 8px;
}

.instrucciones h4 {
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--verde);
}

.instrucciones p {
    font-size: 0.8rem;
    color: var(--gris);
}

.btn-pedir-modal {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: var(--dorado);
    color: var(--blanco);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

/* =====================================================
   ESTADOS (carga y vacío)
===================================================== */
.loading, .empty {
    text-align: center;
    padding: 60px 20px;
}

.loading i, .empty i {
    font-size: 2.5rem;
    color: var(--dorado);
    margin-bottom: 15px;
    display: inline-block;
}

.loading p, .empty p {
    color: var(--gris);
    font-size: 0.9rem;
}

.empty h3 {
    color: var(--verde);
    margin-bottom: 8px;
    font-size: 1.2rem;
}

/* =====================================================
   RESPONSIVE - OPTIMIZADO PARA MÓVIL
===================================================== */

/* Tablets y móviles grandes */
@media (max-width: 768px) {
    .section {
        padding: 25px 0;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    /* Grid a 2 columnas */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    /* Tarjetas más compactas */
    .product-card {
        border-radius: 10px;
    }
    
    .product-image {
        height: 120px;
    }
    
    .product-info {
        padding: 10px 12px 12px;
    }
    
    .product-name {
        font-size: 1rem;
        margin-bottom: 3px;
    }
    
    .product-description {
        font-size: 0.7rem;
        margin-bottom: 6px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
    
    .old-price {
        font-size: 0.7rem;
    }
    
    .badge {
        font-size: 0.6rem;
        padding: 2px 8px;
    }
    
    .category-group h3 {
        font-size: 1.3rem;
        padding-left: 10px;
        margin-bottom: 12px;
    }
    
    /* Modal responsive */
    .modal-main-img {
        height: 200px;
    }
    
    .modal-info h2 {
        font-size: 1.5rem;
    }
}

/* Móviles pequeños (menos de 400px) */
@media (max-width: 400px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .product-image {
        height: 100px;
    }
    
    .product-info {
        padding: 8px 8px 10px;
    }
    
    .product-name {
        font-size: 0.9rem;
        margin-bottom: 2px;
    }
    
    .product-description {
        display: none; /* Ocultamos descripción para ahorrar espacio */
    }
    
    .product-price {
        font-size: 1rem;
    }
    
    .old-price {
        font-size: 0.65rem;
    }
    
    .badge {
        font-size: 0.5rem;
        padding: 1px 6px;
    }
    
    .category-group h3 {
        font-size: 1.1rem;
        padding-left: 8px;
        margin-bottom: 10px;
    }
}

/* Móviles muy pequeños (menos de 350px) */
@media (max-width: 350px) {
    .products-grid {
        gap: 6px;
    }
    
    .product-image {
        height: 85px;
    }
    
    .product-name {
        font-size: 0.8rem;
    }
    
    .product-price {
        font-size: 0.9rem;
    }
}

/* =====================================================
   HERO RESPONSIVE
===================================================== */
@media (max-width: 480px) {
    .menu-hero {
        min-height: 220px;
    }
    
    .menu-logo {
        width: 55px;
    }
    
    .menu-content h1 {
        font-size: 1.6rem;
    }
}