/* styles.css — Sistema de Diseño "CHAMOY ARTESANAL" v1
   Dulce · Ácido · Picante · Y ADICTIVO! */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@600;700&family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
    /* COLORES PRIMARIOS DE MARCA — DARK MODE + BRAND RED */
    --chamoy-red: #A81C2A;
    --chamoy-red-dark: #7C1320;
    --chamoy-red-light: #D63654;
    --chamoy-orange: #F2821A;
    --chamoy-orange-warm: #E36D0A;
    --chamoy-cream: #3D2818;
    --bg-dark-deep: #1C1614;      /* Carbón cálido (tinte marrón sutil) */
    --bg-dark: #1C1614;           /* Alias compatibilidad */
    --bg-dark-card: #241E1B;      /* Tarjeta cálida */
    --text-smoke: #EAEAEA;        /* Blanco Hueso para textos */
    --mango-yellow: #FFC107;

    /* JERARQUÍA DE SUPERFICIES (4 niveles) */
    --bg-section: #1F1816;        /* Sección intermedia entre page y card */
    --bg-card-hover: #2D2521;     /* Card en hover */
    --bg-modal: #322823;          /* Modal / drawer elevado */

    /* SUPERFICIES COMPATIBLES (heredadas del tema claro, mapeadas a oscuro) */
    --bg-cream: #241E1B;          /* Antes crema → ahora tarjeta oscura cálida */
    --bg-white: #2D2521;          /* Antes blanco puro → ahora tarjeta elevada cálida */
    --bg-soft-red: #3A1A1F;       /* Antes rosado suave → ahora rojo oscuro tenue */
    --bg-soft-yellow: #3A2818;    /* Antes amarillo suave → ahora ámbar oscuro */

    /* TEXTOS */
    --text-primary: #EAEAEA;
    --text-secondary: #CCCCCC;
    --text-tertiary: #999999;
    --text-on-red: #FFFFFF;

    /* FUNCIONALES */
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --whatsapp: #25D366;

    /* GRADIENTES */
    --gradient-hero: linear-gradient(135deg, #D63654 0%, #A81C2A 50%, #8B0E24 100%);
    --gradient-btn-primary: linear-gradient(135deg, #A81C2A 0%, #8B0E24 100%);
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-medium: 0 12px 32px rgba(0, 0, 0, 0.4);
    --shadow-red: 0 8px 24px rgba(168, 28, 42, 0.35);

    --header-height: 76px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark-deep);
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(168, 28, 42, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(168, 28, 42, 0.03) 0%, transparent 45%);
    background-attachment: fixed;
    color: var(--text-smoke);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.2px;
}

h1 {
    font-weight: 700;
}

.font-branding {
    font-family: 'Fredoka', sans-serif;
}

/* --- HEADER --- */
.header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: var(--bg-dark-deep);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    border-bottom: 1px solid rgba(168, 28, 42, 0.22);
}

.header.scrolled {
    background: rgba(26, 26, 26, 0.92);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
    border-bottom-color: rgba(168, 28, 42, 0.25);
}

.header-logo img {
    height: 64px;
    object-fit: contain;
    transition: all 0.3s ease;
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-info-text {
    font-size: 12px;
    font-weight: 700;
    color: var(--chamoy-red-dark);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-soft-red);
    padding: 7px 14px;
    border-radius: 20px;
    line-height: 1;
    white-space: nowrap;
}

.header-cta {
    background: var(--gradient-btn-primary);
    color: #fff;
    padding: 9px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(176, 20, 47, 0.22);
    transition: all 0.25s ease;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.header-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(176, 20, 47, 0.28);
}

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

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 16px;
        height: 66px;
    }

    .header-logo img {
        height: 50px;
    }

    .header-right {
        gap: 8px;
    }

    .header-info-label {
        display: none;
    }

    .header-info-text {
        padding: 7px 9px;
    }

    .header-cta {
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* --- SEARCH --- */
.search-container {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
    position: relative;
}

.hero-search {
    width: 100%;
    max-width: 520px;
    margin: 0 0 24px;
}

.search-input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: #262626;
    font-size: 15px;
    font-family: inherit;
    font-weight: 500;
    color: var(--text-smoke);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: var(--text-tertiary);
    font-weight: 500;
}

