/* ============================================
   MIA SOMMELIER - EuroShop 2026 Design System
   ITAB Brand Identity: ITC Avant Garde Gothic Pro
   ============================================ */

/* ── @font-face: ITC Avant Garde Gothic Pro (R2 CDN) ── */
@font-face {
    font-family: 'ITC Avant Garde Gothic Pro';
    src: url('https://pub-435f2bec082643bab3f1a264538150cd.r2.dev/assets/fonts/ITCAvantGarde-Book.woff2') format('woff2'),
         url('https://pub-435f2bec082643bab3f1a264538150cd.r2.dev/assets/fonts/ITCAvantGarde-Book.ttf') format('truetype');
    font-weight: 400;   /* Book — body copy */
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ITC Avant Garde Gothic Pro';
    src: url('https://pub-435f2bec082643bab3f1a264538150cd.r2.dev/assets/fonts/ITCAvantGardePro-Md.woff2') format('woff2'),
         url('https://pub-435f2bec082643bab3f1a264538150cd.r2.dev/assets/fonts/ITCAvantGardePro-Md.ttf') format('truetype');
    font-weight: 500;   /* Medium/Demi — headlines, subheadings, highlight copy */
    font-style: normal;
    font-display: swap;
}

/* Alias bold to Medium (closest weight available) */
@font-face {
    font-family: 'ITC Avant Garde Gothic Pro';
    src: url('https://pub-435f2bec082643bab3f1a264538150cd.r2.dev/assets/fonts/ITCAvantGardePro-Md.woff2') format('woff2'),
         url('https://pub-435f2bec082643bab3f1a264538150cd.r2.dev/assets/fonts/ITCAvantGardePro-Md.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ITC Avant Garde Gothic Pro';
    src: url('https://pub-435f2bec082643bab3f1a264538150cd.r2.dev/assets/fonts/ITCAvantGardePro-Md.woff2') format('woff2'),
         url('https://pub-435f2bec082643bab3f1a264538150cd.r2.dev/assets/fonts/ITCAvantGardePro-Md.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* EuroShop 2026 Official Palette */
    --dark-teal: #356f7a;
    --medium-teal: #7AA2AB;
    --light-teal: #D1DDE0;
    --dark-brown: #392c24;
    --burgundy: #4A0E0E;
    --champagne-gold: #D4AF37;
    
    /* Functional Colors */
    --bg-overlay: rgba(53, 111, 122, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    
    /* Typography — ITAB Brand: ITC Avant Garde Gothic Pro */
    --font-main: 'ITC Avant Garde Gothic Pro', 'Century Gothic', 'Avenir Next', sans-serif;

}

/* ============================================
   Reset & Base
   ============================================ */

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

body {
    font-family: var(--font-main);
    color: white;
    overflow: hidden;
    background: var(--dark-brown);
    width: 100vw;
    height: 100vh;
}

/* ============================================
   Video Background System
   ============================================ */

.video-background {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 56.25vh;  /* 9:16 ratio: 9/16 = 0.5625 */
    max-width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
}

.video-background video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.7;
    transition: opacity 1s ease;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(53, 111, 122, 0.05) 0%, 
        rgba(57, 44, 36, 0.1) 100%);
    pointer-events: none;
}

/* ============================================
   App Container - 9:16 Format
   ============================================ */

.app-container {
    position: relative;
    z-index: 10;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   Screen Management
   ============================================ */

.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: var(--spacing-sm) var(--spacing-md);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    z-index: 20;
    overflow: hidden;
}

.screen.active {
    opacity: 1;
    pointer-events: all;
}

/* Screens with scrollable content need overflow */
#screen-result.active,
#screen-cart.active,
#screen-checkout.active {
    overflow-y: auto;
}

/* ── CTA Attract Screen ── */
#screen-cta {
    padding: 0 !important;
    justify-content: center;
}
#screen-cta.active {
    z-index: 100; /* Above everything including video bg */
}
@keyframes ctaPulse {
    0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
    50%      { opacity: 1;   transform: translateX(-50%) scale(1.05); }
}

.screen-title {
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--spacing-md);
    margin-top: var(--spacing-lg);
    text-align: center;
    color: white;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

/* ============================================
   Screen 0: Language Selector - Modern Design
   ============================================ */

#screen-language {
    justify-content: center;
}

#screen-language .screen-title {
    position: absolute;
    top: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    width: 100%;
}

.language-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 550px;
    width: 95%;
    height: auto;
    max-height: calc(100vh - 220px);
    justify-content: center;
    margin: 0;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
    background: linear-gradient(135deg, 
        rgba(53, 111, 122, 0.5) 0%, 
        rgba(57, 44, 36, 0.4) 100%);
    backdrop-filter: blur(25px);
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 100;
    opacity: 1;
    pointer-events: all;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.language-option:hover {
    background: linear-gradient(135deg, 
        rgba(53, 111, 122, 0.7) 0%, 
        rgba(57, 44, 36, 0.6) 100%);
    border-color: var(--champagne-gold);
    transform: translateX(10px);
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.5);
}

.language-flag {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.language-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.language-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.language-native {
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--champagne-gold);
    opacity: 0.9;
}

/* ============================================
   Screen 1: Pathway Dashboard
   ============================================ */

/* v5.9.5: Xiaomi Pad 7 Pro fix - Ensure labels are ALWAYS visible */
#screen-pathway {
    padding-top: var(--spacing-lg);
    padding-bottom: 80px; /* v5.9.5: Extra bottom padding for labels */
    justify-content: flex-start;
    overflow-y: visible; /* v5.9.5: CRITICAL - Allow labels to overflow */
    overflow-x: hidden;
    min-height: 100vh; /* v5.9.5: Ensure full height */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pathway-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto auto;
    gap: 70px 24px; /* v5.9.5: Compact gap for Xiaomi Pad */
    max-width: 850px;
    width: 95%;
    min-height: auto;
    align-items: start;
    justify-items: center;
    padding-bottom: 120px; /* v5.9.5: HUGE bottom padding for labels */
    margin-top: 20px;
    margin-bottom: 40px;
    position: relative; /* v5.9.5: Ensure labels are positioned relative to grid */
}

.pathway-pentagon {
    width: 100%;
    height: 100%;
    max-width: 200px; /* v5.9.8: Smaller for Xiaomi Pad fit */
    max-height: 200px;
    aspect-ratio: 1;
    position: relative;
    cursor: pointer;
    overflow: visible;
    /* v5.9.10: BACK TO CIRCLE - SVG mask still clips labels */
    border-radius: 50%; /* Circle shape - ONLY solution that shows labels */
    transition: all 0.4s ease;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    filter: drop-shadow(0 10px 40px rgba(212, 175, 55, 0.6)) drop-shadow(0 0 60px rgba(212, 175, 55, 0.4));
    margin-bottom: 70px;
}

.pathway-pentagon::after {
    content: '';
    position: absolute;
    inset: -15px;
    border-radius: 50%; /* v5.9.10: Match parent circle shape */
    background: linear-gradient(135deg, 
        rgba(107, 159, 146, 0.8) 0%,  /* v5.9.17: ITAB Green #6B9F92 */
        rgba(79, 129, 178, 0.7) 50%,  /* v5.9.17: ITAB Blue #4F81B2 */
        rgba(107, 159, 146, 0.8) 100%); /* v5.9.17: ITAB Green #6B9F92 */
    filter: blur(30px);
    z-index: -1;
    opacity: 0.8;
    transition: all 0.4s ease;
}

.pathway-pentagon:hover::after {
    opacity: 1;
    filter: blur(40px);
    inset: -20px;
}

