/* ==========================================================================
   RESET & VARIABLES GLOBALES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-dark: #0d0d0d;
    --bg-surface: #171717;
    --card-bg: #1f1f1f;
    --card-hover: #262626;
    --gold: #dfb15b;
    --gold-bright: #f5c158;
    --gold-dark: #9e7529;
    --gold-glow: rgba(223, 177, 91, 0.25);
    --text-white: #ffffff;
    --text-light: #f0f0f0;
    --text-muted: #a1a1aa;
    --border-color: #2e2e2e;
    --border-light: #3f3f46;
    
    /* Etiquetas de Alérgenos / Restricciones */
    --tag-veggie: #10b981;
    --tag-veggie-bg: rgba(16, 185, 129, 0.15);
    --tag-sintacc: #f59e0b;
    --tag-sintacc-bg: rgba(245, 158, 11, 0.15);
    --tag-spicy: #ef4444;
    --tag-spicy-bg: rgba(239, 68, 68, 0.15);
    --tag-compartir: #3b82f6;
    --tag-compartir-bg: rgba(59, 130, 246, 0.15);

    --font-heading: 'Oswald', sans-serif;
    --font-sub: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    --header-height: 240px;
    --sticky-nav-height: 52px;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-body);
    padding-bottom: 90px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* ==========================================================================
   HEADER / BRANDING
   ========================================================================== */
.header {
    width: 100%;
    background: radial-gradient(circle at top, #241e12 0%, #0d0d0d 80%);
    border-bottom: 1px solid var(--border-color);
    padding: 24px 16px 16px 16px;
    display: flex;
    justify-content: center;
}

.header-container {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo-container {
    margin-bottom: 10px;
}

.logo {
    max-width: 130px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.04);
}

.welcome-title {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    letter-spacing: 3px;
    color: var(--text-white);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.subtitle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--gold);
    font-family: var(--font-sub);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 18px;
}

.star {
    color: var(--gold);
    font-size: 0.85rem;
}

/* Selector de Cartas (Tabs) */
.cartas-selector {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 480px;
    background-color: rgba(20, 20, 20, 0.8);
    padding: 4px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    margin-bottom: 14px;
}

.carta-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 25px;
    color: var(--text-muted);
    font-family: var(--font-sub);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.carta-tab.active {
    background: var(--gold);
    color: #000;
    box-shadow: 0 2px 10px var(--gold-glow);
}

.carta-tab:hover:not(.active) {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.05);
}

/* Barra de Búsqueda y Redes */
.search-section-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 480px;
}

.search-bar-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.instagram-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    color: #ffffff;
    border-radius: 50%;
    font-size: 1.25rem;
    text-decoration: none;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(214, 36, 159, 0.35);
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.instagram-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 14px rgba(214, 36, 159, 0.6);
    color: #ffffff;
}

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

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--gold);
    font-size: 0.9rem;
    pointer-events: none;
}

#search-input {
    width: 100%;
    padding: 10px 38px 10px 38px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#search-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px var(--gold-glow);
}

#search-input::placeholder {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.clear-search-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.clear-search-btn:hover {
    color: var(--gold);
}

.clear-search-btn.hidden {
    display: none;
}

/* ==========================================================================
   NAVEGADOR HORIZONTAL STICKY DE CATEGORÍAS
   ========================================================================== */
