:root {
    --primary-color: #780000;
    --primary-color-rgb: 120, 0, 0;
    --secondary-color: #A9A9A9;
    --accent-color: #C19A6B;
    --text-color: #C19A6B;
    --text-color-rgb: 255, 248, 220;
    --background-color: #121212;
    --subcategory-color: #840404;
    --region-color: #FFF8DC;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Performance optimizations for smooth scrolling */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* Enhanced smooth scrolling */
    scroll-padding-top: 0;
}

body {
    font-family: 'Playfair Display', serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    /* Performance optimizations */
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
    /* Ultra-smooth scrolling */
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

/* Optimize menu container for better performance */
.menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem;
    position: relative;
    z-index: 3;
}

.menu-header {
    text-align: center;
    margin-bottom: 0.5rem;
    position: relative;
    padding: 0.5rem 0;
    z-index: 3;
    background: transparent;
    border-radius: 12px;
    box-shadow: none;
    border: none;
}

.header-logo {
    width: 90vw;
    max-width: 90%;
    display: block;
    margin-left: auto;
    margin-right: auto;
    height: auto;
    margin-bottom: 0.3rem;
    animation: glowPulse 2s ease-in-out infinite;
    filter: brightness(3) saturate(3) contrast(1.6) drop-shadow(0 0 32px 16px rgba(255, 0, 0, 1)) drop-shadow(0 0 64px 24px rgba(255, 0, 0, 0.7));
}

@keyframes glowPulse {
    0% {
        filter: drop-shadow(0 0 5px rgba(var(--primary-color-rgb), 0.5));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(var(--primary-color-rgb), 0.8));
    }
    100% {
        filter: drop-shadow(0 0 5px rgba(var(--primary-color-rgb), 0.5));
    }
}

.menu-content {
    position: relative;
    z-index: 3;
    padding: 0 0.5rem;
    background: none;
}

.cover-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
    animation: fadeIn 1s ease-in;
}

