/* ... Previous styles remain for context ... */

:root {
    /* Color Palette - Dark Mode Default */
    --bg-primary: #0f1115;
    --bg-secondary: #161b22;
    --bg-card: rgba(30, 35, 45, 0.7);
    --bg-card-hover: rgba(40, 45, 55, 0.9);

    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-accent: #e6b450;
    /* Beer Gold */

    --border-color: rgba(240, 246, 252, 0.1);

    --primary-color: #e6b450;
    --primary-hover: #f0c460;

    --success-color: #238636;
    --danger-color: #da3633;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Spacing */
    --container-width: 1450px;
    --header-height: 80px;
}

/* Light Mode Overrides */
body.light-mode {
    --bg-primary: #ffffff;
    --bg-secondary: #f6f8fa;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 1);
    --text-primary: #24292f;
    --text-secondary: #57606a;
    --text-accent: #0b665f;  /* Dark sea blue instead of gold */
    --primary-color: #0b665f;  /* Dark sea blue instead of gold */
    --primary-hover: #0d7a72;  /* Slightly lighter sea blue */
    --border-color: rgba(27, 31, 35, 0.15);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    display: none !important;
}

/* Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    gap: 40px;
    z-index: 1000;
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-accent);
    letter-spacing: 1px;
    white-space: nowrap;
    flex-shrink: 0;
}

.icon-btn {
    background: transparent;
    color: var(--text-primary);
    font-size: 1.2rem;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(15deg);
}

.nav-controls {
    flex-shrink: 0;
}

/* Tab Navigation */
.tabs-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: color 0.3s ease, background 0.3s ease;
    white-space: nowrap;
    position: relative;
}

.tab-btn i {
    font-size: 1.1rem;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(230, 180, 80, 0.15);
}

.tab-btn.active {
    color: var(--primary-color);
    background: rgba(230, 180, 80, 0.2);
    font-weight: 600;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../backgrounds/background1.png');
    background-size: cover;
    background-position: center;
    filter: brightness(0.4);
    z-index: 0;
    transform: scale(1);
    animation: zoomHero 20s infinite alternate;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.6s ease;
}

@keyframes zoomHero {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    opacity: 0;
    animation: fadeInUp 1.2s ease forwards 0.5s;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 20px;
}

.accent-text {
    display: inline-block;
    position: relative;
    /* Always white in both themes */
    background: linear-gradient(to right, #fff, #ddd);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #fff;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
}

.cta-btn {
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: #000;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 30px;
    transition: var(--transition-normal);
}

.cta-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 180, 80, 0.4);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;  /* Always white in both modes */
    animation: bounce 2s infinite;
    z-index: 1;
    cursor: pointer;
    font-size: 1.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== LANDING PAGE ==================== */
.landing-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-primary);
    overflow: hidden;
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.landing-page.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Scroll spacer to enable scrolling */
.scroll-spacer {
    height: 400vh;
    pointer-events: none;
    position: relative;
    z-index: 0;
}

/* Scroll Progress Indicators */
.scroll-indicators {
    position: fixed;
    right: 3rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.scroll-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.scroll-dot.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 12px var(--primary-color);
    transform: scale(1.3);
}

.scroll-dot:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.landing-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.landing-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin: 0 auto;
    max-width: 95vw;
    padding: 0 60px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.landing-section.active {
    z-index: 2;
    opacity: 1;
    pointer-events: auto;
}

/* Section 1 & 3: Text left, Image right - MORE space for text, images shifted left */
.landing-section.section-1,
.landing-section.section-3 {
    grid-template-columns: 1.3fr 0.7fr;
    gap: 100px;
    padding-left: 80px;
    padding-right: 40px;
}

.landing-section.section-2,
.landing-section.section-4 {
    grid-template-columns: 1.2fr 0.8fr;
}

.landing-text-block {
    padding: 40px;
}

.landing-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(4rem, 10vw, 9rem);
    font-weight: 700;
    line-height: 0.85;
    margin: 0;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: -4px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Text gradient effect */
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 50%, var(--text-primary) 100%);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 8s ease infinite;
    
    /* Text shadow for depth */
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.landing-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.landing-title:nth-child(2) {
    transition-delay: 0.2s;
    /* Alternate text effect - outline */
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 2px var(--primary-color);
    background: none;
    animation: none;
}