.sticky-category-nav {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 90;
    width: 100%;
    background-color: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    display: flex;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.chips-scroll-container {
    width: 100%;
    max-width: 900px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.chips-scroll-container::-webkit-scrollbar {
    display: none;
}

.nav-chip {
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 7px 16px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-family: var(--font-sub);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.nav-chip:hover {
    color: var(--text-white);
    border-color: var(--border-light);
    transform: translateY(-1px);
}

.nav-chip.active {
    background-color: var(--gold);
    color: #000;
    border-color: var(--gold);
    box-shadow: 0 2px 10px var(--gold-glow);
}

/* ==========================================================================
   CONTENIDO PRINCIPAL & SECCIONES
   ========================================================================== */
.main-content {
    width: 100%;
    max-width: 900px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.sections-container {
    display: flex;
    flex-direction: column;
    gap: 36px;
    width: 100%;
}

.menu-section {
    scroll-margin-top: 75px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(223, 177, 91, 0.2);
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(223, 177, 91, 0.4), transparent);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
}

/* Grilla Responsive de Platos */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
}

@media (min-width: 640px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (min-width: 960px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* ==========================================================================
   TARJETA DE PRODUCTO (CARD)
   ========================================================================== */
.product-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    gap: 12px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 12px var(--gold-glow);
}

.product-img-box {
    width: 100px;
    height: 100px;
    min-width: 100px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background-color: #111;
}

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

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

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.product-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.product-title {
    font-family: var(--font-sub);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.25;
}

.product-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.35;
    margin: 4px 0 6px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}

.product-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.product-price {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.5px;
}

.btn-info {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--gold);
    font-family: var(--font-sub);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: all 0.2s ease;
}

.btn-info:hover {
    background-color: var(--gold);
    color: #000;
    border-color: var(--gold);
}

/* ==========================================================================
   ETIQUETAS / BADGES DE RESTRICCIONES
   ========================================================================== */
.badge-tag {
    font-family: var(--font-sub);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-veggie {
    background-color: var(--tag-veggie-bg);
    color: var(--tag-veggie);
    border: 1px solid var(--tag-veggie);
}

.badge-sintacc {
    background-color: var(--tag-sintacc-bg);
    color: var(--tag-sintacc);
    border: 1px solid var(--tag-sintacc);
}

.badge-spicy {
    background-color: var(--tag-spicy-bg);
    color: var(--tag-spicy);
    border: 1px solid var(--tag-spicy);
}

.badge-compartir {
    background-color: var(--tag-compartir-bg);
    color: var(--tag-compartir);
    border: 1px solid var(--tag-compartir);
}

.badge-default {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 1px solid var(--border-light);
}

/* ==========================================================================
   MODAL DE DETALLE (+info)
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-dialog {
    background-color: var(--card-bg);
    border: 1px solid var(--gold);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.8), 0 0 25px var(--gold-glow);
    animation: modalFadeIn 0.3s ease forwards;
}

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

.modal-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 20;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--border-light);
    color: var(--text-white);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background-color: var(--gold);
    color: #000;
    border-color: var(--gold);
}

.modal-img-container {
    position: relative;
    width: 100%;
    height: 220px;
    background-color: #111;
    overflow: hidden;
}

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

.modal-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(31,31,31,1) 100%);
}

.modal-body {
    padding: 16px 20px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-category-tag {
    font-family: var(--font-sub);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--text-white);
    margin: 2px 0 6px 0;
    letter-spacing: 0.5px;
}

.modal-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.modal-price-box {
    display: flex;
    align-items: baseline;
    gap: 8px;
    background-color: var(--bg-surface);
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 3px solid var(--gold);
}

.price-label {
    font-family: var(--font-sub);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.modal-price {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold-bright);
}

.modal-desc-box h4, .modal-maridaje-box h4 {
    font-family: var(--font-sub);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.modal-desc-box p, .modal-maridaje-box p {
    font-size: 0.85rem;
    color: #d4d4d8;
    line-height: 1.5;
}

.modal-maridaje-box {
    background-color: rgba(223, 177, 91, 0.08);
    border: 1px dashed rgba(223, 177, 91, 0.3);
    padding: 12px;
    border-radius: 8px;
}

/* ==========================================================================
   MENSAJE SIN RESULTADOS DE BÚSQUEDA
   ========================================================================== */
.no-search-results {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.no-search-results.hidden {
    display: none;
}

.no-search-results i {
    font-size: 3rem;
    color: var(--gold);
    opacity: 0.7;
}

.no-search-results h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--text-white);
}

.no-search-results p {
    font-size: 0.85rem;
    max-width: 320px;
    line-height: 1.4;
}

.reset-search-btn {
    background-color: var(--gold);
    color: #000;
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    font-family: var(--font-sub);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 6px;
}

.reset-search-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 15px var(--gold-glow);
}

/* ==========================================================================
   BOTTOM NAVIGATION FIJA
   ========================================================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background-color: rgba(17, 17, 17, 0.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    max-width: 900px;
    margin: 0 auto;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-muted);
    font-family: var(--font-sub);
    font-size: 0.7rem;
    font-weight: 600;
    transition: color 0.2s;
    cursor: pointer;
    padding: 6px 20px;
}

.nav-item i {
    font-size: 1.25rem;
}

.nav-item.active, .nav-item:hover {
    color: var(--gold);
}