.pathway-pentagon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%; /* v5.9.10: Match parent circle shape */
    background: linear-gradient(135deg, 
        var(--dark-teal) 0%, 
        var(--medium-teal) 100%);
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.pathway-pentagon:hover::before {
    opacity: 0.15;
}

.pathway-pentagon:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 12px 36px rgba(107, 159, 146, 0.6)); /* v5.9.17: ITAB Green glow */
}

.pathway-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 50%; /* v5.9.10: Match parent circle shape */
}

.pathway-label {
    position: absolute;
    bottom: -55px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;
    color: #6B9F92 !important; /* v5.9.16: ITAB Accent1 Teal (blue-green from guidelines) */
    z-index: 1000;
    text-shadow: 
        0 0 20px rgba(107, 159, 146, 0.9) !important, /* Blue-green glow */
        0 0 40px rgba(107, 159, 146, 0.7) !important,
        0 2px 10px rgba(0, 0, 0, 1),
        0 0 60px rgba(107, 159, 146, 0.5) !important,
        0 4px 20px rgba(0, 0, 0, 0.8);
    letter-spacing: 1.2px;
    width: 150%;
    word-wrap: break-word;
    line-height: 1.3;
    padding: 8px 12px;
    background: linear-gradient(135deg, 
        rgba(40, 51, 58, 0.95) 0%, /* ITAB dk2 with transparency */
        rgba(48, 46, 43, 0.95) 100%) !important; /* ITAB dk1 with transparency */
    border-radius: 8px;
    border: 3px solid rgba(107, 159, 146, 1) !important; /* Blue-green border */
    opacity: 1;
    pointer-events: none;
    box-shadow: 
        0 6px 30px rgba(0, 0, 0, 1),
        0 0 40px rgba(122, 162, 171, 0.6), /* More blue-green outer glow */
        inset 0 1px 0 rgba(209, 221, 224, 0.3); /* ITAB light teal highlight */
    white-space: nowrap;
    overflow: visible;
    display: block;
    visibility: visible;
}

/* ============================================
   Screen 2: Decision Tree
   ============================================ */

.decision-header {
    width: 100%;
    max-width: 800px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
    z-index: 1000; /* v5.9.1: Ensure back button is always visible */
    position: relative; /* v5.9.1: For z-index to work */
}

.btn-back {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 10px 20px; /* v5.9.1: Larger touch target */
    border-radius: 20px;
    font-size: 1rem; /* v5.9.1: Slightly larger text */
    font-weight: 600; /* v5.9.1: Bolder for visibility */
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
    z-index: 1001; /* v5.9.1: Above everything */
    position: relative; /* v5.9.1: For z-index */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); /* v5.9.1: Shadow for depth */
}

.btn-back:hover {
    background: var(--medium-teal);
    transform: translateX(-4px);
}

.decision-question {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    margin-top: 12px;
    color: white;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    letter-spacing: 1px;
    flex-shrink: 0;
}

.decision-container {
    width: 95%;
    max-width: 950px;
    padding: var(--spacing-xs) var(--spacing-xs);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 100px);
    overflow: hidden;
    justify-content: flex-start;
}

.decision-level {
    margin-bottom: var(--spacing-xs);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 100%;
    height: 100%;
    align-content: start;
}

/* ── 2×4 grid for 7-8 options ── */
.options-grid.grid-2x4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    align-content: space-evenly;
}
.options-grid.grid-2x4 .option-card {
    aspect-ratio: auto;
    max-height: none;
    height: auto;
}
.options-grid.grid-2x4 .option-image {
    height: 540px; /* v5.9.20: Increased to 540px for true square on 1080px width (540x540 per card) */
    flex-shrink: 0;
}
.options-grid.grid-2x4 .option-label {
    font-size: 0.7rem;
    padding: 4px 6px;
    line-height: 1.15;
    height: auto;
}
.options-grid.grid-2x4 .sensory-tags {
    display: none !important;
}

/* ── 3×n grid for 9+ options ── */
.options-grid.grid-3col {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    align-content: space-evenly;
}
.options-grid.grid-3col .option-card {
    aspect-ratio: auto;
    max-height: none;
    height: auto;
}
.options-grid.grid-3col .option-image {
    height: 480px; /* v5.9.20: Increased to 480px for better square aspect (3 cols ~360px each) */
    flex-shrink: 0;
}
.options-grid.grid-3col .option-label {
    font-size: 0.65rem;
    padding: 4px 5px;
    line-height: 1.2;
    height: auto;
    letter-spacing: 0;
}
.options-grid.grid-3col .sensory-tags {
    display: none !important;
}

@media (max-width: 768px) {
    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .options-grid.grid-2x4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .options-grid.grid-3col {
        grid-template-columns: repeat(3, 1fr);
    }
}

.option-card {
    aspect-ratio: auto;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
    box-shadow: 
        inset 0 0 20px rgba(212, 175, 55, 0.1),
        0 4px 20px rgba(0, 0, 0, 0.4);
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
}

.option-card:hover {
    transform: scale(1.05);
    border-color: var(--champagne-gold);
    box-shadow: 
        inset 0 0 30px rgba(212, 175, 55, 0.2),
        0 8px 32px rgba(212, 175, 55, 0.5),
        0 0 40px rgba(212, 175, 55, 0.3);
    filter: blur(0.3px);
}

.option-card.selected {
    border-color: var(--champagne-gold);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.3);
}

.option-image {
    width: 100%;
    height: 540px; /* v5.9.20: Increased to 540px for true square aspect ratio */
    min-height: 400px; /* v5.9.20: Increased from 360px */
    object-fit: cover;
    object-position: center;
    transition: opacity 0.3s ease, filter 0.3s ease;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.3);
}

/* Image loading states */
.option-image.loading {
    opacity: 0.5;
    filter: blur(5px);
    animation: pulse 1.5s ease-in-out infinite;
}

.option-image.loaded {
    opacity: 1;
    filter: none;
}

.option-image.error {
    opacity: 0.7;
    filter: grayscale(50%);
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.option-label {
    height: auto;
    min-height: 36px;
    padding: 8px 10px;
    background: linear-gradient(to top, 
        var(--dark-brown) 0%, 
        rgba(57, 44, 36, 0.98) 100%);
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    color: var(--champagne-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    word-wrap: break-word;
    overflow: hidden;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.95);
    flex-shrink: 0;
}

/* 🆕 v3.1: Sensory Descriptions */
.option-description {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 12px;
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.95) 0%, 
        rgba(0, 0, 0, 0.7) 100%);
    font-family: var(--font-main);
    font-size: 0.7rem;
    font-weight: 400;
    text-align: center;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.7);
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.option-card:hover .option-description {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile: Always show descriptions */
@media (max-width: 768px) {
    .option-description {
        opacity: 0.8;
        transform: translateY(0);
        font-size: 0.65rem;
        padding: 6px 8px;
    }
}


/* ============================================
   Screen 3: AI Analysis
   ============================================ */

.analysis-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    min-height: 60vh;
}

/* v5.9.17: Wine Glass Loader (inverted triangle) */
.wine-glass-loader {
    width: 200px;
    height: 250px;
    animation: pulse 2s ease-in-out infinite;
}

.glass-bowl {
    fill: none;
    stroke: #6B9F92; /* ITAB Green */
    stroke-width: 3;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: draw 2s ease-in-out infinite;
}

.glass-stem {
    fill: #6B9F92; /* ITAB Green */
    opacity: 0.8;
}

.glass-base {
    fill: #6B9F92; /* ITAB Green */
    opacity: 0.6;
}