.search-input:focus {
    outline: none;
    border-color: var(--chamoy-orange);
    background: var(--bg-white);
    box-shadow: 0 8px 28px rgba(243, 156, 31, 0.25);
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    padding: 4px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateY(-10px);
}

.search-container:focus-within .search-suggestions {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.search-suggestions::-webkit-scrollbar {
    display: none;
}

.suggestion {
    padding: 6px 14px;
    background: rgba(28, 22, 20, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid var(--chamoy-orange);
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    color: var(--chamoy-orange);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.suggestion:hover {
    background: var(--chamoy-orange);
    color: #1C1614;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
}

.delivery-toggle {
    display: flex;
    background: var(--bg-soft-red);
    padding: 4px;
    border-radius: 30px;
    gap: 4px;
}

.toggle-btn {
    padding: 8px 16px;
    border-radius: 25px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toggle-btn.active {
    background: var(--bg-white);
    color: var(--chamoy-red-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* --- HERO --- */
.hero {
    min-height: 480px;
    background-color: var(--bg-dark-deep);
    background-image:
        linear-gradient(135deg, rgba(168, 28, 42, 0.42) 0%, rgba(28, 22, 20, 0.95) 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 80px 6% 100px;
    overflow: hidden;
    isolation: isolate;
}

/* Overlay decorativo (vignette inferior) para mejorar contraste del texto */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, transparent 50%, rgba(139, 14, 36, 0.35) 100%);
    pointer-events: none;
    z-index: -1;
}

/* Video de fuego como fondo del hero — el negro se vuelve transparente con mix-blend-mode */
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: screen;
    opacity: 0.95;
}

/* Banda de fade entre el hero y el contenido para evitar el corte abrupto */
.hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 90px;
    background: linear-gradient(180deg, transparent 0%, var(--bg-dark-deep) 100%);
    pointer-events: none;
    z-index: 2;
}

.hero::before {
    display: none;
}

@keyframes blobMorph {
    0% {
        border-radius: 43% 57% 41% 59% / 51% 40% 60% 49%;
    }

    50% {
        border-radius: 70% 30% 60% 40% / 40% 60% 30% 70%;
    }

    100% {
        border-radius: 43% 57% 41% 59% / 51% 40% 60% 49%;
    }
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 7px 16px;
    border-radius: 20px;
    color: white;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 22px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.hero-title {
    font-size: 64px;
    color: white;
    line-height: 1.02;
    margin-bottom: 14px;
    letter-spacing: -1px;
    text-shadow: 0 4px 18px rgba(176, 20, 47, 0.18);
}

/* Salto de línea extra que sólo aparece en mobile */
.hero-title .br-mobile-only {
    display: none;
}

.hero-subtitle {
    font-size: 22px;
    color: white;
    opacity: 0.96;
    margin-bottom: 28px;
    font-weight: 500;
}

.btn-hero {
    background: var(--chamoy-red);
    color: white;
    padding: 16px 32px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 800;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
    transition: all 0.3s ease;
    margin-top: 4px;
}

.btn-hero:hover {
    background: var(--chamoy-orange);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 16px 32px rgba(242, 130, 26, 0.25);
}


@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 36px 5% 40px;
        text-align: center;
    }

    .hero-content {
        align-items: center;
        text-align: center;
        max-width: 100%;
    }

    .hero-search {
        margin-left: auto;
        margin-right: auto;
    }


    .hero-title {
        font-size: 38px;
    }

    /* En mobile mantenemos los saltos para que se lea en tres líneas:
       "Pa' que se te" / "haga agua" / "la boca" */
    .hero-title br {
        display: inline;
    }

    .hero-subtitle {
        font-size: 17px;
        margin-bottom: 20px;
    }
}

/* --- CATEGORY BAR --- */
.category-bar {
    position: sticky;
    top: var(--header-height);
    background: rgba(28, 22, 20, 0.92);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    z-index: 900;
    padding: 4px 0;
    border-bottom: 1px solid rgba(168, 28, 42, 0.22);
}

.category-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 20px 5% 30px; /* Aumentado a 30px para la sombra */
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch; /* Mejora el scroll en iOS */
}

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

.category-pill {
    white-space: nowrap;
    padding: 9px 18px;
    border-radius: 30px;
    background: #2A2A2A;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    user-select: none;
}

.category-pill:hover {
    background: #FCEDE9;
}

.category-pill.active {
    background: var(--chamoy-red);
    color: #fff;
    box-shadow: 0 8px 18px rgba(176, 20, 47, 0.25);
    transform: translateY(-1px);
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .category-bar {
        top: 66px;
        padding: 4px 0;
    }

    .category-pill {
        font-size: 12.5px;
        padding: 8px 14px;
    }
}

/* --- MENU GRID --- */
#menu-container {
    background-color: var(--bg-dark-deep);
    padding-bottom: 60px;
}