.menu-header h1 {
    font-size: 3.5rem;
    color: var(--text-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: slideDown 1s ease-out;
}

.menu-nav, nav {
    background: transparent !important;
    border-radius: 10px;
    box-shadow: none;
    border: none;
    margin-bottom: 1.2rem;
}
.menu-nav::before, .menu-nav::after, nav::before, nav::after {
    background: none !important;
    content: none !important;
}

    .menu-nav {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE 10+ */
        gap: 0.35rem;
        max-width: 98vw;
        margin-left: auto;
        margin-right: auto;
        padding-bottom: 0.5rem;
    }
.menu-nav::-webkit-scrollbar {
    display: none;
}

.nav-btn, .drink-item {
    background: transparent;
    border: 1.5px solid rgba(var(--primary-color-rgb), 0.18);
    border-radius: 10px;
    box-shadow: 0 0 4px 1px rgba(var(--primary-color-rgb), 0.06);
    color: var(--text-color);
    padding: 0.5rem 1.1rem;
    font-size: 1rem;
    transition: box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.1s ease;
    font-family: 'Playfair Display', serif;
    margin: 0.12rem;
    background: rgba(18, 18, 18, 0.55); /* Slightly darker transparent background */
}

.glow-effect,
.nav-btn.active,
.drink-item.in-view {
    border-color: var(--primary-color) !important;
    box-shadow:
        0 0 8px 3px var(--primary-color),
        0 0 16px 6px rgba(var(--primary-color-rgb), 0.18),
        0 0 2px 0.5px var(--text-color) inset;
    transition: box-shadow 0.7s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn.active {
    background: rgba(18, 18, 18, 0.72); /* Slightly darker and more opaque when active */
}

.nav-btn.in-view {
    border-color: var(--primary-color);
    box-shadow: 0 0 24px 6px var(--primary-color), 0 0 48px 10px rgba(var(--primary-color-rgb), 0.24);
    transition: box-shadow 0.7s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn:active {
    transform: scale(0.98);
}

.drink-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    position: relative;
    padding: 1.2rem 0.8rem;
    background: transparent !important;
    border: 1.5px solid rgba(var(--primary-color-rgb), 0.18);
    border-radius: 10px;
    box-shadow: 0 0 4px 1px rgba(var(--primary-color-rgb), 0.06);
    text-align: center;
    transition: box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
    z-index: 1;
    min-height: 340px;
}

.drink-item-bottom-row {
    position: absolute;
    right: 0.8rem;
    bottom: 0.8rem;
    margin-top: 0;
    min-height: unset;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    width: auto;
    background: none;
    z-index: 3;
}

.drink-item p.price {
    position: static;
    margin: 0;
    padding: 0.2rem 0.7rem 0.2rem 0.7rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
    background: rgba(10,10,10,0.85);
    border-radius: 8px;
    z-index: 2;
    box-shadow: 0 1px 6px 0 rgba(var(--primary-color-rgb), 0.08);
    align-self: flex-end;
}

.drink-item * {
    background: transparent !important;
}

.drink-item p {
    margin-bottom: 0.2rem;
}

.drink-item img {
    border: 1.5px solid rgba(var(--primary-color-rgb), 0.18);
    border-radius: 10px;
    box-shadow: 0 0 4px 1px rgba(var(--primary-color-rgb), 0.06);
    background: var(--background-color);
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0.5rem;
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    max-width: 100%;
    transform: scale(1.08);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.drink-item h3,
.card-back h3 {
    position: absolute;
    top: 0.5rem;
    left: 0.4rem;
    transform: none;
    width: auto;
    min-width: 60%;
    max-width: 100%;
    text-align: left;
    font-size: 1.4rem;
    color: var(--text-color);
    font-family: 'Bebas Neue', sans-serif;
    text-shadow: 0 0 2px #000, 0 0 8px rgba(var(--primary-color-rgb), 0.12);
    background: rgba(18,18,18,0.72);
    border-radius: 12px;
    padding: 0.3rem 0.7rem 0.3rem 0.5rem;
    margin: 0;
    z-index: 2;
}

.drink-item p:not(.polish):not(.price) {
    text-align: right;
    align-self: flex-end;
    font-family: 'Smooch Sans', sans-serif;
}

.drink-item p.polish {
    font-size: 0.85rem;
    color: var(--accent-color);
    text-align: right;
    align-self: flex-end;
    margin-top: 0.3em;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Desktop styling to match mobile experience */
@media (min-width: 769px) {
    .menu-container {
        max-width: 480px;
        padding: 1rem;
    }

    .header-logo {
        width: 90vw;
        max-width: 90%;
    }

    .menu-header h1 {
        font-size: 2rem;
    }

    .nav-btn {
        padding: 0.7rem 0.4rem;
        font-size: 1rem;
        min-width: 130px;
        height: 45px;
    }

    .drinks-grid {
        grid-template-columns: 1fr !important;
        padding: 0 1rem;
        max-width: 400px;
    }

    .drink-item {
        margin: 1rem auto !important;
        width: calc(100% - 1rem) !important;
        max-width: 350px;
    }

    .drink-item img {
        transform: scale(1.0);
    }

    .back-to-top-btn {
        bottom: 20px;
        left: 10px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 0.7rem !important;
    }

    .menu-nav {
        max-width: 90vw;
    }
}

@media (max-width: 768px) {
    .menu-container {
        padding: 1rem;
    }

    .header-logo {
        width: 90vw;
        max-width: 90%;
    }

    .menu-header h1 {
        font-size: 2rem;
    }

    .nav-btn {
        padding: 0.7rem 0.4rem;
        font-size: 1rem;
        min-width: 130px;
        height: 45px;
    }

    .drinks-grid {
        grid-template-columns: 1fr;
        padding: 0 3rem;
    }

    #backToTopBtn {
        bottom: 20px !important;
        left: 10px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 0.7rem !important;
    }

    .drink-item {
        margin: 1rem auto !important;
        width: calc(100% - 6rem) !important;
    }
}

#redLightCocktails.menu-section,
#krakenCocktails.menu-section,
#classicCocktails.menu-section,
#jackDanielsCocktails.menu-section,
#shots.menu-section,
#mocktails.menu-section {
    position: relative;
    overflow: hidden;
    background: transparent !important;
}
#redLightCocktails .drinks-grid,
#redLightCocktails h2,
#krakenCocktails .drinks-grid,
#krakenCocktails h2,
#classicCocktails .drinks-grid,
#classicCocktails h2,
#jackDanielsCocktails .drinks-grid,
#jackDanielsCocktails h2,
#shots .drinks-grid,
#shots h2,
#mocktails .drinks-grid,
#mocktails h2 {
    position: relative;
    z-index: 2;
}

/* Special styling for shots grid to make it more text-friendly */
#shots .drinks-grid {
    grid-template-columns: 1fr !important;
    gap: 0.1rem !important;
    max-width: 800px !important;
}

