/* ==========================================================================
   FLORAL & LUXURY CAFÉ THEME - PREMIUM UI (LAYOUT FIXED)
   ========================================================================== */
:root {
    /* Color Palette */
    --bg-base: #FDFBF7;         
    --bg-accent: #F4EFE6;       
    --text-dark: #2C3522;       
    --text-light: #7A8070;      
    --gold: #D4AF37;            
    --gold-glow: rgba(212, 175, 55, 0.4);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.9);
    --glass-shadow: 0 20px 40px rgba(44, 53, 34, 0.06);
    
    /* Typography */
    --font-head: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
    
    /* Animations */
    --smooth: 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ==========================================================================
   BASE STYLES & ANIMATED BACKGROUND
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(120deg, var(--bg-base), #ffffff, var(--bg-accent), var(--bg-base));
    background-size: 300% 300%;
    animation: gradientDrift 20s ease infinite;
    color: var(--text-dark);
    font-family: var(--font-body);
    overflow-x: hidden;
    cursor: none; 
}

@keyframes gradientDrift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 600;
}

/* ==========================================================================
   CUSTOM LUXURY CURSOR
   ========================================================================== */
.cursor-dot {
    width: 6px; height: 6px;
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold);
    pointer-events: none;
    z-index: 9999;
}

.cursor-outline {
    width: 40px; height: 40px;
    border: 1px solid var(--gold);
    pointer-events: none;
    z-index: 9998;
    transition: width 0.3s, height 0.3s, background 0.3s;
}

