/* ==========================================================================
   CSS Variables (Design System)
   ========================================================================== */
:root {
    /* Colors */
    --bg-dark: #0a0a0a;
    /* Very dark background */
    --bg-card: #141414;
    /* Slightly lighter for cards/alternating rows */
    --text-main: #f0f0f0;
    /* Off-white for readability */
    --text-muted: #aaaaaa;
    /* Gray for descriptions */

    --accent-burgundy: #722F37;
    /* Wine red */
    --accent-burgundy-light: #C0606D;
    /* Lighter wine red, readable as text on dark backgrounds */
    --accent-gold: #D4AF37;
    /* Elegant gold */

    /* Surfaces, lines and shadows that change with the theme */
    --header-bg-start: #1a0a0c;
    --nav-bg: rgba(10, 10, 10, 0.95);
    --footer-bg-start: #080808;
    --footer-bg-end: #050505;
    --surface-sunken: rgba(0, 0, 0, 0.2);
    --surface-hover: rgba(255, 255, 255, 0.02);
    --tile-bg: rgba(255, 255, 255, 0.05);
    --tile-bg-hover: rgba(255, 255, 255, 0.1);
    --skeleton-base: rgba(255, 255, 255, 0.05);
    --skeleton-shine: rgba(255, 255, 255, 0.15);
    --line-faint: rgba(255, 255, 255, 0.05);
    --line-soft: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.5);
    --floating-bg: rgba(10, 10, 10, 0.85);
    --logo-glow: rgba(var(--accent-gold-rgb), 0.2);
    --accent-gold-rgb: 212, 175, 55;
    --accent-burgundy-rgb: 114, 47, 55;
    /* Ilustraciones de la carta: por ahora solo en modo claro */
    --paper-texture: none;
    --deco-display: none;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;

    /* Spacing & Layout */
    --container-padding: 20px;
    --nav-height: 60px;
    --border-radius: 8px;
    --transition-speed: 0.3s;
}

/* ==========================================================================
   Modo claro: colores de la carta impresa (papel crema, tinta negra,
   morado del logo y rojo vino)
   ========================================================================== */
:root[data-theme="light"] {
    --bg-dark: #fcf8f0;
    /* Paper of the printed menu */
    --bg-card: #f5ece0;
    --text-main: #1a1a1a;
    --text-muted: #5c534b;

    --accent-burgundy: #722F37;
    --accent-burgundy-light: #a5123c;
    /* Crimson of the logo */
    --accent-gold: #7b4f8c;
    /* Purple of the logo's grapes and wave */

    --header-bg-start: #f3e8dd;
    --nav-bg: rgba(252, 248, 240, 0.95);
    --footer-bg-start: #f5ece0;
    --footer-bg-end: #efe3d4;
    --surface-sunken: rgba(123, 79, 140, 0.06);
    --surface-hover: rgba(0, 0, 0, 0.03);
    --tile-bg: rgba(123, 79, 140, 0.07);
    --tile-bg-hover: rgba(123, 79, 140, 0.14);
    --skeleton-base: rgba(0, 0, 0, 0.07);
    --skeleton-shine: rgba(0, 0, 0, 0.15);
    --line-faint: rgba(26, 26, 26, 0.1);
    --line-soft: rgba(26, 26, 26, 0.18);
    --shadow-color: rgba(90, 60, 40, 0.18);
    --floating-bg: rgba(252, 248, 240, 0.9);
    --logo-glow: rgba(123, 79, 140, 0.15);
    --accent-gold-rgb: 123, 79, 140;
    --accent-burgundy-rgb: 114, 47, 55;
    --paper-texture: url('../img/deco/papel.webp');
    --deco-display: block;
    --titulo-carta: #0000ff;
    /* Azul con el que están impresos los títulos de la carta */
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 20px);
    /* Offset for sticky nav */
}

