/* styles.css — Sistema de Diseño "AMANGO FRESCO CARIBEÑO" v2 */

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

:root {
    /* COLORES PRIMARIOS DE MARCA */
    --amango-green-dark: #046C32;
    --amango-green: #377F4A;
    --amango-green-light: #5AB936;
    --amango-yellow: #FCCE06;
    --amango-yellow-warm: #F4C31B;
    --amango-lime: #8EBF2C;

    /* FONDOS */
    --bg-cream: #FFFBF0;
    --bg-white: #FFFFFF;
    --bg-soft-yellow: #FEF8DC;
    --bg-soft-green: #EEF7E4;

    /* TEXTOS */
    --text-primary: #1A2E1F;
    --text-secondary: #3D5A47;
    --text-tertiary: #6B7F70;
    --text-on-green: #FFFFFF;

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

    /* GRADIENTES */
    --gradient-hero: linear-gradient(135deg, #5AB936 0%, #8EBF2C 50%, #FCCE06 100%);
    --gradient-btn-primary: linear-gradient(135deg, #377F4A 0%, #046C32 100%);
    --gradient-btn-secondary: linear-gradient(135deg, #FCCE06 0%, #F4C31B 100%);
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 12px 32px rgba(4, 108, 50, 0.15);
    --shadow-whatsapp: 0 8px 24px rgba(37, 211, 102, 0.4);

    --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-cream);
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-primary);
}

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

/* --- HEADER --- */
.header {
    position: relative;
    height: var(--header-height);
    background: var(--bg-cream);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(4, 108, 50, 0.06);
}

.header.scrolled {
    box-shadow: var(--shadow-soft);
    background: rgba(255, 255, 255, 0.95);
}

.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(--amango-green-dark);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-soft-green);
    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(4, 108, 50, 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(4, 108, 50, 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 transparent;
    background: rgba(255, 255, 255, 0.96);
    font-size: 15px;
    font-family: inherit;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: 0 8px 24px rgba(4, 108, 50, 0.12);
    transition: all 0.3s ease;
}

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

.search-input:focus {
    outline: none;
    border-color: var(--amango-yellow);
    background: var(--bg-white);
    box-shadow: 0 8px 28px rgba(252, 206, 6, 0.25);
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 10px;
    right: 10px;
    padding: 4px 0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    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: 5px 12px;
    background: var(--bg-white);
    border: 1px solid var(--amango-yellow);
    border-radius: 15px;
    font-size: 11px;
    font-weight: 700;
    color: var(--amango-green-dark);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.suggestion:hover {
    background: var(--amango-yellow);
}

.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-green);
    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(--amango-green-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* --- HERO --- */
.hero {
    min-height: 480px;
    background: var(--gradient-hero);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 80px 6% 100px;
    overflow: hidden;
    isolation: isolate;
}

/* Video de fondo del hero — invisible hasta que termina de cargar */
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: 0;
    transition: opacity 0.7s ease;
    pointer-events: none;
}

.hero-video.is-ready {
    opacity: 1;
}

/* Overlay desactivado: el video se muestra puro, sin capa de color encima */
.hero-overlay {
    display: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 320px;
    height: 320px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
}

.hero::before {
    content: '';
    position: absolute;
    bottom: -120px;
    left: -120px;
    width: 420px;
    height: 420px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 43% 57% 41% 59% / 51% 40% 60% 49%;
    filter: blur(60px);
    animation: blobMorph 15s linear infinite;
    pointer-events: 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;
    z-index: 2;
    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(4, 108, 50, 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(--amango-yellow);
    color: var(--amango-green-dark);
    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 {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}


@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: 0;
    background: rgba(255, 251, 240, 0.88);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    z-index: 900;
    padding: 4px 0;
    border-bottom: 1px solid rgba(4, 108, 50, 0.08);
}

.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: var(--bg-soft-green);
    border: none;
    color: var(--amango-green-dark);
    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: #e0efce;
}

.category-pill.active {
    background: var(--amango-green);
    color: #fff;
    box-shadow: 0 8px 18px rgba(4, 108, 50, 0.25);
    transform: translateY(-1px);
    position: relative;
    z-index: 2;
}

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

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

/* --- MENU GRID --- */
.menu-section {
    padding: 44px 5% 16px;
}

.section-title {
    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-white);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(4, 108, 50, 0.05), 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(4, 108, 50, 0.06);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 36px rgba(4, 108, 50, 0.14);
    border-color: rgba(252, 206, 6, 0.55);
}

