@keyframes fadeUp { 
    0% { opacity: 0; transform: translateY(20px); } 
    100% { opacity: 1; transform: translateY(0); } 
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body { 
    background-color: #F4EFE6; 
    color: #2C2C2C; 
    font-family: 'Playfair Display', serif; 
    text-align: center; 
    margin: 0; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
}

.content-wrapper { padding: 20px; flex: 1; }

.fade-section { animation: fadeUp 0.8s ease-out both; }
.delay-1 { animation-delay: 0.1s; } 
.delay-2 { animation-delay: 0.2s; } 
.delay-3 { animation-delay: 0.3s; }

.top-nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    width: 100%; 
    max-width: 1000px; 
    margin: 0 auto 20px auto; 
    position: relative; /* FIX FOR DROPDOWN BUG */
    z-index: 1000; /* FIX FOR DROPDOWN BUG */
}

.back-link { display: inline-block; text-decoration: none; margin-top: 10px; }
.fun-text { font-family: Arial, sans-serif; font-size: 0.9rem; color: #555555; margin-right: 5px; letter-spacing: 2px; }
.logo-text { font-family: Arial, sans-serif; font-size: 1.1rem; letter-spacing: 6px; color: #333333; }
.back-link:hover .fun-text, .back-link:hover .logo-text { color: #A64B2A; transition: color 0.3s ease; }

h1 { font-size: 3rem; margin-bottom: 5px; margin-top: 20px; }
p.subtitle { font-family: Arial, sans-serif; letter-spacing: 2px; color: #555; margin-bottom: 30px; }

/* --- PREMIUM MOBILE DROPDOWN --- */
.category-dropdown { position: relative; display: inline-block; width: 90%; max-width: 400px; margin: 0 auto 30px auto; text-align: left; z-index: 50; }
.dropdown-btn { background-color: #F8F5F0; color: #3E2723; padding: 15px 20px; font-size: 16px; font-weight: bold; border: 2px solid #3E2723; border-radius: 8px; width: 100%; cursor: pointer; display: flex; justify-content: space-between; font-family: 'Playfair Display', serif; }
.dropdown-content { display: none; position: absolute; background-color: #FFFFFF; width: 100%; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1); border-radius: 8px; overflow: hidden; z-index: 100; top: 100%; margin-top: 0; text-align: left;}
.category-dropdown:hover .dropdown-content,
.category-dropdown.open .dropdown-content { display: block; }
.dropdown-content a { color: #3E2723; padding: 15px 20px; text-decoration: none; display: block; border-bottom: 1px solid #f1f1f1; font-weight: 500; font-family: Arial, sans-serif; font-size: 0.9rem;}
.dropdown-content a.coming-soon { color: #A9A9A9; font-style: italic; font-size: 0.85rem; cursor: not-allowed; } /* FIXED CURSOR! */
.dropdown-content a.active-category { font-weight: bold; background-color: #F8F5F0; }
.dropdown-content a:hover:not(.coming-soon) { background-color: #EFEBE4; }

.section-title { font-size: 2rem; margin: 50px 0 20px 0; color: #8A3A1F; border-bottom: 1px solid #D4CAB5; display: inline-block; padding-bottom: 10px; scroll-margin-top: 80px; }

.product-grid { 
    display: flex; 
    justify-content: center; 
    gap: 30px; 
    flex-wrap: wrap; 
    max-width: 1000px; 
    margin: 0 auto; 
    padding-bottom: 60px;
}

.product-card { 
    background-color: #FFFFFF; 
    border-radius: 8px; 
    padding: 20px; 
    width: 280px; 
    box-shadow: 0px 4px 10px rgba(0,0,0,0.03); 
    transition: transform 0.4s ease, box-shadow 0.4s ease; 
    box-sizing: border-box; 
    overflow: hidden; 
}
.product-card:hover { transform: translateY(-8px); box-shadow: 0px 20px 40px rgba(0,0,0,0.08); }

.carousel-wrapper { position: relative; width: 100%; height: 320px; border-radius: 6px; margin-bottom: 20px; overflow: hidden; }
.carousel-track { 
    display: flex; 
    width: 100%; 
    height: 100%; 
    transition: transform 0.4s ease-in-out; 
    will-change: transform;
}
.slide-placeholder { 
    flex: 0 0 100%; 
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 100%;
    box-sizing: border-box;
    background-color: #EAEAEA; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #999; 
    font-family: Arial, sans-serif; 
    font-size: 0.9rem; 
}

.carousel-btn { 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    background: rgba(255, 255, 255, 0.8); 
    border: none; 
    border-radius: 50%; 
    width: 30px; 
    height: 30px; 
    cursor: pointer; 
    color: #333; 
    z-index: 5; 
    box-shadow: 0px 2px 5px rgba(0,0,0,0.1); 
    font-weight: bold; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: background 0.3s; 
}
.carousel-btn:hover { background: #FFFFFF; }
.prev-btn { left: 10px; } 
.next-btn { right: 10px; }

.product-card h2 { margin: 10px 0 5px 0; font-size: 1.5rem; }
.ingredients { font-family: Arial, sans-serif; font-size: 0.8rem; color: #888; margin: 0 0 15px 0; line-height: 1.5; letter-spacing: 0.5px; min-height: 35px; }
.price { font-family: Arial, sans-serif; font-size: 1.1rem; color: #444; margin-bottom: 20px; font-weight: bold; }

.order-btn { 
    background-color: #A64B2A; 
    color: white; 
    padding: 12px; 
    width: 100%; 
    border: none; 
    border-radius: 4px; 
    font-size: 1.1rem; 
    cursor: pointer; 
    font-weight: bold; 
    font-family: 'Playfair Display', serif; 
    transition: background-color 0.3s ease; 
}
.order-btn:hover { background-color: #8A3A1F; }
.btn-disabled { background-color: #D4CAB5; cursor: not-allowed; color: #888; }
.btn-disabled:hover { background-color: #D4CAB5; }
.coming-soon-text { color: #8A3A1F; font-size: 0.85rem; font-weight: bold; letter-spacing: 1px; margin-bottom: 10px; }

.cart-trigger { 
    background-color: #1A1A1A; 
    color: white; 
    padding: 10px 20px; 
    border-radius: 50px; 
    font-family: Arial, sans-serif; 
    font-weight: bold; 
    cursor: pointer; 
    border: none; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    gap: 8px; 
    transition: background 0.3s; 
    white-space: nowrap;
    flex-shrink: 0;
}
.cart-trigger:hover { background-color: #333; }

/* MODALS */
.modal-overlay { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.6); 
    align-items: center; 
    justify-content: center; 
    z-index: 100; 
    backdrop-filter: blur(3px); 
}
.modal-content { 
    background-color: #FFF; 
    padding: 35px 30px; 
    border-radius: 12px; 
    width: 90%; 
    max-width: 420px; 
    text-align: left; 
    position: relative; 
    max-height: 80vh; 
    overflow-y: auto; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.2); 
}
.close-btn { position: absolute; top: 15px; right: 20px; font-size: 1.5rem; cursor: pointer; color: #999; transition: color 0.3s; }
.close-btn:hover { color: #333; }
.modal-content h3 { margin-top: 0; font-size: 1.8rem; color: #1A1A1A; font-family: 'Playfair Display', serif; margin-bottom: 5px; }
.modal-size-label { font-family: Arial, sans-serif; color: #A64B2A; font-weight: bold; font-size: 0.9rem; letter-spacing: 1px; margin-bottom: 25px; text-transform: uppercase; }

/* MODERN SELECTION PILLS */
.select-group { margin-bottom: 25px; }
.select-group > label { display: block; font-family: Arial, sans-serif; font-weight: bold; margin-bottom: 10px; color: #444; font-size: 0.85rem; letter-spacing: 1px; text-transform: uppercase; }
.pill-grid { display: flex; gap: 10px; width: 100%; }
.pill-input { display: none; }
.pill-label { 
    flex: 1; 
    text-align: center; 
    background-color: #F9F9F9; 
    border: 2px solid #EAEAEA; 
    border-radius: 8px; 
    padding: 15px 10px; 
    cursor: pointer; 
    transition: all 0.2s ease; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    color: #666; 
}
.pill-title { font-family: Arial, sans-serif; font-weight: bold; font-size: 1rem; margin-bottom: 4px; color: #333; }
.pill-sub { font-family: Arial, sans-serif; font-size: 0.75rem; line-height: 1.2; }

.pill-input:checked + .pill-label { background-color: #FFF; border-color: #A64B2A; box-shadow: 0 4px 12px rgba(166, 75, 42, 0.15); }
.pill-input:checked + .pill-label .pill-title { color: #A64B2A; }

/* Monk Fruit surcharge badge — visible only for sweetened variants */
.monk-price-badge {
    display: none;
    margin-top: 5px;
    font-family: Arial, sans-serif;
    font-size: 0.72rem;
    color: #999;
    letter-spacing: 0.3px;
    line-height: 1;
}

.pay-btn { background-color: #1A1A1A; color: white; padding: 16px; width: 100%; border: none; border-radius: 8px; font-size: 1.1rem; cursor: pointer; font-weight: bold; margin-top: 10px; font-family: 'Playfair Display', serif; transition: background 0.3s; }
.pay-btn:hover { background-color: #333; }
.pay-btn:disabled { background-color: #D4CAB5; cursor: not-allowed; color: #888; }

/* CART STYLES */
.cart-item { display: flex; justify-content: space-between; align-items: center; font-family: Arial, sans-serif; border-bottom: 1px solid #EEE; padding: 15px 0; }
.cart-item-details { flex-grow: 1; }
.cart-item-title { font-weight: bold; color: #333; margin-bottom: 4px; }
.cart-item-variant { font-size: 0.85rem; color: #888; }
.cart-item-price { font-weight: bold; color: #A64B2A; }
.cart-total-row { display: flex; justify-content: space-between; font-family: Arial, sans-serif; font-weight: bold; font-size: 1.2rem; padding-top: 15px; margin-top: 10px; }
.empty-cart-msg { font-family: Arial, sans-serif; color: #888; text-align: center; padding: 20px 0; }

.progress-container { background-color: #EAEAEA; border-radius: 10px; height: 10px; width: 100%; margin: 15px 0 5px 0; overflow: hidden; }
.progress-bar { background-color: #A64B2A; height: 100%; width: 0%; transition: width 0.5s ease; }
.progress-text { font-family: Arial, sans-serif; font-size: 0.85rem; color: #A64B2A; font-weight: bold; text-align: center; margin-bottom: 20px;}
.unlocked-text { color: #2E8B57; }
.unlocked-bar { background-color: #2E8B57; }

/* THE ROASTER AI */
.ai-bubble-btn { 
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    width: 60px; 
    height: 60px; 
    background-color: #1A1A1A; 
    color: white; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.2); 
    z-index: 1000; 
    transition: transform 0.3s; 
    font-size: 1.5rem; 
    font-family: 'Playfair Display', serif; 
    border: none; 
}
.ai-bubble-btn:hover { transform: scale(1.08); background-color: #333; }

.ai-chat-window { 
    position: fixed; 
    bottom: 100px; 
    right: 30px; 
    width: 320px; 
    background-color: #FFF; 
    border-radius: 12px; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.15); 
    z-index: 1000; 
    display: none; 
    flex-direction: column; 
    overflow: hidden; 
    border: 1px solid #EAEAEA; 
    animation: fadeUp 0.3s ease-out; 
    text-align: left; 
}
.ai-chat-header { background-color: #1A1A1A; color: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; font-family: 'Playfair Display', serif; }
.ai-name { font-size: 1.2rem; font-weight: bold; margin-bottom: 2px;}
.ai-subtitle { font-size: 0.65rem; color: #B3B3B3; font-family: Arial, sans-serif; letter-spacing: 2px; }
.ai-close { cursor: pointer; color: #B3B3B3; font-size: 1.5rem; line-height: 1; }
.ai-close:hover { color: #FFF; }

.ai-chat-body { padding: 20px; height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; background-color: #FDFDFD; font-family: Arial, sans-serif; font-size: 0.9rem; }

.ai-msg-bot { 
    background-color: #F4EFE6; 
    padding: 12px 15px; 
    border-radius: 12px 12px 12px 2px; 
    color: #333; 
    max-width: 85%; 
    align-self: flex-start; 
    line-height: 1.4; 
    border: 1px solid #EBE4D5;
    display: flex; 
    gap: 8px; 
    align-items: flex-start;
}
.ai-msg-content { flex-grow: 1; }

/* AI Typing Indicator - Pulsing Dots */
.ai-typing-indicator {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    padding: 6px 2px;
}
.ai-typing-indicator span {
    width: 6px;
    height: 6px;
    background-color: #8A2924;
    border-radius: 50%;
    display: inline-block;
    animation: aiDotPulse 1.4s infinite ease-in-out both;
}
.ai-typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
.ai-typing-indicator span:nth-child(3) { animation-delay: 0s; }

@keyframes aiDotPulse {
    0%, 80%, 100% { transform: scale(0.3); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

.ai-speaker-btn { 
    background: none; 
    border: none; 
    color: #A64B2A; 
    cursor: pointer; 
    padding: 2px; 
    opacity: 0.6; 
    transition: all 0.3s; 
    flex-shrink: 0; 
    margin-top: 2px; 
}
.ai-speaker-btn:hover { opacity: 1; transform: scale(1.1); }

.ai-msg-user { background-color: #A64B2A; color: white; padding: 12px 15px; border-radius: 12px 12px 2px 12px; max-width: 85%; align-self: flex-end; line-height: 1.4; }

.ai-chat-input-area { display: flex; flex-direction: column; padding: 10px 15px 15px 15px; border-top: 1px solid #EAEAEA; background: #FFF; gap: 5px; }

.ai-input-row { display: flex; gap: 10px; width: 100%; align-items: center; }

.ai-input-wrapper {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.ai-input { 
    width: 100%; 
    border: 1px solid #DDD; 
    padding: 10px 40px 10px 15px; 
    border-radius: 20px; 
    outline: none; 
    font-family: Arial, sans-serif; 
    font-size: 0.9rem; 
    transition: border-color 0.3s;
    box-sizing: border-box; 
}
.ai-input:focus { border-color: #A64B2A; }
.ai-input:disabled { background-color: #F9F9F9; cursor: not-allowed; }

.ai-mic-btn { 
    position: absolute;
    right: 8px;
    background: none; 
    border: none; 
    cursor: pointer; 
    color: #888; 
    padding: 5px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    transition: color 0.3s;
}
.ai-mic-btn:hover { color: #A64B2A; }
.ai-mic-btn:disabled { color: #CCC; cursor: not-allowed; }
.mic-icon svg { width: 16px; height: 16px; fill: currentColor; }

/* PREMIUM VISUALIZER STYLES */
.voice-visualizer { 
    display: none; 
    align-items: center; 
    justify-content: center; 
    gap: 2px; 
    height: 16px; 
    width: 16px; 
}
.voice-visualizer .bar { 
    width: 3px; 
    background-color: #D9534F; 
    border-radius: 2px; 
    animation: soundWave 1s infinite ease-in-out; 
}
.voice-visualizer .bar:nth-child(1) { height: 8px; animation-delay: -1.2s; }
.voice-visualizer .bar:nth-child(2) { height: 16px; animation-delay: -1.0s; }
.voice-visualizer .bar:nth-child(3) { height: 10px; animation-delay: -0.8s; }
.voice-visualizer .bar:nth-child(4) { height: 12px; animation-delay: -0.6s; }

@keyframes soundWave {
    0%, 100% { transform: scaleY(0.4); }
    50% { transform: scaleY(1); }
}

.ai-send { 
    background: none; 
    border: none; 
    color: #A64B2A; 
    font-weight: bold; 
    cursor: pointer; 
    font-size: 0.9rem; 
    letter-spacing: 1px; 
    flex-shrink: 0; 
}
.ai-send:disabled { color: #CCC; cursor: not-allowed; }
.ai-char-counter { font-size: 0.65rem; color: #AAA; font-family: Arial, sans-serif; text-align: right; margin-right: 10px; }

/* --- COMPACT TOP NAV FIXES --- */
.nav-actions { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.category-dropdown.compact { 
    margin: 0; 
    width: auto; 
    z-index: 100; 
}

.compact .dropdown-btn { 
    padding: 10px 15px; 
    font-size: 0.85rem; 
    width: auto; 
    gap: 8px; 
}

/* This forces the menu to open to the left so it doesn't spill off the screen */
.compact .dropdown-content { 
    right: 0; 
    left: auto; 
    min-width: 220px; 
    margin-top: 0; 
    top: 100%;
}

.cart-trigger.compact-cart { 
    padding: 10px 15px; 
    font-size: 0.85rem; 
    white-space: nowrap;
    flex-shrink: 0;
}

/* --- AUTH & DROPDOWN STYLES --- */
.auth-btn {
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-family: Arial, sans-serif;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: opacity 0.2s;
}
.auth-btn:hover { opacity: 0.85; }

.auth-modal-box {
    text-align: center;
}

.close-modal {
    position: absolute; 
    top: 15px; 
    right: 20px; 
    font-size: 28px; 
    color: #AAA;
    cursor: pointer;
    transition: color 0.2s;
}
.close-modal:hover { color: #1A1A1A; }

.modal-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #CCC;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
    font-family: Arial, sans-serif;
}
.modal-input:focus { outline: none; border-color: #1A1A1A; } 

.input-group {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    background: #fff;
    padding: 5px 15px;
}
.input-group input {
    border: none;
    outline: none;
    padding: 8px;
    font-size: 1rem;
    width: 150px;
}

/* User Profile Menu & Dropdown */
.user-profile-menu {
    position: relative;
    display: inline-block;
}

.user-name-trigger {
    background: #FFFFFF;
    border: 1px solid #1A1A1A;
    border-radius: 4px;
    padding: 8px 14px;
    font-family: Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 1px;
    color: #1A1A1A;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.user-name-trigger:hover,
.user-name-trigger.active {
    background: #1A1A1A;
    color: #FFFFFF;
}

.dropdown-chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.user-name-trigger.active .dropdown-chevron {
    transform: rotate(180deg);
}

#user-name {
    display: inline-block;
    max-width: 130px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* Dropdown Menu */
.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 250px;
    background: #FFFFFF;
    border: 1px solid #1A1A1A;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 6px 0;
    z-index: 1000;
    text-align: left;
    overflow: hidden;
}

.user-dropdown.show {
    display: block !important;
    animation: fadeIn 0.15s ease-out;
}

/* Support Email Item */
.user-dropdown .dropdown-support-item {
    padding: 12px 15px;
    font-size: 0.75rem;
    color: #666;
    letter-spacing: 0.5px;
    background: #F9F9F9;
    border-bottom: 1px solid #EEEEEE;
    line-height: 1.5;
    font-family: Arial, sans-serif;
}

.user-dropdown .dropdown-support-item a {
    color: #1A1A1A;
    text-decoration: none;
    font-weight: bold;
}

.user-dropdown .dropdown-support-item a:hover {
    color: #8A2924;
    text-decoration: underline;
}

.dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    font-family: Arial, sans-serif;
    font-size: 0.85rem;
    color: #1A1A1A;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-item:hover {
    background-color: #F5F5F5;
}

.dropdown-item-danger:hover {
    color: #8A2924;
    background-color: #FDF4F4;
}

.dropdown-divider {
    height: 1px;
    background-color: #EEEEEE;
    margin: 4px 0;
}

/* Auth Modal Content Customization */
#auth-modal {
    z-index: 2000;
}

#auth-modal .modal-content {
    max-width: 380px;
    text-align: center;
    padding: 40px;
    border-radius: 8px;
}

@media (max-width: 768px) { 
    h1 { font-size: 2.2rem; } 
    .section-title { font-size: 1.5rem; } 
    .product-card { width: 100%; max-width: 350px; } 
    .ai-chat-window { width: calc(100% - 40px); right: 20px; bottom: 90px; } 
    .ai-bubble-btn { right: 20px; bottom: 20px; width: 50px; height: 50px; font-size: 1.2rem; } 
    /* Compact Top Nav mobile fixes */
    .logo-text { display: none; } 
    .fun-text { margin: 0; font-weight: bold; }
    .cart-trigger.compact-cart { padding: 8px 10px; font-size: 0.8rem; white-space: nowrap; flex-shrink: 0; }
    .nav-actions { gap: 6px; flex-shrink: 0; }
    .compact .dropdown-btn { padding: 8px 10px; font-size: 0.8rem; }
    .user-name-trigger { padding: 6px 8px; font-size: 0.8rem; }
    .user-dropdown { min-width: 190px; right: 0; }
    #user-name { max-width: 75px; }
}
/* ===== AUTH TABS (premium monochrome) ===== */
.auth-tabs { display: flex; border-bottom: 1px solid #E0E0E0; margin-bottom: 18px; }
.auth-tab {
    flex: 1; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
    padding: 12px 8px; cursor: pointer; font-family: Arial, sans-serif; font-size: 0.85rem;
    letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600;
    color: #9A9A9A; transition: color 0.2s ease, border-color 0.2s ease;
}
.auth-tab:hover { color: #555; }
.auth-tab.active { color: #000; border-bottom-color: #000; }
.auth-tab:focus-visible { outline: 1px solid #000; outline-offset: -3px; }
.auth-tab-title { margin: 0 0 15px; font-size: 1rem; color: #333; font-weight: normal; }