/* Apply same styling to other text-only categories */
#mocktails .drinks-grid,
#softDrinks .drinks-grid,
#hotDrinks .drinks-grid,
#bottles .drinks-grid,
#wine .drinks-grid {
    grid-template-columns: 1fr !important;
    gap: 0.1rem !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Desktop styling for text-only categories removed - now matches mobile */

/* Force override body line-height for text-only items */
.drink-item.text-only,
.drink-item.text-only * {
    line-height: 1.2 !important;
}





/* All text-only items left-aligned */
#shots .drink-item.text-only,
#mocktails .drink-item.text-only,
#softDrinks .drink-item.text-only,
#hotDrinks .drink-item.text-only,
#bottles .drink-item.text-only,
#wine .drink-item.text-only {
    margin-left: 0 !important;
    margin-right: auto !important;
    width: 100% !important;
    position: relative !important;
    left: 0 !important;
}

#shots .drink-item.text-only .card-front,
#mocktails .drink-item.text-only .card-front,
#softDrinks .drink-item.text-only .card-front,
#hotDrinks .drink-item.text-only .card-front,
#bottles .drink-item.text-only .card-front,
#wine .drink-item.text-only .card-front {
    align-items: flex-start !important;
    width: 100% !important;
    position: relative !important;
    left: 0 !important;
}











/* Menu section padding matches mobile */
.menu-section {
    padding: 1.5rem 0.5rem;
    margin-bottom: 1.5rem;
    display: none;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border-radius: 0;
    border: none;
}

.menu-section.active {
    display: flex;
}

/* General drinks grid - but text-only categories will override this */
.drinks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2.2rem;
    padding: 0.5rem;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

/* Override for text-only categories with higher specificity */
#shots .drinks-grid,
#mocktails .drinks-grid,
#softDrinks .drinks-grid,
#hotDrinks .drinks-grid,
#bottles .drinks-grid,
#wine .drinks-grid {
    grid-template-columns: 1fr !important;
    gap: 0.1rem !important;
    max-width: 100% !important;
    width: 100% !important;
}

#redLightCocktails {
    position: relative;
}
.redlight-bg-image {
    background-image: url('RedLightMenuPNGs/background1_test.webp');
}
.redlight-bg-image.bg-active,
.kraken-bg-image.bg-active {
    opacity: 0.18;
    pointer-events: auto;
}

@media (max-width: 600px) {
  .redlight-bg-image.bg-active,
  .kraken-bg-image.bg-active {
    opacity: 0.10;
  }
}

@media (max-width: 400px) {
  .redlight-bg-image,
  .kraken-bg-image {
    display: none;
  }
}

#redLightCocktails > *:not(.redlight-bg-image) {
    position: relative;
    z-index: 1;
}

#krakenCocktails {
    position: relative;
}

#krakenCocktails > *:not(.kraken-bg-image) {
    position: relative;
    z-index: 1;
}