.product-img-container {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(180deg, #fff 0%, #fdfdf7 100%);
    overflow: hidden;
    position: relative;
    padding: 8px;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    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(--amango-green);
    color: white;
}

.badge-top {
    background: var(--amango-yellow);
    color: var(--amango-green-dark);
}

.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-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

.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(--amango-green-dark);
    letter-spacing: -0.3px;
    line-height: 1;
}

.btn-add {
    background: var(--amango-yellow);
    color: var(--amango-green-dark);
    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(252, 206, 6, 0.45);
}

.btn-add i {
    color: var(--amango-green-dark) !important;
    font-size: 16px !important;
    font-weight: 900 !important;
}

.btn-add:hover {
    transform: scale(1.08);
    box-shadow: 0 7px 18px rgba(252, 206, 6, 0.55);
}

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

/* Feedback al agregar directo al carrito */
.btn-add.btn-add-success {
    background: var(--amango-green) !important;
    box-shadow: 0 6px 18px rgba(4, 108, 50, 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-white);
    width: 100%;
    max-width: 580px;
    max-height: 92vh;
    border-radius: var(--radius-lg);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    position: relative;
    animation: modalIn 0.3s ease;
}

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

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

.modal-close {
    position: fixed;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    background: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
}

.modal-close i {
    color: var(--amango-green-dark);
    font-size: 20px;
    font-weight: 900;
}

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

.modal-img {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(180deg, #fff 0%, var(--bg-cream) 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;
}

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

.modal-price {
    font-size: 26px;
    font-weight: 800;
    color: var(--amango-green-dark);
    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;
}

/* ── MODIFICADORES (TAJÍN, CHAMOY, BEBIDA MICHELADA, SALSA WAFFLE…) ── */
.modal-modificadores {
    margin: 4px 0 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modifier-group {
    border: 2px solid var(--bg-soft-green);
    background: var(--bg-cream);
    border-radius: var(--radius-md);
    padding: 14px 14px 8px;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.modifier-group-error {
    border-color: var(--danger) !important;
    background: #FFF4F4 !important;
    animation: shakeMod 0.4s ease;
}

@keyframes shakeMod {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-3px); }
}

.modifier-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-weight: 800;
    font-size: 13.5px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 10px;
}

.modifier-req {
    background: var(--amango-yellow);
    color: var(--text-primary);
    font-size: 10.5px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.modifier-opt {
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.modifier-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modifier-option {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-white);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.modifier-option:hover {
    border-color: var(--amango-yellow);
}

.modifier-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.modifier-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--bg-soft-green);
    background: var(--bg-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.modifier-option input[type="checkbox"] ~ .modifier-check {
    border-radius: 6px;
}

.modifier-option input:checked ~ .modifier-check {
    border-color: var(--amango-green-dark);
    background: var(--amango-green-dark);
}

.modifier-option input:checked ~ .modifier-check::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bg-white);
}

.modifier-option input[type="checkbox"]:checked ~ .modifier-check::after {
    content: "✓";
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: var(--bg-white);
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
}

.modifier-option:has(input:checked) {
    border-color: var(--amango-green-dark);
    background: var(--bg-soft-green);
}

.modifier-option:has(input:checked) .modifier-label {
    color: var(--amango-green-dark);
    font-weight: 700;
}

.modifier-label {
    flex: 1;
    font-size: 14.5px;
    color: var(--text-primary);
    font-weight: 600;
}

.modifier-price {
    font-size: 13px;
    font-weight: 800;
    color: var(--amango-green-dark);
    background: var(--bg-soft-yellow);
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

/* Modificadores elegidos dentro del item del carrito */
.cart-item-mods {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin: 4px 0;
}

.cart-mod {
    background: var(--bg-soft-green);
    color: var(--amango-green-dark);
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    line-height: 1.2;
}

.cart-mod-extra {
    color: var(--amango-green-dark);
    font-weight: 800;
}

.notes-input {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--bg-soft-green);
    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(--amango-yellow);
}

