/* ============================================
   RESET Y CONFIGURACIÓN BÁSICA
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #fff;
    color: #333;
}

/* ============================================
   HEADER
   ============================================ */
header {
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 20px;
}

.logo-text {
    font-family: 'Arial Black', sans-serif;
    font-size: 1.4rem;
    line-height: 0.9;
    text-align: center;
    color: #000;
    letter-spacing: -1px;
}

.header-logo {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ce1126;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
}

.header-left,
.header-icons {
    flex: 1; /* Ocupan espacio igual para centrar el logo */
    display: flex;
}

.header-left {
    justify-content: flex-start; /* Instagram a la izquierda */
}

.header-icons {
    justify-content: flex-end; /* Carrito a la derecha */
    position: relative; /* Para el contador */
}

/* Estilos específicos para el enlace e icono de Instagram */
.icon-link-mex {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #333; /* Color inicial neutro */
    text-decoration: none;
    transition: transform 0.2s, color 0.2s;
    padding: 5px; /* Área de toque más grande en móvil */
}

.instagram-icon {
    width: 26px; /* Tamaño equilibrado con el carrito */
    height: 26px;
}

/* Efecto Hover estilo La Mexicana (Verde/Rojo) */
.icon-link-mex:hover {
    transform: scale(1.1); /* Liguero zoom */
    color: #ce1126; /* Cambia a verde mexicano al pasar el mouse */
}

/* ==============================================
BARRA DE CATEGORÍAS
================================================0 */
.category-nav {
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 70px; /* Ajusta según la altura de tu header fijo */
    z-index: 900;
    padding: 10px 0;
}

.category-scroll {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0 15px;
    gap: 10px;
    scrollbar-width: none; /* Oculta scroll en Firefox */
}

.category-scroll::-webkit-scrollbar { display: none; } /* Oculta scroll en Chrome/Safari */

.category-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.category-btn.active {
    background: #ce1126;
    color: white;
    border-color: #ce1126;
}

/* ============================================
   CARRITO SIDEBAR
   ============================================ */
.cart-sidebar {
    position: fixed;
    right: -350px;
    top: 0;
    width: 320px;
    height: 100%;
    background: white;
    z-index: 3000;
    transition: 0.4s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}


/* Contenedor del título "TU CARRITO" */
.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
    font-size: 16px;
    letter-spacing: 1px;
}

/* Cuerpo del carrito y mensaje de vacío */
.cart-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty-msg {
    text-align: center;
    color: #757575; /* Mejorado para accesibilidad */
    margin-top: 50px;
}

/* Contenedor del botón inferior */
.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

/* Ajuste para el botón de WhatsApp */
.btn-whatsapp-checkout {
    width: 100%;
    margin: 0;
}


.cart-sidebar.active { 
    right: 0; 
}

.overlay-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 2500;
}

.overlay-bg.active { 
    display: block; 
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0 15px;
    color: #888;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #e91e63; /* Color rosa de tu logo */
}

/*CARRITO INSIDE*/
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    font-family: sans-serif;
}

.cart-item-name {
    font-size: 14px;
    font-weight: bold;
    margin: 0;
    text-transform: uppercase;
}

.cart-item-price {
    font-size: 13px;
    color: #666;
    margin: 5px 0 0 0;
}

.btn-remove {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    font-size: 18px;
}

/* Estilo del botón de añadir en la tienda */
.btn-add-cart {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 10px;
    width: 100%;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
    margin-top: 10px;
}

.btn-add-cart:hover {
    background-color: #e91e63; 
}

/* ============================================
   CUERPO DE LA PÁGINA 
   ============================================ */
.menu-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
}

.menu-title {
    text-align: center;
    font-family: 'Arial Black', sans-serif;
    letter-spacing: 2px;
    margin-bottom: 30px;
    color: #1a1a1a;
}

/* La cuadrícula de 2 columnas */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

/* La Tarjeta Horizontal  */
.product-card {
    display: flex;
    background: #fff;
    border: 1px solid #d1d5db; /* Borde gris definido */
    border-radius: 8px;
    overflow: hidden;
    height: 160px; /* Altura fija para alineación perfecta */
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-image {
    width: 30%;
    height: 100%;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    width: 60%;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-text h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: #111;
    text-transform: uppercase;
}

.product-text p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.2;
    margin-bottom: 8px;
}