.wine-liquid {
    fill: url(#wine-gradient);
    opacity: 0;
    animation: fillWine 3s ease-in-out infinite;
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fillWine {
    0% {
        opacity: 0;
        transform: translateY(0);
    }
    50% {
        opacity: 0.5;
        transform: translateY(-10px);
    }
    100% {
        opacity: 0.8;
        transform: translateY(-20px);
    }
}

/* Floating multilingual words */
.floating-words-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.floating-word {
    position: absolute;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(107, 159, 146, 0.6); /* ITAB Green with transparency */
    animation: float 4s ease-in-out infinite;
    animation-delay: var(--delay);
    left: var(--x);
    top: var(--y);
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    50% {
        transform: translate(calc(random() * 40px - 20px), calc(random() * 40px - 20px));
        opacity: 1;
    }
    90% {
        opacity: 0.7;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.analysis-text {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--light-teal);
    text-align: center;
    line-height: 1.4;
}

.molecules-container {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 80%;
}

.floating-word {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--champagne-gold);
    opacity: 0;
    animation: floatWord 2s ease-in-out infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@keyframes floatWord {
    0%, 100% {
        opacity: 0;
        transform: translateY(20px);
    }
    50% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Screen 4: Smart Output (9:16 Layout with Scroll)
   v3.6.0 — Brand colors: card bg #392c24 80%, accent #356f7a
   ============================================ */

.result-container {
    width: 100%;
    max-width: 800px; /* Wider for 1080px (9:16 = 1080x1920) */
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: var(--spacing-sm) var(--spacing-md);
}

/* Bottle Section - Ultra Compact */
.bottle-section {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xs);
    min-height: 200px;
}

.bottle-image {
    max-width: 180px;
    max-height: 240px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4));
    animation: bottleAppear 0.8s ease-out;
    transition: opacity 0.3s ease;
}

/* Loading state for bottle */
.bottle-image.loading {
    opacity: 0.3;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4)) blur(3px);
    animation: bottlePulse 1.5s ease-in-out infinite;
}

.bottle-image.loaded {
    opacity: 1;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4));
}

@keyframes bottlePulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes bottleAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wine-name {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    margin-top: var(--spacing-xs);
    color: var(--champagne-gold);
    line-height: 1.2;
}

/* Profile Section - Compact (v3.6.0 brand bg) */
.profile-section {
    flex: 0 0 auto;
    padding: var(--spacing-sm);
    background: rgba(57, 44, 36, 0.80);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    margin-bottom: var(--spacing-sm);
    border: 1px solid rgba(212, 175, 55, 0.15);
}

/* Wine Description - Compact */
.wine-description {
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    line-height: 1.5;
    color: var(--light-teal);
    max-height: 200px;
    overflow-y: auto;
}

/* ── WSET Intensity Triangle v3.6.0 ── */
.profile-triangle {
    margin-bottom: var(--spacing-sm);
    position: relative;
    padding: 12px;
    background: rgba(53, 111, 122, 0.08);
    border: 1px solid rgba(53, 111, 122, 0.25);
    border-radius: 8px;
    /* Sharp geometric accent lines */
    background-image:
        linear-gradient(135deg, rgba(53, 111, 122, 0.3) 0%, transparent 40%),
        linear-gradient(225deg, rgba(53, 111, 122, 0.15) 0%, transparent 40%);
}

.profile-triangle::before {
    content: '';
    position: absolute;
    top: -1px; left: 50%; transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 6px solid var(--dark-teal);
}

.profile-item {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--light-teal);
    min-width: 65px;
    flex-shrink: 0;
}

.profile-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 0;
    overflow: hidden;
    /* Sharp geometric — no border-radius */
    clip-path: polygon(0 0, 100% 0, 98% 100%, 0% 100%);
}

.profile-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--dark-teal) 0%, var(--champagne-gold) 100%);
    border-radius: 0;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.profile-value {
    font-size: 0.6rem;
    color: var(--light-teal);
    min-width: 75px;
    text-align: right;
    flex-shrink: 0;
}

.pairing-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--champagne-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pairing-visuals {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

/* Service Section - Auto height (v3.6.0 brand) */
.service-section {
    flex: 0 0 auto;
    padding: var(--spacing-lg);
    background: rgba(53, 111, 122, 0.85);
    border-radius: 16px;
    margin-bottom: var(--spacing-md);
    border: 1px solid rgba(53, 111, 122, 0.5);
}

.service-rectangle {
    display: flex;
    justify-content: space-around;
    margin-bottom: var(--spacing-sm);
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.service-icon {
    font-size: 1rem;
    font-weight: 700;
    color: var(--champagne-gold);
}

.service-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    opacity: 0.8;
}

.service-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--champagne-gold);
}

.location-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.location-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.location-icon {
    font-size: 1rem;
    font-weight: 700;
    color: var(--champagne-gold);
}

.minimap-container {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.minimap-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* v3.6.0: Primary CTA button — Dark Teal per brand spec */
.btn-restart {
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--dark-teal);
    color: #ffffff;
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 24px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
    letter-spacing: 1px;
}

.btn-restart:hover {
    transform: scale(1.05);
    background: var(--champagne-gold);
    color: var(--dark-brown);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4);
}

.result-header {
    width: 100%;
    max-width: 600px;
    padding: var(--spacing-md);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000; /* v5.9.3: Higher z-index to stay above wine card slider (z-index: 10) */
    pointer-events: none; /* v5.9.3: Let touches pass through to slider */
}

.btn-back-result {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 24px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
    pointer-events: all; /* v5.9.3: Button is clickable even though parent has pointer-events: none */
    position: relative; /* v5.9.3: For z-index to work */
    z-index: 1001; /* v5.9.3: Above everything */
}

.btn-back-result:hover {
    background: var(--medium-teal);
    transform: translateX(-4px);
}

/* ============================================
   Particle Canvas
   ============================================ */

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

/* ============================================
   Responsive Design - 9:16 Optimized
   ============================================ */

