:root {
    --primary: #c9a063;
    --dark: #0f1113;
    --darker: #08090a;
    --light: #f4f4f4;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--darker);
    color: var(--light);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

main {
    flex: 1;
}

/* Loader */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    width: 48px;
    height: 48px;
    border: 3px solid var(--primary);
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loader-wrapper.fade-out {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
}

/* Header */
header {
    min-height: 320px;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1514362545857-3bc16c4c7d1b?auto=format&fit=crop&q=80&w=1200');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 1.5rem 1.5rem 4rem 1.5rem;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary);
}

.tagline {
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--primary);
}

/* Navigation */
.categories-nav {
    display: flex;
    justify-content: center;
    overflow-x: auto;
    padding: 1.5rem 1rem;
    gap: 1rem;
    background: var(--dark);
    position: sticky;
    top: 0;
    z-index: 100;
    scrollbar-width: none;
}

@media (max-width: 600px) {
    .categories-nav {
        justify-content: flex-start;
    }
}

.categories-nav::-webkit-scrollbar {
    display: none;
}

.cat-btn {
    padding: 0.6rem 1.5rem;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: var(--light);
    border-radius: 30px;
    white-space: nowrap;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.cat-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--darker);
    font-weight: 600;
}

/* Menu Grid */
.menu-grid {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.menu-item {
    display: flex;
    flex-direction: column;
    background: var(--dark);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    animation: fadeInUp 0.6s ease forwards;
    height: 100%;
}

.menu-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.item-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
}

.item-info {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    padding-top: 1rem;
}

.item-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    text-align: center;
}

.item-info p {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.price {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
}

.allergen-icons {
    display: flex;
    gap: 0.4rem;
    font-size: 1rem;
}

/* Footer */
footer {
    padding: 3rem 1rem 4rem 1rem;
    text-align: center;
    background: var(--darker);
    border-top: 1px solid var(--glass-border);
}

footer p {
    font-size: 0.8rem;
    color: #666;
}

/* Language Selector */
.lang-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.header-lang a {
    text-decoration: none;
    font-size: 1.8rem;
    padding: 0.6rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.8;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.header-lang a.active {
    opacity: 1;
    background: rgba(201, 160, 99, 0.25);
    border-color: var(--primary);
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(201, 160, 99, 0.4);
}

.header-lang a:hover {
    opacity: 1;
    transform: translateY(-4px) scale(1.1);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Flag visibility logic */
.desktop-flag {
    display: none;
    width: 28px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.mobile-flag {
    display: inline-block;
}

/* Desktop View (over 1024px) */
@media (min-width: 1025px) {
    .mobile-flag {
        display: none;
    }

    .desktop-flag {
        display: block;
    }
}




.social-icons {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    color: var(--primary);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        padding: 0.8rem;
    }

    .item-image {
        aspect-ratio: 1 / 1;
        height: auto;
    }

    .item-info {
        padding: 0.8rem;
    }

    .item-info h3 {
        font-size: 1rem;
    }

    .item-info p {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.75rem;
    }
}

/* Daily Menu Section */
.daily-menu-section {
    padding: 3rem 1rem 2rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.daily-card {
    background: linear-gradient(135deg, #1a1d21 0%, #0f1113 100%);
    border-radius: 30px;
    padding: 2.5rem;
    border: 1px solid var(--primary);
    position: relative;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.daily-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--darker);
    padding: 0.5rem 2rem;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(201, 160, 99, 0.3);
}

.daily-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.daily-price {
    font-size: 2.5rem;
    color: var(--primary);
    font-weight: 900;
    margin-bottom: 2rem;
}

.daily-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
}

.daily-course h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    font-size: 1.1rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.daily-course ul {
    list-style: none;
}

.daily-course li {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: #bbb;
}

.postres-daily {
    margin-top: 2rem;
    border-top: 1px dashed var(--glass-border);
    padding-top: 1.5rem;
    text-align: center;
}

.daily-footer {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.6rem 2rem;
    background: var(--glass);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--primary);
    border: 1px solid var(--glass-border);
}

@media (max-width: 600px) {
    header {
        min-height: 250px;
        padding: 1rem 1rem 3rem 1rem;
    }

    .daily-menu-section {
        padding: 1rem 0.5rem;
    }

    .daily-card {
        padding: 1.5rem 1rem;
        border-radius: 20px;
    }

    .daily-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }

    .daily-course h3 {
        font-size: 0.9rem;
    }

    .daily-course li {
        font-size: 0.8rem;
    }

    .daily-card h2 {
        font-size: 1.8rem;
    }

    .daily-price {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .daily-footer {
        margin-top: 1rem;
        padding: 0.5rem 1.5rem;
    }
}

/* Modal Overlay */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--dark);
    width: 90%;
    max-width: 500px;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    transform: scale(0.9);
    transition: var(--transition);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

.modal.active .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.5);
    /* Semi-transparent dark background */
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.4);
    /* Light border for contrast */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    /* Shadow for depth */
}

.close-btn:hover {
    background: var(--primary);
    color: var(--darker);
    transform: rotate(90deg);
}

.modal-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--glass-border);
}

.modal-body {
    padding: 2.5rem 2rem;
    text-align: left;
}

.modal-body h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
    color: var(--light);
}

.modal-meta {
    margin-bottom: 1.5rem;
}

.modal-body p {
    color: #888;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
}

.modal-footer .price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.modal-footer .allergen-icons {
    display: flex;
    gap: 0.8rem;
    font-size: 1.6rem;
}

@media (max-width: 600px) {
    .modal-content {
        width: 92%;
        max-height: 85vh;
        max-width: none;
        border-radius: 30px;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    }

    .modal-image {
        aspect-ratio: 1 / 1;
        width: 100%;
    }

    .modal-body {
        padding: 2rem 1.5rem;
    }

    .modal-body h2 {
        font-size: 2rem;
    }
}