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

* {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.no-transitions * {
    transition: none !important;
    animation-duration: 0s !important;
}

/* CSS Custom Properties */
:root {
    /* Light Mode Colors */
    --bg-primary: #FAFAFA;
    --bg-secondary: #FFFFFF;
    --bg-elevated: #FFFFFF;
    --text-primary: #1A1A1A;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --text-muted: #999999;
    --border-light: #E5E5E5;
    --border-medium: #E5E5E5;
    --accent-primary: #B8860B;
    --accent-olive: #708238;
    --accent-secondary: #8B7355;
    --shadow-sm: rgba(0, 0, 0, 0.04);
    --shadow-md: rgba(0, 0, 0, 0.08);
    --shadow-lg: rgba(0, 0, 0, 0.12);
    
    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 5rem;
    
    /* Typography Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 4rem;
    
    /* Border Radius Scale */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* Dark Mode Color Overrides */
[data-theme="dark"] {
    --bg-primary: #0A0A0A;
    --bg-secondary: #141414;
    --bg-elevated: #1A1A1A;
    --text-primary: #FAFAFA;
    --text-secondary: #A8A8A8;
    --text-tertiary: #707070;
    --text-muted: #606060;
    --border-light: #2A2A2A;
    --border-medium: #333333;
    --accent-primary: #D4AF37;
    --accent-olive: #9CB45B;
    --accent-secondary: #A0906B;
    --shadow-sm: rgba(0, 0, 0, 0.2);
    --shadow-md: rgba(0, 0, 0, 0.4);
    --shadow-lg: rgba(0, 0, 0, 0.6);
}

/* Auto Dark Mode Detection */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-primary: #0A0A0A;
        --bg-secondary: #141414;
        --bg-elevated: #1A1A1A;
        --text-primary: #E5E5E5;
        --text-secondary: #A0A0A0;
        --text-tertiary: #707070;
        --text-muted: #707070;
        --border-light: #2A2A2A;
        --border-medium: #2A2A2A;
        --accent-olive: #9CB45B;
        --shadow-sm: rgba(0, 0, 0, 0.2);
        --shadow-md: rgba(0, 0, 0, 0.4);
        --shadow-lg: rgba(0, 0, 0, 0.6);
    }
}

/* Base Document Styles */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    transition: background-color 0.4s ease, color 0.4s ease;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

::selection {
    background: var(--accent-olive);
    color: white;
}

*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Layout Components */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-4xl) var(--space-xl);
}

/* Theme toggle button */
.theme-toggle {
    position: fixed;
    top: var(--space-xl);
    right: var(--space-xl);
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px var(--shadow-md);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
}

.theme-toggle:hover {
    border-color: var(--accent-primary);
    transform: translateY(-1px) rotate(180deg);
    box-shadow: 0 6px 16px var(--shadow-lg);
}

.theme-icon {
    width: 22px;
    height: 22px;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

/* Filter toggle button */
.filter-toggle {
    position: fixed;
    top: var(--space-xl);
    left: var(--space-xl);
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px var(--shadow-md);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
}

.filter-toggle:hover {
    border-color: var(--accent-olive);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--shadow-lg);
}

.filter-text {
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    text-transform: uppercase;
}

/* Header */
.header {
    text-align: center;
    padding: var(--space-4xl) 0 var(--space-3xl) 0;
    margin-bottom: var(--space-3xl);
}

.header h1 {
    font-size: clamp(var(--text-5xl), 8vw, var(--text-6xl));
    font-weight: 200;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: var(--space-lg);
}

.header-subtitle {
    color: var(--text-secondary);
    font-size: var(--text-lg);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 400;
    line-height: 1.4;
}

/* Filter Pills */
.filter-pills {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-3xl);
    flex-wrap: wrap;
    justify-content: center;
    padding-top: 4rem;
}

.pill {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 10px 24px;
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.pill:hover {
    border-color: var(--accent-olive);
    color: var(--accent-olive);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-md);
}

.pill.active {
    background: var(--accent-olive);
    color: white;
    border-color: var(--accent-olive);
}

/*Olive section*/
.olives-list-section {
    padding-top: 4rem;
    border-top: 1px solid var(--border-light);
    text-align: center;
}
/* Olive Grid */
.olive-grid {
    display: grid;
    gap: var(--space-2xl);
    grid-template-columns: 1fr;
    margin-bottom: var(--space-4xl);
}