/* Desktop / Tablet Landscape */
@media (min-width: 1024px) and (min-aspect-ratio: 9/16) {
    .app-container {
        max-width: calc(100vh * 9 / 16);
        margin: 0 auto;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Mobile Portrait (Native 9:16) */
@media (max-width: 768px) {
    .screen-title {
        font-size: 2rem;
    }
    
    .language-grid {
        gap: var(--spacing-md);
    }
    
    .language-sphere .flag-icon {
        font-size: 3rem;
    }
    
    .pathway-grid {
        gap: var(--spacing-sm);
    }
    
    .pathway-label {
        font-size: 0.8rem;
    }
    
    .options-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: var(--spacing-sm);
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .screen {
        padding: var(--spacing-md);
    }
    
    .screen-title {
        font-size: 1.5rem;
        margin-bottom: var(--spacing-md);
    }
    
    .language-sphere .flag-icon {
        font-size: 2.5rem;
    }
}

/* ============================================
   v5.9.5: XIAOMI PAD 7 PRO OPTIMIZED
   Resolution: 2136x3200 (portrait)
   Works for high-res tablets with min-width 1200px
   ============================================ */
@media (orientation: portrait) and (min-width: 1200px) {
    .pathway-grid {
        gap: 100px 30px; /* More space for high-res */
        padding-bottom: 140px; /* Extra space for labels */
        max-width: 1000px; /* Wider grid for big tablets */
    }
    
    .pathway-pentagon {
        max-width: 300px; /* Bigger pentagons for high-res */
        max-height: 300px;
    }
    
    .pathway-label {
        font-size: 1.3rem; /* Bigger text for high-res */
        padding: 12px 18px;
        bottom: -70px;
        width: 160%;
    }
}

/* ============================================
   v5.9.4: UNIVERSAL TABLET RESPONSIVE
   Works for standard tablets (600px - 1200px width)
   ============================================ */
@media (orientation: portrait) and (min-width: 600px) and (max-width: 1199px) {
    .pathway-grid {
        gap: 60px 20px;
        padding-bottom: 100px;
        margin-top: 15px;
    }
    
    .pathway-pentagon {
        max-width: 220px;
        max-height: 220px;
    }
    
    .pathway-label {
        font-size: 0.95rem;
        padding: 6px 10px;
        bottom: -50px;
        width: 130%;
    }
    
    .screen-title {
        font-size: 2rem;
        margin-bottom: 16px;
    }
    
    #screen-pathway {
        padding-top: 16px;
        padding-bottom: 60px;
    }
}

/* Extra small tablets / large phones */
@media (orientation: portrait) and (max-width: 600px) {
    .pathway-grid {
        gap: 50px 16px;
        padding-bottom: 60px;
    }
    
    .pathway-pentagon {
        max-width: 180px;
        max-height: 180px;
    }
    
    .pathway-label {
        font-size: 0.85rem;
        padding: 5px 8px;
        bottom: -45px;
        font-weight: 700;
    }
}

/* ============================================
   Screen 5 & 6: Detail Screens (Recipe & Product)
   ============================================ */

.detail-header {
    width: 100%;
    max-width: 800px;
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
}

.btn-back-detail {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
    font-weight: 600;
}

.btn-back-detail:hover {
    background: var(--medium-teal);
    transform: translateX(-4px);
}

.detail-container {
    width: 100%;
    max-width: 800px;
    height: 85vh;
    overflow-y: auto;
    padding: var(--spacing-md);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
}

.detail-hero {
    width: 100%;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.detail-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--champagne-gold);
    margin-bottom: var(--spacing-sm);
    text-align: center;
}

.detail-meta {
    display: flex;
    justify-content: space-around;
    padding: var(--spacing-md);
    background: rgba(0, 139, 139, 0.15);
    border-radius: 12px;
    margin-bottom: var(--spacing-md);
}

.detail-meta-item {
    text-align: center;
}

.detail-meta-label {
    font-size: 0.7rem;
    color: var(--light-teal);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.detail-meta-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.detail-section {
    margin-bottom: var(--spacing-lg);
}

.detail-section h3 {
    font-size: 1.3rem;
    color: var(--champagne-gold);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-text {
    line-height: 1.6;
    color: var(--light-teal);
    font-size: 1rem;
}

.detail-list {
    list-style: none;
    padding: 0;
}

.detail-list li {
    padding: var(--spacing-xs);
    margin-bottom: var(--spacing-xs);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: white;
}

.detail-cta {
    display: block;
    width: 100%;
    padding: var(--spacing-md);
    background: linear-gradient(135deg, var(--dark-teal), var(--medium-teal));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    margin-top: var(--spacing-lg);
}

.detail-cta:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.5);
}

/* ============================================
   v3.1.2: EXPERT GATE - "Let MIA Decide"
   Glow + Pulse animation for kiosk visibility
   ============================================ */

.expert-gate-card {
    position: relative;
    border: 2px solid var(--light-teal, #008B8B) !important;
    background: linear-gradient(135deg, rgba(0, 139, 139, 0.15), rgba(0, 139, 139, 0.05)) !important;
    box-shadow: 
        0 0 15px rgba(0, 139, 139, 0.4),
        0 0 30px rgba(0, 139, 139, 0.2),
        inset 0 0 15px rgba(0, 139, 139, 0.1) !important;
    animation: expertGatePulse 2.5s ease-in-out infinite;
}

.expert-gate-card::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: inherit;
    background: linear-gradient(45deg, transparent, rgba(0, 139, 139, 0.3), transparent);
    z-index: -1;
    animation: expertGateShimmer 3s linear infinite;
}

.expert-gate-card:hover {
    transform: scale(1.08) !important;
    box-shadow: 
        0 0 25px rgba(0, 139, 139, 0.6),
        0 0 50px rgba(0, 139, 139, 0.3),
        0 0 75px rgba(0, 139, 139, 0.15),
        inset 0 0 20px rgba(0, 139, 139, 0.15) !important;
    border-color: var(--champagne-gold, #D4AF37) !important;
}

.expert-gate-card .option-label {
    color: var(--light-teal, #008B8B) !important;
    font-weight: 700 !important;
    text-shadow: 0 0 10px rgba(0, 139, 139, 0.5);
}

@keyframes expertGatePulse {
    0%, 100% {
        box-shadow: 
            0 0 15px rgba(0, 139, 139, 0.4),
            0 0 30px rgba(0, 139, 139, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 
            0 0 25px rgba(0, 139, 139, 0.6),
            0 0 50px rgba(0, 139, 139, 0.3);
        transform: scale(1.03);
    }
}

@keyframes expertGateShimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* ============================================
   v3.6.0: TOP 3 VERTICAL RESULTS GRID
   PerfectMatch = Dark Teal accent
   BestValue    = White accent
   SurpriseMatch = Gold accent
   v3.7.0: Horizontal Swipe Slider + Frosted Glass
   ============================================ */

/* ── v3.7.0: HORIZONTAL SWIPE SLIDER ── */

.top3-slider-section {
    margin: 16px 0;
    padding: 14px 0;
    background: rgba(57, 44, 36, 0.85);
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.15);
    overflow: visible;             /* v3.8.2: visible so arrows aren't clipped */
    position: relative;            /* anchor for nav arrows */
}

/* v3.8.2: Inner track wrapper clips horizontal overflow without clipping arrows */
.top3-slider-track-wrapper {
    overflow: hidden;
    position: relative;
    border-radius: 12px;
}

.top3-slider-title {
    font-family: var(--font-main);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--champagne-gold);
    text-align: center;
    margin-bottom: 12px;
    padding: 0 14px;
}

/* Hide old vertical grid (kept for compatibility) */
.top3-grid { display: none !important; }
.top3-grid-title { display: none !important; }

/* ── Slider Track (v3.7.1 fix) ── */
.top3-slider-track {
    display: flex;
    overflow: visible;
    position: relative;
    touch-action: pan-y; /* allow vertical scroll, JS handles horizontal */
    cursor: grab;
    padding: 8px 0 16px;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}
.top3-slider-track.grabbing {
    cursor: grabbing;
    transition: none; /* disable during drag for real-time feedback */
}

/* ── Slide Wrapper ── */
.top3-slide {
    flex: 0 0 78%;
    max-width: 78%;
    scroll-snap-align: center;
    padding: 0 6px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: scale(0.88);
    opacity: 0.55;
    filter: blur(1px);
}
.top3-slide.active {
    transform: scale(1);
    opacity: 1;
    filter: none;
    z-index: 2;
}

/* ── Frosted Glass Card ── */
.top3-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 280px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.top3-card:active { transform: scale(0.98); }

/* Role accent — top gradient bar */
.top3-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 16px 16px 0 0;
}
.top3-card[data-role="perfect"]::before  { background: linear-gradient(90deg, var(--dark-teal), var(--medium-teal)); }
.top3-card[data-role="value"]::before    { background: linear-gradient(90deg, rgba(255,255,255,0.6), rgba(255,255,255,0.3)); }
.top3-card[data-role="surprise"]::before { background: linear-gradient(90deg, var(--champagne-gold), rgba(212,175,55,0.4)); }