body {
    background-color: var(--bg-dark);
    background-image: var(--paper-texture);
    background-size: 320px;
    background-blend-mode: multiply;
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--accent-gold);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed) ease;
}

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

/* ==========================================================================
   Header Main
   ========================================================================== */
.main-header {
    text-align: center;
    padding: 3rem var(--container-padding);
    background: linear-gradient(135deg, var(--header-bg-start) 0%, var(--bg-dark) 100%);
    border-bottom: 2px solid var(--accent-burgundy);
    position: relative;
    overflow: hidden;
}

/* Racimo de uvas, arriba a la derecha como en la portada */
.main-header::before {
    content: '';
    display: var(--deco-display);
    position: absolute;
    top: -26px;
    right: -34px;
    width: clamp(130px, 20vw, 230px);
    aspect-ratio: 1000 / 1132;
    background: url('../img/deco/uvas.webp') no-repeat center / contain;
    pointer-events: none;
    /* Sin mix-blend-mode: Safari deja de repintar un elemento que mezcla y
       se anima a la vez, y el racimo se quedaba quieto. */
    /* Cuelga de la rama y se mece despacio. La aparición solo toca la
       opacidad: si dos animaciones mueven el transform a la vez, WebKit
       (Safari y todos los navegadores de iPhone) congela la segunda. */
    transform-origin: 78% 6%;
    will-change: transform;
    animation: uvas-cae 1.1s cubic-bezier(0.22, 0.9, 0.3, 1.2) both,
        uvas-vaiven 7s ease-in-out infinite;
}

/* La caída usa translate (propiedad aparte), no transform */
@keyframes uvas-cae {
    from {
        opacity: 0;
        translate: 0 -20px;
    }

    to {
        opacity: 1;
        translate: 0 0;
    }
}

@keyframes uvas-vaiven {

    0%,
    100% {
        transform: rotate(-1.6deg);
    }

    50% {
        transform: rotate(1.6deg);
    }
}

/* Si el cliente pide menos movimiento, todo se queda quieto */
@media (prefers-reduced-motion: reduce) {

    .main-header::before,
    .main-footer::before,
    .main-footer::after,
    .logo {
        animation: none;
    }

    .hoja {
        display: none;
    }
}

/* Cepa vieja al fondo del pie, como en las últimas páginas de la carta */
.main-footer {
    position: relative;
    overflow: hidden;
}

.main-footer::before {
    content: '';
    display: var(--deco-display);
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1020px, 165%);
    aspect-ratio: 816 / 730;
    background: url('../img/deco/cepa.webp') no-repeat center bottom / contain;
    opacity: 0.3;
    pointer-events: none;
    /* Sin mix-blend-mode: Safari congela lo que mezcla y se anima a la vez */
    will-change: transform;
    /* Se desvanece por arriba para que no se corte contra el aviso */
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%);
    mask-image: linear-gradient(to bottom, transparent, #000 30%);
    /* Brisa: se mece desde la base, muy despacio */
    transform-origin: bottom center;
    animation: cepa-brisa 16s ease-in-out infinite;
}

/* La misma cepa, pequeña y nítida, en la esquina del pie */
.main-footer::after {
    content: '';
    display: var(--deco-display);
    position: absolute;
    bottom: 14px;
    left: 14px;
    width: clamp(110px, 17vw, 170px);
    aspect-ratio: 816 / 730;
    background: url('../img/deco/cepa.webp') no-repeat left bottom / contain;
    opacity: 0.95;
    pointer-events: none;
    will-change: transform;
    transform-origin: bottom center;
    animation: cepa-brisa-chica 11s ease-in-out infinite;
}

@media (max-width: 600px) {
    .main-footer::after {
        width: 88px;
        bottom: 6px;
        left: 8px;
    }

    .hoja {
        --caida: 390px;
    }
}

