/* =========================================
   1. RESET & BASE
   ========================================= */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    outline: none; 
    -webkit-tap-highlight-color: transparent; 
}

body {
    font-family: 'Poppins', sans-serif;
    background: url('../imagenes/fondo.webp') no-repeat center center fixed;
    background-size: cover;
    color: #333;
    padding-bottom: 80px;
    min-height: 100vh;
}

body.menu-open { overflow: hidden; }

/* =========================================
   2. HEADER PRINCIPAL
   ========================================= */
.header-main {
    background: #1a1a1a;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 10px;
    height: 90px;
}

.logo-wrapper { flex-shrink: 0; }
.main-logo { height: 60px; width: auto; }

/* Navegación Principal */
.nav-principal { flex: 1; }

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-menu li a {
    color: white;
    text-decoration: none;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.3s;
    white-space: nowrap;
    display: block;
    text-align: center;
    line-height: 1.2;
}

.nav-menu li a:hover {
    background: rgba(255,255,255,0.15);
}

.nav-menu li a.btn-crea {
    background: #e63946;
    color: white;
    font-weight: 800;
}

.nav-menu li a.btn-crea:hover {
    background: #d62839;
    transform: scale(1.05);
}

.nav-menu li a.btn-reservar {
    background: #27ae60;
    color: white;
    font-weight: 800;
    font-size: 13px;
    padding: 10px 14px;
    line-height: 1.1;
}

.nav-menu li a.btn-reservar:hover {
    background: #219a52;
    transform: scale(1.05);
}

/* Sección Derecha Header */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* Botón Dirección */
.btn-direccion {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 10px;
    padding: 8px 15px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.3s;
}

.btn-direccion:hover {
    background: rgba(255,255,255,0.25);
    border-color: white;
}

.direccion-linea1 {
    color: white;
    font-size: 11px;
    font-weight: 600;
}

.direccion-linea2 {
    color: white;
    font-size: 13px;
    font-weight: 700;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Carrito Header */
.carrito-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.carrito-header:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.carrito-precio {
    color: #e63946;
    font-weight: 700;
    font-size: 15px;
}

.carrito-icono { font-size: 20px; }

.carrito-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #27ae60;
    color: white;
    font-size: 11px;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Menú Hamburguesa */
.menu-hamburguesa {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.menu-hamburguesa span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s;
}

/* =========================================
   3. MENÚ MOBILE
   ========================================= */
.menu-mobile {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    background: white;
    z-index: 9999;
    transition: left 0.3s ease;
    box-shadow: 5px 0 30px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}

.menu-mobile.open { left: 0; }

.menu-mobile-header {
    background: #e63946;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-mobile { height: 40px; }

.cerrar-menu {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
}

.menu-mobile-links {
    list-style: none;
    flex: 1;
    overflow-y: auto;
}

.menu-mobile-links li a {
    display: block;
    padding: 18px 25px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 1px solid #eee;
    transition: all 0.3s;
}

.menu-mobile-links li a:hover {
    background: #fff5f5;
    color: #e63946;
    padding-left: 35px;
}

.btn-direccion-mobile {
    margin: 20px;
    padding: 15px;
    background: #e63946;
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.btn-direccion-mobile span:first-child {
    font-size: 12px;
    opacity: 0.9;
}

.btn-direccion-mobile span:last-child {
    font-size: 14px;
    font-weight: 700;
}

/* =========================================
   4. MODALES NUEVOS
   ========================================= */
.modal-full {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 5000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-cerrar {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.modal-cerrar:hover { color: #e63946; }

/* Modal Locales */
.modal-locales-content {
    background: white;
    width: 95%;
    max-width: 1100px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px;
    padding: 40px;
    position: relative;
}

.modal-locales-content h2 {
    text-align: center;
    color: #e63946;
    margin-bottom: 30px;
    font-size: 28px;
}

.locales-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.local-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px solid #eee;
}

.local-info h3 {
    color: #e63946;
    font-size: 22px;
    margin-bottom: 15px;
}

.local-info p {
    color: #555;
    margin: 8px 0;
    font-size: 14px;
}

.local-info p a {
    color: #e63946;
    text-decoration: none;
}

.local-info p a:hover {
    text-decoration: underline;
}

.local-badge {
    display: inline-block;
    background: #27ae60;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.local-badge.sucursal {
    background: #3498db;
}

.local-badge.nuevo {
    background: #ff6b35;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.local-badge.preparacion {
    background: #95a5a6;
}

.local-item.disabled {
    opacity: 0.7;
    position: relative;
}

.local-item.disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 15px;
    pointer-events: none;
}

.btn-seleccionar-local.disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.btn-seleccionar-local.disabled:hover {
    transform: none;
    background: #95a5a6;
}

.local-mini.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.badge-preparacion-mini {
    display: inline-block;
    background: #95a5a6;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-top: 5px;
}

.inauguracion {
    color: #ff6b35;
    font-size: 14px;
    margin-top: 10px;
    padding: 8px;
    background: #fff5f0;
    border-radius: 8px;
}

.badge-nuevo-mini {
    display: inline-block;
    background: #ff6b35;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-top: 5px;
}

/* Búsqueda de cliente por teléfono */
.buscar-cliente-box {
    background: #f0f8ff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 2px solid #3498db;
}

.buscar-cliente-box label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.input-buscar-grupo {
    display: flex;
    gap: 10px;
}

.input-buscar-grupo input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
}

.input-buscar-grupo button {
    padding: 12px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.input-buscar-grupo button:hover {
    background: #2980b9;
}

#resultado-busqueda {
    margin-top: 15px;
}

#resultado-busqueda .buscando {
    color: #666;
}

#resultado-busqueda .error {
    color: #e63946;
}

.cliente-encontrado {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #27ae60;
}

.cliente-encontrado p {
    margin: 5px 0;
}

.cliente-encontrado .gratis {
    color: #27ae60;
    font-weight: 600;
}

.cliente-no-encontrado {
    background: #fff3e0;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #ff9800;
}

.cliente-no-encontrado a {
    color: #e63946;
    font-weight: 600;
}

.separador-o {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.separador-o::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #ddd;
}

.separador-o span {
    background: white;
    padding: 0 15px;
    position: relative;
    color: #999;
    font-size: 14px;
}

.despacho-gratis-banner {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    margin: 15px 0;
    font-size: 16px;
}

.costo-despacho-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin: 15px 0;
    border: 2px dashed #ddd;
}