.landing-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-top: 30px;
    line-height: 1.6;
    font-weight: 300;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
    letter-spacing: 0.5px;
}

.landing-title.visible ~ .landing-subtitle,
.landing-subtitle.visible {
    opacity: 1;
    transform: translateY(0);
}

.landing-image-right,
.landing-image-left {
    position: relative;
    height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-image-right {
    justify-content: flex-start;
    padding-left: 0;
}

.landing-image-left {
    justify-content: flex-start;
}

.float-image {
    max-width: 120%;
    max-height: 700px;
    object-fit: contain;
    filter: drop-shadow(0 25px 80px rgba(0, 0, 0, 0.6));
    opacity: 0;
    transform: scale(0.9) translateY(50px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.float-image.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Landing CTA Section */
.landing-cta-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.landing-cta-section.active {
    opacity: 1;
    pointer-events: auto;
}

.landing-cta-text {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 8vw, 5rem);
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 700;
    
    /* Text gradient CTA */
    background: linear-gradient(90deg, var(--text-primary), var(--primary-color), var(--text-primary));
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 3s linear infinite;
}

@keyframes gradientFlow {
    to {
        background-position: 200% center;
    }
}

.landing-cta-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    letter-spacing: 1px;
}

.landing-cta-icons {
    font-size: 3rem;
    color: var(--primary-color);
    animation: bounce 2s infinite;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-fast);
}

.landing-cta-icons:hover {
    transform: scale(1.1);
    color: var(--primary-hover);
}

/* Light Mode Adjustments for Landing */
body.light-mode .landing-title {
    background: linear-gradient(135deg, var(--text-primary) 0%, #0b665f 50%, var(--text-primary) 100%);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 8s ease infinite;
    filter: drop-shadow(0 4px 8px rgba(11, 102, 95, 0.3));
}

body.light-mode .landing-title:nth-child(2) {
    -webkit-text-stroke: 2px #0b665f;
    animation: none;
}

body.light-mode .landing-cta-text {
    background: linear-gradient(90deg, var(--text-primary), #0b665f, var(--text-primary));
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 8s ease infinite;
}

body.light-mode .float-image {
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.2));
}

/* Light Mode - Replace all golden rgba with dark sea blue rgba */
body.light-mode .tab-btn:hover {
    background: rgba(11, 102, 95, 0.15);
}

body.light-mode .tab-btn.active {
    background: rgba(11, 102, 95, 0.2);
}

body.light-mode .cta-btn:hover {
    box-shadow: 0 5px 15px rgba(11, 102, 95, 0.4);
}

body.light-mode .search-bar input:focus {
    box-shadow: 0 0 0 3px rgba(11, 102, 95, 0.2);
}

body.light-mode .subcategory-item.selected {
    background: rgba(11, 102, 95, 0.1);
}

body.light-mode .product-image:hover {
    filter: drop-shadow(0 0 20px rgba(11, 102, 95, 0.2));
}

body.light-mode .category-group.expanded,
body.light-mode .parent-category.active {
    background: rgba(11, 102, 95, 0.05);
}

body.light-mode .filter-chip.active {
    background: rgba(11, 102, 95, 0.1);
}

body.light-mode .landing-cta-icons {
    color: #0b665f;
}