/* Hojas que se desprenden de la cepa y caen revoloteando */
.hoja {
    --caida: 335px;
    display: var(--deco-display);
    position: absolute;
    top: -22px;
    width: 15px;
    height: 15px;
    background-color: #6f8a5e;
    -webkit-mask: url('../img/deco/hoja.svg') no-repeat center / contain;
    mask: url('../img/deco/hoja.svg') no-repeat center / contain;
    opacity: 0;
    pointer-events: none;
    animation: hoja-cae 13s linear infinite;
}

.hoja:nth-child(1) {
    left: 8%;
    animation-duration: 12s;
    animation-delay: 0s;
}

.hoja:nth-child(2) {
    left: 22%;
    width: 11px;
    height: 11px;
    animation-duration: 16s;
    animation-delay: 3.5s;
}

.hoja:nth-child(3) {
    left: 47%;
    animation-duration: 14s;
    animation-delay: 7s;
}

.hoja:nth-child(4) {
    left: 68%;
    width: 12px;
    height: 12px;
    animation-duration: 17s;
    animation-delay: 1.8s;
}

.hoja:nth-child(5) {
    left: 86%;
    animation-duration: 15s;
    animation-delay: 9.5s;
}

@keyframes hoja-cae {
    0% {
        transform: translate(0, 0) rotate(0);
        opacity: 0;
    }

    8% {
        opacity: 0.75;
    }

    35% {
        transform: translate(26px, calc(var(--caida) * 0.33)) rotate(140deg);
    }

    65% {
        transform: translate(-14px, calc(var(--caida) * 0.64)) rotate(260deg);
    }

    92% {
        opacity: 0.55;
    }

    100% {
        transform: translate(20px, var(--caida)) rotate(420deg);
        opacity: 0;
    }
}

@keyframes cepa-brisa-chica {

    0%,
    100% {
        transform: rotate(0.8deg);
    }

    50% {
        transform: rotate(-0.8deg);
    }
}

@keyframes cepa-brisa {

    0%,
    100% {
        transform: translateX(-50%) rotate(-0.5deg);
    }

    50% {
        transform: translateX(-50%) rotate(0.5deg);
    }
}

.footer-content {
    position: relative;
    z-index: 1;
}

/* Halo suave para que el texto se lea sobre la cepa */
:root[data-theme="light"] .footer-content {
    background: radial-gradient(ellipse at center, var(--bg-dark) 35%, transparent 72%);
}


.main-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background-color: var(--accent-gold);
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo {
    max-width: 250px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px var(--logo-glow));
    /* Aparece al cargar y luego flota despacio. La entrada usa scale y
       translate, propiedades aparte del transform que usa el flotar. */
    animation: logo-entrada 1.1s cubic-bezier(0.22, 0.9, 0.3, 1.1) both,
        logo-flotar 7s ease-in-out infinite;
}

@keyframes logo-entrada {
    from {
        opacity: 0;
        translate: 0 14px;
        scale: 0.94;
    }

    to {
        opacity: 1;
        translate: 0 0;
        scale: 1;
    }
}