.menu-section {
    padding: 44px 5% 16px;
    border-bottom: 1px solid rgba(168, 28, 42, 0.22);
}

.menu-section:last-of-type {
    border-bottom: none;
}

.section-title {
    color: var(--text-primary);
    font-size: 30px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.5px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 22px;
}

@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .menu-section {
        padding: 28px 4% 12px;
    }
}

/* --- PRODUCT CARD --- */
.product-card {
    background: var(--bg-dark-card);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2), 0 0 15px rgba(168, 28, 42, 0.1);
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(168, 28, 42, 0.3);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 36px rgba(0, 0, 0, 0.4), 0 0 25px rgba(168, 28, 42, 0.3);
    border-color: var(--chamoy-red);
}

.product-img-container {
    width: 100%;
    aspect-ratio: 1/1;
    background: radial-gradient(ellipse at 50% 45%, #3A3027 0%, #241E1B 65%, #1C1614 100%);
    overflow: hidden;
    position: relative;
    padding: 10px;
    border-radius: 18px 18px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px; /* Marco interno redondeado para la imagen */
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.badge-new {
    background: var(--mango-yellow);
    color: var(--bg-dark);
}

.badge-top {
    background: var(--chamoy-orange);
    color: white;
}

.badge-out {
    background: #666;
    color: white;
}

.product-info {
    padding: 14px 14px 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-smoke);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-desc {
    font-size: 11.5px;
    color: var(--text-tertiary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.product-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
}

.product-price {
    font-size: 19px;
    font-weight: 800;
    color: var(--text-smoke);
    letter-spacing: -0.3px;
    line-height: 1;
}

.btn-add {
    background: var(--chamoy-red);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 14px rgba(243, 156, 31, 0.45);
}

.btn-add i {
    color: white !important;
    font-size: 16px !important;
    font-weight: 900 !important;
}

.btn-add:hover {
    transform: scale(1.08);
    background: var(--chamoy-orange);
    box-shadow: 0 7px 18px rgba(242, 130, 26, 0.4);
}

.btn-add:active {
    transform: scale(0.92);
}

/* Feedback al agregar directo al carrito */
.btn-add.btn-add-success {
    background: var(--chamoy-red) !important;
    box-shadow: 0 6px 18px rgba(176, 20, 47, 0.45) !important;
    animation: addedPop 0.6s ease;
}

.btn-add.btn-add-success i {
    color: #fff !important;
}

.btn-add.btn-add-success i::before {
    content: "\f00c" !important; /* fa-check */
}

@keyframes addedPop {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.25); }
    70%  { transform: scale(0.95); }
    100% { transform: scale(1); }
}

@media (max-width: 600px) {
    .product-info {
        padding: 10px 10px 10px;
    }

    .product-name {
        font-size: 13px;
        min-height: 2.4em;
    }

    .product-desc {
        font-size: 11px;
    }

    .product-price {
        font-size: 16px;
    }

    .btn-add {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .btn-add i {
        font-size: 13px !important;
    }
}

/* --- MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal {
    background: var(--bg-dark-card);
    width: 100%;
    max-width: 580px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    animation: modalIn 0.3s ease;
    color: var(--text-smoke);
}

@keyframes modalIn {
    from {
        transform: scale(0.92);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    background: var(--bg-dark-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-close i {
    color: var(--chamoy-red);
    font-size: 18px;
    font-weight: 900;
}

.modal-close:hover {
    transform: rotate(90deg);
    background: var(--bg-soft-yellow);
}

.modal-img {
    width: 100%;
    aspect-ratio: 4/3;
    background: radial-gradient(ellipse at 50% 45%, #3A3027 0%, #241E1B 65%, #1C1614 100%);
    object-fit: contain;
    padding: 12px;
}

.modal-body {
    padding: 26px 28px 28px;
}

.modal-name {
    font-size: 28px;
    margin-bottom: 8px;
    letter-spacing: -0.6px;
    line-height: 1.15;
    color: var(--text-smoke);
}

.modal-desc {
    color: var(--text-tertiary);
    margin-bottom: 18px;
    font-size: 14.5px;
}

.modal-price {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-smoke);
    margin-bottom: 22px;
    letter-spacing: -0.5px;
}

.modal-label {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.notes-input {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--bg-soft-red);
    background: var(--bg-cream);
    resize: none;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 22px;
    transition: border 0.2s;
}

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

.modal-footer {
    display: flex;
    align-items: center;
    gap: 16px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    background: var(--bg-soft-red);
    border-radius: 30px;
    padding: 5px;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-white);
    cursor: pointer;
    font-weight: 800;
    font-size: 18px;
    color: var(--chamoy-red);
    transition: all 0.2s;
}

.qty-btn:hover {
    background: var(--chamoy-orange);
}

.qty-val {
    width: 38px;
    text-align: center;
    font-weight: 800;
    font-size: 16px;
    color: var(--text-primary);
}

.btn-add-cart {
    flex-grow: 1;
    background: var(--gradient-btn-primary);
    color: white;
    border: none;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 14.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(176, 20, 47, 0.22);
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    background: var(--chamoy-orange);
    box-shadow: 0 12px 24px rgba(242, 130, 26, 0.3);
}

/* --- CART FLOATING --- */
.cart-floating {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--chamoy-red);
    color: white;
    padding: 13px 22px;
    border-radius: 40px;
    box-shadow: 0 8px 32px rgba(168, 28, 42, 0.6), 0 0 15px rgba(168, 28, 42, 0.3);
    display: none;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    z-index: 1500;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.cart-floating:hover {
    transform: scale(1.04) translateY(-3px);
    background: var(--chamoy-orange);
}

.cart-floating.pulse {
    animation: cart-bounce 0.4s ease;
}

.cart-count {
    background: white;
    color: var(--chamoy-red);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
}

/* Espacio extra al final para que el carrito no tape la última fila */
main#menu-container {
    padding-bottom: 110px;
}

/* --- CART DRAWER --- */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2500;
    display: none;
}