.nav-btn {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    padding: 0 0.3rem;
    position: relative;
    z-index: 3;
    color: var(--text-color);
    text-shadow: 0 0 3px #000;
    align-items: center;
    font-family: 'Playfair Display', serif !important;
    text-shadow: 0 0 5px var(--primary-color);
}

.menu-section h2 {
    text-align: center;
    font-family: 'UnifrakturCook', cursive !important;
    color: var(--text-color);
    font-size: 2.1rem;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 1.2rem;
    padding: 0.3rem;
    text-shadow: 0 0 5px var(--primary-color);
}

.backgrounds {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
}
.bg-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  display: none;
  /* Hardware accelerated parallax */
  transform: translate3d(0, 0, 0);
  will-change: transform;
  contain: layout;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.bg-image.bg-active {
  display: block;
  opacity: 0.35;
  /* Simplified filter for better performance */
  filter: drop-shadow(0 0 30px var(--primary-color));
}
.bg-image[data-section="redLightCocktails"] { background-image: url('RedLightMenuPNGs/background1_test.webp'); }
.bg-image[data-section="krakenCocktails"] { background-image: url('RedLightMenuPNGs/Background2.webp'); }
.bg-image[data-section="classicCocktails"] { background-image: url('RedLightMenuPNGs/background3.webp'); }
.bg-image[data-section="jackDanielsCocktails"] { background-image: url('RedLightMenuPNGs/Background4.webp'); }
.bg-image[data-section="shots"] { background-image: url('RedLightMenuPNGs/background6.webp'); }
.bg-image[data-section="mocktails"] { background-image: url('RedLightMenuPNGs/Background5.webp'); }
.bg-image[data-section="softDrinks"] { background-image: url('RedLightMenuPNGs/background7.webp'); }
.bg-image[data-section="hotDrinks"] { background-image: url('RedLightMenuPNGs/background8.webp'); }
.bg-image[data-section="bottles"] { background-image: url('RedLightMenuPNGs/Background9.webp'); }
.bg-image[data-section="wine"] { background-image: url('RedLightMenuPNGs/background10.webp'); }

@media (max-width: 600px) {
  .bg-image.bg-active {
    opacity: 0.2;
    /* Remove filter on mobile for better performance */
    filter: none;
  }
}

/* Mobile-first parallax optimization */
@media (max-width: 768px) {
  .bg-image {
    /* Simple transform for mobile parallax */
    transform: translateY(0);
    will-change: transform;
  }
}

/* Styles for the sticky back to top button */
.back-to-top-btn {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 30px; /* Increased distance from bottom */
    left: 30px; /* Increased distance from left */
    z-index: 99; /* Ensure it's above other content */
    cursor: pointer;
    background: transparent;
    border: 1.5px solid rgba(var(--primary-color-rgb), 0.3);
    border-radius: 50%; /* Make it round */
    box-shadow: 0 0 8px 2px rgba(var(--primary-color-rgb), 0.2);
    color: var(--text-color);
    width: 60px; /* Increased size */
    height: 60px; /* Increased size */
    font-size: 2rem; /* Adjust size of the arrow */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease-in-out;
    padding: 0;
}

.back-to-top-btn:hover {
    box-shadow: 0 0 12px 3px rgba(var(--primary-color-rgb), 0.4); /* Hover effect */
}

/* Mobile back-to-top button media query removed - using base styling */

/* Duplicate back-to-top button styling removed - using base class */

#backToTopBtn:hover {
    box-shadow: 0 0 12px 3px rgba(var(--primary-color-rgb), 0.4); /* Hover effect */
}

/* Large screen header logo removed - now matches mobile */

@media (max-width: 800px) {
    .menu-nav {
        max-width: 98vw;
    }
}

.flip-card {
    perspective: 1200px;
    position: relative;
    cursor: pointer;
    transition: box-shadow 0.3s;
}

