/* =====================================================
   LA PARRILLA MK - SISTEMA DE PEDIDOS
   Estilos principales
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500..800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Colores principales */
    --color-primary: #FF6B35;
    --color-primary-dark: #E55A2B;
    --color-primary-light: #FF8F66;
    --color-secondary: #2D2D2D;
    --color-accent: #FFD700;
    --color-success: #22C55E;
    --color-warning: #F59E0B;
    --color-danger: #EF4444;
    --color-info: #3B82F6;
    
    /* Fondos */
    --bg-primary: #FAFAFA;
    --bg-secondary: #FFFFFF;
    --bg-dark: #1A1A1A;
    --bg-card: #FFFFFF;
    
    /* Texto */
    --text-primary: #1A1A1A;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --text-light: #FFFFFF;
    
    /* Bordes y sombras */
    --border-color: #E5E7EB;
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    
    /* Transiciones */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
}

/* =====================================================
   RESET Y BASE
   ===================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    background-image: radial-gradient(50% 30% at 100% 0%, rgba(255,107,53,0.05), transparent 60%);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

/* =====================================================
   TIPOGRAFÍA
   ===================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

.font-display {
    font-family: 'Bricolage Grotesque', sans-serif;
    letter-spacing: 0.02em;
}

.font-elegant {
    font-family: 'Playfair Display', serif;
}

/* =====================================================
   LAYOUT - CLIENTE
   ===================================================== */

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header-client {
    background: linear-gradient(135deg, #26211d 0%, #322b26 100%);
    color: var(--text-light);
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    border-bottom: 2px solid var(--color-primary);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    overflow: hidden;
    flex-shrink: 0;
}

.logo-icon .logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.logo-text h1 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
    color: #fff;
}
.logo-text h1 .accent { color: var(--color-primary); }

.logo-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Status bar */
.status-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 50px;
    font-size: 0.875rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-success);
    animation: pulse 2s infinite;
}

.status-dot.closed {
    background: var(--color-danger);
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Cart Button */
.cart-btn {
    position: relative;
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.cart-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

.cart-count {
    background: var(--color-secondary);
    color: white;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    min-width: 20px;
    text-align: center;
}

/* =====================================================
   HERO BANNER
   ===================================================== */

.hero-banner {
    background:
        radial-gradient(80% 120% at 15% 0%, rgba(255,215,0,0.18), transparent 55%),
        radial-gradient(70% 100% at 100% 100%, rgba(45,45,45,0.35), transparent 60%),
        linear-gradient(135deg, var(--color-primary) 0%, #e8501e 55%, var(--color-primary-dark) 100%);
    color: white;
    padding: 2.1rem 1.5rem 2.3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '🌮';
    position: absolute;
    font-size: 15rem;
    opacity: 0.14;
    right: -3rem;
    top: -2rem;
    transform: rotate(12deg);
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.3));
}

.hero-banner::after {
    content: '🔥';
    position: absolute;
    font-size: 9rem;
    opacity: 0.12;
    left: -2rem;
    bottom: -2.5rem;
    transform: rotate(-10deg);
}

.hero-content {
    max-width: 620px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: heroIn 0.7s ease both;
}

@keyframes heroIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

.hero-banner h2 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(2.1rem, 5.2vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.04;
    margin-bottom: 0.6rem;
    text-shadow: 0 4px 18px rgba(0,0,0,0.25);
}

.hero-banner p {
    font-size: 1.08rem;
    opacity: 0.94;
    max-width: 480px;
    margin: 0 auto;
}

.delivery-info {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0,0,0,0.28);
    border: 1px solid rgba(255,255,255,0.22);
    backdrop-filter: blur(6px);
    padding: 0.5rem 1.1rem;
    border-radius: 50px;
    margin-top: 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

/* =====================================================
   CATEGORÍAS
   ===================================================== */

.categories-nav {
    background: var(--bg-secondary);
    padding: 1rem;
    position: sticky;
    top: 82px;
    z-index: 90;
    box-shadow: var(--shadow-sm);
}

.categories-scroll {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-pill {
    flex-shrink: 0;
    padding: 0.55rem 1.15rem;
    background: var(--bg-primary);
    border: 1.5px solid var(--border-color);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.88rem;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.category-pill:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-1px);
}

.category-pill.active {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: white;
    box-shadow: 0 4px 12px rgba(45,45,45,0.3);
}

/* =====================================================
   PRODUCTOS GRID
   ===================================================== */

.main-content {
    flex: 1;
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 1.1rem 2rem;
}

.section-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(1.25rem, 2.6vw, 1.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 1.4rem 0 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-left: 0.7rem;
    border-left: 4px solid var(--color-primary);
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-color), transparent);
    margin-left: 0.75rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    gap: 0.85rem;
}

/* Product Card */
.product-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-fast);
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 34px -10px rgba(255,107,53,0.22), var(--shadow-xl);
    border-color: rgba(255,107,53,0.35);
}