.drawer {
    position: fixed;
    top: 0;
    right: -460px;
    width: 440px;
    height: 100%;
    max-width: 100vw;
    background: var(--bg-dark-deep);
    color: var(--text-smoke);
    z-index: 2600;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.4);
    min-height: 0;
}

.drawer.open {
    right: 0;
}

.drawer-header {
    padding: 22px 24px;
    border-bottom: 1px solid rgba(168, 28, 42, 0.22);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.drawer-header h3 {
    font-size: 20px;
    letter-spacing: -0.4px;
}

/* Cart items: scroll independiente, máx 38% del alto del drawer */
.drawer-body {
    flex: 0 1 auto;
    max-height: 38vh;
    overflow-y: auto;
    padding: 18px 24px;
    background: var(--bg-dark-deep);
}

.cart-item {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
    padding: 12px;
    background: var(--bg-dark-card);
    border: 1px solid rgba(168, 28, 42, 0.15);
    border-radius: 14px;
}

.cart-item:last-child {
    margin-bottom: 0;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: contain;
    background: radial-gradient(ellipse at 50% 45%, #3A3027 0%, #241E1B 65%, #1C1614 100%);
    padding: 4px;
    flex-shrink: 0;
}

.cart-item-info {
    flex-grow: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13.5px;
    line-height: 1.25;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item-notes {
    font-size: 11.5px;
    color: var(--text-tertiary);
    margin: 4px 0;
    font-style: italic;
}

.cart-item-price {
    color: var(--chamoy-orange);
    font-weight: 700;
    font-size: 13px;
}

/* Cantidad dentro del carrito — más chiquita y discreta */
.cart-item .quantity-selector {
    margin-top: 8px !important;
    transform: scale(0.78) !important;
    transform-origin: left center !important;
    background: var(--bg-dark-deep);
    border: 1px solid rgba(168, 28, 42, 0.22);
}

.cart-item .qty-btn {
    width: 30px;
    height: 30px;
    font-size: 16px;
    background: transparent;
    color: var(--chamoy-orange);
}

.cart-item .qty-val {
    width: 30px;
    font-size: 14px;
    color: var(--text-primary);
}

/* Footer: ocupa el resto y permite scroll interno del form */
.drawer-footer {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 18px 24px 18px;
    background: var(--bg-section);
    border-top: 1px solid rgba(168, 28, 42, 0.22);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    flex-shrink: 0;
}

.summary-total {
    font-size: 19px;
    font-weight: 800;
    color: var(--text-primary);
    border-top: 1px solid rgba(168, 28, 42, 0.22);
    padding-top: 14px;
    margin-top: 0;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.btn-checkout {
    width: 100%;
    background: var(--chamoy-red);
    color: white;
    border: none;
    padding: 18px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
    box-shadow: 0 8px 24px rgba(168, 28, 42, 0.3);
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-checkout:hover {
    background: var(--chamoy-orange);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(242, 130, 26, 0.4);
}

/* --- CHECKOUT FORM --- */
/* Scroll independiente del form: ocupa el espacio restante del drawer-footer */
.checkout-form {
    display: grid;
    gap: 14px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
    margin-right: -4px;
}

/* Scrollbars sutiles para el carrito y el form */
.drawer-body::-webkit-scrollbar,
.checkout-form::-webkit-scrollbar {
    width: 6px;
}
.drawer-body::-webkit-scrollbar-thumb,
.checkout-form::-webkit-scrollbar-thumb {
    background: rgba(168, 28, 42, 0.35);
    border-radius: 3px;
}
.drawer-body::-webkit-scrollbar-track,
.checkout-form::-webkit-scrollbar-track {
    background: transparent;
}

.form-group label {
    display: block;
    font-size: 11.5px;
    font-weight: 800;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-secondary);
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: #2A2A2A;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-smoke);
    transition: border 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--chamoy-orange);
    outline: none;
    box-shadow: 0 0 0 4px rgba(243, 156, 31, 0.15);
}

/* --- FOOTER --- */
footer {
    padding: 56px 5% 36px;
    background: var(--bg-section);
    text-align: center;
    border-top: 1px solid rgba(168, 28, 42, 0.22);
    box-shadow: inset 0 1px 0 rgba(168, 28, 42, 0.08);
    color: var(--text-smoke);
}

footer p {
    color: rgba(255, 255, 255, 0.7) !important;
}

.footer-logo {
    height: 56px;
    margin-bottom: 16px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-bottom: 26px;
}

.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--chamoy-red-dark);
    text-decoration: none;
    font-size: 19px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--chamoy-red);
    color: white;
    transform: translateY(-3px);
}