/* Responsive Landing Page */
@media (max-width: 968px) {
    .landing-page {
        position: relative;
        height: auto;
        min-height: 100vh;
    }
    
    .scroll-spacer {
        display: none;
    }
    
    .landing-section {
        grid-template-columns: 1fr !important;
        gap: 40px;
        padding: 60px 20px !important;
        text-align: center;
        position: relative;
        height: auto;
        min-height: 100vh;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .landing-section.section-1,
    .landing-section.section-3 {
        grid-template-columns: 1fr !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .landing-section.section-2 .landing-image-left,
    .landing-section.section-4 .landing-image-left {
        order: 2;
    }

    .landing-section.section-2 .landing-text-block,
    .landing-section.section-4 .landing-text-block {
        order: 1;
    }

    .landing-image-right,
    .landing-image-left {
        height: 400px;
        justify-content: center !important;
    }

    .float-image {
        max-height: 400px;
    }

    .landing-title {
        font-size: clamp(3rem, 12vw, 6rem);
    }

    /* Hide scroll indicators on mobile */
    .scroll-indicators {
        display: none;
    }
}

/* Search Bar (Compact & Sticky) */
.search-section {
    padding: 15px 0;
    /* Reduced padding */
    position: sticky;
    top: var(--header-height); /* Account for unified navigation */
    background: var(--bg-primary);
    z-index: 998;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    /* Added shadow for separation */
    display: none; /* Hidden by default, shown when reviews tab active via JS */
}

.search-bar {
    position: relative;
    max-width: 500px;
    /* Reduced width */
    margin: 0 auto 10px;
    /* Reduced margin */
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-bar input {
    width: 100%;
    padding: 10px 10px 10px 40px;
    /* Smaller padding */
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.9rem;
    /* Smaller font */
    transition: var(--transition-fast);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(230, 180, 80, 0.2);
}

.filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

select {
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
}

.filter-chip {
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    font-size: 0.85rem;
}

.filter-chip:hover,
.filter-chip.active {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

/* New Sidebar + Grid Layout */
.main-content {
    padding: 40px 0 80px;
    margin-top: var(--header-height); /* Space for unified navigation */
}

/* Hide main-content wrapper on home page */
body.home-mode .main-content {
    display: none;
}

.layout-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* Sidebar Styles (Sticky & No internal scroll if fits) */
.sidebar-filter {
    flex: 0 0 300px;
    /* Reduced width for more grid space */
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: sticky;
    top: 100px;
    /* Adjusted for unified navigation */
    height: auto;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
    /* Firefox thin scrollbar */
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    font-size: 1.2rem;
}

.text-btn {
    background: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: underline;
}

.text-btn:hover {
    color: var(--text-accent);
}

/* Tree Categories */
.category-group {
    margin-bottom: 15px;
}

.parent-category {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    font-weight: 600;
}

.parent-category:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary-color);
}

.parent-category.active {
    color: var(--primary-color);
}

.subcategory-list {
    margin-left: 15px;
    padding-left: 10px;
    border-left: 1px solid var(--border-color);
    margin-top: 5px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.subcategory-item {
    padding: 6px 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.subcategory-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.subcategory-item.selected {
    color: var(--primary-color);
    background: rgba(230, 180, 80, 0.1);
}

.category-group.expanded .subcategory-list {
    max-height: 500px;
    /* Arbitrary expand limit */
}

.count-badge {
    opacity: 0.6;
    font-size: 0.8rem;
}

/* Product Grid (Larger Gap, Smaller Cards) */
.content-area {
    flex: 1;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 90px;
    /* Increased gap */
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    /* Reduced padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.product-img-wrapper {
    width: 100%;
    /* Full width */
    aspect-ratio: 1/1;
    /* Square to reduce height */
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: var(--radius-sm);
    margin: 0 auto 15px;
    /* Reduced margin */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.product-img {
    height: 100%;
    width: 100%;
    object-fit: contain;
    /* Ensure it stays inside */
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
    padding: 5px;
}

.product-card:hover .product-img {
    transform: scale(1.05);
    /* Slight zoom on hover */
}

.product-name {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 6px;
    line-height: 1.3;
}

.product-rating {
    color: var(--text-accent);
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* Overlay / Fullscreen Detail */
.beer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.beer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.overlay-background-parallax {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-image: url('../backgrounds/background1.png');
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.2);
    z-index: -1;
    transition: transform 0.1s ease-out;
    pointer-events: none;
}

/* Hide recommendation badge visually — filtering logic remains intact */
#overlay-recommended {
    display: none !important;
}

.close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 2rem;
    color: var(--text-primary);
    background: transparent;
    z-index: 2002;
    transition: var(--transition-fast);
}

.close-btn:hover {
    color: var(--danger-color);
    transform: rotate(90deg);
}

.overlay-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 20px;
    z-index: 2002;
    transition: var(--transition-fast);
}

.overlay-nav:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.overlay-nav-prev {
    left: 40px;
}

.overlay-nav-next {
    right: 40px;
}

.overlay-content-wrapper {
    width: 85%;
    height: 85%;
    max-width: 1200px;
    /* Prevent the card from growing unboundedly when the browser is zoomed out.
       At normal zoom 85vh ≈ 85% of the overlay which fills 100vh — so this
       clamp only kicks in when zoom < 100%, keeping the card's shape stable. */
    max-height: min(85vh, 800px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.beer-detail-card {
    width: 100%;
    height: 100%;
    background: rgba(15, 17, 21, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform var(--transition-slow);
    position: relative;
}

/* Custom Gradient Background - uses CSS variable set dynamically */
.beer-detail-card.has-custom-gradient .beer-info-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--custom-gradient);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.2;
    z-index: 0;
    pointer-events: none;
}

/* Ensure content is above the background */
.beer-image-section,
.beer-info-section {
    position: relative;
    z-index: 1;
}

.beer-info-section > * {
    position: relative;
    z-index: 1;
}

.beer-overlay.active .beer-detail-card {
    transform: scale(1);
}

.beer-image-section {
    width: 40%;
    position: relative;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.beer-image-section img {
    max-width: 96%;
    max-height: 96%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(230, 180, 80, 0.2));
}

.image-actions {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    text-align: center;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.secondary-btn:hover {
    background: var(--text-primary);
    color: #000;
}

.beer-info-section {
    width: 60%;
    padding: 50px;
    overflow-y: auto;
    position: relative;
}

.beer-category-badge {
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 20px;
}

.beer-title {
    font-size: 3rem;
    margin-bottom: 30px;
    color: #fff;
}

.rating-container {
    margin-bottom: 40px;
}

.rating-score {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.max-rating {
    font-size: 1rem;
    color: var(--text-secondary);
}

.rating-bar-wrapper {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 1s ease-out 0.5s;
    /* Delay for animation effect */
}

.beer-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.meta-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.meta-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-top: 3px;
}

.meta-content {
    display: flex;
    flex-direction: column;
}

.meta-content strong {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.beer-description h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    display: inline-block;
}

.beer-description p {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 1.1rem;
}

.recommendation-badge {
    margin-top: 30px;
    padding: 15px;
    background: rgba(35, 134, 54, 0.1);
    border-left: 3px solid var(--success-color);
    color: var(--success-color);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Light Mode Adjustments for Overlay */
body.light-mode .beer-title {
    color: #1a1a1a;
}

body.light-mode .meta-content span {
    color: var(--text-primary);
}

body.light-mode .meta-content strong {
    color: var(--text-secondary);
}

body.light-mode .secondary-btn {
    background: rgba(0, 0, 0, 0.15);
    color: var(--text-primary);
    font-weight: 600;
}

body.light-mode .secondary-btn:hover {
    background: var(--primary-color);
    color: #000;
}

/* ==================== ARTICLE OVERLAY ==================== */
.article-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.article-overlay.active {
    opacity: 1;
    visibility: visible;
}

.article-overlay-content {
    width: 90%;
    height: 90%;
    max-width: 900px;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    padding: 20px;
}

.article-detail {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: slideUpFade 0.4s ease-out;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-header-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

.article-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.article-detail-body {
    padding: 50px 60px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.article-category-badge {
    display: inline-block;
    background: var(--primary-color);
    color: #000;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-date-badge {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-detail-body h1 {
    font-size: 2.8rem;
    margin-bottom: 30px;
    color: var(--text-primary);
    font-family: 'Playfair Display', serif;
    line-height: 1.3;
}

.article-full-content {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Heading Styles */
.article-full-content .heading1 {
    font-size: 2.2rem;
    margin-top: 50px;
    margin-bottom: 30px;
    color: var(--text-primary);
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.article-full-content .heading2 {
    font-size: 1.6rem;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--text-primary);
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
}

.article-full-content .heading3 {
    font-size: 1.3rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--text-primary);
    text-align: left;
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
}

/* Paragraph Styles */
.article-full-content .paragraph1 {
    margin-bottom: 20px;
    text-align: justify;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-full-content .paragraph2 {
    margin-bottom: 20px;
    text-align: left;
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.article-full-content .paragraph3 {
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    font-style: italic;
    color: var(--text-secondary);
}

/* Legacy support for unmarked headings and paragraphs */
.article-full-content h2 {
    font-size: 1.6rem;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--text-primary);
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
}

.article-full-content p {
    margin-bottom: 20px;
    text-align: justify;
}

.article-full-content ul {
    margin: 20px 0;
    padding-left: 30px;
}

.article-full-content li {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.article-full-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 20px 30px;
    margin: 30px 0;
    background: rgba(230, 180, 80, 0.05);
    border-radius: var(--radius-sm);
    font-style: italic;
    color: var(--text-primary);
}

/* Article Content Images */
.article-content-image-wrapper {
    margin: 30px 0;
    text-align: center;
    position: relative;
}

.article-content-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    cursor: default;
    transition: opacity 0.3s ease;
}

/* Stats Overlay Effect for Selected Images */
.article-content-image-wrapper.has-stats {
    cursor: pointer;
}

.article-content-image-wrapper.has-stats .article-content-image {
    transition: opacity 0.3s ease;
}

.article-content-image-wrapper.has-stats:hover .article-content-image {
    opacity: 0;
}

.beer-stats-overlay {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgba(30, 35, 45, 0.95) 0%, rgba(40, 45, 55, 0.95) 100%);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 30px;
    gap: 15px;
}

.article-content-image-wrapper.has-stats:hover .beer-stats-overlay {
    opacity: 1;
}

.stats-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    background: rgba(230, 180, 80, 0.1);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary-color);
}

.stats-label {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-label i {
    color: var(--primary-color);
}

.stats-value {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.article-image-caption {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
}

/* Scrollbar styling for article overlay */
.article-overlay-content::-webkit-scrollbar {
    width: 10px;
}

.article-overlay-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.article-overlay-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

.article-overlay-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* ==================== TAB CONTENT LAYOUTS ==================== */

/* List View */
.list-view {
    padding: 40px 0;
}

.list-header {
    text-align: center;
    margin-bottom: 40px;
}

.list-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.list-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.beer-list {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.beer-list-item {
    display: grid;
    grid-template-columns: 60px 1fr auto auto;
    align-items: center;
    gap: 20px;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
    cursor: pointer;
}

.beer-list-item:last-child {
    border-bottom: none;
}

.beer-list-item:hover {
    background: var(--bg-card-hover);
    transform: translateX(5px);
}

.beer-list-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.beer-list-info h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.beer-list-category {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.beer-list-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.beer-list-badge {
    padding: 6px 12px;
    background: rgba(35, 134, 54, 0.1);
    color: var(--success-color);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Articles View */
.articles-view {
    padding: 40px 0;
}

.articles-header {
    text-align: center;
    margin-bottom: 50px;
}

.articles-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.articles-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.article-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.article-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 25px;
}

.article-date {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.article-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-primary);
    line-height: 1.4;
}

.article-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.article-link {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition-fast);
}

.article-link:hover {
    gap: 10px;
}

/* Stats View */
.stats-view {
    padding: 40px 0;
}

.stats-header {
    text-align: center;
    margin-bottom: 50px;
}

.stats-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.stats-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-family: 'Inter', sans-serif;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.chart-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
}

.chart-card h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--text-primary);
}

.chart-content {
    min-height: 300px;
}

.chart-bar-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.chart-bar-label {
    min-width: 200px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.chart-bar-container {
    flex: 1;
    height: 30px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.chart-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    border-radius: var(--radius-sm);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: #000;
    font-weight: 600;
    font-size: 0.85rem;
}

.chart-category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    transition: var(--transition-fast);
}

.chart-category-item:hover {
    background: var(--bg-card-hover);
}

.chart-category-name {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.chart-category-count {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Responsive adjustments for tabs */
@media (max-width: 768px) {
    .top-nav {
        padding: 0 20px;
        gap: 15px;
        height: 70px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .tab-btn span {
        display: none;
    }
    
    .tab-btn {
        padding: 10px 12px;
    }
    
    .tabs-wrapper {
        gap: 5px;
    }
    
    .charts-section,
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .beer-list-item {
        grid-template-columns: 50px 1fr;
        gap: 15px;
    }
    
    .beer-list-rating,
    .beer-list-badge {
        grid-column: 2;
    }
}

body.light-mode .beer-detail-card {
    background: rgba(255, 255, 255, 0.95);
}

body.light-mode .beer-image-section {
    background: #f6f8fa;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .layout-wrapper {
        gap: 20px;
    }

    .sidebar-filter {
        flex: 0 0 240px;
    }
}

@media (max-width: 900px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .overlay-content-wrapper {
        flex-direction: column;
        height: 95%;
        overflow-y: auto;
    }

    .beer-image-section {
        width: 100%;
        height: 300px;
    }

    .beer-image-section img {
        height: 100%;
    }

    .beer-info-section {
        width: 100%;
        padding: 30px;
    }

    .beer-title {
        font-size: 2rem;
    }

    .overlay-nav {
        padding: 10px;
    }

    .overlay-nav-prev {
        left: 10px;
    }

    .overlay-nav-next {
        right: 10px;
    }

    /* Article overlay responsive */
    .article-detail-body {
        padding: 30px 25px;
    }

    .article-detail-body h1 {
        font-size: 2rem;
    }

    .article-header-image {
        height: 200px;
    }

    .article-full-content {
        font-size: 1rem;
    }

    .article-full-content h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .layout-wrapper {
        flex-direction: column;
    }

    .sidebar-filter {
        width: 100%;
        position: relative;
        top: 0;
        max-height: none;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    /* Article overlay mobile */
    .article-overlay-content {
        width: 100%;
        height: 100%;
        padding: 10px;
    }

    .article-detail-body {
        padding: 20px 15px;
    }

    .article-detail-body h1 {
        font-size: 1.5rem;
    }

    .article-full-content h2 {
        font-size: 1.3rem;
        margin-top: 25px;
    }

    .article-full-content {
        font-size: 0.95rem;
        text-align: left;
    }
}

/* ══════════════════════════════════════════════════════
   SITE LOGO — fixed top-left (visible on all pages)
══════════════════════════════════════════════════════ */
.site-logo {
    position: fixed;
    top: 1.4rem;
    left: 2rem;
    z-index: 10001;
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: rgba(245, 245, 245, 0.9);
    letter-spacing: 0.06em;
    pointer-events: auto;
    cursor: pointer;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    mix-blend-mode: normal;
    transition: color 0.3s ease, opacity 0.3s ease;
    user-select: none;
}
.site-logo:hover {
    color: rgba(255, 255, 255, 1);
    opacity: 0.85;
}

/* Logo adapts in light mode (non-home tabs) */
body.light-mode .site-logo {
    color: rgba(20, 20, 20, 0.9);
    text-shadow: none;
}
body.light-mode .site-logo:hover {
    color: rgba(0, 0, 0, 1);
}

/* ══════════════════════════════════════════════════════
   HAMBURGER MENU — fixed top-right
══════════════════════════════════════════════════════ */
.hamburger-wrapper {
    position: fixed;
    top: 1.2rem;
    right: 1.8rem;
    z-index: 10001;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.55rem;
}

/* Standalone theme-toggle icon button — shown only on non-home tabs */
.theme-icon-btn {
    background: rgba(10, 10, 10, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    width: 60px;
    height: 60px;
    display: none; /* hidden by default; JS shows it */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    color: #d8d8d8;
    font-size: 1.2rem;
}

.theme-icon-btn:hover {
    background: rgba(30, 30, 30, 0.85);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

body.light-mode .theme-icon-btn {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.15);
    color: #333333;
}

body.light-mode .theme-icon-btn:hover {
    background: rgba(240, 240, 240, 0.95);
    color: #111111;
}

.hamburger-btn {
    background: rgba(10, 10, 10, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.hamburger-btn:hover {
    background: rgba(30, 30, 30, 0.85);
    border-color: rgba(255, 255, 255, 0.35);
}

.hamburger-btn span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: #f0f0f0;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

/* Open state — X animation */
.hamburger-btn.open span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}
.hamburger-btn.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger-btn.open span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* Light mode hamburger button */
body.light-mode .hamburger-btn {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.15);
}
body.light-mode .hamburger-btn span {
    background: #1a1a1a;
}
body.light-mode .hamburger-btn:hover {
    background: rgba(240, 240, 240, 0.95);
}

/* ── Dropdown panel ───────────────────────────────── */
.dropdown-nav {
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    min-width: 260px;
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 0.6rem 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.22s ease, transform 0.22s ease;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7),
                0 4px 16px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.dropdown-nav.open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1);
}

/* Light mode dropdown */
body.light-mode .dropdown-nav {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15),
                0 4px 16px rgba(0, 0, 0, 0.08);
}

/* ── Menu items ───────────────────────────────────── */
.menu-nav-item {
    background: transparent;
    border: none;
    border-left: 2px solid transparent;
    color: #d8d8d8;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-align: left;
    padding: 1rem 1.6rem;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease,
                border-left-color 0.18s ease;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.menu-nav-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

.menu-nav-item.active {
    color: #ffffff;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #ffffff;
}

/* Light mode menu items */
body.light-mode .menu-nav-item {
    color: #444444;
}
body.light-mode .menu-nav-item:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #111111;
}
body.light-mode .menu-nav-item.active {
    color: #111111;
    background: rgba(0, 0, 0, 0.08);
    border-left-color: #111111;
}

.menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.4rem 1rem;
}

body.light-mode .menu-divider {
    background: rgba(0, 0, 0, 0.1);
}

/* Theme toggle item */
.theme-menu-item {
    color: #888888;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
}
.theme-menu-item:hover {
    color: #cccccc;
}
body.light-mode .theme-menu-item {
    color: #666666;
}
body.light-mode .theme-menu-item:hover {
    color: #333333;
}

/* ══════════════════════════════════════════════════════
   HOME MODE — body class applied when home tab is active
   Forces dark background, disables light mode override
══════════════════════════════════════════════════════ */
body.home-mode,
body.home-mode.light-mode {
    background-color: #0a0a0a !important;
    color: #f5f5f5 !important;
}

/* Home content wrapper */
#home-content {
    display: block;
}

#home-content.hidden-tab {
    display: none;
}

/* Non-home tab body spacing */
body:not(.home-mode) .main-content {
    padding-top: 86px;
}

/* Search section as a fixed top bar — aligned with site-logo and hamburger */
body:not(.home-mode) #search-section {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: auto;
    padding: 0.85rem 6.5rem 0.85rem 12.5rem;
    z-index: 9999;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
    align-items: center;
    gap: 1rem;
}