/* ── Badge Pill ── */
.top3-badge {
    position: absolute;
    top: 10px; right: 12px;
    font-family: var(--font-main);
    font-size: 0.5rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.2px;
    padding: 3px 10px; border-radius: 20px;
}
.top3-card[data-role="perfect"] .top3-badge  { background: var(--dark-teal); color: #fff; box-shadow: 0 2px 8px rgba(53,111,122,0.4); }
.top3-card[data-role="value"] .top3-badge    { background: rgba(255,255,255,0.9); color: var(--dark-brown); box-shadow: 0 2px 8px rgba(255,255,255,0.2); }
.top3-card[data-role="surprise"] .top3-badge { background: var(--champagne-gold); color: var(--dark-brown); box-shadow: 0 2px 8px rgba(212,175,55,0.4); }

/* ── Bottle Image ── */
.top3-bottle {
    width: 52px; height: 140px;
    object-fit: contain;
    margin: 8px 0 10px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
    transition: transform 0.3s ease;
}
.top3-slide.active .top3-bottle { animation: bottleReveal 0.5s ease-out; }
@keyframes bottleReveal {
    from { transform: translateY(10px); opacity: 0.6; }
    to   { transform: translateY(0); opacity: 1; }
}

/* ── Wine Info ── */
.top3-info { width: 100%; padding: 0 4px; }
.top3-name {
    font-family: var(--font-main); font-size: 0.85rem; font-weight: 700;
    color: #fff; line-height: 1.25; margin-bottom: 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.top3-region {
    font-family: var(--font-main); font-size: 0.65rem; font-weight: 400;
    color: var(--medium-teal); letter-spacing: 0.5px; margin-bottom: 8px; text-transform: uppercase;
}

/* ── MIA Insight (Dynamic Justification) ── */
.top3-insight {
    font-family: var(--font-main); font-size: 0.68rem; font-weight: 400;
    color: var(--light-teal); line-height: 1.4; font-style: italic;
    padding: 6px 10px; background: rgba(53,111,122,0.12); border-radius: 8px;
    border-left: 2px solid var(--dark-teal); margin: 4px 0 10px;
    text-align: left; min-height: 32px; display: flex; align-items: center;
}
.top3-insight::before {
    content: 'MIA'; font-size: 0.45rem; font-weight: 700; font-style: normal;
    color: var(--champagne-gold); letter-spacing: 1px; margin-right: 6px; flex-shrink: 0;
}

/* ── WSET Mini Profile Bars ── */
.top3-wset-mini { display: flex; gap: 6px; width: 100%; margin-bottom: 10px; }
.top3-wset-bar  { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.top3-wset-label { font-family: var(--font-main); font-size: 0.45rem; font-weight: 700; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.5px; }
.top3-wset-track { width: 100%; height: 3px; background: rgba(255,255,255,0.1); overflow: hidden; }
.top3-wset-fill  { height: 100%; background: linear-gradient(90deg, var(--dark-teal), var(--champagne-gold)); transition: width 0.6s cubic-bezier(0.25,0.46,0.45,0.94); }

/* ── Price ── */
.top3-price {
    font-family: var(--font-main); font-size: 1.2rem; font-weight: 700;
    color: var(--champagne-gold); margin-top: auto; padding-top: 6px;
}

/* ── Location Button (slider card) ── */
.top3-locate-btn {
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    background: var(--dark-teal);
    color: #fff;
    border: 1.5px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    font-family: var(--font-main);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(53, 111, 122, 0.3);
}

.top3-locate-btn svg {
    color: var(--champagne-gold);
    flex-shrink: 0;
}

.top3-locate-btn:hover {
    background: linear-gradient(135deg, var(--dark-teal), rgba(53, 111, 122, 0.85));
    border-color: var(--champagne-gold);
    box-shadow: 0 4px 16px rgba(53, 111, 122, 0.5), 0 0 20px rgba(212, 175, 55, 0.2);
    transform: translateY(-1px);
}

.top3-locate-btn:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 2px 6px rgba(53, 111, 122, 0.4);
}

/* ── Add to Cart (slider card) ── */
.top3-btn-cart {
    width: 100%; margin-top: 8px; padding: 8px 0;
    background: var(--dark-teal); color: #fff; border: none; border-radius: 8px;
    font-family: var(--font-main); font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px; cursor: pointer; transition: all 0.2s ease;
}
.top3-btn-cart:active { background: var(--medium-teal); transform: scale(0.97); }

/* ── Pagination Dots ── */
.top3-dots { display: flex; justify-content: center; gap: 8px; padding: 0 14px; margin-top: 4px; }
.top3-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.15);
    cursor: pointer; transition: all 0.3s ease;
}
.top3-dot.active { background: var(--champagne-gold); border-color: var(--champagne-gold); box-shadow: 0 0 8px rgba(212,175,55,0.5); transform: scale(1.2); }
.top3-dot[data-role="perfect"].active  { background: var(--dark-teal); border-color: var(--dark-teal); }
.top3-dot[data-role="value"].active    { background: rgba(255,255,255,0.9); border-color: #fff; }
.top3-dot[data-role="surprise"].active { background: var(--champagne-gold); }

/* ── v3.8.2: Navigation Arrows — float over bottle image area ── */
.top3-arrow-right,
.top3-arrow-left {
    position: absolute;
    /* v3.8.2: Position over bottle area (~35% from top of track wrapper) */
    top: 35%;
    transform: translateY(-50%);
    z-index: 30;                  /* above cards (z-index 2), badge, and wrapper */
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(53, 111, 122, 0.88);      /* Dark Teal semi-transparent */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    transition: opacity 0.3s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
/* v3.8.2: Arrows anchored to slider-section edges, outside track wrapper overflow */
.top3-arrow-right { right: 4px; }
.top3-arrow-left  { left: 4px; opacity: 0; pointer-events: none; }

.top3-arrow-right:hover,
.top3-arrow-left:hover {
    background: var(--dark-teal);
    border-color: var(--champagne-gold);
    box-shadow: 0 4px 22px rgba(53,111,122,0.6);
    transform: translateY(-50%) scale(1.12);
}
.top3-arrow-right:active,
.top3-arrow-left:active {
    background: var(--champagne-gold);
    color: var(--dark-brown);
    transform: translateY(-50%) scale(0.9);
}

/* Hide cart buttons (cart removed v3.7.2) */
.top3-btn-cart { display: none !important; }
.btn-add-cart  { display: none !important; }
.cart-floating-btn { display: none !important; }

/* ── Slider Responsive: Tablet ── */
@media (min-width: 768px) and (max-width: 1200px) {
    .top3-slide { flex: 0 0 65%; max-width: 65%; }
    .top3-card  { min-height: 300px; padding: 20px; }
    .top3-bottle { height: 160px; width: 60px; }
    .top3-name { font-size: 0.95rem; }
    .top3-insight { font-size: 0.72rem; }
    .top3-arrow-right, .top3-arrow-left { width: 48px; height: 48px; }
}
@media (min-width: 1080px) and (min-height: 1920px) {
    .top3-slide { flex: 0 0 60%; max-width: 60%; }
    .top3-card  { min-height: 340px; padding: 24px; }
    .top3-bottle { height: 180px; width: 68px; }
    .top3-name { font-size: 1rem; }
    .top3-price { font-size: 1.4rem; }
    .top3-arrow-right, .top3-arrow-left { width: 52px; height: 52px; }
}

/* ============================================
   v3.6.0: RETAIL_LOC highlight in location
   ============================================ */

.retail-loc-text {
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.retail-loc-text .aisle-highlight {
    color: var(--dark-teal);
    font-weight: 700;
    text-shadow: 0 0 8px rgba(53, 111, 122, 0.5);
}

/* ============================================
   v3.6.1: FLOATING CART BUTTON
   ============================================ */

.cart-floating-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background: rgba(57, 44, 36, 0.92);
    backdrop-filter: blur(20px);
    border: 1.5px solid rgba(212, 175, 55, 0.4);
    border-radius: 28px;
    color: var(--champagne-gold);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.cart-floating-btn:hover {
    background: rgba(53, 111, 122, 0.9);
    border-color: var(--champagne-gold);
    transform: scale(1.05);
    box-shadow: 0 6px 28px rgba(212, 175, 55, 0.4);
}

.cart-badge {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: var(--champagne-gold);
    color: var(--dark-brown);
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: var(--font-main);
}

/* ============================================
   v3.6.1: ADD TO CART BUTTON (Result & Top3)
   ============================================ */

.btn-add-cart {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--dark-teal) 0%, rgba(53, 111, 122, 0.85) 100%);
    color: #ffffff;
    border: 1.5px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-cart:hover {
    background: var(--champagne-gold);
    color: var(--dark-brown);
    border-color: var(--champagne-gold);
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
}

.btn-add-cart.added {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--champagne-gold);
    color: var(--champagne-gold);
    pointer-events: none;
}

/* Compact version for Top3 cards */
.btn-add-cart-sm {
    padding: 5px 10px;
    font-size: 0.65rem;
    border-radius: 12px;
    background: rgba(53, 111, 122, 0.7);
    color: #fff;
    border: 1px solid rgba(212, 175, 55, 0.25);
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-add-cart-sm:hover {
    background: var(--champagne-gold);
    color: var(--dark-brown);
}

.btn-add-cart-sm.added {
    background: rgba(212, 175, 55, 0.2);
    color: var(--champagne-gold);
    pointer-events: none;
}

/* ============================================
   v3.6.1: CART SCREEN
   ============================================ */

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--light-teal);
}