/* --- AUTOCOMPLETE BARRIOS --- */
.autocomplete-container {
    position: relative;
}

.barrio-suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid rgba(168, 28, 42, 0.22);
    border-radius: 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    display: none;
}

.barrio-suggestion-item {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(168, 28, 42, 0.22);
    font-size: 13.5px;
    transition: background 0.2s;
}

.barrio-suggestion-item:hover {
    background: var(--bg-soft-red);
    color: var(--chamoy-red-dark);
}

.barrio-suggestion-item b {
    color: var(--chamoy-red-dark);
}

.product-card.reveal {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-whatsapp {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(34, 197, 94, 0);
    }
}

@keyframes cart-bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .drawer {
        width: 100%;
        right: -100%;
    }

    .drawer-header,
    .drawer-body,
    .drawer-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .section-title {
        font-size: 22px;
        margin-bottom: 16px;
    }

    .modal {
        border-radius: 24px 24px 0 0;
        position: absolute;
        bottom: 0;
        animation: slideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    }

    .modal-body {
        padding: 22px 20px 22px;
    }

    .modal-name {
        font-size: 22px;
    }

    .modal-price {
        font-size: 22px;
    }

    .modal-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .quantity-selector {
        align-self: center;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* ============================================================
   NUEVOS COMPONENTES (más vendidos, switch retiro, pagos, modales)
   ============================================================ */

/* Sección Más Vendidos con destaque — glow rojizo que empata con el banner */
.menu-section.section-top {
    background: linear-gradient(180deg, rgba(168, 28, 42, 0.22) 0%, rgba(168, 28, 42, 0) 100%);
    padding-top: 30px;
}

.menu-section.section-top .section-title::after {
    content: 'TOP';
    background: var(--chamoy-orange);
    color: var(--chamoy-red-dark);
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 12px;
    margin-left: 8px;
    letter-spacing: 0.5px;
}

/* Switch Domicilio / Retiro en el carrito */
.delivery-switch {
    display: flex;
    background: var(--bg-white);
    border: 2px solid var(--bg-soft-red);
    border-radius: 14px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 18px;
}

.delivery-opt {
    flex: 1;
    padding: 10px 8px;
    border-radius: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
    font-family: inherit;
}

.delivery-opt i {
    font-size: 15px;
}

.delivery-opt.active {
    background: var(--chamoy-red);
    color: #fff;
    box-shadow: 0 6px 14px rgba(176, 20, 47, 0.22);
}

/* Pista bajo input */
.form-hint {
    display: block;
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 5px;
    font-weight: 500;
}

.form-input.invalid {
    border-color: var(--danger) !important;
    background: rgba(239, 68, 68, 0.04) !important;
}

.form-hint.error {
    color: var(--danger);
    font-weight: 700;
}

/* Métodos de pago */
.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.payment-opt {
    padding: 12px 8px;
    border-radius: 10px;
    border: 2px solid var(--bg-soft-red);
    background: var(--bg-white);
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
    font-family: inherit;
}

.payment-opt i {
    font-size: 15px;
    color: var(--chamoy-red);
}

.payment-opt.active {
    background: var(--bg-soft-red);
    border-color: var(--chamoy-red);
    color: var(--chamoy-red-dark);
}

.payment-opt.active i {
    color: var(--chamoy-red-dark);
}

/* Modal de éxito */
.success-modal,
.after-hours-modal {
    text-align: center;
    padding: 36px 28px 28px;
    max-width: 480px;
}

.success-icon {
    font-size: 72px;
    color: var(--success);
    margin-bottom: 16px;
    animation: successPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.after-hours-icon {
    font-size: 64px;
    color: var(--chamoy-orange);
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 12px rgba(243, 156, 31, 0.35));
}

.success-title {
    font-size: 26px;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.success-desc {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 22px;
    line-height: 1.5;
}

.success-desc strong {
    color: var(--chamoy-red-dark);
}

#success-close,
#after-hours-close {
    width: 100%;
    margin-top: 6px;
}

@keyframes successPop {
    0%   { transform: scale(0); opacity: 0; }
    60%  { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); }
}