.flip-card .card-front,
.flip-card .card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.flip-card .card-front {
    z-index: 2;
    background: transparent;
    padding: 1.2rem 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.flip-card .card-back {
    transform: rotateY(180deg);
    z-index: 3;
    background: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    width: 100%;
    height: 100%;
}

.flip-card .card-back img {
    width: 94%;
    height: 94%;
    object-fit: cover;
    border-radius: 10px;
    margin: auto;
    box-shadow: 0 0 4px 1px rgba(var(--primary-color-rgb), 0.06);
    display: block;
}

.flip-card.flipped .card-front {
    transform: rotateY(180deg);
}
.flip-card.flipped .card-back {
    transform: rotateY(0deg);
}

.flip-card {
    min-height: 340px;
    height: 100%;
}

/* Desktop flip-card styling removed - now matches mobile */

.card-front,
.card-back {
    padding-top: 3.2rem !important;
}

/* Desktop card sizing removed - now matches mobile */

/* --- Remove the global fixed width/height for cards (let media queries handle it) --- */
.drink-item,
.flip-card {
  box-sizing: border-box;
}

/* Large screen grid max-width removed - now matches mobile */

.flip-card .card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    margin: 0;
    box-shadow: 0 0 4px 1px rgba(var(--primary-color-rgb), 0.06);
    display: block;
} 

.drink-item.text-only {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    min-height: auto !important;
    height: auto !important;
    padding: 0.4rem 0.2rem !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-align: left !important;
    position: relative;
    margin: 0 !important;
}
.drink-item.text-only .card-front {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    height: auto !important;
    position: static;
    padding: 0 !important;
    width: 100% !important;
}

/* Name-price row container */
.drink-item.text-only .name-price-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 0.2rem !important;
}
.drink-item.text-only h3 {
    position: static !important;
    width: auto !important;
    min-width: unset !important;
    max-width: unset !important;
    text-align: left !important;
    font-size: 1.3rem !important;
    background: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    color: var(--text-color) !important;
    font-family: 'Playfair Display', serif !important;
    font-weight: 600 !important;
    display: inline-block !important;
}
.drink-item.text-only p,
.drink-item.text-only p.polish {
    text-align: left !important;
    align-self: flex-start !important;
    margin: 0.1rem 0 !important;
    font-size: 0.9rem !important;
    color: var(--accent-color) !important;
    line-height: 1.4 !important;
}

.drink-item.text-only p.origin {
    font-size: 0.85rem !important;
    color: var(--region-color) !important;
    text-align: left !important;
    align-self: flex-start !important;
    margin: 0.15rem 0 !important;
    font-style: italic !important;
    line-height: 1.3 !important;
}
.drink-item.text-only .drink-item-bottom-row {
    position: static !important;
    margin-top: 0.3rem !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: 100% !important;
}
.drink-item.text-only p.price {
    align-self: flex-end !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1.1rem !important;
    font-weight: bold !important;
    color: var(--text-color) !important;
    background: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    float: right !important;
} 

.drink-item.in-view,
.drink-item.text-only.in-view {
    border-color: var(--primary-color) !important;
    box-shadow:
        0 0 8px 3px var(--primary-color),
        0 0 16px 6px rgba(var(--primary-color-rgb), 0.18),
        0 0 2px 0.5px var(--text-color) inset;
    transition: box-shadow 0.7s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Override in-view effects for text-only items */
.drink-item.text-only.in-view {
    border: none !important;
    box-shadow: none !important;
} 

/* Eye animation icon styles - small and bottom center */
.flip-card .card-front {
  position: relative;
}
.eye-anim {
  position: absolute;
  left: 50%;
  bottom: 0.7rem;
  transform: translateX(-50%);
  width: 44px;
  height: 28px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
}
.eye-anim img {
  width: 100%;
  height: auto;
  display: block;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Specific styling for Whiskey Sour cocktail to reduce font size */
.drink-item.whiskey-sour p:not(.price):not(.polish) {
  font-size: 0.85rem !important;
}

.drink-item.whiskey-sour p.polish {
  font-size: 0.75rem !important;
}