.cart-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    margin-bottom: 10px;
    background: rgba(57, 44, 36, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.15);
}

.cart-item-image {
    width: 48px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-family: var(--font-main);
    font-size: 0.8rem;
    color: var(--champagne-gold);
}

.cart-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.cart-qty-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(53, 111, 122, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-main);
}

.cart-qty-btn:hover {
    background: var(--champagne-gold);
    color: var(--dark-brown);
}

.cart-qty-value {
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    min-width: 24px;
    text-align: center;
}

.cart-item-subtotal {
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--champagne-gold);
    min-width: 60px;
    text-align: right;
    flex-shrink: 0;
}

.cart-item-remove {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    transition: color 0.2s;
}

.cart-item-remove:hover {
    color: #ff6b6b;
}

/* Cart Summary */
.cart-summary {
    margin-top: 20px;
    padding: 16px;
    background: rgba(53, 111, 122, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: var(--light-teal);
}

.cart-summary-row.total {
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--champagne-gold);
}

.btn-checkout {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    background: linear-gradient(135deg, var(--dark-teal), var(--champagne-gold));
    color: #fff;
    border: none;
    border-radius: 24px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-checkout:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 24px rgba(212, 175, 55, 0.4);
}

.btn-clear-cart {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: transparent;
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    font-family: var(--font-main);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear-cart:hover {
    color: #ff6b6b;
    border-color: #ff6b6b;
}

/* Checkout screen */
.checkout-message {
    text-align: center;
    padding: 40px 20px;
}

.checkout-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--champagne-gold);
}

.checkout-text {
    font-family: var(--font-main);
    font-size: 1.1rem;
    color: var(--light-teal);
    line-height: 1.6;
    margin-bottom: 24px;
}

.btn-back-mia {
    display: inline-block;
    padding: 14px 32px;
    background: var(--dark-teal);
    color: #fff;
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 24px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back-mia:hover {
    background: var(--champagne-gold);
    color: var(--dark-brown);
}


/* ============================================
   v3.8.0: ITAB/HMY BRAND REFINEMENTS
   – ESL Pillar Button, Vivino Badge,
   – Location Badge, Price-Row in Slider
   – Pentagon L1 Buttons (ITAB shape language)
   ============================================ */

/* ── ESL "Pillar-style" Rectangular Button ── */
.esl-pillar-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 10px;
    padding: 10px 16px;              /* Reducido de 14px 20px */
    background: var(--dark-teal);
    color: #ffffff;
    border: 2px solid rgba(212, 175, 55, 0.35);
    border-radius: 4px;               /* Sharp rectangular — ITAB "pillar" shape */
    font-family: var(--font-main);
    font-size: 0.7rem;               /* Reducido de 0.82rem */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;            /* Reducido de 1.5px */
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow:
        0 3px 12px rgba(53, 111, 122, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

/* Decorative triangular accent (ITAB geometric language) */
.esl-pillar-button::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 0; height: 0;
    border-left: 6px solid var(--champagne-gold);
    border-bottom: 6px solid transparent;
}
.esl-pillar-button::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 0; height: 0;
    border-right: 6px solid var(--champagne-gold);
    border-top: 6px solid transparent;
}

.esl-pillar-button:hover {
    background: linear-gradient(135deg, var(--dark-teal) 0%, rgba(53, 111, 122, 0.85) 100%);
    border-color: var(--champagne-gold);
    box-shadow:
        0 6px 24px rgba(53, 111, 122, 0.4),
        0 0 20px rgba(212, 175, 55, 0.15);
    transform: translateY(-1px);
}

.esl-pillar-button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(53, 111, 122, 0.3);
}

.esl-pillar-button svg {
    flex-shrink: 0;
    color: var(--champagne-gold);
}

/* ── Vivino Badge (in Slider Cards) ── */
.top3-vivino {
    font-family: var(--font-main);
    font-size: 0.7rem;
    font-weight: 700;
    color: #e8573a;                   /* Vivino brand red */
    background: rgba(232, 87, 58, 0.1);
    border: 1px solid rgba(232, 87, 58, 0.25);
    border-radius: 6px;
    padding: 2px 8px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* ── Location Badge (in Slider Cards) ── */
.top3-loc {
    position: absolute;
    top: 10px; left: 12px;
    font-family: var(--font-main);
    font-size: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--light-teal);
    background: rgba(53, 111, 122, 0.3);
    border: 1px solid rgba(53, 111, 122, 0.4);
    border-radius: 4px;
    padding: 2px 6px;
}

/* ── Price Row (price + vivino side by side) ── */
.top3-price-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 6px;
    width: 100%;
}

/* ── Pentagon L1 CTA Buttons (ITAB irregular shape language) ── */
.btn-cta-pentagon {
    clip-path: polygon(10% 0%, 100% 0%, 90% 100%, 0% 100%, 5% 50%);
    background: var(--dark-teal);
    color: #fff;
    border: none;
    padding: 14px 28px 14px 32px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cta-pentagon:hover {
    background: var(--champagne-gold);
    color: var(--dark-brown);
    transform: scale(1.04);
}

/* ── v3.8.0: Sharper WSET Triangular Accent on Profile Section ── */
.profile-triangle::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 50%; transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 6px solid var(--dark-teal);
}

/* ── v3.8.0: Card Overlay — #392c24 at 80% opacity (per brand spec) ── */
.result-card-overlay {
    background: rgba(57, 44, 36, 0.80);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: 16px;
}