/* Selector de sede para retiro en tienda */
.pickup-sede-group {
    margin-bottom: 18px;
    animation: fadeInUp 0.3s ease;
}

.pickup-sede-options {
    display: grid;
    gap: 10px;
}

.pickup-sede-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    border: 2px solid var(--bg-soft-red);
    background: var(--bg-white);
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    text-align: left;
    width: 100%;
}

.pickup-sede-card:hover {
    border-color: var(--chamoy-red-light);
    background: var(--bg-soft-red);
}

.pickup-sede-card.active {
    background: var(--bg-soft-red);
    border-color: var(--chamoy-red);
    box-shadow: 0 6px 16px rgba(176, 20, 47, 0.14);
}

.pickup-sede-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--chamoy-red);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.pickup-sede-card.active .pickup-sede-icon {
    background: var(--chamoy-red-dark);
}

.pickup-sede-info {
    flex-grow: 1;
    min-width: 0;
}

.pickup-sede-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: 4px;
}

.pickup-sede-address {
    font-size: 12.5px;
    color: var(--text-tertiary);
    line-height: 1.35;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pickup-sede-address i {
    color: var(--chamoy-red);
    font-size: 11px;
}

.pickup-sede-radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    background: #fff;
}

.pickup-sede-card.active .pickup-sede-radio {
    border-color: var(--chamoy-red-dark);
    background: var(--chamoy-red-dark);
}

.pickup-sede-card.active .pickup-sede-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}

/* Toast tipo notificación discreta (no se usa por ahora pero queda listo) */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--chamoy-red-dark);
    color: #fff;
    padding: 14px 22px;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    z-index: 5000;
    font-weight: 700;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