.price {
    display: block;
    font-size: 1.1rem;
    font-weight: bold;
    color: #000;
}

/* Botón + Agregar */
.btn-add-mex {
    align-self: flex-start;
    background-color: #ce1126; /* Rojo Mexicano */
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
}

.btn-add-mex:hover {
    background-color: #a00d1e;
}

.plus-icon {
    font-size: 1.2rem;
    line-height: 1;
}

/* ============================================
   MODAL DE PERSONALIZACIÓN (MODIFICADO)
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 4000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* ✕ de cierre estilo carrito, en la esquina superior izquierda */
.close-modal-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    z-index: 4100;
    padding: 10px;
    transition: color 0.3s;
}

.close-modal-btn:hover {
    color: #ce1126;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header-food {
    padding: 25px 20px;
    border-bottom: 1px solid #eee;
    background-color: #fafafa;
}

.modal-header-food h2 {
    margin: 0 0 5px 0;
    font-size: 1.5rem;
    color: #006847;
    font-family: 'Arial Black', sans-serif;
}

.food-price-big {
    margin: 0;
    font-size: 1.3rem;
    font-weight: bold;
    color: #ce1126;
}

.modal-body-food {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

/* Separación mejorada de textos y secciones */
.options-section {
    margin-bottom: 25px;
}

.options-section h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #333;
    border-left: 4px solid #f1b31c;
    padding-left: 10px;
}

.options-grid {
    display: grid;
    gap: 12px;
}

.option-check, .option-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding: 12px 10px; /* Más espacio interno */
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 5px; /* Separación entre cada opción */
    transition: background 0.2s;
}

.option-check:hover, .option-radio:hover {
    background: #f1f1f1;
}

.option-check input, .option-radio input {
    position: absolute;
    opacity: 0;
}

.custom-check, .custom-radio {
    height: 20px; width: 20px;
    border: 2px solid #ccc;
    background-color: #fff;
    margin-right: 10px;
    display: inline-block;
}

.custom-radio { border-radius: 50%; }
.custom-check { border-radius: 4px; }

.option-check input:checked ~ .custom-check,
.option-radio input:checked ~ .custom-radio {
    border-color: #006847;
}

.custom-check:after, .custom-radio:after {
    content: "";
    position: absolute;
    display: none;
}

.option-check input:checked ~ .custom-check:after,
.option-radio input:checked ~ .custom-radio:after {
    display: block;
}

.option-radio .custom-radio:after {
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #006847;
}

.option-check .custom-check:after {
    left: 7px; top: 3px;
    width: 5px; height: 10px;
    border: solid #006847;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.option-text {
    font-size: 0.95rem;
    color: #444;
}

#food-notes {
    width: 100%;
    height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: none;
    font-family: inherit;
    margin-top: 10px;
}

.modal-footer-food {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background-color: #fafafa;
}

.btn-confirm-food {
    width: 100%;
    background-color: #ce1126;
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-confirm-food:hover {
    background-color: #a00d1e;
}

/* ============================================
   ELEMENTOS ADICIONALES DEL CARRITO
   ============================================ */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.btn-remove {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    font-size: 18px;
}

.btn-add-cart {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 10px;
    width: 100%;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
    margin-top: 10px;
}

/* ============================================
   RESPONSIVE (MÓVIL)
   ============================================ */
@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: 1fr; /* Mantenemos una columna pero más baja */
        gap: 10px;
        padding: 10px;
    }

    .product-card {
        height: 120px; /* Reducimos altura de 160px a 120px para ver más */
        padding: 5px;
    }

    .product-image {
        width: 35%; /* Imagen un poco más pequeña */
    }

    .product-info {
        width: 65%;
        padding: 8px;
    }

    .product-info h3 {
        font-size: 0.9rem; /* Texto más pequeño para ahorrar espacio */
        margin-bottom: 2px;
    }

    .product-info p {
        font-size: 0.75rem;
        line-height: 1.1;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Limita descripción a 2 líneas */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .price {
        font-size: 0.9rem;
    }

    .btn-add-mex {
        padding: 5px;
        font-size: 0.8rem;
    }
}