body:not(.home-mode) #search-section .container {
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0;
    margin: 0;
}

body:not(.home-mode) #search-section .search-bar {
    flex: 1;
    max-width: 400px;
    margin: 0;
}

body:not(.home-mode) #search-section .filters {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: nowrap;
    margin: 0;
}

/* Remove header-height margin when not on home (no fixed navbar) */
body:not(.home-mode) .main-content {
    margin-top: 0;
}

body:not(.home-mode) .tab-content {
    min-height: calc(100vh - 80px);
}

/* Tab sections hidden by default — shown by app.js */
.main-content .tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.main-content .tab-content.active {
    display: block;
}

/* Tab background adapts to light/dark mode */
body:not(.home-mode) {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* Ensure BeerVault headings in tabs keep their font, not Space Grotesk */
.main-content h1,
.main-content h2,
.main-content h3,
.main-content h4,
.stats-view h2,
.stats-view h3,
.list-view h2,
.articles-view h2,
.sidebar-filter h3 {
    font-family: 'Playfair Display', serif !important;
    text-transform: none !important;
    line-height: 1.2 !important;
}

/* .stat-label in stats view (NOT in #home-content) */
.stats-grid .stat-label,
.stat-card .stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    text-transform: none;
}

/* Site footer for tab views */
.site-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Ensure noise-overlay and ambient-light don't interfere with tabs */
body:not(.home-mode) .noise-overlay,
body:not(.home-mode) .ambient-light {
    display: none;
}