@keyframes logo-flotar {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* El logo blanco no se ve sobre el papel claro: se cambia por el de color */
:root[data-theme="light"] .logo-dark,
:root:not([data-theme="light"]) .logo-light {
    display: none;
}

.restaurant-name {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.intro-text {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    font-style: italic;
}

@media (max-width: 600px) {
    .main-header {
        padding: 1.5rem var(--container-padding);
    }

    .logo {
        max-width: 150px;
        margin-bottom: 0.75rem;
    }

    .intro-text {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}

/* ==========================================================================
   Sticky Navigation
   ========================================================================== */
.sticky-nav {
    position: sticky;
    top: 0;
    background-color: var(--nav-bg);
    /* iOS necesita el prefijo o no aplica el desenfoque */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(var(--accent-gold-rgb), 0.2);
    box-shadow: 0 4px 15px var(--shadow-color);
}

.nav-links {
    display: flex;
    list-style: none;
    overflow-x: auto;
    /* Allow horizontal scrolling on mobile */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    padding: 0 var(--container-padding);
    height: var(--nav-height);
    align-items: center;
    -webkit-overflow-scrolling: touch;
    /* Better mobile scrolling */
}

.nav-links::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    /* Mobile touch target best practice */
    min-width: 48px;
    padding: 0.5rem 1.2rem;
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    white-space: nowrap;
    border-radius: 8px;
    /* Softer radius */
    margin-right: 0.5rem;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* Botón de modo claro / oscuro, fijo a la derecha de la navegación */
.sticky-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    flex: 1;
    min-width: 0;
    /* Los enlaces se desvanecen al pasar por detrás del botón */
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}

.theme-toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    position: relative;
    margin: 0 10px 0 17px;
    background: transparent;
    border: 1px solid rgba(var(--accent-gold-rgb), 0.35);
    border-radius: 50%;
    color: var(--accent-gold);
    font-size: 1rem;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* Línea que separa el botón de los enlaces */
.theme-toggle::before {
    content: '';
    position: absolute;
    left: -17px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 26px;
    background-color: rgba(var(--accent-gold-rgb), 0.3);
}

.theme-toggle:hover {
    background-color: rgba(var(--accent-gold-rgb), 0.15);
}

:root[data-theme="light"] .theme-toggle .icon-dark,
:root:not([data-theme="light"]) .theme-toggle .icon-light {
    display: none;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-gold);
    background-color: rgba(var(--accent-burgundy-rgb), 0.2);
    /* Subtle burgundy background */
}

/* ==========================================================================
   Menu Sections & Grid
   ========================================================================== */
.menu-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem var(--container-padding);
}

.menu-section {
    padding: 3rem 0;
    border-bottom: 1px dashed rgba(var(--accent-gold-rgb), 0.3);
}

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

.bg-alternate {
    background-color: var(--bg-card);
    margin-left: calc(-1 * var(--container-padding));
    margin-right: calc(-1 * var(--container-padding));
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-burgundy);
}

/* Azul de los títulos impresos en la carta */
:root[data-theme="light"] .section-title,
:root[data-theme="light"] .wine-type {
    color: var(--titulo-carta);
}


.highlight-section {
    border: 1px solid var(--accent-gold);
    border-radius: var(--border-radius);
    padding: 2rem var(--container-padding);
    margin-top: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 0 20px rgba(var(--accent-gold-rgb), 0.1);
}

.gold-text {
    color: var(--accent-gold);
}

/* Menú del Día */
.md-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.md-title {
    margin-bottom: 1rem;
}

.md-fecha {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.md-precios {
    color: var(--accent-gold);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.md-separador {
    margin: 0 10px;
    opacity: 0.5;
}

@media (max-width: 600px) {
    .md-precios > span:not(.md-separador) {
        display: block;
    }

    .md-separador {
        display: none;
    }
}

.md-notas {
    font-size: 1rem;
    color: var(--text-muted);
    font-style: italic;
}

.md-notas-skeleton {
    display: inline-block;
    width: 60%;
    margin: 0;
}

.md-horario {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.md-bloque {
    background-color: var(--surface-sunken);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-top: 3px solid var(--accent-burgundy);
}

.md-bloque-titulo {
    display: block;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--accent-burgundy-light);
    font-size: 1.5rem;
}

.md-bloque-postres {
    grid-column: 1 / -1;
    border-top-color: var(--accent-gold);
    margin-top: 1rem;
}

.md-bloque-postres .md-bloque-titulo {
    color: var(--accent-gold);
}

.md-lista {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Menu Grid Layout */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 3rem;
    }
}

/* ==========================================================================
   Individual Menu Items
   ========================================================================== */
.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 0;
    /* More breathing room for touch UI */
    border-bottom: 1px solid var(--line-faint);
    transition: transform var(--transition-speed) ease, background-color var(--transition-speed) ease;
}