.costo-despacho-info p {
    margin: 0;
    font-size: 16px;
}

.costo-despacho-info small {
    color: #666;
}

.btn-tipo-entrega {
    flex: 1;
    padding: 15px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.btn-tipo-entrega small {
    font-size: 11px;
    font-weight: 400;
    color: #666;
}

.btn-tipo-entrega.active {
    border-color: #e63946;
    background: #fff5f5;
    color: #e63946;
}

.btn-tipo-entrega.active small {
    color: #e63946;
}

.btn-tipo-entrega.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5 !important;
    border-color: #ddd !important;
    color: #999 !important;
}

.btn-tipo-entrega.disabled small {
    color: #999;
}

.btn-tipo-entrega.disabled:hover {
    transform: none;
    box-shadow: none;
}

.local-horario {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.local-horario strong {
    display: block;
    margin-bottom: 10px;
    color: #333;
}

.local-horario table {
    width: 100%;
    font-size: 13px;
}

.local-horario table td {
    padding: 4px 0;
    color: #555;
}

.local-horario table td:first-child {
    font-weight: 600;
    color: #333;
}

.btn-ver-mapa {
    display: block;
    text-align: center;
    padding: 10px;
    background: #e63946;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    margin-top: 10px;
    border-radius: 8px;
    transition: background 0.3s;
}

.btn-ver-mapa:hover {
    background: #d62839;
}

.btn-seleccionar-local {
    margin-top: 20px;
    background: #e63946;
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-seleccionar-local:hover {
    background: #d62839;
    transform: scale(1.05);
}

.local-mapa {
    border-radius: 12px;
    overflow: hidden;
    min-height: 200px;
}

.local-mapa iframe {
    width: 100%;
    height: 100%;
    min-height: 200px;
    border: none;
}

/* Modal Cuenta */
.modal-cuenta-content {
    background: white;
    width: 95%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px;
    padding: 40px;
    position: relative;
}

.cuenta-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-cuenta {
    flex: 1;
    padding: 12px;
    border: 2px solid #e63946;
    background: white;
    color: #e63946;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-cuenta.active {
    background: #e63946;
    color: white;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group .required {
    color: #e63946;
    font-size: 12px;
    font-weight: 400;
}

.form-group input {
    width: 100%;
    padding: 14px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #e63946;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.form-check input { width: auto; }

.btn-submit {
    width: 100%;
    padding: 15px;
    background: #e63946;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit:hover {
    background: #d62839;
}

.link-olvido {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #e63946;
    text-decoration: none;
    font-size: 14px;
}

.texto-privacidad {
    font-size: 12px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.texto-privacidad a { color: #e63946; }

/* Perfil de usuario */
.perfil-header {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, #e63946 0%, #d62839 100%);
    border-radius: 15px;
    margin-bottom: 25px;
    color: white;
}

.perfil-avatar {
    font-size: 50px;
    margin-bottom: 10px;
}

.perfil-header h3 {
    margin: 0 0 5px;
    font-size: 22px;
}

.perfil-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.perfil-puntos {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: 20px;
    margin-top: 15px;
    font-size: 14px;
}

#vista-perfil h4 {
    color: #e63946;
    margin: 20px 0 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

#vista-perfil h4:first-of-type {
    border-top: none;
    padding-top: 0;
}

.form-error {
    color: #e63946;
    font-size: 13px;
    margin: 10px 0;
    padding: 10px;
    background: #fff5f5;
    border-radius: 8px;
    display: none;
}

.form-error:not(:empty) {
    display: block;
}

.form-success {
    color: #27ae60;
    font-size: 13px;
    margin: 10px 0;
    padding: 10px;
    background: #e8f5e9;
    border-radius: 8px;
    display: none;
}

.form-success:not(:empty) {
    display: block;
}

.btn-logout {
    width: 100%;
    padding: 12px;
    background: #f4f4f4;
    color: #666;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: #e63946;
    color: white;
    border-color: #e63946;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Modal Dirección */
.modal-direccion-content {
    background: white;
    width: 95%;
    max-width: 600px;
    border-radius: 20px;
    padding: 40px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-direccion-content h2 {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
}

.tipo-entrega-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.btn-tipo-entrega {
    flex: 1;
    padding: 20px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-tipo-entrega.active {
    border-color: #e63946;
    background: #fff5f5;
    color: #e63946;
}

.seccion-direccion {
    margin-bottom: 25px;
}

.btn-buscar-direccion {
    width: 100%;
    padding: 12px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.locales-grid-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.local-mini {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.local-mini:hover {
    border-color: #e63946;
    background: #fff5f5;
}

.local-mini h4 {
    color: #e63946;
    margin-bottom: 8px;
}

.local-mini p {
    font-size: 13px;
    color: #666;
    margin: 5px 0;
}

.direccion-capturada {
    color: #27ae60 !important;
    font-weight: 600;
    margin-top: 10px !important;
}

/* =========================================
   5. CARRUSEL DE BANNERS
   ========================================= */
.banner-carousel {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.carousel-container {
    width: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    width: 100%;
    flex: 0 0 100%;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.carousel-btn:hover { background: #e63946; color: white; }
.carousel-prev { left: 15px; }
.carousel-next { right: 15px; }

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-dots .dot {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
}

.carousel-dots .dot.active {
    background: #e63946;
    transform: scale(1.2);
}

/* =========================================
   6. PRODUCTOS
   ========================================= */
#productos-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.product-card {
    background: white;
    border-radius: 16px;
    padding: 15px;
    border: 1px solid #eee;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 12px;
}

.card-content-mobile h3 { font-size: 16px; margin-bottom: 8px; color: #333; }
.price { font-size: 18px; font-weight: 700; color: #e63946; display: block; margin: 8px 0; }

.btn-add {
    background: #e63946;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    margin-top: auto;
    width: 100%;
    text-align: center;
    font-size: 14px;
}

.btn-add:hover { background: #d62839; }

/* =========================================
   7. MODALES GENERALES
   ========================================= */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    width: 95%;
    max-width: 500px;
    padding: 25px;
    border-radius: 20px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    color: #999;
    cursor: pointer;
}

.size-selector { display: flex; gap: 8px; margin: 15px 0; flex-wrap: wrap; }

.size-btn {
    flex: 1;
    min-width: 100px;
    padding: 12px 8px;
    border: 2px solid #ddd;
    border-radius: 12px;
    background: #f9f9fa;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    text-align: center;
}

.size-btn.active { background: #e63946; color: white; border-color: #e63946; }

.ingrediente-card {
    border: 1px solid #eee;
    padding: 12px 5px;
    border-radius: 12px;
    text-align: center;
    font-size: 11px;
    cursor: pointer;
}

.ingrediente-card.selected { border: 2px solid #e63946; background: #fff1f2; font-weight: bold; }
.ingrediente-card.disabled { opacity: 0.4; cursor: not-allowed; }

.btn-add-final {
    width: 100%;
    padding: 15px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
}

.selector-salsa { display: flex; gap: 8px; margin: 15px 0; }
.salsa-btn {
    flex: 1;
    padding: 12px 8px;
    border: 2px solid #ddd;
    border-radius: 12px;
    background: #f9f9fa;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
}
.salsa-btn.active { background: #ff6b35; color: white; border-color: #ff6b35; }

.selector-modo-pizza { display: flex; gap: 10px; margin: 15px 0; }
.mode-btn {
    flex: 1;
    padding: 14px;
    border: 2px solid #ddd;
    border-radius: 12px;
    background: #f9f9fa;
    font-weight: 700;
    cursor: pointer;
}
.mode-btn.active { background: #27ae60; color: white; border-color: #27ae60; }

.mitad-tabs { display: flex; gap: 10px; margin: 15px 0; }
.tab {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 12px;
    background: #f9f9fa;
    font-weight: 600;
    cursor: pointer;
}
.tab.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-color: transparent;
}

/* =========================================
   8. CARRITO
   ========================================= */
/* ── CARRITO PANEL LATERAL ── */
/* Sobreescribir el align-items:center del .modal padre
   para que el panel ocupe toda la altura de la pantalla */
#cart-modal.modal {
    align-items: stretch;    /* el hijo ocupa todo el alto del flex padre */
    justify-content: flex-end; /* panel aparece desde la derecha */
    padding: 0;
}

.receipt-container {
    background: white;
    width: 100%;
    max-width: 450px;
    height: 100vh;           /* altura completa */
    min-height: 100vh;       /* refuerzo para Safari/iOS */
    margin-left: auto;
    display: flex;
    flex-direction: column;
    animation: slideRight 0.3s ease-out;
    overflow: hidden;        /* evita scroll doble */
}

@keyframes slideRight { from { transform: translateX(100%); } to { transform: translateX(0); } }

.receipt-header {
    background: #e63946;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.receipt-header h3 { margin: 0; font-size: 20px; }
.close-cart { font-size: 28px; cursor: pointer; }
.receipt-body {
    flex: 1;              /* ocupa todo el espacio disponible entre header y footer */
    min-height: 0;        /* CLAVE: sin esto, flex:1 colapsa en Safari/iOS */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* scroll suave en iOS */
    padding: 10px;
}

.cart-item {
    padding: 15px;
    border-bottom: 1px dashed #ddd;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.receipt-footer { padding: 12px 16px; border-top: 1px solid #eee; }
.total-row { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; margin-bottom: 8px; }
#puntos-preview { font-size: 11px; color: #27ae60; margin-bottom: 6px; }

.btn-pay {
    background: #27ae60;
    color: white;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    margin-bottom: 6px;
}

.btn-continue {
    background: #f4f4f4;
    color: #333;
    width: 100%;
    padding: 9px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.datos-cliente {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #3498db;
}
.datos-cliente h4 { color: #333; margin-bottom: 12px; }
.datos-cliente input {
    width: 100%;
    padding: 12px;
    margin: 6px 0;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.puntos-section {
    background: linear-gradient(135deg, #fff9e6 0%, #ffe6cc 100%);
    padding: 15px;
    border-radius: 12px;
    margin: 15px 0;
    border-left: 4px solid #ffa500;
}

.entrega-section {
    margin: 15px 0;
    padding: 15px;
    background: #e8f5e9;
    border-radius: 12px;
    border-left: 4px solid #27ae60;
}

/* =========================================
   9. FOOTER
   ========================================= */
.footer-main {
    background: #1a1a1a;
    color: white;
    padding: 50px 0 0;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer-col { }

.footer-logo {
    height: 60px;
    margin-bottom: 15px;
}

.burgerass-promo {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    text-align: center;
}

.burgerass-promo p {
    margin-bottom: 10px;
    font-weight: 600;
    color: #ffeb3b;
}

.burgerass-promo a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: white;
    transition: transform 0.3s;
}

.burgerass-promo a:hover {
    transform: scale(1.05);
}

.logo-burgerass {
    height: 150px;
    width: auto;
    border-radius: 8px;
}

.burgerass-promo span {
    background: #ff6b35;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.burgerass-link {
    color: #ff6b35 !important;
    font-weight: 600 !important;
}

.burgerass-link:hover {
    color: #ff8c5a !important;
}

.footer-col p {
    color: #aaa;
    font-size: 14px;
    line-height: 1.6;
}

.footer-col h4 {
    color: #e63946;
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 700;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #aaa;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.footer-col ul li a:hover {
    color: #e63946;
    padding-left: 5px;
}

.footer-col p a {
    color: #ffeb3b;
    text-decoration: none;
}

.footer-col p a:hover {
    color: #fff59d;
    text-decoration: underline;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.footer-social a {
    font-size: 24px;
    text-decoration: none;
    transition: transform 0.3s;
}

.footer-social a:hover {
    transform: scale(1.2);
}

.footer-bottom {
    background: #111;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

.footer-bottom p {
    color: #666;
    font-size: 13px;
}

/* Formas de Pago */
.footer-pagos {
    background: #222;
    padding: 30px 20px;
    margin-top: 40px;
}

.footer-pagos h4 {
    color: #e63946;
    font-size: 18px;
    text-align: center;
    margin-bottom: 25px;
}

.pagos-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.pagos-grupo {
    text-align: center;
}

.pagos-titulo {
    display: block;
    color: #aaa;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pagos-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.pagos-logos img {
    height: 70px;
    width: auto;
    background: white;
    padding: 10px 18px;
    border-radius: 10px;
    transition: transform 0.3s;
}

.pagos-logos img:hover {
    transform: scale(1.1);
}

/* =========================================
   10. MODAL TRABAJA CON NOSOTROS
   ========================================= */
.modal-trabaja-content {
    background: white;
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px;
    padding: 40px;
    position: relative;
}

.modal-trabaja-content h2 {
    text-align: center;
    color: #e63946;
    margin-bottom: 30px;
    font-size: 28px;
}

.trabaja-cargos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.cargo-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #eee;
}

.cargo-item h3 {
    color: #e63946;
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e63946;
}

.cargo-item ul {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

.cargo-item ul li {
    font-size: 12px;
    color: #555;
    margin-bottom: 8px;
    line-height: 1.5;
}

.form-trabaja {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
}

.form-trabaja h3 {
    color: #333;
    margin-bottom: 25px;
    font-size: 20px;
    text-align: center;
}

.form-trabaja h4 {
    color: #e63946;
    margin: 25px 0 15px;
    font-size: 16px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-trabaja .form-group {
    margin-bottom: 15px;
}

.form-trabaja .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.form-trabaja .required {
    color: #e63946;
}

.form-trabaja input,
.form-trabaja select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-trabaja input:focus,
.form-trabaja select:focus {
    border-color: #e63946;
    outline: none;
}

.form-trabaja input[type="file"] {
    padding: 10px;
    background: white;
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400 !important;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    width: auto;
}

.form-trabaja .btn-submit {
    margin-top: 25px;
}

/* =========================================
   11. MODAL RESERVAR MESA
   ========================================= */
.modal-reserva-content {
    background: white;
    width: 95%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px;
    padding: 40px;
    position: relative;
}

.modal-reserva-content h2 {
    text-align: center;
    color: #e63946;
    margin-bottom: 25px;
    font-size: 26px;
}

.form-reserva h4 {
    color: #e63946;
    margin: 25px 0 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.personas-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
}

.personas-selector button {
    width: 45px;
    height: 45px;
    border: none;
    background: #e63946;
    color: white;
    font-size: 24px;
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.personas-selector button:hover {
    background: #d62839;
    transform: scale(1.1);
}

.personas-selector span {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    min-width: 50px;
    text-align: center;
}

.form-reserva textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.form-reserva textarea:focus {
    border-color: #e63946;
    outline: none;
}

.reserva-resumen {
    background: #e8f5e9;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    border-left: 4px solid #27ae60;
}

.reserva-resumen h4 {
    margin: 0 0 10px;
    border: none;
    padding: 0;
}

.reservar-mobile {
    background: #27ae60 !important;
    color: white !important;
}

.reservar-mobile:hover {
    background: #219a52 !important;
}

/* Selector de mesas disponibles */
.mesas-disponibles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    min-height: 100px;
}

.mesa-option {
    background: white;
    border: 3px solid #27ae60;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.mesa-option:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.mesa-option.selected {
    background: #27ae60;
    color: white;
    transform: scale(1.05);
}

.mesa-option.selected .mesa-capacidad,
.mesa-option.selected .mesa-estado-small {
    color: white;
}

.mesa-option.no-disponible {
    border-color: #ddd;
    opacity: 0.5;
    cursor: not-allowed;
}

.mesa-option.no-disponible:hover {
    transform: none;
    box-shadow: none;
}

/* Mesa incluida automáticamente en combinación de grupo */
.mesa-option.seleccionada-auto {
    border-color: #27ae60;
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    box-shadow: 0 4px 15px rgba(39,174,96,0.25);
}
.mesa-option.seleccionada-auto .mesa-codigo-small {
    color: #27ae60;
}

.mesa-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.mesa-codigo-small {
    font-weight: 700;
    font-size: 14px;
    color: #333;
}

.mesa-option.selected .mesa-codigo-small {
    color: white;
}

.mesa-capacidad {
    font-size: 11px;
    color: #666;
    margin-top: 3px;
}

.mesa-estado-small {
    font-size: 14px;
    margin-top: 5px;
}

.cargando-mesas {
    grid-column: 1 / -1;
    text-align: center;
    color: #666;
    padding: 20px;
}

.no-mesas {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: #666;
}

.no-mesas a {
    color: #e63946;
    font-weight: 600;
}

/* =========================================
   12. EXTRAS SIDEBAR LAYOUT
   ========================================= */
.extras-layout {
    display: flex;
    gap: 20px;
    padding: 20px;
    min-height: 500px;
    grid-column: 1 / -1;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Cuando hay extras-layout, el contenedor no necesita ser grid */
#productos-container:has(.extras-layout) {
    display: block;
    padding: 0;
}

.extras-sidebar {
    width: 180px;
    background: #1a1a1a;
    border-radius: 15px;
    padding: 15px;
    flex-shrink: 0;
    position: sticky;
    top: 110px;
    height: fit-content;
}

.extras-sidebar h4 {
    color: #e63946;
    font-size: 16px;
    margin-bottom: 15px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
}

.subcat-btn {
    display: block;
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: transparent;
    border: 1px solid #333;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    transition: all 0.3s;
}

.subcat-btn:hover {
    background: rgba(230, 57, 70, 0.2);
    border-color: #e63946;
}

.subcat-btn.active {
    background: #e63946;
    border-color: #e63946;
    color: white;
}

.extras-products {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    align-content: start;
    align-items: start;
}

/* Asegurar que las cards dentro de extras tengan buen tamaño */
.extras-products .product-card {
    width: 100%;
    min-height: 280px;
}

/* =========================================
   13. RESPONSIVE
   ========================================= */
@media (max-width: 1200px) {
    .nav-menu li a { padding: 8px 10px; font-size: 13px; }
    .nav-menu li a.btn-reservar { font-size: 11px; padding: 8px 10px; }
    .direccion-linea2 { max-width: 120px; }
    .trabaja-cargos { grid-template-columns: 1fr; }
}

@media (max-width: 992px) {
    .nav-principal { display: none; }
    .menu-hamburguesa { display: flex; }
    .btn-direccion { display: none; }
    
    .header-container { justify-content: space-between; }
    
    .local-item { grid-template-columns: 1fr; }
    .locales-grid-mini { grid-template-columns: 1fr; }
    
    .footer-container { grid-template-columns: repeat(2, 1fr); gap: 30px; }

    /* =========================================
       CORRECCIÓN: Forzar 1 columna en tablets
       ========================================= */
    #productos-container { 
        grid-template-columns: 1fr !important; 
        gap: 12px;
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .header-container { height: 60px; padding: 0 15px; }
    .main-logo { height: 40px; }
    
    .carrito-header { padding: 8px 12px; }
    .carrito-precio { font-size: 14px; }
    
    .banner-carousel { margin: 10px; border-radius: 12px; }
    .carousel-btn { width: 35px; height: 35px; font-size: 16px; }

    /* =========================================
       CORRECCIÓN PRINCIPAL: Tarjetas de producto
       en celulares - 1 columna, ancho completo,
       formato horizontal (imagen izquierda + info derecha)
       ========================================= */
    #productos-container { 
        grid-template-columns: 1fr !important; 
        gap: 12px;
        padding: 0 10px;
        max-width: 100%;
    }

    .product-card { 
        flex-direction: row; 
        padding: 10px; 
        width: 100% !important;        /* Forzar ancho completo */
        max-width: 100% !important;     /* Sin límite de ancho */
        min-width: 0 !important;        /* Evitar desborde */
        margin: 0 !important;           /* Sin márgenes laterales */
    }

    .product-card img { 
        width: 100px; 
        height: 100px; 
        min-width: 100px;               /* Evitar que se achique */
        margin: 0 12px 0 0; 
        border-radius: 10px;
    }

    .card-content-mobile { 
        flex: 1; 
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0;                   /* Permite que el texto haga wrap */
    }

    .card-content-mobile h3 { 
        font-size: 14px; 
        line-height: 1.3;
        word-wrap: break-word;
    }

    .price { font-size: 16px; margin: 5px 0; }

    .btn-add { 
        padding: 8px 15px; 
        font-size: 13px; 
        border-radius: 8px;
    }

    /* Extras en mobile: 1 columna también */
    .extras-products {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }

    .extras-products .product-card {
        flex-direction: row;
        min-height: auto;
        padding: 10px;
    }

    .extras-products .product-card img {
        width: 100px;
        height: 100px;
        min-width: 100px;
        margin: 0 12px 0 0;
    }
    
    .modal-locales-content,
    .modal-cuenta-content,
    .modal-direccion-content,
    .modal-trabaja-content {
        width: 100%;
        height: 100%;
        max-height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 0;
        padding: 20px;
    }
    
    .modal-content {
        width: 100%;
        max-width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .receipt-container { max-width: 100%; }
    
    .tipo-entrega-selector { flex-direction: column; }
    
    .form-row { grid-template-columns: 1fr; gap: 0; }
    
    .footer-container { grid-template-columns: 1fr; text-align: center; }
    .footer-col ul li a:hover { padding-left: 0; }
    .footer-social { justify-content: center; }
    
    .pagos-container { gap: 30px; }
    .pagos-logos img { height: 55px; padding: 8px 14px; }

    /* Extras sidebar en mobile */
    .extras-layout {
        flex-direction: column;
        padding: 10px;
    }
    
    .extras-sidebar {
        width: 100%;
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
    }
    
    .extras-sidebar h4 {
        width: 100%;
        margin-bottom: 10px;
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .subcat-btn {
        flex: 1;
        min-width: calc(50% - 4px);
        padding: 10px;
        text-align: center;
        font-size: 12px;
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .main-logo { height: 35px; }
    .carrito-precio { display: none; }
    .carousel-dots .dot { width: 8px; height: 8px; }
    
    .size-btn { min-width: 70px; font-size: 10px; }
    .salsa-btn { font-size: 11px; }
    
    .cargo-item { padding: 15px; }
    .cargo-item h3 { font-size: 14px; }
    .cargo-item ul li { font-size: 11px; }

    /* =========================================
       CELULARES PEQUEÑOS: Imagen un poco más chica
       ========================================= */
    .product-card img { 
        width: 85px; 
        height: 85px; 
        min-width: 85px;
    }

    .card-content-mobile h3 { font-size: 13px; }
    .price { font-size: 15px; }
    .btn-add { font-size: 12px; padding: 7px 12px; }
}