/* ── v3.8.0: Retail Location Prominent Display ── */
.retail-loc-prominent {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(53, 111, 122, 0.15);
    border: 1px solid var(--dark-teal);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.retail-loc-prominent:hover {
    background: rgba(53, 111, 122, 0.25);
    border-color: var(--champagne-gold);
}

/* ── v3.8.0: Responsive adjustments for new elements ── */
@media (min-width: 1080px) and (min-height: 1920px) {
    .esl-pillar-button {
        font-size: 0.95rem;
        padding: 16px 24px;
    }
    .top3-vivino {
        font-size: 0.8rem;
    }
    .top3-loc {
        font-size: 0.55rem;
    }
}

@media (max-width: 480px) {
    .esl-pillar-button {
        font-size: 0.75rem;
        padding: 12px 16px;
        letter-spacing: 1px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
 * v5.3.0: 3D WINE CELLAR NAVIGATOR - FULLSCREEN MODE
 * ═══════════════════════════════════════════════════════════════════════════
 * Interactive 3D map overlay with:
 * - Fullscreen image display
 * - Rotation controls (90° increments)
 * - Dynamic path animation
 * - "Su vino está aquí" marker
 * - Responsive layout
 */

#3d-nav-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#3d-nav-fullscreen.nav3d-visible {
    opacity: 1;
}

.nav3d-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Close button */
.nav3d-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10001;
    width: 50px;
    height: 50px;
    background: rgba(53, 111, 122, 0.9);
    border: 2px solid var(--champagne-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav3d-close:hover {
    background: var(--champagne-gold);
    transform: scale(1.1);
}

.nav3d-close svg {
    color: white;
}

/* Viewport for 3D image + SVG overlay */
.nav3d-viewport {
    position: relative;
    width: 90vw;
    max-width: 1400px;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 16px;
    border: 3px solid var(--champagne-gold);
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.3);
    cursor: grab; /* Show that image is draggable */
    touch-action: none; /* Prevent default touch behaviors */
}

.nav3d-viewport:active {
    cursor: grabbing;
}

#nav3d-cellar-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.6s ease;
}

/* SVG overlay for path and markers */
.nav3d-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.nav3d-route {
    stroke: var(--champagne-gold);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6));
}

/* Location info banner */
.nav3d-banner {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--dark-brown), rgba(57, 44, 36, 0.95));
    border: 2px solid var(--champagne-gold);
    border-radius: 12px;
    padding: 16px 24px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.nav3d-banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--champagne-gold);
    border-radius: 50%;
    color: var(--dark-brown);
}

.nav3d-banner-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav3d-banner-title {
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 700;
    color: var(--champagne-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav3d-banner-location {
    font-family: var(--font-main);
    font-size: 0.85rem;
    color: white;
    font-weight: 500;
}

/* Rotation controls */
.nav3d-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 10001;
}

.nav3d-rotate-btn {
    width: 60px;
    height: 60px;
    background: rgba(53, 111, 122, 0.9);
    border: 2px solid var(--champagne-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.nav3d-rotate-btn:hover {
    background: var(--champagne-gold);
    color: var(--dark-brown);
    transform: scale(1.15);
}

.nav3d-rotate-btn:active {
    transform: scale(0.95);
}

/* Help banner (instructions at bottom) */
.nav3d-help-banner {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    border: 1px solid var(--champagne-gold);
    backdrop-filter: blur(10px);
    z-index: 10002;
}

.nav3d-help-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-main);
    font-size: 0.75rem;
    color: white;
}

.nav3d-help-item svg {
    flex-shrink: 0;
    color: var(--champagne-gold);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav3d-viewport {
        width: 95vw;
        height: 60vh;
    }

    .nav3d-banner {
        top: 60px;
        padding: 12px 16px;
    }

    .nav3d-banner-title {
        font-size: 0.85rem;
    }

    .nav3d-banner-location {
        font-size: 0.75rem;
    }

    .nav3d-rotate-btn {
        width: 50px;
        height: 50px;
    }

    .nav3d-help-banner {
        bottom: 90px;
        flex-direction: column;
        gap: 8px;
        padding: 10px 16px;
        font-size: 0.7rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
 * v5.3.0: WINE ACTIONS GRID - FIXED BUTTONS SECTION
 * ═══════════════════════════════════════════════════════════════════════════
 * Four fixed buttons below wine card:
 * - Maridaje (Pairing)
 * - Completa Experiencia (Complete Experience)
 * - BUSCAR VINO (Primary - 3D Navigator)
 * - Parpadear ESL (Secondary - LED Blink)
 */

.wine-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 20px 0;
    padding: 0;
}

/* Push action buttons to bottom (for 1920px vertical layout) */
.wine-actions-bottom {
    margin-top: auto !important; /* Push to bottom */
    padding-top: 40px; /* Extra space above */
}

.wine-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    background: linear-gradient(135deg, rgba(53, 111, 122, 0.15), rgba(57, 44, 36, 0.15));
    border: 2px solid var(--dark-teal);
    border-radius: 12px;
    color: white;
    font-family: var(--font-main);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wine-action-btn svg {
    color: var(--light-teal);
    transition: all 0.3s ease;
}

.wine-action-btn:hover {
    background: linear-gradient(135deg, rgba(53, 111, 122, 0.3), rgba(57, 44, 36, 0.3));
    border-color: var(--champagne-gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.2);
}

.wine-action-btn:hover svg {
    color: var(--champagne-gold);
    transform: scale(1.15);
}

.wine-action-btn:active {
    transform: translateY(0);
}

/* Primary button (BUSCAR VINO) */
.wine-action-primary {
    background: linear-gradient(135deg, var(--dark-teal), rgba(53, 111, 122, 0.8));
    border-color: var(--champagne-gold);
}

.wine-action-primary svg {
    color: var(--champagne-gold);
}

.wine-action-primary:hover {
    background: linear-gradient(135deg, var(--champagne-gold), rgba(212, 175, 55, 0.9));
    color: var(--dark-brown);
}

.wine-action-primary:hover svg {
    color: var(--dark-brown);
}

/* Secondary button (ESL Blink) */
.wine-action-secondary {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.2), rgba(74, 14, 14, 0.2));
    border-color: rgba(212, 175, 55, 0.5);
}

.wine-action-secondary:hover {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.4), rgba(74, 14, 14, 0.4));
    border-color: var(--champagne-gold);
}

/* Responsive: Tablet (vertical) */
@media (min-width: 768px) and (max-width: 1080px) {
    .wine-actions-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .wine-action-btn {
        padding: 14px 10px;
        font-size: 0.7rem;
    }

    .wine-action-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* Responsive: Kiosk (1080x1920) */
@media (min-width: 1080px) and (min-height: 1920px) {
    .wine-actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        margin: 24px 0;
    }

    .wine-action-btn {
        padding: 20px 16px;
        font-size: 0.85rem;
    }

    .wine-action-btn svg {
        width: 24px;
        height: 24px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
 * v5.4.0: WINE CARD SLIDER - FULL CARD SWIPEABLE (NO SCROLL)
 * ═══════════════════════════════════════════════════════════════════════════
 * Complete wine card slider with all info visible (no vertical scroll):
 * - Bottle image + wine name
 * - Region + year
 * - WSET profile bars (acidity, body, tannin)
 * - Service info (temp, glass)
 * - Location (aisle/shelf)
 * - Ratings (Parker, WS, Decanter)
 * 
 * Design: Portrait 9:16 kiosk (1080x1920), no overflow
 */

.wine-card-slider-section {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 180px); /* Reserve space for header + buttons */
    overflow: hidden;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 10; /* Ensure slider is visible above other elements */
    flex: 1; /* Take available space, pushing buttons down */
    display: flex;
    flex-direction: column;
}

.wine-card-track-wrapper {
    position: relative;
    width: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
}

.wine-card-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 300%; /* 3 cards */
}

