/* ==========================================================
   BROOK VALLEY — Custom Design System & Luxury Aesthetics
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --color-cream: #FAF7F2;
    --color-cream-light: #FFFDF9;
    --color-ruby: #740A10;
    --color-ruby-dark: #5A060C;
    --color-espresso: #3A2010;
    --color-roast: #4A2E1B;
    --color-bean: #6F4E37;
    --color-forest: #2E6B42;
    --color-forest-dark: #1E4C2E;
    --color-gold: #C5A059;
    --color-gold-light: #DFBF7A;
    --color-gold-pill: #F4E2BD;
    --color-beige: #F2ECE4;
    --color-border: #E8DFD3;
    --color-charcoal: #1F1F1F;
    --color-muted: #6B5E51;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--color-cream);
    color: var(--color-charcoal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.font-serif {
    font-family: 'Playfair Display', Georgia, serif;
}

/* Permanent Luxury Scroll Area & Scrollbars (Always Shown On Scroll) */
html {
    scrollbar-gutter: stable;
    overflow-y: scroll !important;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-scrollbar-thumb, #6F4E37) var(--color-scrollbar-track, #F7F3EB);
}

::-webkit-scrollbar {
    width: var(--scrollbar-width, 10px) !important;
    height: var(--scrollbar-width, 10px) !important;
    display: block !important;
}
::-webkit-scrollbar-track {
    background: var(--color-scrollbar-track, #F7F3EB) !important;
    border-left: 1px solid var(--color-border, #E8DFD3) !important;
    display: block !important;
}
::-webkit-scrollbar-thumb {
    background: var(--color-scrollbar-thumb, #6F4E37) !important;
    border-radius: 6px !important;
    border: 2px solid var(--color-scrollbar-track, #F7F3EB) !important;
    display: block !important;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-scrollbar-thumb-hover, #3A2010) !important;
}

/* Luxury button styling */
.btn-luxury {
    background-color: var(--color-ruby, #740A10);
    color: #FFFFFF;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 0.05em;
    font-weight: 700;
}
.btn-luxury:hover {
    background-color: var(--color-ruby-dark, #5A060C);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(116, 10, 16, 0.3);
}

.btn-luxury-green {
    background-color: var(--color-forest);
    color: #FFFDF9;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-luxury-green:hover {
    background-color: var(--color-forest-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(30, 58, 43, 0.25);
}

.btn-gold {
    background-color: var(--color-gold);
    color: #1F1F1F;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-gold:hover {
    background-color: var(--color-gold-light);
    transform: translateY(-1px);
}

/* Glass & Card effects */
.card-luxury {
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-luxury:hover {
    border-color: var(--color-gold);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(74, 46, 27, 0.08);
}

/* Badge styling */
.badge-gold {
    background: rgba(197, 160, 89, 0.12);
    color: #926E27;
    border: 1px solid rgba(197, 160, 89, 0.3);
}

.badge-forest {
    background: rgba(30, 58, 43, 0.1);
    color: #1E3A2B;
    border: 1px solid rgba(30, 58, 43, 0.2);
}

/* Toast container */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}
.toast-msg {
    pointer-events: auto;
    background: #1F1F1F;
    color: #FFFDF9;
    padding: 14px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    animation: toastSlideUp 0.3s ease forwards;
    border-left: 4px solid var(--color-gold);
}
@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================
   BROOK VALLEY — Liquid 3D Glass Icons & Benefit Cards
   ========================================================== */
.glass-icon-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 20px;
    flex-shrink: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Apple / VisionOS Specular Top Glaze Reflection */
.glass-icon-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-top-left-radius: 19px;
    border-top-right-radius: 19px;
    pointer-events: none;
    z-index: 1;
}

/* Inner Specular Rim & Outer Bevel */
.glass-icon-badge::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 
        inset 0 1.5px 2px rgba(255, 255, 255, 0.75),
        inset 0 -1.5px 2px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    z-index: 2;
}

/* Vibrant Glass Gradients & Deep Diffused Colored Glows */
.glass-icon-emerald {
    background: linear-gradient(145deg, #10B981 0%, #059669 45%, #047857 100%);
    box-shadow: 
        0 12px 28px -4px rgba(5, 150, 105, 0.42),
        0 4px 10px -2px rgba(5, 150, 105, 0.25);
}

.glass-icon-amber {
    background: linear-gradient(145deg, #F59E0B 0%, #D97706 45%, #B45309 100%);
    box-shadow: 
        0 12px 28px -4px rgba(217, 119, 6, 0.42),
        0 4px 10px -2px rgba(217, 119, 6, 0.25);
}

.glass-icon-gold {
    background: linear-gradient(145deg, #E6C687 0%, #C5A059 45%, #8C6B28 100%);
    box-shadow: 
        0 12px 28px -4px rgba(197, 160, 89, 0.45),
        0 4px 10px -2px rgba(197, 160, 89, 0.25);
}

.glass-icon-blue {
    background: linear-gradient(145deg, #3B82F6 0%, #2563EB 45%, #1D4ED8 100%);
    box-shadow: 
        0 12px 28px -4px rgba(37, 99, 235, 0.42),
        0 4px 10px -2px rgba(37, 99, 235, 0.25);
}

/* Glass Card Luxury Elevation */
.glass-benefit-card {
    position: relative;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(232, 223, 211, 0.8);
    border-radius: 20px;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-benefit-card:hover {
    transform: translateY(-6px);
    background: #FFFFFF;
    border-color: rgba(197, 160, 89, 0.6);
    box-shadow: 
        0 20px 35px -10px rgba(58, 32, 16, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.04);
}

.glass-benefit-card:hover .glass-icon-badge {
    transform: scale(1.08) translateY(-2px);
}

/* ==========================================================
   Announcement Bar Infinite Seamless Marquee Ticker (Strict Single Line)
   ========================================================== */
.announcement-bar-container {
    background-color: var(--color-espresso, #3A2010);
    color: #FFFDF9;
    border-bottom: 1px solid rgba(197, 160, 89, 0.3);
    position: relative;
    overflow: hidden !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    width: 100% !important;
}

.announcement-marquee-wrapper {
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    position: relative !important;
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    mask-image: linear-gradient(to right, transparent 0%, black 24px, black calc(100% - 24px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 24px, black calc(100% - 24px), transparent 100%);
}

.announcement-marquee-track {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    width: max-content !important;
    animation: announcementMarquee var(--marquee-speed, 22s) linear infinite;
    will-change: transform;
}

.announcement-marquee-track.is-paused {
    animation-play-state: paused !important;
}

.announcement-marquee-wrapper:hover .announcement-marquee-track.pause-on-hover {
    animation-play-state: paused;
}

.announcement-static-mode .announcement-marquee-track {
    animation: none !important;
    width: 100% !important;
    justify-content: center !important;
}

.announcement-item {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    align-items: center !important;
    padding: 0 2rem !important;
    font-size: 11px !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    font-weight: 500 !important;
    width: max-content !important;
    line-height: 1 !important;
}

.announcement-item .sep {
    margin: 0 1.25rem !important;
    color: #C5A059 !important;
    font-size: 13px !important;
    opacity: 0.9 !important;
    display: inline-block !important;
}

@keyframes announcementMarquee {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

/* Brand Logo Upload Helpers */
.brand-logo-img {
    height: auto !important;
    max-height: var(--header-logo-height, 50px) !important;
    max-width: var(--header-logo-max-width, 240px) !important;
    width: auto !important;
    object-fit: contain !important;
    display: block !important;
    transition: all 0.3s ease;
}

@media (max-width: 640px) {
    .brand-logo-img {
        max-height: var(--header-logo-mobile-height, 38px) !important;
        max-width: 180px !important;
    }
}

.footer-logo-img {
    height: auto !important;
    max-height: var(--footer-logo-height, 44px) !important;
    max-width: var(--footer-logo-max-width, 200px) !important;
    width: auto !important;
    object-fit: contain !important;
    display: block !important;
    transition: all 0.3s ease;
}

/* ==========================================================
   Mobile WebApp Bottom Navigation Bar
   ========================================================== */
.mobile-webapp-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: #FFFFFF;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.08);
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom, 0px)) 10px;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

@media (min-width: 1024px) {
    .mobile-webapp-nav {
        display: none !important;
    }
}

.mobile-nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
    padding: 4px 2px;
    color: #4B5563;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: color 0.18s ease, transform 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-tab svg {
    width: 24px;
    height: 24px;
    margin-bottom: 3px;
    stroke: currentColor;
    transition: transform 0.2s ease, stroke 0.18s ease;
}

.mobile-nav-tab:active svg {
    transform: scale(0.92);
}

.mobile-nav-tab.is-active {
    color: #1E3A2B !important;
    font-weight: 600;
}

.mobile-nav-tab.is-active svg {
    stroke: #1E3A2B !important;
}

@media (max-width: 1023px) {
    body {
        padding-bottom: 74px !important;
    }
}

/* Mobile Bottom Sheets & Backdrop */
.mobile-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.48) !important;
    z-index: 65 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.mobile-sheet-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 80 !important;
    background: #FFFDF9 !important;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -8px 35px rgba(0, 0, 0, 0.2) !important;
    border-top: 1px solid #E8DFD3;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: translateY(105%) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: transform;
}

.mobile-bottom-sheet.is-open {
    transform: translateY(0) !important;
}

/* Strict Desktop Protection: Completely disable and hide mobile sheets, drawer, and backdrop on desktop screens */
@media (min-width: 1024px) {
    .mobile-bottom-sheet,
    .mobile-sheet-backdrop,
    .mobile-webapp-nav,
    #mobile-menu,
    #mobile-menu-backdrop,
    #mobile-categories-sheet,
    #mobile-search-sheet,
    #mobile-offers-sheet {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: translateY(120%) !important;
        opacity: 0 !important;
    }
}

/* ==========================================================
   Apple & Big Tech Liquid Glass Design System
   ========================================================== */
.apple-liquid-glass {
    background: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(28px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
    border: 1px solid rgba(255, 255, 255, 0.75) !important;
    box-shadow: 
        0 20px 50px -10px rgba(0, 0, 0, 0.14),
        0 0 0 1px rgba(0, 0, 0, 0.04),
        inset 0 1px 1.5px rgba(255, 255, 255, 0.95) !important;
}

.apple-liquid-card {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.72) 100%) !important;
    backdrop-filter: blur(22px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 20px !important;
    box-shadow: 
        0 10px 30px -4px rgba(44, 26, 14, 0.05),
        0 0 0 1px rgba(232, 223, 211, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.95) !important;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow: hidden;
}

.apple-liquid-card:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 16px 40px -6px rgba(44, 26, 14, 0.12),
        0 0 0 1px rgba(197, 160, 89, 0.4),
        inset 0 1px 1.5px rgba(255, 255, 255, 1) !important;
}

.apple-liquid-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.95) 50%, transparent 100%);
    pointer-events: none;
}

.apple-glass-header {
    background: rgba(255, 253, 249, 0.85) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border-bottom: 1px solid rgba(232, 223, 211, 0.75) !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.03) !important;
}

.apple-glass-modal {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(32px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(32px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.25), inset 0 1px 1.5px rgba(255, 255, 255, 1) !important;
}

.apple-glass-squircle {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 
        0 4px 14px rgba(0, 0, 0, 0.08),
        inset 0 1px 1.5px rgba(255, 255, 255, 0.7),
        inset 0 -1px 1px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================
   BROOK VALLEY — Luxury Nature-Inspired Footer Styles
   ========================================================== */
.footer-luxury-container {
    background-color: #1C100A;
    color: #F8F3E9;
    position: relative;
}

.footer-link-item {
    color: #C4B69E;
    transition: all 0.22s ease;
}

.footer-link-item:hover {
    color: #F3CC79;
    padding-left: 2px;
}

.footer-link-item:hover .footer-chevron {
    color: #F3CC79;
    transform: translateX(3px);
}

.footer-social-btn {
    width: 34px;
    height: 34px;
    border-radius: 9999px;
    border: 1px solid rgba(217, 181, 109, 0.45);
    background: rgba(28, 16, 10, 0.65);
    color: #D9B56D;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-social-btn:hover {
    border-color: #F3CC79;
    background: rgba(217, 181, 109, 0.18);
    color: #F3CC79;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 181, 109, 0.25);
}

.footer-benefits-panel {
    background: rgba(20, 8, 4, 0.82);
    border: 1px solid rgba(217, 181, 109, 0.35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 18px;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.35);
}

/* ==========================================================
   BROOK VALLEY — Smooth Infinite Marquee Announcement Ticker
   ========================================================== */
@keyframes bvMarqueeScroll {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

.announcement-marquee-track {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    width: max-content !important;
    will-change: transform;
    animation: bvMarqueeScroll var(--marquee-speed, 22s) linear infinite;
}

.announcement-marquee-track.pause-on-hover:hover {
    animation-play-state: paused !important;
}

.announcement-static-mode .announcement-marquee-track {
    animation: none !important;
}

/* ==========================================================
   BROOK VALLEY — Luxury Botanical Green Leaves & Art Leaf Overlays
   ========================================================== */
@keyframes leafFloatSlow {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-6px) rotate(1.2deg);
    }
}

@keyframes leafFloatGentle {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
    50% {
        transform: translateY(-4px) rotate(-1deg) scale(1.01);
    }
}

.decor-leaf-seam-left {
    position: absolute;
    left: -35px;
    top: -105px;
    width: 260px;
    max-width: 35vw;
    z-index: 30;
    pointer-events: none;
    filter: drop-shadow(0 14px 28px rgba(42, 23, 13, 0.22));
    animation: leafFloatSlow 8s ease-in-out infinite;
    transform-origin: top left;
}

@media (min-width: 640px) {
    .decor-leaf-seam-left {
        left: -50px;
        top: -135px;
        width: 320px;
    }
}

@media (min-width: 1024px) {
    .decor-leaf-seam-left {
        left: -65px;
        top: -160px;
        width: 410px;
    }
}

@media (min-width: 1536px) {
    .decor-leaf-seam-left {
        left: -75px;
        top: -180px;
        width: 460px;
    }
}

.decor-leaf-left {
    position: absolute;
    left: -20px;
    top: -85px;
    width: 240px;
    max-width: 32vw;
    z-index: 30;
    pointer-events: none;
    filter: drop-shadow(0 14px 28px rgba(42, 23, 13, 0.22));
    animation: leafFloatSlow 8s ease-in-out infinite;
    transform-origin: top left;
}

@media (min-width: 640px) {
    .decor-leaf-left {
        left: -35px;
        top: -115px;
        width: 310px;
    }
}

@media (min-width: 1024px) {
    .decor-leaf-left {
        left: -45px;
        top: -140px;
        width: 380px;
    }
}

.decor-leaf-right {
    position: absolute;
    right: -20px;
    top: -75px;
    width: 210px;
    max-width: 26vw;
    z-index: 30;
    pointer-events: none;
    filter: drop-shadow(0 14px 28px rgba(42, 23, 13, 0.18));
    animation: leafFloatGentle 9s ease-in-out infinite;
    transform-origin: top right;
}

@media (min-width: 640px) {
    .decor-leaf-right {
        right: -30px;
        top: -105px;
        width: 270px;
    }
}

@media (min-width: 1024px) {
    .decor-leaf-right {
        right: -40px;
        top: -130px;
        width: 330px;
    }
}

.decor-leaf-bottom-left {
    position: absolute;
    left: -30px;
    bottom: -20px;
    width: 200px;
    max-width: 24vw;
    z-index: 20;
    pointer-events: none;
    filter: drop-shadow(0 10px 20px rgba(42, 23, 13, 0.15));
    animation: leafFloatGentle 10s ease-in-out infinite;
    transform-origin: bottom left;
}

@media (min-width: 768px) {
    .decor-leaf-bottom-left {
        left: -40px;
        bottom: -30px;
        width: 260px;
    }
}

.decor-leaf-bottom-right {
    position: absolute;
    right: -30px;
    bottom: -20px;
    width: 200px;
    max-width: 24vw;
    z-index: 20;
    pointer-events: none;
    filter: drop-shadow(0 10px 20px rgba(42, 23, 13, 0.15));
    animation: leafFloatSlow 9.5s ease-in-out infinite;
    transform-origin: bottom right;
}

@media (min-width: 768px) {
    .decor-leaf-bottom-right {
        right: -40px;
        bottom: -30px;
        width: 260px;
    }
}

/* Delicate Botanical Golden Art Leafs */
.decor-art-leaf {
    pointer-events: none;
    user-select: none;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}