.cursor-dot, .cursor-outline {
    position: fixed;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.cursor-outline.hovered {
    width: 60px; height: 60px;
    background: rgba(212, 175, 55, 0.1);
    border-color: transparent;
    backdrop-filter: blur(2px);
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.menu-nav {
    position: fixed;
    top: 0; width: 100%;
    padding: 20px 5vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(253, 251, 247, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-family: var(--font-head);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 1px;
}

.back-btn {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--smooth);
}

.back-btn i { color: var(--gold); transition: transform 0.3s; }
.back-btn:hover { color: var(--gold); }
.back-btn:hover i { transform: translateX(-5px); }

/* ==========================================================================
   HERO SECTION & PARTICLES
   ========================================================================== */
.hero-content h1 {
    font-size: clamp(3rem, 6vw, 5.5rem);
    text-shadow: 0 10px 30px rgba(0,0,0,0.4);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--gold);
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.bubbles {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

.bubble {
    position: absolute; bottom: -100px;
    background: radial-gradient(circle, rgba(212,175,55,0.6) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(5px);
    animation: driftUp 12s infinite ease-in;
}

.bubble:nth-child(1) { width: 100px; height: 100px; left: 15%; animation-duration: 14s; }
.bubble:nth-child(2) { width: 60px; height: 60px; left: 35%; animation-duration: 10s; animation-delay: 2s; }
.bubble:nth-child(3) { width: 120px; height: 120px; left: 65%; animation-duration: 16s; animation-delay: 4s; }
.bubble:nth-child(4) { width: 80px; height: 80px; left: 80%; animation-duration: 12s; animation-delay: 1s; }

@keyframes driftUp {
    0% { transform: translateY(0) scale(0.8); opacity: 0; }
    30% { opacity: 0.4; }
    80% { opacity: 0.4; }
    100% { transform: translateY(-100vh) scale(1.2); opacity: 0; }
}

/* ==========================================================================
   CHEF'S SPECIAL ROTATOR
   ========================================================================== */
.special-highlight {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: -70px auto 80px;
    position: relative;
    z-index: 10;
}

.circular-text-container {
    position: relative;
    width: 260px; height: 260px;
    display: flex; justify-content: center; align-items: center;
}

.circular-text-container svg {
    position: absolute;
    width: 100%; height: 100%;
    animation: spin 20s linear infinite;
    fill: var(--text-dark);
    letter-spacing: 3px;
    font-weight: 500;
}

.center-image {
    width: 160px; height: 160px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border: 5px solid var(--glass-bg);
    backdrop-filter: blur(10px);
    transition: var(--smooth);
    z-index: 2;
}

.center-image img { width: 100%; height: 100%; object-fit: cover; }

.center-image:hover {
    border-color: var(--gold);
    box-shadow: 0 20px 50px var(--gold-glow);
    transform: scale(1.1) rotate(5deg);
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* ==========================================================================
   MENU LAYOUT & GRID SYSTEM (FIXED)
   ========================================================================== */
.menu-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 3vw 100px;
}

.category-header {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.category-header h2 {
    font-size: 2.8rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.underline {
    height: 3px; width: 60px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    transition: width var(--smooth);
    border-radius: 2px;
}

.menu-category:hover .underline { width: 160px; }

/* Desktop Grid Layout Setup */
.horizontal-scroll-wrapper {
    width: 100%;
    padding-bottom: 20px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    justify-content: center;
    align-items: stretch;
}

/* ==========================================================================
   PREMIUM GLASS CARDS
   ========================================================================== */
.menu-card {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 16px;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    position: relative;
    transform-style: preserve-3d;
    transition: border-color 0.4s, box-shadow 0.4s;
    height: 100%; /* Forces equal height in grid */
}

.menu-card:hover {
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 30px 60px rgba(44, 53, 34, 0.1), 0 0 30px var(--gold-glow);
}

/* Perfect Image Cropping */
.card-img-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3; /* This replaces height to ensure perfect image proportions */
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transform: translateZ(30px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    background: #e9e4dc; /* Soft placeholder */
}

.card-img-wrapper img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center; /* Keeps focus on the food */
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    display: block;
}

.card-img-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 60%;
    background: linear-gradient(to top, rgba(44,53,34,0.7), transparent);
    opacity: 0;
    transition: opacity var(--smooth);
    pointer-events: none;
}

.menu-card:hover .card-img-wrapper img { transform: scale(1.12); }
.menu-card:hover .card-img-wrapper::after { opacity: 1; }

/* Text Content */
.card-info {
    padding: 20px 5px 5px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Pushes the button to the bottom */
    transform: translateZ(20px); 
}

.card-info h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.3;
}

.card-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Floating Badge Price inside the image area */
.price {
    position: absolute;
    top: 25px; right: 25px;
    background: rgba(253, 251, 247, 0.9);
    backdrop-filter: blur(10px);
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transform: translateZ(40px);
    transition: var(--smooth);
    z-index: 10;
}

.menu-card:hover .price {
    background: var(--gold);
    color: #fff;
    box-shadow: 0 10px 20px var(--gold-glow);
}

/* Add to cart aligned to bottom */
.add-to-cart-btn {
    margin-top: auto; 
    /* The rest of your button styling from the HTML style tag will apply beautifully here */
}

/* ==========================================================================
   FULLSCREEN IMAGE LIGHTBOX
   ========================================================================== */
.lightbox {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(28, 34, 22, 0.95);
    backdrop-filter: blur(15px);
    z-index: 2000;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox.active { opacity: 1; pointer-events: auto; }

.close-lightbox {
    position: absolute;
    top: 40px; right: 5vw;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    transition: var(--smooth);
}

.close-lightbox:hover { color: var(--gold); transform: rotate(90deg); }

.lightbox-content {
    text-align: center;
    transform: scale(0.9) translateY(30px);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.lightbox.active .lightbox-content { transform: scale(1) translateY(0); }

.lightbox-content img {
    max-height: 75vh; max-width: 90vw;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    margin-bottom: 20px;
    border: 2px solid rgba(255,255,255,0.1);
}

.lightbox-content h3 {
    font-size: 2.5rem; color: #fff;
    text-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

/* ==========================================================================
   MOBILE SWIPE-FEED OVERRIDE
   ========================================================================== */
@media (max-width: 992px) {
    .menu-nav { padding: 15px 20px; }
    .hero-content h1 { font-size: 2.8rem; }
    
    .special-highlight { transform: scale(0.85); margin: -50px auto 30px; }

    /* Switch back to horizontal swipe on mobile */
    .horizontal-scroll-wrapper {
        overflow-x: auto;
        padding: 20px 10px 40px;
        scroll-snap-type: x mandatory;
    }

    .menu-grid {
        display: flex; /* Flex instead of grid for mobile */
        flex-wrap: nowrap;
        gap: 25px;
    }

    .menu-card { 
        min-width: 80vw; /* Takes up most of screen width */
        max-width: 80vw;
        scroll-snap-align: center; 
        height: auto;
    }

    /* Disable custom cursor on touch devices */
    .cursor-dot, .cursor-outline { display: none !important; }
    body { cursor: auto; }
}