.product-card.sold-out {
    opacity: 0.6;
    pointer-events: none;
}

.product-image {
    width: 100%;
    height: 135px;
    background: linear-gradient(135deg, #f7f3ef 0%, #efe8e2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.06);
}

.product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-popular {
    background: var(--color-accent);
    color: var(--text-primary);
}

.badge-new {
    background: var(--color-info);
    color: white;
}

.badge-soldout {
    background: var(--color-danger);
    color: white;
}

.product-info {
    padding: 0.65rem 0.8rem 0.75rem;
}

.product-name {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 0.94rem;
    letter-spacing: -0.01em;
    line-height: 1.18;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.product-description {
    font-size: 0.76rem;
    line-height: 1.35;
    color: var(--text-secondary);
    margin-bottom: 0.55rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.product-price {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--color-primary);
    letter-spacing: -0.02em;
}

.product-add-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
    box-shadow: 0 6px 14px rgba(255,107,53,0.35);
}

.product-add-btn:hover {
    background: var(--color-primary-dark);
    transform: scale(1.12) rotate(90deg);
    box-shadow: 0 8px 18px rgba(255,107,53,0.5);
}

/* =====================================================
   MODAL DE PRODUCTO
   ===================================================== */

/* =====================================================
   MODAL - DISEÑO COMPACTO
   ===================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(3px);
    z-index: 1000;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-secondary);
    width: 100%;
    max-width: 500px;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: all var(--transition-normal);
    box-shadow: 0 0 60px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

/* Modal compacto sin imagen para productos simples */
.modal-content.compact {
    max-width: 450px;
}

.modal-content.compact .modal-header {
    padding: 1rem 1rem 0;
}

.modal-content.compact .modal-image {
    display: none;
}

/* Escritorio: tarjeta flotante, no de altura completa */
@media (min-width: 481px) {
    .modal-content {
        height: auto;
        max-height: 86vh;
        border-radius: 18px;
    }
}

/* Responsive - móvil */
@media (max-width: 480px) {
    .modal-content {
        max-width: 100%;
    }
}

/* Responsive - tablets */
@media (min-width: 481px) and (max-width: 768px) {
    .modal-content {
        max-width: 450px;
    }
    
    .modal-content.compact {
        max-width: 400px;
    }
}

/* Responsive - desktop */
@media (min-width: 769px) {
    .modal-content {
        max-width: 550px;
    }
    
    .modal-content.compact {
        max-width: 480px;
    }
    
    .modal-image {
        max-height: 280px;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .option-group {
        padding: 1rem;
    }
    
    .option-item {
        padding: 0.875rem 1rem;
    }
}

/* Responsive - pantallas grandes */
@media (min-width: 1024px) {
    .modal-content {
        max-width: 600px;
    }
    
    .modal-content.compact {
        max-width: 520px;
    }
}

.modal-header {
    position: relative;
    flex-shrink: 0;
}

.modal-image {
    width: 100%;
    height: 130px;
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    flex-shrink: 0;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.modal-close:hover {
    background: white;
    transform: scale(1.1);
}

.modal-body {
    padding: 0.8rem 0.9rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.1rem;
    line-height: 1.2;
}

.modal-price {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.modal-description {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 0.9rem;
    line-height: 1.4;
}

/* Opciones del producto - Compacto */
.option-group {
    margin-bottom: 0.7rem;
}

.option-group.grupo-error {
    animation: shake 0.5s ease-in-out;
    background: #fff5f5;
    border: 2px solid #dc3545;
    border-radius: 8px;
    padding: 0.5rem;
}

.option-group.grupo-error .option-group-title {
    color: #dc3545;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.option-group-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.option-group-title .required {
    font-size: 0.7rem;
    color: var(--color-danger);
    font-weight: 500;
    text-transform: none;
}

.option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.65rem;
    background: var(--bg-primary);
    border-radius: 9px;
    margin-bottom: 0.35rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
    font-size: 0.88rem;
}

.option-item:hover {
    background: #f0f0f0;
}

.option-item.selected {
    background: rgba(255, 107, 53, 0.08);
    border-color: var(--color-primary);
}

.option-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.option-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.option-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.option-item.selected .option-checkbox {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.option-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.option-item.selected .option-radio {
    border-color: var(--color-primary);
}

.option-item.selected .option-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--color-primary);
    border-radius: 50%;
}

.option-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.option-price {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.option-price.extra {
    color: var(--color-primary);
    font-weight: 600;
}

/* Botón "aparte" para radio/checkbox */
.btn-aparte {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 0.5rem;
    opacity: 0;
    visibility: hidden;
}

.option-item.selected .btn-aparte {
    opacity: 1;
    visibility: visible;
}

.btn-aparte:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.btn-aparte.active {
    background: #e0f2e9;
    border-color: var(--color-primary);
    color: var(--color-primary);
    font-weight: 600;
}

/* Estado visual "aparte" para option-item */
.option-item.aparte {
    border-color: #ffc107;
    background: rgba(255, 193, 7, 0.08);
}

.option-item.aparte .option-name::after {
    content: ' (aparte)';
    font-size: 0.75rem;
    color: #d39e00;
    font-style: italic;
}

/* Notas - Compacto */
.notes-textarea {
    width: 100%;
    padding: 0.6rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 60px;
    transition: border-color var(--transition-fast);
}

.notes-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Cantidad - Compacto */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: var(--bg-primary);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.quantity-label {
    font-weight: 600;
    font-size: 0.9rem;
    flex: 1;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: white;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.quantity-btn:hover:not(:disabled) {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-value {
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
}

/* Modal Footer - Fijo abajo */
.modal-footer {
    padding: 0.7rem 0.9rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.add-to-cart-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 6px 16px rgba(255,107,53,0.32);
    transition: all var(--transition-fast);
}

.add-to-cart-btn:hover {
    background: var(--color-primary-dark);
}

.add-to-cart-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

/* =====================================================
   CARRITO SIDEBAR
   ===================================================== */

.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: var(--bg-secondary);
    z-index: 1100;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
}

.cart-sidebar.active {
    transform: translateX(0);
}

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-header h3 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-primary);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.cart-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.cart-item {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cart-item-name {
    font-weight: 600;
}

.cart-item-remove {
    color: var(--color-danger);
    cursor: pointer;
    font-size: 1.1rem;
}

.cart-item-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.cart-item-sin {
    font-size: 0.8rem;
    color: #dc3545;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.cart-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-quantity button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
}

/* Cantidad fija (para grupos multiplicadores) */
.cart-item-quantity-fixed {
    display: flex;
    align-items: center;
}

.cart-item-quantity-fixed .qty-badge {
    background: var(--color-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.cart-item-price {
    font-weight: 700;
    color: var(--color-primary);
}

.cart-summary {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: 700;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.75rem;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all var(--transition-fast);
}

.checkout-btn:hover {
    background: var(--color-primary-dark);
}

.checkout-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

.min-order-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
    padding: 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    text-align: center;
    margin-top: 1rem;
}

/* =====================================================
   CHECKOUT
   ===================================================== */

.checkout-page {
    min-height: 100vh;
    background: var(--bg-primary);
}

.checkout-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem;
}

.checkout-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.checkout-section {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.checkout-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-label .required {
    color: var(--color-danger);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-input.error {
    border-color: var(--color-danger);
}

.form-error {
    color: var(--color-danger);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Location Picker */
.location-picker {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 0.5rem;
}

.location-btn {
    width: 100%;
    padding: 0.75rem;
    background: white;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.location-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.location-btn.has-location {
    border-style: solid;
    border-color: var(--color-success);
    color: var(--color-success);
}

/* Payment Methods */
.payment-methods {
    display: grid;
    gap: 0.75rem;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.payment-option:hover {
    border-color: var(--color-primary);
}

.payment-option.selected {
    border-color: var(--color-primary);
    background: rgba(255, 107, 53, 0.05);
}

.payment-option input {
    display: none;
}

.payment-radio {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-option.selected .payment-radio {
    border-color: var(--color-primary);
}

.payment-option.selected .payment-radio::after {
    content: '';
    width: 12px;
    height: 12px;
    background: var(--color-primary);
    border-radius: 50%;
}

.payment-icon {
    font-size: 1.5rem;
}

.payment-info h4 {
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.payment-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Order Summary */
.order-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.order-summary-item:last-child {
    border-bottom: none;
}

.order-item-info {
    flex: 1;
}

.order-item-name {
    font-weight: 500;
}

.order-item-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.order-item-price {
    font-weight: 600;
}

/* Submit Button */
.submit-order-btn {
    width: 100%;
    padding: 1.25rem;
    background: var(--color-success);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.submit-order-btn:hover {
    background: #1ea04e;
    transform: translateY(-2px);
}

.submit-order-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

/* =====================================================
   NEGOCIO CERRADO
   ===================================================== */

.closed-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.closed-content {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    max-width: 400px;
}

.closed-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.closed-content h2 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.closed-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* =====================================================
   ESTADOS DE PEDIDO
   ===================================================== */

.status-pending { background: #FEF3C7; color: #92400E; }
.status-confirmed { background: #DBEAFE; color: #1E40AF; }
.status-preparing { background: #FEE2E2; color: #991B1B; }
.status-ready { background: #D1FAE5; color: #065F46; }
.status-delivery { background: #E0E7FF; color: #3730A3; }
.status-delivered { background: #D1FAE5; color: #065F46; }
.status-cancelled { background: #FEE2E2; color: #991B1B; }

.status-badge {
    display: inline-flex;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* =====================================================
   UTILIDADES
   ===================================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--color-primary); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.d-none { display: none; }
.d-flex { display: flex; }
.flex-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 640px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .logo-text h1 {
        font-size: 1.4rem;
    }
    
    .status-bar {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
    
    .hero-banner h2 {
        font-size: 1.8rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .cart-sidebar {
        max-width: 100%;
    }
}

/* =====================================================
   ANIMACIONES
   ===================================================== */

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-slide-up {
    animation: slideUp 0.4s ease forwards;
}

.animate-fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* Stagger animation for products */
.products-grid .product-card {
    opacity: 0;
    animation: slideUp 0.4s ease forwards;
}

.products-grid .product-card:nth-child(1) { animation-delay: 0.1s; }
.products-grid .product-card:nth-child(2) { animation-delay: 0.15s; }
.products-grid .product-card:nth-child(3) { animation-delay: 0.2s; }
.products-grid .product-card:nth-child(4) { animation-delay: 0.25s; }
.products-grid .product-card:nth-child(5) { animation-delay: 0.3s; }
.products-grid .product-card:nth-child(6) { animation-delay: 0.35s; }

/* =====================================================
   TOAST NOTIFICATIONS
   ===================================================== */

.toast-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--text-primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    animation: slideUp 0.3s ease forwards;
}

.toast.success {
    background: var(--color-success);
}

.toast.error {
    background: var(--color-danger);
}

.toast.warning {
    background: var(--color-warning);
}

/* =====================================================
   LOADING SPINNER
   ===================================================== */

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}

/* Hint para opciones */
.option-hint {
    background: #fef3c7;
    color: #92400e;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

/* Radio button checked state */
.option-radio.checked {
    background: var(--color-primary, #FF6B35);
    border-color: var(--color-primary, #FF6B35);
}
.option-radio.checked::after {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.option-radio {
    position: relative;
}

/* =====================================================
   NUEVO SISTEMA DE GRUPOS MODIFICADORES
   ===================================================== */

/* Contenedor de opciones nuevo sistema */
.option-items.nuevo-sistema {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Counter (cantidad) */
.option-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 0.25rem;
}

.counter-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.counter-btn:hover {
    background: var(--color-primary);
    color: white;
}

.counter-btn:active {
    transform: scale(0.95);
}

.counter-value {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Tristate (normal/aparte/sin) */
.option-tristate {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tristate-indicator {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s;
    background: white;
}

.option-item.selected .tristate-indicator {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.option-item.aparte .tristate-indicator {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #f59e0b;
}

.option-item.sin .tristate-indicator {
    background: #fee2e2;
    border-color: #ef4444;
    color: #ef4444;
}

/* Estado visual de opciones */
.option-item[data-estado="aparte"] {
    background: #fffbeb;
    border-color: #f59e0b;
}

.option-item[data-estado="sin"] {
    background: #fef2f2;
    border-color: #ef4444;
    text-decoration: line-through;
    opacity: 0.7;
}

/* Icono del grupo */
.option-group-icon {
    font-size: 1.25rem;
    margin-right: 0.5rem;
}

/* Input de notas compacto */
.notes-input {
    width: 100%;
    padding: 0.6rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 60px;
    transition: border-color var(--transition-fast);
}

.notes-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Badge de agotado en opciones */
.option-item .badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
}

/* Hint para modos especiales */
.option-hint {
    background: #f0f9ff;
    color: #0369a1;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

/* =====================================================
   FOTO DEL PRODUCTO EN LA VENTANA DE DETALLE
   Antes: 130px fijos y object-fit:cover, la foto salia
   recortada y chiquita en el celular. Ahora se ve COMPLETA
   (contain) y el hueco sobrante lo llena la misma foto
   difuminada, asi no quedan franjas.
   ===================================================== */
.modal-image.con-foto {
    position: relative;
    overflow: hidden;
    height: clamp(210px, 36vh, 300px);
    max-height: none;
    background: #1b1b1b;
}
.modal-image.con-foto .modal-img-fondo {
    position: absolute; inset: -24px;
    width: calc(100% + 48px); height: calc(100% + 48px);
    object-fit: cover;
    filter: blur(18px) brightness(0.75) saturate(1.15);
    transform: scale(1.05);
}
.modal-image.con-foto .modal-img-foto {
    position: relative;
    width: 100%; height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,0.35));
}
/* telefonos bajitos: que no se coma las opciones */
@media (max-height: 640px) {
    .modal-image.con-foto { height: clamp(170px, 32vh, 220px); }
}
@media (min-width: 769px) {
    .modal-image.con-foto { height: 280px; }
}

/* ===== MOVIL 2026-09 =====
   Bloque al final para ganar la cascada. Cambios de marca (sin naranja fijo),
   barra flotante del pedido y disposicion para celular (<640px).
   ========================= */
:root { --color-primary-rgb: 255, 107, 53; --header-h: 82px; --nav-h: 78px; }

/* La barra de categorias se pega justo debajo del header real (antes: 82px fijos) */
.categories-nav { top: var(--header-h, 82px); }
.categories-scroll { position: relative; }

/* Acentos que estaban en naranja fijo: ahora siguen el color del negocio */
.hero-banner {
    background:
        radial-gradient(80% 120% at 15% 0%, rgba(255,215,0,0.18), transparent 55%),
        radial-gradient(70% 100% at 100% 100%, rgba(0,0,0,0.35), transparent 60%),
        linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}
.product-card:hover {
    box-shadow: 0 18px 34px -10px rgba(var(--color-primary-rgb), 0.22), var(--shadow-xl);
    border-color: rgba(var(--color-primary-rgb), 0.35);
}
.product-add-btn { box-shadow: 0 6px 14px rgba(var(--color-primary-rgb), 0.35); }
.product-add-btn:hover { box-shadow: 0 8px 18px rgba(var(--color-primary-rgb), 0.5); }
.payment-option.selected { border-color: var(--color-primary); background: rgba(var(--color-primary-rgb), 0.06); }
.payment-option.selected .payment-radio { border-color: var(--color-primary); }
.payment-option.selected .payment-radio::after { background: var(--color-primary); }

/* Chip de estado dentro del nombre: solo en celular */
.status-chip { display: none; }

/* Barra flotante "Ver pedido" */
.cart-fab {
    position: fixed;
    left: 0.7rem; right: 0.7rem;
    bottom: calc(0.7rem + env(safe-area-inset-bottom));
    z-index: 900; /* debajo del modal (1000), del carrito (1100) y del aviso PWA */
    display: flex; align-items: center; gap: 0.75rem;
    min-height: 56px; padding: 0.8rem 1rem;
    border: 0; border-radius: 14px;
    background: var(--color-primary); color: #fff;
    font: inherit; font-weight: 800; font-size: 1rem;
    box-shadow: 0 14px 34px rgba(0,0,0,0.35);
    max-width: 520px; margin: 0 auto;
    cursor: pointer;
    animation: fabIn 0.25s cubic-bezier(.2,.9,.3,1);
}
.cart-fab[hidden] { display: none; }
.cart-fab:active { transform: scale(0.98); }
.cart-fab-count {
    background: rgba(0,0,0,0.28); border-radius: 999px;
    min-width: 30px; padding: 0.2rem 0.6rem; text-align: center; font-size: 0.95rem;
}
.cart-fab-total { margin-left: auto; font-size: 1.1rem; letter-spacing: -0.01em; }
@keyframes fabIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
body.has-cart-fab .main-content { padding-bottom: calc(2rem + 76px); }
body.has-cart-fab .toast-container { bottom: calc(1.2rem + 70px); }
@media (min-width: 641px) { .cart-fab { display: none; } } /* en escritorio ya esta el boton del header */

@media (max-width: 640px) {
    /* --- Header de una sola fila (~60px) --- */
    .header-client { padding: 0.5rem 0.8rem; }
    .header-content { flex-wrap: nowrap; gap: 0.6rem; }
    .logo-section { gap: 0.6rem; min-width: 0; flex: 1; }
    .logo-icon { width: 40px; height: 40px; font-size: 1.4rem; border-radius: 10px; }
    .logo-text { min-width: 0; }
    .logo-text h1 { font-size: 1.05rem; line-height: 1.15; display: flex; align-items: center; flex-wrap: wrap; gap: 0.15rem 0.45rem; }
    .logo-text .logo-slogan { display: none; }
    .status-bar { display: none; }
    .status-chip {
        display: inline-flex; align-items: center; gap: 0.3rem;
        font-family: 'Plus Jakarta Sans', sans-serif;
        font-size: 0.64rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
        padding: 0.12rem 0.5rem; border-radius: 999px;
        background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.85);
    }
    .status-chip.closed { background: rgba(239,68,68,0.25); }
    .status-chip .status-dot { width: 6px; height: 6px; }
    .cart-btn { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; flex-shrink: 0; font-size: 1.15rem; }
    .cart-btn-label { display: none; }
    .cart-count { position: absolute; top: -4px; right: -4px; font-size: 0.68rem; padding: 0.1rem 0.4rem; min-width: 18px; }

    /* --- Hero compacto --- */
    .hero-banner { padding: 1.1rem 1rem 1.2rem; }
    .hero-banner::before, .hero-banner::after { display: none; }
    .hero-banner h2 { font-size: 1.45rem; margin-bottom: 0.35rem; }
    .hero-banner p { font-size: 0.9rem; }
    .delivery-info { margin-top: 0.7rem; font-size: 0.8rem; padding: 0.4rem 0.9rem; }

    /* --- Categorias --- */
    .categories-nav { padding: 0.5rem 0.8rem; }
    .categories-scroll { gap: 0.5rem; padding-bottom: 0.15rem; scroll-snap-type: x proximity; }
    .category-pill { padding: 0.5rem 0.95rem; min-height: 40px; scroll-snap-align: center; }

    /* --- Dos tarjetas por fila --- */
    .main-content { padding: 0.6rem 0.7rem 2rem; }
    .section-title { margin: 1rem 0 0.6rem; font-size: 1.15rem; }
    .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
    .products-grid .product-card { opacity: 1; animation: none; }
    .product-card:hover { transform: none; }
    .product-image { height: auto; aspect-ratio: 4 / 3; font-size: 2.4rem; }
    .product-info { padding: 0.5rem 0.6rem 0.6rem; }
    .product-name {
        font-size: 0.88rem;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
        min-height: 2.36em;
    }
    .product-description { display: none; }
    .product-price { font-size: 1.02rem; }
    .product-add-btn { width: 44px; height: 44px; font-size: 1.4rem; }
    .product-badge { top: 0.5rem; left: 0.5rem; font-size: 0.66rem; padding: 0.2rem 0.55rem; }
}

@media (max-width: 340px) {
    .logo-text h1 { font-size: 0.95rem; }
    .products-grid { gap: 0.45rem; }
    .main-content { padding-left: 0.5rem; padding-right: 0.5rem; }
    .product-name { font-size: 0.8rem; }
    .product-price { font-size: 0.94rem; }
    .product-add-btn { width: 40px; height: 40px; }
}

/* ===== FASE 3: entrega, prepago y cerrado ===== */
.closed-banner {
    background: #7f1d1d; color: #fff; text-align: center;
    font-size: 0.85rem; font-weight: 600; line-height: 1.35;
    padding: 0.5rem 0.9rem;
}
body.is-closed .product-add-btn { background: #9ca3af; box-shadow: none; }
body.is-closed #add-to-cart-btn { background: #9ca3af; opacity: 0.85; }
.modal-closed-note {
    background: #fef2f2; color: #991b1b; border: 1px solid #fecaca;
    border-radius: 10px; padding: 0.6rem 0.8rem; font-size: 0.85rem; font-weight: 600;
    margin-bottom: 0.9rem;
}
/* checkout */
.entrega-opciones .payment-option { padding: 0.85rem 1rem; }
.entrega-opciones .payment-info p { margin: 0.1rem 0 0; font-size: 0.8rem; color: var(--text-secondary); }
.prepago-aviso {
    margin-top: 0.9rem; padding: 0.75rem 0.9rem; border-radius: 10px;
    background: rgba(201,162,39,0.14); border: 1px solid rgba(201,162,39,0.5);
    font-size: 0.9rem; line-height: 1.45;
}
.ubicacion-aviso { margin-top: 0.5rem; font-size: 0.82rem; color: #b45309; font-weight: 600; }
.checkout-mas { margin-bottom: 1.5rem; }
.checkout-mas summary { cursor: pointer; font-weight: 600; padding: 0.7rem 0.2rem; color: var(--text-secondary); list-style: none; }
.checkout-mas summary::-webkit-details-marker { display: none; }
.checkout-mas[open] summary { margin-bottom: 0.5rem; }
.checkout-sticky {
    position: sticky; bottom: 0; z-index: 50;
    padding: 0.6rem 0 calc(0.6rem + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--bg-primary) 75%, rgba(255,255,255,0));
}
.checkout-sticky .submit-order-btn { margin: 0; }
.submit-aviso { font-size: 0.84rem; font-weight: 600; text-align: center; padding: 0.45rem 0.6rem; border-radius: 8px; margin-bottom: 0.5rem; }
.submit-aviso.warn { background: #fef3c7; color: #92400e; }
.submit-aviso.error { background: #fee2e2; color: #991b1b; }
.submit-aviso.info { background: #dbeafe; color: #1e40af; }
.submit-nota { text-align: center; color: var(--text-muted); font-size: 0.78rem; margin: 0.5rem 0 0; }
@media (max-width: 640px) {
    .checkout-container { padding: 0.9rem 0.8rem 0; }
    .checkout-header { margin-bottom: 1rem; }
    .checkout-header h1 { font-size: 1.35rem; }
    .checkout-section { padding: 1rem; margin-bottom: 0.9rem; }
    .checkout-section-title { font-size: 1rem; margin-bottom: 0.75rem; }
    .payment-option { padding: 0.8rem 0.9rem; gap: 0.75rem; }
}

/* ===== tipo de entrega en el carrito ===== */
.cart-tipo { margin-bottom: 0.9rem; padding-bottom: 0.9rem; border-bottom: 1px dashed var(--border-color); }
.cart-tipo-title { font-weight: 800; font-size: 0.95rem; margin-bottom: 0.5rem; }
.cart-tipo-opciones { display: flex; flex-direction: column; gap: 0.4rem; }
.cart-tipo-btn {
    text-align: left; padding: 0.65rem 0.85rem; border-radius: 10px; font: inherit; font-weight: 600; font-size: 0.92rem;
    background: var(--bg-secondary); border: 2px solid var(--border-color); cursor: pointer; transition: all var(--transition-fast);
}
.cart-tipo-btn.active { border-color: var(--color-primary); background: rgba(var(--color-primary-rgb), 0.08); color: var(--color-primary); }
.cart-tipo-nota { font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.5rem; line-height: 1.35; }
@media (max-width: 640px) {
    .cart-summary { padding: 0.9rem 1rem calc(0.9rem + env(safe-area-inset-bottom)); }
    .cart-tipo-btn { padding: 0.6rem 0.75rem; font-size: 0.88rem; }
}

/* ===== resumen del tipo de entrega en el pago ===== */
.entrega-resumen { padding: 0.9rem 1rem; }
.entrega-resumen-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.entrega-resumen-texto { font-weight: 800; font-size: 1rem; }
.entrega-cambiar { font-size: 0.85rem; font-weight: 700; color: var(--color-primary); text-decoration: none; padding: 0.4rem 0.8rem; border: 1.5px solid var(--color-primary); border-radius: 999px; white-space: nowrap; }
.entrega-cambiar:hover { background: rgba(var(--color-primary-rgb), 0.08); }

/* ===== comensales (comer en el local) ===== */
.comensales-picker { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.comensal-btn { min-width: 44px; height: 44px; border-radius: 10px; border: 2px solid var(--border-color); background: var(--bg-secondary); font: inherit; font-weight: 700; cursor: pointer; }
.comensal-btn.active { border-color: var(--color-primary); background: rgba(var(--color-primary-rgb), 0.1); color: var(--color-primary); }

/* ===== cuenta de cliente ===== */
.cuenta-btn { display: inline-flex; align-items: center; gap: 0.4rem; color: #fff; text-decoration: none; font-weight: 700; font-size: 0.9rem; padding: 0.55rem 0.9rem; border-radius: 50px; border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.08); margin-right: 0.5rem; }
.cuenta-btn.con-sesion { border-color: rgba(201,162,39,0.6); }
.cuenta-btn:hover { background: rgba(255,255,255,0.16); }
@media (max-width: 640px) {
    .cuenta-btn { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; margin-right: 0.35rem; font-size: 1.05rem; flex-shrink: 0; }
    .cuenta-btn-label { display: none; }
}
.footer-accesos { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.cuenta-container { max-width: 520px; }
.cuenta-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.cuenta-tabs a { flex: 1; text-align: center; padding: 0.7rem; border-radius: 999px; font-weight: 700; text-decoration: none; color: var(--text-secondary); border: 2px solid var(--border-color); background: white; }
.cuenta-tabs a.active { color: var(--color-primary); border-color: var(--color-primary); background: rgba(var(--color-primary-rgb), 0.08); }
.cuenta-intro { margin: 0 0 1rem; color: var(--text-secondary); font-size: 0.92rem; line-height: 1.45; }
.cuenta-links { margin-top: 1rem; font-size: 0.88rem; line-height: 1.8; text-align: center; }
.cuenta-links a { color: var(--color-primary); font-weight: 600; text-decoration: none; }
.cuenta-hola { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; background: white; border-radius: var(--border-radius-lg); padding: 0.9rem 1rem; margin-bottom: 1rem; box-shadow: var(--shadow-sm); }
.cuenta-hola small { color: var(--text-secondary); }
.pedido-card { border-left: 5px solid var(--pc, #6b7280); padding: 1rem !important; }
.pedido-card.activo { box-shadow: 0 8px 22px -8px rgba(var(--color-primary-rgb), 0.35); }
.pedido-card-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.pedido-num { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 1.2rem; }
.pedido-estado { font-weight: 800; color: var(--pc, #6b7280); font-size: 0.9rem; }
.pedido-meta { color: var(--text-secondary); font-size: 0.85rem; margin-top: 0.25rem; }
.pedido-mesa { margin-top: 0.45rem; font-size: 0.9rem; background: rgba(var(--color-primary-rgb), 0.07); border-radius: 8px; padding: 0.45rem 0.6rem; }
.pedido-acciones { margin-top: 0.7rem; }
.cuenta-invitacion { margin-top: 1.25rem; background: rgba(var(--color-primary-rgb), 0.07); border: 1px solid rgba(var(--color-primary-rgb), 0.3); border-radius: 12px; padding: 0.9rem 1rem; font-size: 0.9rem; line-height: 1.45; text-align: left; }

/* ===== modo mesa (cliente sentado sigue pidiendo) ===== */
.mesa-banner { background: #065f46; color: #fff; text-align: center; font-size: 0.85rem; line-height: 1.4; padding: 0.55rem 0.9rem; }
.mesa-banner a { color: #fde68a; font-weight: 800; margin-left: 0.5rem; }
body.modo-mesa .cart-tipo { display: none; }
.pedido-seguir { display: flex; text-decoration: none; padding: 0.85rem 1rem; font-size: 1rem; margin-bottom: 0.5rem; }

/* ===== NOMBRE CLIENTE 2026-09-19: en celular el boton de cuenta muestra el nombre ===== */
@media (max-width: 640px) {
    .cuenta-btn.con-sesion { width: auto; height: 40px; padding: 0 0.7rem 0 0.55rem; border-radius: 50px; gap: 0.3rem; font-size: 0.82rem; }
    .cuenta-btn.con-sesion .cuenta-btn-label { display: inline; max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ===== CARRITO 2026-09-18: productos y "¿Cómo lo quieres?" con scroll; pie fijo con total y botón ===== */
.cart-sidebar { height: 100vh; height: 100dvh; }          /* dvh = alto visible real (sin la barra del navegador) */
.cart-header { flex: none; }
.cart-header-n { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.cart-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.cart-body .cart-items { flex: none; overflow: visible; }
.cart-body .cart-tipo { margin: 0 1rem 1rem; padding: 0.85rem 0.9rem; border: 1px solid var(--border-color); border-radius: 14px; background: var(--bg-primary); }
.cart-body .cart-tipo[hidden] { display: none; }
.cart-summary { flex: none; box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08); position: relative; z-index: 1; }
@media (max-width: 640px) {
    .cart-header { padding: 0.8rem 1rem; }
    .cart-header h3 { font-size: 1.15rem; }
    .cart-body .cart-items { padding: 0.75rem 1rem 0.5rem; }
    .cart-body .cart-tipo { margin: 0 1rem 0.9rem; padding: 0.75rem; }
    .cart-tipo-title { font-size: 0.9rem; margin-bottom: 0.45rem; }
    .cart-tipo-opciones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
    .cart-tipo-btn { padding: 0.55rem 0.5rem; font-size: 0.8rem; line-height: 1.2; text-align: center; min-height: 48px; display: flex; align-items: center; justify-content: center; }
    .cart-tipo-nota { font-size: 0.74rem; }
    .cart-summary { padding: 0.65rem 1rem calc(0.7rem + env(safe-area-inset-bottom)); }
    .cart-summary .summary-row:not(.total) { display: none; }   /* en el carrito subtotal = total */
    .cart-summary .summary-row.total { margin: 0; padding: 0; border: none; font-size: 1.05rem; align-items: baseline; }
    .cart-summary .min-order-warning { margin-top: 0.4rem; padding: 0.45rem 0.6rem; font-size: 0.78rem; }
    .cart-summary .checkout-btn { margin-top: 0.55rem; padding: 0.85rem; font-size: 1.02rem; }
}
.cart-body .cart-tipo.resaltar { animation: tipoResalta 1.4s ease 2; }
@keyframes tipoResalta { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--color-primary-rgb), 0); border-color: var(--border-color); } 40% { box-shadow: 0 0 0 5px rgba(var(--color-primary-rgb), 0.28); border-color: var(--color-primary); } }
.cart-summary .min-order-warning { cursor: pointer; }


/* ===== PROMOCIONES 2026-09-22 ===== */
.badge-promo {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff; font-weight: 800; letter-spacing: .01em;
    box-shadow: 0 4px 14px rgba(239, 68, 68, .45);
    animation: promo-late 1.4s ease-in-out infinite;
}
@keyframes promo-late {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 14px rgba(239, 68, 68, .45); }
    50% { transform: scale(1.07); box-shadow: 0 6px 22px rgba(239, 68, 68, .65); }
}
@media (prefers-reduced-motion: reduce) { .badge-promo { animation: none; } }

/* aviso flotante dentro del producto: "Agrega 2 y ahorra $60" */
.promo-flotante {
    position: sticky; top: .3rem; z-index: 5;
    display: flex; align-items: center; gap: .6rem;
    margin: 0 0 .9rem; padding: .7rem .9rem;
    border-radius: 14px; color: #fff; font-weight: 800; font-size: .95rem; line-height: 1.25;
    background: linear-gradient(120deg, #ef4444, #f59e0b);
    box-shadow: 0 10px 24px rgba(239, 68, 68, .35);
    animation: promo-entra .45s cubic-bezier(.2,.9,.3,1.2);
}
.promo-flotante .pf-ico { font-size: 1.5rem; animation: promo-late 1.4s ease-in-out infinite; }
.promo-flotante small { display: block; font-weight: 600; font-size: .78rem; color: rgba(255,255,255,.85); }
@keyframes promo-entra { from { transform: translateY(-10px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }

.summary-ahorro { color: #16a34a; font-weight: 800; }
.cart-item-promo { display: inline-block; margin-top: .2rem; font-size: .72rem; font-weight: 800; color: #b45309; background: #fef3c7; border-radius: 999px; padding: .1rem .5rem; }