@media (min-width: 768px) {
    .olive-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1200px) {
    .olive-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Olive Cards */
.olive-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    box-shadow: 0 2px 8px var(--shadow-sm);
}

.olive-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow-md);
    border-color: var(--border-medium);
}

.olive-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-olive), transparent);
    transform: scaleX(0);
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0.6;
}

.olive-card:hover::before {
    transform: scaleX(1);
}

.olive-header {
    padding: var(--space-xl);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.olive-variety {
    font-size: var(--text-2xl);
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.origin-badge {
    background: var(--accent-olive);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.olive-content {
    padding: var(--space-xl);
}

.description-section {
    margin-bottom: var(--space-xl);
}

.description-section h3 {
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: var(--space-sm);
}

.description-section p {
    color: var(--text-secondary);
    font-size: var(--text-base);
    line-height: 1.6;
}

.tasting-section {
    display: grid;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.tasting-notes h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: var(--space-sm);
}

.flavor-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.tag {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: var(--text-xs);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.olive-card:hover .tag {
    border-color: var(--accent-olive);
    color: var(--accent-olive);
}

.intensity {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.intensity strong {
    color: var(--accent-primary);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pairing-section h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: var(--space-sm);
}

.pairing-section p {
    color: var(--text-secondary);
    font-size: var(--text-base);
    line-height: 1.6;
}

/* Education Section */
.education-section {
    margin-top: var(--space-3xl);
    padding: var(--space-3xl) 0;
    border-top: 1px solid var(--border-light);
    margin-bottom: var(--space-3xl);
}

.education-section h2 {
    font-size: var(--text-3xl);
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: var(--space-3xl);
    color: var(--text-primary);
}

.education-grid {
    display: grid;
    gap: var(--space-xl);
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .education-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .education-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.education-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.education-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow-md);
    border-color: var(--accent-olive);
}

.education-card h3 {
    font-size: var(--text-lg);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
    color: var(--accent-primary);
}

.education-card p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.6;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: var(--space-4xl);
    padding-top: var(--space-2xl);
    border-top: 1px solid var(--border-light);
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* Animations */
.fade-in {
    animation: fadeIn 1.2s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.olive-card:nth-child(1) { animation-delay: 0.1s; }
.olive-card:nth-child(2) { animation-delay: 0.2s; }
.olive-card:nth-child(3) { animation-delay: 0.3s; }
.olive-card:nth-child(4) { animation-delay: 0.4s; }
.olive-card:nth-child(5) { animation-delay: 0.5s; }
.olive-card:nth-child(6) { animation-delay: 0.6s; }
.olive-card:nth-child(7) { animation-delay: 0.7s; }
.olive-card:nth-child(8) { animation-delay: 0.8s; }
.olive-card:nth-child(9) { animation-delay: 0.9s; }
.olive-card:nth-child(10) { animation-delay: 1s; }

/* Filter animations */
.olive-card[data-hidden="true"] {
    display: none;
}

/* Accessibility & Keyboard Navigation */
.keyboard-navigation .olive-card:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 4px;
    transform: translateY(-1px);
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: var(--space-3xl) var(--space-lg);
    }
    
    .theme-toggle {
        width: 44px;
        height: 44px;
        top: var(--space-md);
        right: var(--space-md);
    }
    
    .filter-toggle {
        top: var(--space-md);
        left: var(--space-md);
        padding: 10px 16px;
    }
    
    .olive-card {
        border-radius: var(--radius-md);
    }
    
    .olive-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
    
    .filter-pills {
        padding: 0 var(--space-md);
        margin-top: 2rem;
    }
}

/* Menu Toggle Button */
.menu-toggle {
    position: fixed;
    top: var(--space-xl);
    left: var(--space-xl);
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px var(--shadow-md);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1001;
}

.menu-toggle:hover {
    border-color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--shadow-lg);
}

/* Hamburger Icon */
.menu-icon {
    width: 22px;
    height: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-line {
    display: block;
    height: 1.5px;
    width: 100%;
    background: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Animated X when menu is open */
.menu-open .menu-toggle .menu-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-open .menu-toggle .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-toggle .menu-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Navigation Menu Overlay */
.nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    overflow-y: auto;
}

.nav-menu.active {
    opacity: 1;
    visibility: visible;
}

/* Navigation Menu Content */
.nav-menu-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-4xl) var(--space-xl);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav-menu-header {
    padding: var(--space-2xl) 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: var(--space-3xl);
}

.nav-menu-label {
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

/* Navigation Menu Items */
.nav-menu-items {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.nav-menu-item {
    display: flex;
    align-items: center;
    padding: var(--space-xl) 0;
    text-decoration: none;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateX(-30px);
}

/* Stagger animation for menu items */
.nav-menu.active .nav-menu-item {
    opacity: 1;
    transform: translateX(0);
}

.nav-menu.active .nav-menu-item:nth-child(1) { transition-delay: 0.1s; }
.nav-menu.active .nav-menu-item:nth-child(2) { transition-delay: 0.15s; }
.nav-menu.active .nav-menu-item:nth-child(3) { transition-delay: 0.2s; }
.nav-menu.active .nav-menu-item:nth-child(4) { transition-delay: 0.25s; }
.nav-menu.active .nav-menu-item:nth-child(5) { transition-delay: 0.3s; }
.nav-menu.active .nav-menu-item:nth-child(6) { transition-delay: 0.35s; }

/* Hover line effect */
.nav-menu-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-primary), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-menu-item:hover::before,
.nav-menu-item.active::before {
    transform: scaleX(1);
}

.nav-menu-item:hover {
    padding-left: var(--space-md);
}

.nav-menu-number {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-tertiary);
    margin-right: var(--space-2xl);
    letter-spacing: 0.05em;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.nav-menu-text {
    flex: 1;
    font-size: clamp(var(--text-2xl), 4vw, var(--text-3xl));
    font-weight: 200;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-menu-item:hover .nav-menu-text {
    color: var(--accent-primary);
    letter-spacing: 0.08em;
}

.nav-menu-item.active .nav-menu-text {
    color: var(--accent-primary);
}

.nav-menu-arrow {
    font-size: var(--text-2xl);
    color: var(--accent-primary);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-menu-item:hover .nav-menu-arrow,
.nav-menu-item.active .nav-menu-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Navigation Footer */
.nav-menu-footer {
    padding-top: var(--space-3xl);
    border-top: 1px solid var(--border-light);
    margin-top: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    transition-delay: 0.4s;
}

.nav-menu.active .nav-menu-footer {
    opacity: 1;
    transform: translateY(0);
}

.nav-menu-footer p {
    color: var(--text-muted);
    font-size: var(--text-sm);
    letter-spacing: 0.05em;
}

/* Blur background when menu is open */
.menu-open .container > *:not(.nav-menu):not(.menu-toggle) {
    filter: blur(5px);
    transition: filter 0.5s ease;
}

/* Prevent scroll when menu is open */
.menu-open {
    overflow: hidden;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        width: 44px;
        height: 44px;
        top: var(--space-md);
        left: var(--space-md);
    }
    
    .nav-menu-content {
        padding: var(--space-3xl) var(--space-lg);
    }
    
    .nav-menu-text {
        font-size: var(--text-xl);
    }
    
    .nav-menu-number {
        margin-right: var(--space-lg);
    }
    
    .nav-menu-item {
        padding: var(--space-lg) 0;
    }
}

/* Keyboard focus styles */
.nav-menu-item:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .nav-menu,
    .nav-menu-item,
    .nav-menu-footer {
        transition: none !important;
    }
}

/* Compact Flavor Profile Section */
.flavor-profile-section {
    padding: var(--space-3xl) 0;
    border-top: 1px solid var(--border-light);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title {
    font-size: var(--text-3xl);
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.section-description {
    color: var(--text-secondary);
    font-size: var(--text-lg);
}

/* Profile Container */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: var(--space-3xl);
    align-items: start;
}

/* Controls Column */
.controls-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

/* Mode Toggle */
.mode-toggle {
    display: flex;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 4px;
    max-width: 400px;
    margin-top: 2rem;
    margin-left: auto;
    margin-right: auto;
}

.mode-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: calc(var(--radius-xl) - 4px);
    padding: 10px 20px;
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.mode-btn.active {
    background: var(--accent-olive);
    color: white;
}

/* Control Panel */
.control-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.control-label {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

/* Variety Dropdown */
.variety-dropdown {
    /* remove native chrome/system chrome */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
  
    display: inline-block;
    width: 100%;
    max-width: 320px;
  
    /* spacing & size */
    padding: var(--space-sm) var(--space-lg);
    padding-right: 2.4rem;          /* room for the arrow */
    min-height: 40px;               /* spacious, touch-friendly */
    font-size: var(--text-sm);      /* smaller font as requested */
    font-weight: 500;
    line-height: 1.2;
  
    /* colors & shape */
    color: var(--text-secondary);   /* subtle text color in idle state */
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
  
    /* subtle elevation */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
  
    /* arrow (inline SVG uses currentColor so it matches `color`) */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='currentColor' d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right calc(var(--space-lg)) center;
    background-size: 1rem;
  
    cursor: pointer;
    transition: background-color 220ms ease, color 180ms ease, border-color 180ms ease,
                box-shadow 220ms ease, transform 120ms ease;
  }
  
  /* hover & focus: olive background, white text + arrow */
  .variety-dropdown:hover,
  .variety-dropdown:focus {
    background-color: var(--accent-olive);
    color: #ffffff;                 /* arrow follows because SVG uses currentColor */
    border-color: var(--accent-olive);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
    outline: none;
  }
  
  /* keep native option styling fallback (browsers limit styling of <option>) */
  .variety-dropdown option {
    color: var(--text-primary);
    background-color: var(--bg-secondary);
  }
  
  /* small accessibility tweak: visible focus ring on keyboard focus */
  .variety-dropdown:focus-visible {
    box-shadow: 0 0 0 4px rgba(156, 180, 91, 0.16); /* subtle olive glow */
  }
/* ------------------------
   Custom Select (minimal)
   Applies to select.variety-dropdown
   ------------------------ */

   .visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
  
  /* Wrapper */
  .custom-select {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 340px;
    font-size: var(--text-sm);
    line-height: 1.2;
    z-index: 1000;
  }
  
  /* Control (button-like) */
  .custom-select__control {
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: calc(var(--space-sm)) var(--space-lg);
    min-height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    text-align: left;
    width: 100%;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
    transition: box-shadow 180ms ease, transform 120ms ease, border-color 160ms ease,
                background-color 160ms ease, color 160ms ease;
  }
  
  /* Selected text (overflow-safe) */
  .custom-select__selected {
    display: block;
    flex: 1 1 auto;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: inherit;
    font-weight: 500;
    font-size: var(--text-sm);
  }
  
  /* Subtle arrow (SVG inline in JS also works, but we keep styling here) */
  .custom-select__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 auto;
    color: currentColor; /* arrow follows text color */
    transition: transform 180ms ease;
    margin-left: 0.25rem;
    opacity: 0.86;
  }
  
  /* Rotate arrow when open */
  .custom-select.open .custom-select__arrow {
    transform: rotate(180deg);
  }
  
  /* Options panel */
  .custom-select__list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 28px rgba(0,0,0,0.06);
    max-height: 260px;
    overflow: auto;
    padding: 6px 0;
    display: none;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Show when open */
  .custom-select.open .custom-select__list {
    display: block;
    animation: cs-dropdown-open 160ms ease;
  }
  
  /* tiny opening animation */
  @keyframes cs-dropdown-open {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  
  /* Option */
  .custom-select__option {
    list-style: none;
    padding: 0.5rem var(--space-lg);
    font-size: var(--text-sm);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    border-left: 3px solid transparent; /* selected indicator uses left border */
    transition: background-color 120ms ease, border-left-color 120ms ease;
  }
  
  /* Hover / focus (neutral, minimal) */
  .custom-select__option:hover,
  .custom-select__option:focus {
    background: var(--bg-elevated);
    outline: none;
  }
  /* Hover effect for dropdown options */
.custom-select__option:hover {
    background-color: rgba(112, 130, 56, 0.1); /* subtle olive wash */
    color: var(--accent-olive);
  }
  /* Selected option: subtle left olive indicator + slightly elevated background */
  .custom-select__option[aria-selected="true"] {
    border-left-color: rgba(112,130,56,0.9); /* --accent-olive */
    background: rgba(112,130,56,0.04);       /* very subtle olive wash */
  }
  
  /* Checkmark on the right for selected (sparse color use) */
  .custom-select__option[aria-selected="true"]::after {
    content: "✓";
    color: rgba(112,130,56,0.95);
    font-weight: 600;
    margin-left: 0.5rem;
    opacity: 0.98;
  }
  
  /* Keyboard focus visible for accessibility */
  .custom-select__option:focus-visible,
  .custom-select__control:focus-visible {
    box-shadow: 0 0 0 4px rgba(156,180,91,0.12); /* subtle olive halo */
    border-color: rgba(112,130,56,0.6);
  }
  
  /* If container is placed inside an overflow-hidden parent, the list may be clipped.
     In such cases place the custom-select near the top-level or adjust parent overflow. */
    /* Group label (optgroup equivalent) */
.custom-select__group {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--accent-olive);
    text-transform: uppercase;
    padding: 0.5rem var(--space-lg) 0.25rem var(--space-lg);
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    pointer-events: none;
    border-top: 1px solid var(--border-light);
  }
  
  .custom-select__list > .custom-select__group:first-child {
    border-top: none;
    margin-top: 0;
  }
  .custom-select {
    position: relative; /* create local stacking context */
    z-index: 1;
  }
  
  .custom-select.open {
    z-index: 999; /* raise above others when active */
  }
  
  .custom-select__list {
    z-index: 1000; /* ensure the list appears above neighboring elements */
  }
/* Info Card */
.info-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    animation: slideIn 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 16px var(--shadow-sm);
    margin:0 auto;
    max-width: 800px;
}

/* Single Info Mode */
.single-info {
    padding: var(--space-xl);
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 2px solid var(--border-light);
}

.info-title {
    font-size: var(--text-2xl);
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: 0;
}

.intensity-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: white;
}

.intensity-badge.delicate {
    background: linear-gradient(135deg, #C5D86D, #B5C85D);
}

.intensity-badge.medium {
    background: linear-gradient(135deg, #708238, #607228);
}

.intensity-badge.robust {
    background: linear-gradient(135deg, #4A5C2A, #3A4C1A);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    padding: var(--space-md);
}

.info-section {
    display: flex;
    align-items: center;
}

.section-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.section-label {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: var(--space-sm);
}

.section-value {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

/* Intensity Bar */
.intensity-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    margin-top: var(--space-xs);
}

.intensity-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.23, 1, 0.32, 1);
    background: linear-gradient(90deg, #C5D86D 0%, #708238 50%, #4A5C2A 100%);
}

.intensity-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}

.intensity-markers span {
    font-size: 10px;
    color: var(--text-tertiary);
}

/* Profile Sections */
.profile-sections {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.profile-section {
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.profile-heading {
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: 0 0 var(--space-md) 0;
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-light);
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.profile-tags .tag {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: var(--text-xs);
    transition: all 0.3s ease;
}

.profile-tags .tag:hover {
    border-color: var(--accent-olive);
    color: var(--accent-olive);
}

.profile-tags .note-tag {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: var(--text-xs);
    transition: all 0.3s ease;
}

.profile-tags .note-tag:hover {
    border-color: var(--accent-olive);
    color: var(--accent-olive);
}

.pairing-text {
    font-size: var(--text-sm);
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Comparison Mode */
.compare-info {
    padding: 0;
}

.compare-header {
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-light);
}

.compare-title {
    font-size: var(--text-lg);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: 0;
}

/* Comparison Table */
.comparison-table {
    display: flex;
    flex-direction: column;
}

.table-row {
    display: grid;
    grid-template-columns: 140px 1fr 1fr;
    border-bottom: 1px solid var(--border-light);
}

.table-row:last-child {
    border-bottom: none;
}

.header-row {
    background: var(--bg-secondary);
    font-weight: 600;
}

.table-cell {
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
}

.attribute-cell {
    background: var(--bg-secondary);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    border-right: 1px solid var(--border-light);
}

.variety-cell {
    justify-content: center;
}

.variety-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-1 {
    background: var(--accent-olive);
}

.dot-2 {
    background: var(--accent-primary);
}

.variety-name {
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.value-cell {
    font-size: var(--text-sm);
    color: var(--text-primary);
}

/* Intensity Indicators */
.intensity-indicator {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.intensity-indicator.delicate {
    background: rgba(197, 216, 109, 0.2);
    color: #708238;
}

.intensity-indicator.medium {
    background: rgba(112, 130, 56, 0.2);
    color: #607228;
}

.intensity-indicator.robust {
    background: rgba(74, 92, 42, 0.2);
    color: #3A4C1A;
}

/* Flavor Comparison Bars */
.flavor-comparison .value-cell {
    grid-column: 2 / 4;
}

.flavor-bars {
    width: 100%;
    padding: var(--space-sm) 0;
}

.flavor-bar-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: var(--space-lg);
    align-items: center;
    margin-bottom: var(--space-md);
}

.flavor-bar-row:last-child {
    margin-bottom: 0;
}

.flavor-label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    text-align: right;
    font-weight: 500;
}

.comparison-bars {
    display: flex;
    gap: var(--space-xs);
}

.bar-container {
    flex: 1;
    height: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
}

.bar {
    height: 100%;
    border-radius: 8px;
    transition: width 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.bar-1 {
    background: var(--accent-olive);
    opacity: 0.8;
}

.bar-2 {
    background: var(--accent-primary);
    opacity: 0.8;
}

/* Notes List */
.notes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.notes-list .note-tag {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: var(--text-secondary);
}
/* Dark mode adjustments */
[data-theme="dark"] .profile-section {
    background: rgba(26, 26, 26, 0.5);
}

[data-theme="dark"] .bar-container {
    background: rgba(26, 26, 26, 0.5);
}

[data-theme="dark"] .intensity-bar {
    background: rgba(26, 26, 26, 0.5);
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Wheel Column */
.wheel-column {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
}

.radar-wheel {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: 0 4px 16px var(--shadow-sm);
}

.wheel-svg {
    width: 100%;
    height: auto;
}

/* Grid styling */
.grid-circle {
    fill: none;
    stroke: var(--border-light);
    stroke-width: 1;
    opacity: 0.3;
}

.grid-line {
    stroke: var(--border-light);
    stroke-width: 1;
    opacity: 0.2;
}

.axis-line {
    opacity: 0.4;
}

/* Flavor shape */
.flavor-shape {
    fill: var(--accent-olive);
    fill-opacity: 0.3;
    stroke: var(--accent-olive);
    stroke-width: 2;
    transition: all 1s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Comparison shapes */
.compare-shape-1 {
    fill: var(--accent-olive);
    fill-opacity: 0.2;
    stroke: var(--accent-olive);
    stroke-width: 2;
    transition: all 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.compare-shape-2 {
    fill: var(--accent-primary);
    fill-opacity: 0.2;
    stroke: var(--accent-primary);
    stroke-width: 2;
    stroke-dasharray: 5,5;
    transition: all 1s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Labels */
.axis-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    fill: var(--text-primary);
    text-anchor: middle;
}

.center-dot {
    fill: var(--text-primary);
}

/* Dark mode adjustments */
[data-theme="dark"] .radar-wheel {
    background: var(--bg-elevated);
}

[data-theme="dark"] .grid-circle,
[data-theme="dark"] .grid-line {
    stroke: var(--border-light);
    opacity: 0.2;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .profile-container {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
    
    .controls-column {
        max-width: 400px;
        margin: 0 auto;
        width: 100%;
    }
    
    .wheel-column {
        min-height: 400px;
    }
}
 /* Comparison Mode */
 .compare-info {
    padding: 0;
}

.compare-header {
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-light);
}

.compare-title {
    font-size: var(--text-lg);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: 0;
}

/* Desktop Comparison Table */
.comparison-table {
    display: flex;
    flex-direction: column;
}

.table-row {
    display: grid;
    grid-template-columns: 140px 1fr 1fr;
    border-bottom: 1px solid var(--border-light);
}

.table-row:last-child {
    border-bottom: none;
}

.header-row {
    background: var(--bg-secondary);
    font-weight: 600;
}

.table-cell {
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
}

.attribute-cell {
    background: var(--bg-secondary);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    border-right: 1px solid var(--border-light);
}

.variety-cell {
    justify-content: center;
}

.variety-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-1 {
    background: var(--accent-olive);
}

.dot-2 {
    background: var(--accent-primary);
}

.variety-name {
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.value-cell {
    font-size: var(--text-sm);
    color: var(--text-primary);
}

/* Intensity Indicators */
.intensity-indicator {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.intensity-indicator.delicate {
    background: rgba(197, 216, 109, 0.2);
    color: #708238;
}

.intensity-indicator.medium {
    background: rgba(112, 130, 56, 0.2);
    color: #607228;
}

.intensity-indicator.robust {
    background: rgba(74, 92, 42, 0.2);
    color: #3A4C1A;
}

/* Flavor Comparison Bars */
.flavor-comparison .value-cell {
    grid-column: 2 / 4;
}

.flavor-bars {
    width: 100%;
    padding: var(--space-sm) 0;
}

.flavor-bar-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: var(--space-lg);
    align-items: center;
    margin-bottom: var(--space-md);
}

.flavor-bar-row:last-child {
    margin-bottom: 0;
}

.flavor-label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    text-align: right;
    font-weight: 500;
}

.comparison-bars {
    display: flex;
    gap: var(--space-xs);
}

.bar-container {
    flex: 1;
    height: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
}

.bar {
    height: 100%;
    border-radius: 8px;
    transition: width 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.bar-1 {
    background: var(--accent-olive);
    opacity: 0.8;
}

.bar-2 {
    background: var(--accent-primary);
    opacity: 0.8;
}

/* Notes List */
.notes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.notes-list .note-tag {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: var(--text-secondary);
}

/* Mobile-specific styles - FIXED VERSION */
.mobile-comparison {
    display: none;
}

/* Mobile Responsive - CORRECTED */
@media (max-width: 768px) {
    /* Hide desktop table on mobile */
    .comparison-table {
        display: none !important;
    }

    /* Show mobile-specific layout */
    .mobile-comparison {
        padding: var(--space-lg);
    }

    /* Mobile variety cards */
    .mobile-varieties {
        display: flex;
        flex-direction: column;
        gap: var(--space-xl);
    }

    .mobile-variety-card {
        background: var(--bg-secondary);
        border: 2px solid var(--border-light);
        border-radius: var(--radius-lg);
        padding: var(--space-lg);
        position: relative;
    }

    .mobile-variety-card.variety-1 {
        border-color: var(--accent-olive);
    }

    .mobile-variety-card.variety-2 {
        border-color: var(--accent-primary);
    }

    /* Variety header */
    .mobile-variety-header {
        display: flex;
        align-items: center;
        gap: var(--space-sm);
        margin-bottom: var(--space-lg);
        padding-bottom: var(--space-md);
        border-bottom: 2px solid var(--border-light);
    }

    .mobile-variety-header .color-dot {
        width: 16px;
        height: 16px;
    }

    .mobile-variety-header .variety-name {
        font-size: var(--text-base);
        font-weight: 700;
    }

    /* Attribute sections */
    .mobile-attribute {
        margin-bottom: var(--space-lg);
    }

    .mobile-attribute:last-child {
        margin-bottom: 0;
    }

    .mobile-attribute-label {
        font-size: var(--text-xs);
        font-weight: 600;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: var(--text-tertiary);
        margin-bottom: var(--space-sm);
    }

    .mobile-attribute-value {
        font-size: var(--text-sm);
        color: var(--text-primary);
    }

    /* Mobile flavor bars */
    .mobile-flavor-section {
        margin-top: var(--space-lg);
        padding-top: var(--space-lg);
        border-top: 1px solid var(--border-light);
    }

    .mobile-flavor-bars {
        display: flex;
        flex-direction: column;
        gap: var(--space-md);
    }

    .mobile-flavor-row {
        display: flex;
        align-items: center;
        gap: var(--space-md);
    }

    .mobile-flavor-label {
        font-size: var(--text-xs);
        color: var(--text-tertiary);
        font-weight: 600;
        width: 60px;
        flex-shrink: 0;
    }

    .mobile-flavor-bar {
        flex: 1;
        height: 12px;
        background: var(--bg-elevated);
        border-radius: 6px;
        border: 1px solid var(--border-light);
        overflow: hidden;
    }

    /* Mobile flavor bars with script integration - FIXED */
    .mobile-flavor-fill {
        height: 100%;
        border-radius: 5px;
        transition: width 1s cubic-bezier(0.23, 1, 0.32, 1);
        width: 0%; /* Start at 0% - script will set the width */
    }

    .variety-1 .mobile-flavor-fill {
        background: var(--accent-olive);
    }

    .variety-2 .mobile-flavor-fill {
        background: var(--accent-primary);
    }

    /* Mobile notes - FIXED */
    .mobile-notes {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-xs);
    }

    .mobile-notes .note-tag {
        background: var(--bg-elevated);
        border: 1px solid var(--border-light);
        padding: 4px 10px;
        border-radius: 12px;
        font-size: var(--text-xs);
        color: var(--text-secondary);
    }

    /* Comparison divider */
    .mobile-vs-divider {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: var(--space-lg) 0;
        position: relative;
    }

    .mobile-vs-divider::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: var(--border-light);
    }

    .mobile-vs-text {
        background: var(--bg-elevated);
        padding: 0 var(--space-lg);
        font-size: var(--text-sm);
        font-weight: 600;
        color: var(--text-tertiary);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        z-index: 1;
        position: relative;
    }

}
@media (max-width: 768px) {
    .profile-container {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
        align-items: stretch;
    }
    
    .controls-column {
        max-width: 400px;
        margin: 0 auto;
        width: 100%;
    }
    
    .info-card {
        max-width: none;
        margin: 0;
    }
    
    .wheel-column {
        min-height: 400px;
        order: 3; /* Put wheel last on mobile */
    }
}
/* Replace the mobile comparison CSS section in your styles.css with this simplified version */

/* Mobile comparison - default hidden, controlled by JavaScript */
.mobile-comparison {
    display: none;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    /* Hide desktop comparison table on mobile */
    .comparison-table {
        display: none !important;
    }

    /* Mobile comparison styling - visibility controlled by JS */
    .mobile-comparison {
        padding: var(--space-lg);
    }

    /* Mobile variety cards */
    .mobile-varieties {
        display: flex;
        flex-direction: column;
        gap: var(--space-xl);
    }

    .mobile-variety-card {
        background: var(--bg-secondary);
        border: 2px solid var(--border-light);
        border-radius: var(--radius-lg);
        padding: var(--space-lg);
        position: relative;
    }

    .mobile-variety-card.variety-1 {
        border-color: var(--accent-olive);
    }

    .mobile-variety-card.variety-2 {
        border-color: var(--accent-primary);
    }

    /* Variety header */
    .mobile-variety-header {
        display: flex;
        align-items: center;
        gap: var(--space-sm);
        margin-bottom: var(--space-lg);
        padding-bottom: var(--space-md);
        border-bottom: 2px solid var(--border-light);
    }

    .mobile-variety-header .color-dot {
        width: 16px;
        height: 16px;
    }

    .mobile-variety-header .variety-name {
        font-size: var(--text-base);
        font-weight: 700;
    }

    /* Attribute sections */
    .mobile-attribute {
        margin-bottom: var(--space-lg);
    }

    .mobile-attribute:last-child {
        margin-bottom: 0;
    }

    .mobile-attribute-label {
        font-size: var(--text-xs);
        font-weight: 600;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: var(--text-tertiary);
        margin-bottom: var(--space-sm);
    }

    .mobile-attribute-value {
        font-size: var(--text-sm);
        color: var(--text-primary);
    }

    /* Mobile flavor bars */
    .mobile-flavor-section {
        margin-top: var(--space-lg);
        padding-top: var(--space-lg);
        border-top: 1px solid var(--border-light);
    }

    .mobile-flavor-bars {
        display: flex;
        flex-direction: column;
        gap: var(--space-md);
    }

    .mobile-flavor-row {
        display: flex;
        align-items: center;
        gap: var(--space-md);
    }

    .mobile-flavor-label {
        font-size: var(--text-xs);
        color: var(--text-tertiary);
        font-weight: 600;
        width: 60px;
        flex-shrink: 0;
    }

    .mobile-flavor-bar {
        flex: 1;
        height: 12px;
        background: var(--bg-elevated);
        border-radius: 6px;
        border: 1px solid var(--border-light);
        overflow: hidden;
    }

    /* Mobile flavor fills */
    .mobile-flavor-fill {
        height: 100%;
        border-radius: 5px;
        transition: width 1s cubic-bezier(0.23, 1, 0.32, 1);
        width: 0%;
    }

    .variety-1 .mobile-flavor-fill {
        background: var(--accent-olive);
    }

    .variety-2 .mobile-flavor-fill {
        background: var(--accent-primary);
    }

    /* Mobile notes */
    .mobile-notes {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-xs);
    }

    .mobile-notes .note-tag {
        background: var(--bg-elevated);
        border: 1px solid var(--border-light);
        padding: 4px 10px;
        border-radius: 12px;
        font-size: var(--text-xs);
        color: var(--text-secondary);
    }

    /* Comparison divider */
    .mobile-vs-divider {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: var(--space-lg) 0;
        position: relative;
    }

    .mobile-vs-divider::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: var(--border-light);
    }

    .mobile-vs-text {
        background: var(--bg-elevated);
        padding: 0 var(--space-lg);
        font-size: var(--text-sm);
        font-weight: 600;
        color: var(--text-tertiary);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        z-index: 1;
        position: relative;
    }
}
/*
 * ─── MOBILE DROPDOWN FIX ────────────────────────────────────────────────────────
 */

/* On mobile devices, remove custom appearance from the native select dropdown. */
/* This allows the phone's default, user-friendly UI to take over cleanly. */
@media (max-width: 768px) {
    .variety-dropdown {
      -webkit-appearance: none; /* Keep for some browsers */
      -moz-appearance: none;    /* Keep for some browsers */
      appearance: menulist;     /* Use the standard menu list appearance */
      background-image: none;   /* Remove the custom arrow */
      padding-right: var(--space-lg); /* Reset padding */
    }
  }