.menu-item:hover,
.menu-item:active {
    transform: translateX(5px);
    background-color: var(--surface-hover);
    /* Active state feedback */
    border-radius: var(--border-radius);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.menu-item:hover {
    transform: translateX(5px);
}

.item-info {
    flex: 1;
    padding-right: 1rem;
}

.item-name {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.item-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Fila de iconos siempre debajo del nombre del plato */
.item-allergens {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.item-price {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-gold);
    white-space: nowrap;
}

/* ==========================================================================
   Wines Section Specifics
   ========================================================================== */


.wine-category {
    margin-bottom: 2.5rem;
}

.mt-medium {
    margin-top: 2rem;
}

.wine-type {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--accent-burgundy);
    display: inline-block;
}

.wine-do-group {
    margin-bottom: 2rem;
}

.wine-do-title {
    font-size: 1.2rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
    padding-left: 0.5rem;
    border-left: 3px solid var(--accent-burgundy);
}

.wine-table {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.wine-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--line-soft);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.price-cols {
    width: 120px;
    text-align: right;
}

.wine-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px dotted var(--line-faint);
    padding-bottom: 0.4rem;
}

.wine-item:hover {
    background-color: var(--surface-hover);
}

.wine-name {
    flex: 1;
    font-family: var(--font-body);
    font-size: 1.05rem;
    padding-right: 1rem;
}

.wine-name small {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.85em;
}

.wine-price {
    font-family: var(--font-heading);
    color: var(--accent-gold);
    width: 120px;
    text-align: right;
    font-weight: 600;
}

/* ==========================================================================
   Global Notice & Footer
   ========================================================================== */
.global-notice {
    background-color: var(--accent-burgundy);
    color: white;
    text-align: center;
    padding: 1rem;
    font-weight: bold;
    letter-spacing: 1px;
    position: sticky;
    bottom: 0;
    z-index: 1000;
    box-shadow: 0 -4px 10px var(--shadow-color);
}

.notice-short {
    display: none;
}

@media (max-width: 600px) {
    /* Aviso compacto; deja hueco a la derecha para el botón "volver arriba" */
    .global-notice {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        min-height: 52px;
        font-size: 0.75rem;
        line-height: 1.3;
        padding: 0.4rem 58px 0.4rem 12px;
        letter-spacing: 0;
    }

    .notice-full {
        display: none;
    }

    .notice-short {
        display: inline;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 16px;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--floating-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--accent-gold-rgb), 0.35);
    border-radius: 50%;
    color: var(--accent-gold);
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--shadow-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease,
        background 0.2s ease, border-color 0.2s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: rgba(var(--accent-gold-rgb), 0.15);
    border-color: var(--accent-gold);
    box-shadow: 0 4px 20px rgba(var(--accent-gold-rgb), 0.2);
    transform: translateY(-3px);
}

@media (max-width: 600px) {
    /* Dentro de la barra del aviso, para no tapar los precios */
    .back-to-top {
        bottom: 6px;
        right: 10px;
        z-index: 1001;
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}


/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

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

/* ==========================================================================
   Alergenos (Allergens)
   ========================================================================== */
.allergens-section {
    padding: 2rem var(--container-padding);
    background-color: var(--bg-card);
    border-top: 1px solid rgba(var(--accent-gold-rgb), 0.2);
    margin-top: 3rem;
    border-radius: var(--border-radius);
}

.allergens-title {
    font-size: 1.8rem;
    color: var(--accent-gold);
    text-align: center;
    margin-bottom: 1.5rem;
}

.allergens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.allergen-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background-color: var(--tile-bg);
    border-radius: var(--border-radius);
    transition: transform var(--transition-speed) ease, background-color var(--transition-speed) ease;
    min-height: 88px;
    /* Good touch target size */
    justify-content: center;
}

.allergen-item:hover,
.allergen-item:active {
    transform: translateY(-3px);
    background-color: var(--tile-bg-hover);
}