.modal-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    /* Sticky al fondo del scroll del modal: la cantidad y el "Agregar al carrito"
       siempre se ven mientras el cliente desliza para revisar la imagen y opciones. */
    position: sticky;
    bottom: 0;
    background: var(--bg-white);
    margin: 14px -28px -28px; /* compensa el padding 28px del .modal-body */
    padding: 16px 28px 18px;
    border-top: 1px solid #eee;
    box-shadow: 0 -8px 18px rgba(0, 0, 0, 0.04);
    z-index: 4;
}

.quantity-selector {
    display: flex;
    align-items: center;
    background: var(--bg-soft-green);
    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(--amango-green-dark);
    transition: all 0.2s;
}

.qty-btn:hover {
    background: var(--amango-yellow);
}

.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(4, 108, 50, 0.22);
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(4, 108, 50, 0.3);
}

/* --- CART FLOATING --- */
.cart-floating {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--amango-green-dark);
    color: white;
    padding: 13px 22px;
    border-radius: 40px;
    box-shadow: 0 12px 32px rgba(4, 108, 50, 0.4);
    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);
}

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

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

.cart-count {
    background: var(--amango-yellow);
    color: var(--amango-green-dark);
    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%;
    background: var(--bg-white);
    z-index: 2600;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* Un solo scroll para todo el drawer: productos + resumen + pasarela de pago */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.15);
}

.drawer.open {
    right: 0;
}

.drawer-header {
    padding: 22px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Header pegajoso arriba mientras se hace scroll del contenido */
    position: sticky;
    top: 0;
    background: var(--bg-white);
    z-index: 5;
}

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

.drawer-body {
    padding: 22px 24px 8px;
}

.cart-item {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f5f5f5;
}

.cart-item-img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--bg-cream);
    flex-shrink: 0;
}

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

.cart-item-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 14.5px;
}

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

.cart-item-price {
    color: var(--amango-green-dark);
    font-weight: 800;
    font-size: 14px;
}

.drawer-footer {
    padding: 22px 24px;
    background: var(--bg-cream);
    border-top: 1px solid #eee;
}

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

.summary-total {
    font-size: 19px;
    font-weight: 800;
    color: var(--text-primary);
    border-top: 2px dashed #ccc;
    padding-top: 14px;
    margin-top: 14px;
}

.btn-checkout {
    width: 100%;
    background: var(--whatsapp);
    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: 18px;
    animation: pulse-whatsapp 2s infinite;
    letter-spacing: 0.3px;
}

/* --- CHECKOUT FORM --- */
.checkout-form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.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 var(--bg-soft-green);
    background: white;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    transition: border 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--amango-yellow);
    outline: none;
    box-shadow: 0 0 0 4px rgba(252, 206, 6, 0.15);
}

/* --- FOOTER --- */
footer {
    padding: 56px 5% 36px;
    background: var(--bg-white);
    text-align: center;
    border-top: 1px solid rgba(4, 108, 50, 0.05);
}

.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(--amango-green-dark);
    text-decoration: none;
    font-size: 19px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--amango-green);
    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 #eee;
    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 #f9f9f9;
    font-size: 13.5px;
    transition: background 0.2s;
}

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

.barrio-suggestion-item b {
    color: var(--amango-green-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;
        /* Ajuste del sticky para móvil: el padding del .modal-body es 22px 20px */
        margin: 12px -20px -22px;
        padding: 14px 20px 16px;
    }

    .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 */
.menu-section.section-top {
    background: linear-gradient(180deg, rgba(252, 206, 6, 0.10) 0%, rgba(255, 251, 240, 0) 100%);
    border-radius: 0 0 24px 24px;
    padding-top: 30px;
}

.menu-section.section-top .section-title::after {
    content: 'TOP';
    background: var(--amango-yellow);
    color: var(--amango-green-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-green);
    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(--amango-green);
    color: #fff;
    box-shadow: 0 6px 14px rgba(4, 108, 50, 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-green);
    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(--amango-green);
}

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

.payment-opt.active i {
    color: var(--amango-green-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(--amango-yellow);
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 12px rgba(252, 206, 6, 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(--amango-green-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-green);
    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(--amango-green-light);
    background: var(--bg-soft-green);
}

.pickup-sede-card.active {
    background: var(--bg-soft-green);
    border-color: var(--amango-green);
    box-shadow: 0 6px 16px rgba(4, 108, 50, 0.14);
}

.pickup-sede-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--amango-green);
    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(--amango-green-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(--amango-green);
    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(--amango-green-dark);
    background: var(--amango-green-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(--amango-green-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;
}