/* Individual wine card */
.wine-card-slide {
    flex: 0 0 100%;
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto; /* Allow vertical scroll if content is too tall */
    max-height: calc(100vh - 100px); /* More space for rich descriptions (was 200px) */
}

/* Wine card sections - VERTICAL CENTERED LAYOUT */
.wc-bottle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 0;
}

.wc-bottle-img {
    width: 80px;
    height: 160px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.wc-wine-name {
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--champagne-gold);
    text-align: center;
    line-height: 1.2;
    margin: 0;
}

.wc-region {
    font-family: var(--font-main);
    font-size: 0.7rem;
    color: var(--light-teal);
    text-align: center;
    margin-top: 2px;
}

/* Wine Description - TALLER VERTICALLY, NARROWER HORIZONTALLY */
.wc-description {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin: 10px auto;
    font-family: var(--font-main);
    min-height: 400px; /* Much taller for 60-80 word descriptions */
    max-width: 600px; /* Back to original width */
    width: 90%;
}

.wc-desc-grapes,
.wc-desc-pairing,
.wc-desc-chartier,
.wc-desc-text {
    font-size: 0.8rem; /* Slightly larger text */
    line-height: 1.5; /* More spacing */
    margin: 6px 0; /* More vertical margin */
    color: white;
}

/* Wine description text (general description) */
.wc-desc-text {
    font-style: italic;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    font-size: 0.85rem; /* Slightly larger for rich AI descriptions */
    line-height: 1.6; /* More readable line spacing */
}

.wc-desc-grapes strong,
.wc-desc-pairing strong {
    color: var(--champagne-gold);
    font-weight: 600;
}

.wc-desc-chartier {
    color: var(--light-teal);
    font-style: italic;
    font-size: 0.6rem;
}

.wc-desc-chartier em {
    color: white;
    font-style: normal;
}

.wc-desc-price-rating {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 6px;
    padding: 10px 12px;
    border-top: none;
    background: rgba(212, 175, 55, 0.15);
    border-radius: 8px;
}

.wc-price {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--champagne-gold);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.wc-vivino {
    font-size: 1rem;
    color: #e8573a;
    font-weight: bold;
}

/* WSET Profile Bars (compact) - SAME WIDTH AS DESCRIPTION */
.wc-profile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: rgba(53, 111, 122, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    max-width: 600px; /* Same as description */
    width: 90%; /* Responsive width */
    margin: 10px auto; /* Center horizontally */
}

.wc-profile-item {
    display: grid;
    grid-template-columns: 60px 1fr 50px;
    align-items: center;
    gap: 8px;
}

.wc-profile-label {
    font-family: var(--font-main);
    font-size: 0.7rem;
    color: var(--light-teal);
    text-transform: uppercase;
}

.wc-profile-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.wc-profile-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--dark-teal), var(--champagne-gold));
    transition: width 0.6s ease;
}

.wc-profile-value {
    font-family: var(--font-main);
    font-size: 0.65rem;
    color: white;
    text-align: right;
}

/* Service section (temp + glass) - SAME WIDTH AS DESCRIPTION */
.wc-service {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px;
    background: rgba(53, 111, 122, 0.15);
    border-radius: 6px;
    max-width: 600px; /* Same as description */
    width: 90%; /* Responsive width */
    margin: 10px auto; /* Center horizontally */
}

.wc-service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.wc-service-icon {
    font-family: var(--font-main);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--champagne-gold);
}

.wc-service-label {
    font-family: var(--font-main);
    font-size: 0.6rem;
    color: var(--light-teal);
    text-transform: uppercase;
}

.wc-service-value {
    font-family: var(--font-main);
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
}

/* Location section - SAME WIDTH AS DESCRIPTION */
.wc-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    background: rgba(53, 111, 122, 0.15);
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    max-width: 600px; /* Same as description */
    width: 90%; /* Responsive width */
    margin: 10px auto; /* Center horizontally */
}

.wc-location-icon {
    font-family: var(--font-main);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--champagne-gold);
}

.wc-location-text {
    font-family: var(--font-main);
    font-size: 0.75rem;
    color: white;
}

/* Ratings section (compact 3-column) - SAME WIDTH AS DESCRIPTION */
.wc-ratings {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 8px;
    max-width: 600px; /* Same as description */
    width: 90%; /* Responsive width */
    margin: 10px auto; /* Center horizontally */
}

.wc-rating-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.wc-rating-label {
    font-family: var(--font-main);
    font-size: 0.6rem;
    color: var(--light-teal);
    text-transform: uppercase;
}

.wc-rating-value {
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--champagne-gold);
}

/* Navigation dots */
.wine-card-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.wine-card-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
}

.wine-card-dot.active {
    background: var(--champagne-gold);
    border-color: var(--champagne-gold);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

/* Role badges */
.wc-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 12px;
    font-family: var(--font-main);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wc-badge-perfect {
    background: linear-gradient(135deg, rgba(53, 111, 122, 0.9), rgba(53, 111, 122, 0.7));
    color: white;
    border: 1px solid var(--dark-teal);
}

.wc-badge-value {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.9), rgba(212, 175, 55, 0.7));
    color: var(--dark-brown);
    border: 1px solid var(--champagne-gold);
}

.wc-badge-surprise {
    background: linear-gradient(135deg, rgba(74, 14, 14, 0.9), rgba(74, 14, 14, 0.7));
    color: var(--champagne-gold);
    border: 1px solid var(--burgundy);
}

/* Expandable sections */
.pairing-expandable,
.experience-expandable {
    margin: 16px 0;
    padding: 14px;
    background: rgba(53, 111, 122, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    animation: slideDown 0.3s ease;
}

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

.pairing-expandable h3,
.experience-expandable h4 {
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: var(--champagne-gold);
    text-transform: uppercase;
    margin-bottom: 10px;
    text-align: center;
    letter-spacing: 1px;
}

/* Responsive adjustments */
@media (min-width: 1080px) and (min-height: 1920px) {
    .wc-bottle-img {
        width: 120px;
        height: 240px;
    }

    .wc-wine-name {
        font-size: 1.3rem;
    }

    .wc-profile-item {
        gap: 12px;
    }

    .wc-service {
        gap: 14px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
 * v5.4.1: WINE NAVIGATION ARROWS + INFO SECTION
 * ═══════════════════════════════════════════════════════════════════════════
 * Navigation arrows for swipe hint
 * Wine info section (WSET, service, location, ratings) below slider
 */

/* Navigation arrows (swipe hint) */
.wine-arrow-left,
.wine-arrow-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 44px;
    height: 44px;
    background: rgba(53, 111, 122, 0.85);
    border: 2px solid rgba(212, 175, 55, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.wine-arrow-left {
    left: 10px;
}

.wine-arrow-right {
    right: 10px;
}

.wine-arrow-left:hover,
.wine-arrow-right:hover {
    background: var(--champagne-gold);
    border-color: var(--champagne-gold);
    transform: translateY(-50%) scale(1.1);
}

.wine-arrow-left svg,
.wine-arrow-right svg {
    color: white;
}

.wine-arrow-left:hover svg,
.wine-arrow-right:hover svg {
    color: var(--dark-brown);
}

/* Wine info section (below slider) */
.wine-info-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    position: relative;
    z-index: 5;
}

/* "¿Dónde está?" button in location */
.wc-donde-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--dark-teal) 0%, var(--medium-teal) 100%);
    border: 2px solid var(--champagne-gold);
    border-radius: 12px;
    color: white;
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.wc-donde-btn:hover {
    background: linear-gradient(135deg, var(--champagne-gold) 0%, #d4af37 100%);
    color: var(--dark-brown);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
}