.allergen-icon {
    font-size: 2rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.allergen-name {
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 600;
}

/* ==========================================================================
   Skeleton Loaders (Phase 2)
   ========================================================================== */
@keyframes skeleton-loading {
    0% {
        background-color: var(--skeleton-base);
    }

    50% {
        background-color: var(--skeleton-shine);
    }

    100% {
        background-color: var(--skeleton-base);
    }
}

.skeleton {
    animation: skeleton-loading 1.5s infinite ease-in-out;
    border-radius: 4px;
    color: transparent !important;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: "\00A0";
    /* Keeps the line height */
}

.skeleton-text {
    width: 80%;
    height: 1.2rem;
    margin: 0.5rem auto;
}

.skeleton-title {
    width: 50%;
    height: 1.8rem;
    margin: 0 auto 1rem auto;
}

.skeleton-price {
    width: 40px;
    height: 1.5rem;
    display: inline-block;
    vertical-align: middle;
}

/* ==========================================================================
   Footer (Compact)
   ========================================================================== */
.main-footer {
    text-align: center;
    padding: 4.5rem var(--container-padding) 60px;
    background: linear-gradient(180deg, var(--footer-bg-start) 0%, var(--footer-bg-end) 100%);
    color: var(--text-muted);
    font-size: 0.9rem;
    /* Space for the sticky global notice is in the padding-bottom */
    border-top: 1px solid rgba(var(--accent-gold-rgb), 0.1);
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    max-width: 90px;
    opacity: 0.5;
    filter: grayscale(30%);
    transition: opacity var(--transition-speed) ease;
}

.footer-logo:hover {
    opacity: 0.85;
}

:root[data-theme="light"] .footer-logo {
    opacity: 0.8;
    filter: none;
}

/* Phone + Address row */
.footer-info {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem 0.6rem;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color var(--transition-speed) ease;
    text-decoration: none;
}

.footer-link i {
    color: var(--accent-gold);
    opacity: 0.6;
    margin-right: 0.3rem;
    font-size: 0.8rem;
}

.footer-link:hover {
    color: var(--accent-gold);
}

.footer-separator {
    color: rgba(var(--accent-gold-rgb), 0.3);
    user-select: none;
}

@media (max-width: 600px) {
    .footer-info {
        flex-direction: column;
        gap: 0;
    }

    .footer-separator {
        display: none;
    }
}

/* Social icons */
.footer-social {
    display: flex;
    gap: 0.8rem;
}

.footer-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line-soft);
    color: var(--text-muted);
    font-size: 1rem;
    transition: all var(--transition-speed) ease;
}

.footer-social-icon:hover {
    transform: translateY(-2px);
    color: var(--accent-gold);
    border-color: rgba(var(--accent-gold-rgb), 0.4);
}

#social-instagram:hover {
    color: #fcb045;
    border-color: rgba(253, 29, 29, 0.4);
}

#social-facebook:hover {
    color: #4599ff;
    border-color: rgba(24, 119, 242, 0.4);
}

.footer-divider {
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    opacity: 0.3;
}

.footer-copy {
    font-size: 0.75rem;
    opacity: 0.4;
}
/* Iconos de alérgenos en formato imagen (junto a los platos) */
.item-allergens img,
.allergen-img {
    height: 20px;
    width: 20px;
    vertical-align: middle;
    opacity: 0.9;
    cursor: help;
}

/* Etiqueta que aparece al tocar un icono de alérgeno */
.allergen-tooltip {
    position: absolute;
    z-index: 1100;
    padding: 0.25rem 0.6rem;
    background: var(--bg-card);
    border: 1px solid rgba(var(--accent-gold-rgb), 0.4);
    border-radius: 4px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    white-space: nowrap;
    pointer-events: none;
    transform: translate(-50%, -100%);
}

/* Iconos de la leyenda de alérgenos */
.allergen-icon-img {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.5rem;
}
