/* Comic Relief Font Face Declarations */
@font-face {
    font-family: "Comic Relief";
    src: url('../fonts/ComicRelief-Bold.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Comic Relief";
    src: url('../fonts/ComicRelief-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

.comic-relief-regular {
    font-family: "Comic Relief", "Comic Relief", system-ui, -apple-system, sans-serif;
    font-weight: 400;
    font-style: normal;
}

.comic-relief-bold {
    font-family: "Comic Relief", "Comic Relief", system-ui, -apple-system, sans-serif;
    font-weight: 700;
    font-style: normal;
}

/* CSS Variables - Easy to change site-wide colors */
:root {
    --section-bg-color: rgb(255, 253, 249); /* Main background color for sections (white by default) */
    --review-card-bg-color: #f9fafb; /* Background color for review cards (light gray by default) */
}

* {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--section-bg-color) !important;
    background: var(--section-bg-color) !important;
}

/* Performance: Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .float-animation,
    .pulse-animation,
    .glow-effect,
    .morph-animation,
    .animated-bg,
        animation: none !important;
    }
}

/* Performance: Reduce blur intensity on mobile devices */
@media (max-width: 768px) {
    .blur-xl {
        filter: blur(8px) !important; /* Further reduced for mobile performance */
    }
    
    /* Disable heavy background animations on mobile to prevent overheating */
    /* Keep morph-animation for image cutouts as requested */
    .float-animation {
        animation: none !important;
    }
    
    /* Slightly slow down morph animation on mobile for better performance */
    .morph-animation {
        animation-duration: 12s !important; /* Slower = less CPU usage */
    }
    
    /* Reduce shimmer animation frequency */
    .animate-shimmer {
        animation-duration: 6s !important;
    }
}

/* Performance mode: Disable animations on low-end devices */
@media (prefers-reduced-motion: reduce) {
    .float-animation,
    .pulse-animation,
    .glow-effect,
    .morph-animation,
    .animated-bg,
    .walking-character {
        animation: none !important;
    }
}

section {
    margin-top: 0rem;
    margin-bottom: 0rem;
}

section:last-child {
    margin-bottom: 0;
}

/* Extra spacing for main content sections */
#scheduleSeciton {
    /* padding-bottom: 8rem; */
}

#scheduleSection {
    position: relative;
    top: -1px;
    padding-bottom: 5rem !important;
}

/* Hide scheduleSection when disabled */
#scheduleSection.disabled {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

#calendarSection {
    padding-bottom: 5rem !important;
}

/* Fix date span heights in calendar section to be consistent */
#calendarSection .fib-lg.fib-semibold,
#calendarSection .fib-lg.fib-bold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* min-height: 88px; */
    /* height: 88px; */
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.75rem; /* Between fib-md (1.313rem) and fib-lg (2.125rem) */
}

/* Past drops scrollable container */
.past-drops-scrollable {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Schedule items - base styling */
.schedule-item {
    margin-bottom: 1rem;
    transition: transform 0.2s ease;
}

.schedule-item:hover {
    transform: translateY(-2px);
}

/* Enhanced schedule items (upcoming/current only) - 300px height */
.schedule-item[data-status="upcoming"],
.schedule-item[data-status="live"] {
    min-height: 300px;
}

#liveDropSection,
#discoverSection,
#reviewsSection,
#instagramSection {
    padding-top: 8rem;
    padding-bottom:16rem;
}

/* Reviews section - match bottom padding to top on laptop/desktop */
#reviewsSection {
    padding-bottom: 8rem;
}

/* Apply section background color variable */
#liveDropSection,
#discoverSection,
#scheduleSection,
#reviewsSection,
#faqSection {
    background-color: var(--section-bg-color) !important;
    background: var(--section-bg-color) !important; /* Override any gradient backgrounds */
}

/* Q&A Images Horizontal Scroll */
#qandaImagesContainer {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#qandaImagesContainer::-webkit-scrollbar {
    display: none;
}

#qandaImagesContainer img {
    max-height: 80vh;
    object-fit: contain;
}

#qandaImagesContainer > div {
    overflow: hidden;
    max-height: 80vh;
}

/* eBay Images Horizontal Scroll - Merch Section */
#ebayImagesContainer {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#ebayImagesContainer::-webkit-scrollbar {
    display: none;
}

#ebayImagesContainer img {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    object-position: center;
}

#ebayImagesContainer > div {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
}

#ebayImagesContainer > div > a {
    width: fit-content;
    max-width: 100%;
    display: block;
}

/* On mobile, ensure images maintain aspect ratio with responsive height */
@media (max-width: 768px) {
    #ebayImagesContainer img {
        max-height: 35vh !important;
        max-width: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        object-position: center;
    }
}

/* On very small mobile devices, reduce height further */
@media (max-width: 480px) {
    #ebayImagesContainer img {
        max-height: 30vh !important;
    }
}

/* Ensure liveDropSection is visible by default when enabled */
#liveDropSection:not(.disabled) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Hide liveDropSection when disabled */
#liveDropSection.disabled {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Instagram section - use solid section bg color */
#instagramSection {
    background-color: var(--section-bg-color) !important;
    background: var(--section-bg-color) !important; /* Override any gradient backgrounds */
}

/* Body background uses section background color variable */
body.bg-white {
    background-color: var(--section-bg-color) !important;
    background: var(--section-bg-color) !important;
}

/* Review card background color variable */
.review-card {
    background-color: var(--review-card-bg-color) !important;
    background: var(--review-card-bg-color) !important; /* Override any gradient backgrounds */
}

/* Hero section arc and rectangle use section background color */
#heroSection svg path[fill="white"],
#heroSection svg path {
    fill: var(--section-bg-color);
}

#heroSection > div:last-child > div[style*="background-color: white"],
#calendarSection > div[style*="background-color: white"] {
    background-color: var(--section-bg-color) !important;
}

/* Fibonacci Typography Hierarchy */
/* Base: 1rem (16px) - Fibonacci: 1 */
/* Sequence: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144 */
/* In rem: 0.5, 0.625, 0.813, 1, 1.313, 2.125, 3.438, 5.563, 9 */

/* Typography Scale */
.fib-base { font-size: 1rem; } /* 16px - Body text */
.fib-sm { font-size: 0.813rem; } /* 13px - Small text, captions */
.fib-md { font-size: 1.313rem; } /* 21px - Subheadings, buttons */
.fib-lg { font-size: 2.125rem; } /* 34px - H3, section titles */
.fib-xl { font-size: 3.438rem; } /* 55px - H2, major sections */
.fib-2xl { font-size: 5.563rem; } /* 89px - H1, hero titles */
.fib-3xl { font-size: 9rem; } /* 144px - Display, super hero */

/* Font Weight Hierarchy */
.fib-light { font-weight: 300; }
.fib-normal { font-weight: 400; }
.fib-medium { font-weight: 500; }
.fib-semibold { font-weight: 600; }
.fib-bold { font-weight: 700; }
.fib-black { font-weight: 900; }

/* Line Height for Fibonacci */
.fib-base { line-height: 1.618; } /* Golden ratio */
.fib-sm { line-height: 1.5; }
.fib-md { line-height: 1.618; }
.fib-lg { line-height: 1.3; }
.fib-xl { line-height: 1.2; }
.fib-2xl { line-height: 1.1; }
.fib-3xl { line-height: 1; }

/* Removed gradient animations */

/* Optimized: Removed unused animations (gradientRotate, rotateIn, particle, slideUp, zoomIn) */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

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

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

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.5); }
    50% { box-shadow: 0 0 40px rgba(245, 158, 11, 0.8), 0 0 60px rgba(245, 158, 11, 0.4); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}


@keyframes morph {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animated Background - Removed gradient */
.animated-bg {
    background: #f59e0b;
}

/* Floating Animation - Pause when not visible to save CPU/GPU */
.float-animation {
    animation: float 6s ease-in-out infinite;
    animation-play-state: paused;
}
.float-animation.visible {
    animation-play-state: running;
}

/* Pulse Animation - Pause when not visible */
.pulse-animation {
    animation: pulse 3s ease-in-out infinite;
    animation-play-state: paused;
}
.pulse-animation.visible {
    animation-play-state: running;
}

/* Glow Effect - Pause when not visible */
.glow-effect {
    animation: glow 2s ease-in-out infinite;
    animation-play-state: paused;
}
.glow-effect.visible {
    animation-play-state: running;
}

/* Text Glow - Optimized */
.text-glow {
    text-shadow: 0 0 15px rgba(245, 158, 11, 0.6), 0 0 25px rgba(255, 255, 255, 0.5), 0 0 35px rgba(255, 255, 255, 0.3);
}

/* Morph Animation - Pause when not visible */
.morph-animation {
    animation: morph 8s ease-in-out infinite;
    animation-play-state: paused;
}
.morph-animation.visible {
    animation-play-state: running;
}

/* Scroll Reveal Classes */
.reveal {
    opacity: 1;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Exclude hero title from reveal animation */
#heroSection .hero-title.reveal,
#heroSection .hero-title.reveal.active,
#heroSection .hero-title.reveal.fadeInDown,
#heroSection .hero-title.reveal.fadeInDown.active {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Hover Effects - Only on devices that support hover */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) {
    .hover-lift:hover {
        transform: translateY(-10px) scale(1.02);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    }

    .hover-glow:hover {
        box-shadow: 0 0 30px rgba(245, 158, 11, 0.6);
        transform: scale(1.05);
    }

    .hover-rotate:hover {
        transform: rotate(5deg) scale(1.1);
    }
}

/* Removed gradient-text class - use regular text colors instead */

/* Navbar Animation */
.nav-blur {
    background: #ffffff;
    transition: all 0.3s ease;
}

/* Hamburger Menu Styles */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    z-index: 100;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #374151;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    z-index: 99;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding-top: 160px;
    overflow-y: auto;
    pointer-events: none; /* Don't block touches when closed (checkout, etc.) */
}

.mobile-menu.active {
    transform: translateX(0);
    pointer-events: auto;
}

/* Mobile Menu Logo - Top Left, Bigger */
.mobile-menu-logo {
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 120px;
    z-index: 100;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
    /* Remove all interaction effects */
    pointer-events: auto;
    /* Remove any default link styles that might cause movement */
    text-decoration: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
    /* Remove padding and margin */
    padding: 0;
    margin: 0;
    /* Circle cutout */
    border-radius: 50%;
    overflow: hidden;
}

.mobile-menu.active .mobile-menu-logo {
    opacity: 1;
    transform: translateX(0);
    margin: 2rem;
}

/* Prevent any hover, active, or touch effects that cause movement */
.mobile-menu-logo:hover,
.mobile-menu-logo:active,
.mobile-menu-logo:focus {
    /* No transform changes on interaction - keep current position */
    transform: translateX(-20px) !important;
    scale: 1 !important;
}

.mobile-menu.active .mobile-menu-logo:hover,
.mobile-menu.active .mobile-menu-logo:active,
.mobile-menu.active .mobile-menu-logo:focus {
    /* When menu is active, keep at translateX(0) - no movement on interaction */
    transform: translateX(0) !important;
    scale: 1 !important;
}

/* Prevent touch effects on mobile - no movement on tap */
@media (hover: none) and (pointer: coarse) {
    .mobile-menu-logo:active {
        transform: translateX(-20px) !important;
        scale: 1 !important;
    }
    
    .mobile-menu.active .mobile-menu-logo:active {
        transform: translateX(0) !important;
        scale: 1 !important;
    }
}

.mobile-menu-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* Circle cutout for image */
    border-radius: 50%;
    /* Prevent image movement on interaction */
    pointer-events: none;
    /* Prevent any transforms on the image */
    transform: none !important;
    /* Remove any default image spacing */
    display: block;
    padding: 0;
    margin: 0;
}

.mobile-menu a {
    display: block;
    padding: 20px 30px;
    font-size: 1.313rem;
    color: #374151;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-weight: 500;
}

/* Desktop nav divider styling */
.desktop-nav > div[class*="bg-gray"] {
    display: block;
    width: 2px;
    height: 24px;
    background-color: #9ca3af !important;
    flex-shrink: 0;
    margin: 0 4px;
}

/* Mobile menu link with darker divider (for Instagram and Q&A/Account) */
.mobile-menu-link-dark-divider {
    border-bottom: 1px solid #9ca3af !important;
}

/* Exclude logo from mobile menu link padding */
.mobile-menu a.mobile-menu-logo {
    padding: 0 !important;
    border-bottom: none !important;
}

@media (hover: hover) {
    .mobile-menu a:hover {
        background: rgba(245, 158, 11, 0.1);
        color: #f59e0b;
        padding-left: 40px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-menu {
        display: block;
    }

    /* Ensure announcement bar is fully visible on mobile */
    #announcementBar {
        z-index: 60 !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        min-height: auto !important;
        padding: 0.5rem 0 !important;
    }

    #navigationBar {
        /* top is controlled dynamically by JavaScript based on announcement bar visibility */
        z-index: 50 !important;
    }

    /* Make navbar thinner on mobile */
    #navigationBar .container > div {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    #navigationBar .hamburger {
        padding: 4px !important;
    }

    #navigationBar .hamburger span {
        width: 20px !important;
        height: 2px !important;
        margin: 2px 0 !important;
    }

    /* Reduce logo/brand size on mobile */
    #navigationBar .text-xl,
    #navigationBar .text-2xl {
        font-size: 1rem !important;
    }

    /* Show walking character on mobile navbar */
    .walking-character {
        display: block;
        max-width: 60px;
        animation-name: walkAcross;
    }

    /* Adjust hero section */
    /* #heroSection {
        min-height: 70vh;
        padding-top: 96px;
        padding-left: 1rem;
        padding-right: 1rem;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    } */

    /* Ensure hero title fits on mobile */
    #heroSection .container {
        width: 90% !important;
        max-width: 90vw !important;
        margin-left: auto;
        margin-right: auto;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        box-sizing: border-box;
        --hero-base-size: clamp(3.5rem, 10vw, 9rem) !important;
    }

    #heroSection .hero-title {
        flex-wrap: nowrap !important;
        gap: 0.5rem !important;
        padding: 0 0.5rem;
        white-space: nowrap;
    }

    /* Adjust blur circle for mobile */
    .hero-text-wrapper {
        /* padding: 1.5rem; */
    }

    /* .hero-blur-circle - REMOVED */

    /* Adjust text sizes - Fibonacci responsive */
    h1 {
        font-size: 3.438rem !important; /* fib-xl */
        line-height: 1.2;
    }

    /* Ensure hero section maintains ratio at all screen sizes - override general h1 rule */
    #heroSection .container h1.hero-title {
        font-size: var(--hero-base-size) !important;
    }

    #heroSection .container p:first-of-type {
        font-size: calc(var(--hero-base-size) * var(--hero-subtitle-ratio)) !important;
    }

    #heroSection .container p:nth-of-type(2) {
        font-size: calc(var(--hero-base-size) * var(--hero-subtitle2-ratio)) !important;
    }

    h2 {
        font-size: 2.125rem !important; /* fib-lg */
    }

    h3 {
        font-size: 1.313rem !important; /* fib-md */
    }

    /* Ensure hero section maintains ratio at all screen sizes - override general h1 rule */
    #heroSection .container.relative.z-10 h1.hero-title {
        font-size: var(--hero-base-size) !important;
    }

    #heroSection .container.relative.z-10 p.reveal.fadeInDown {
        font-size: calc(var(--hero-base-size) * var(--hero-subtitle-ratio)) !important;
    }

    #heroSection .container.relative.z-10 p.reveal.fadeInUp {
        font-size: calc(var(--hero-base-size) * var(--hero-subtitle2-ratio)) !important;
    }

    /* Force Comic Relief font in hero section on mobile */
    #heroSection .hero-title,
    #heroSection .hero-title span,
    #heroSection .comic-relief-hero,
    #heroSection .comic-relief-bold,
    #heroSection p.comic-relief-hero,
    #heroSection h1.comic-relief-hero {
        font-family: "Comic Relief", "Comic Relief", system-ui, -apple-system, sans-serif !important;
        font-weight: 700 !important;
    }

    /* Kiwi Maru font for hero section when Japanese language is selected (mobile) */
    #heroSection[data-lang="ja"] .hero-title,
    #heroSection[data-lang="ja"] .hero-title span,
    #heroSection[data-lang="ja"] .comic-relief-hero,
    #heroSection[data-lang="ja"] .comic-relief-bold,
    #heroSection[data-lang="ja"] p.comic-relief-hero,
    #heroSection[data-lang="ja"] h1.comic-relief-hero {
        font-family: "Kiwi Maru", serif !important;
        font-weight: 400 !important;
        font-style: normal !important;
    }

    /* Grid adjustments */
    .grid {
        gap: 1rem;
    }

    /* Keep flavor selection grids as 2x2 on mobile */
    #fourFlavorGrid,
    #twoPairFlavorGrid,
    #fourOfAKindFlavorGrid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Padding adjustments */
    section:not(.account-section-container) {
        padding: 0rem 0rem !important;
    }

    section:not(#heroSection, #faqSection) {
        margin-bottom: 5rem !important;
    }

    section:last-child {
        margin-bottom: 0 !important;
    }

    /* Button adjustments */
    .btn-futuristic {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }

    /* Card adjustments */
    .card-3d {
        margin-bottom: 1rem;
    }

    /* Instagram horizontal scroll - keep on mobile */
    #instagramContainer {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Review cards */
    .review-card {
        margin-bottom: 0;
    }

    /* Reviews scroll container on mobile */
    .reviews-scroll-container {
        gap: 1rem;
    }

    .reviews-scroll-container .review-card {
        min-width: 280px;
        width: 280px;
    }

    /* Discover section */
    #discoverSection .grid {
        gap: 2rem;
    }

    /* Discover image aspect ratio for mobile - 2:1 horizontal */
    #discoverSection .discover-image-container {
        aspect-ratio: 3/2 !important; /* 2:1 horizontal ratio */
    }

    /* Footer adjustments */
    footer .grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    /* Container padding */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    #faqSection .container {
        padding-bottom: 6rem;
    }
}

/* Disabled button styles */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

@media (hover: hover) {
    button:disabled:hover {
        transform: none !important;
        scale: 1 !important;
    }
}

/* Disabled flavor buttons should still show selected state */
.flavor-btn:disabled {
    opacity: 1;
    cursor: default;
}

/* Flavor button selected state - match Four Flavor grid colors exactly */
.flavor-btn.selected {
    border-color: #d97706 !important; /* amber-600 */
    background-color: #fffbeb !important; /* amber-50 */
    color: #b45309 !important; /* amber-700 */
}

/* Remove tap highlight on mobile */
.flavor-btn {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

/* Immediate visual feedback on touch for flavor buttons - override transition-all */
.flavor-btn:active,
.flavor-btn.touching {
    border-color: #f59e0b !important; /* amber-500 for immediate feedback */
    background-color: #fef3c7 !important; /* amber-50 */
    color: #d97706 !important; /* amber-700 */
    transform: scale(0.98) !important;
    transition: border-color 0s !important, background-color 0s !important, color 0s !important, transform 0.1s !important; /* Instant color change, quick scale */
}

.flavor-btn.selected:active,
.flavor-btn.selected.touching {
    border-color: #d97706 !important; /* amber-600 */
    background-color: #fffbeb !important; /* amber-50 */
    color: #b45309 !important; /* amber-700 */
    transform: scale(0.98) !important;
    transition: border-color 0s !important, background-color 0s !important, color 0s !important, transform 0.1s !important; /* Instant color change, quick scale */
}

/* Override transition-all on mobile for instant feedback */
@media (hover: none) and (pointer: coarse) {
    /* Override transition-all class from Tailwind */
    .flavor-btn.transition-all,
    .flavor-btn[class*="transition"] {
        transition: transform 0.1s !important; /* Only transition transform, not colors */
    }
    
    .flavor-btn:active,
    .flavor-btn.touching,
    .flavor-btn.transition-all:active,
    .flavor-btn.transition-all.touching {
        transition: none !important; /* No transition on active/touching for instant feedback */
        border-color: #f59e0b !important;
        background-color: #fef3c7 !important;
        color: #d97706 !important;
    }
    
    .flavor-btn.selected:active,
    .flavor-btn.selected.touching,
    .flavor-btn.selected.transition-all:active,
    .flavor-btn.selected.transition-all.touching {
        transition: none !important;
        border-color: #d97706 !important;
        background-color: #fffbeb !important;
        color: #b45309 !important;
    }
}

/* Ensure selected state is always visible */
.flavor-btn.selected {
    border-color: #d97706 !important; /* amber-600 */
    background-color: #fffbeb !important; /* amber-50 */
    color: #b45309 !important; /* amber-700 */
}

/* Add to Cart button active state for immediate mobile feedback */
button.bg-amber-600:active,
#twoPairAddToCart:active,
#fourOfAKindAddToCart:active {
    background-color: #d97706 !important; /* amber-700 */
    transform: scale(0.98) !important;
}

/* Category and option button active states for immediate mobile feedback */
.segment-picker .category-btn.active,
.option-btn.active-option {
    border-color: #d97706 !important; /* amber-600 - orange border that persists */
    border-width: 2px !important; /* ensure border is visible */
    background-color: #fef3c7 !important; /* amber-50 */
    color: #b45309 !important; /* amber-800 - darker orange */
}

/* Immediate visual feedback for option buttons on touch */
.option-btn:active {
    border-color: #f59e0b !important; /* amber-500 - orange border */
    background-color: #fef3c7 !important; /* amber-50 */
    color: #d97706 !important; /* amber-700 */
    transition: border-color 0s !important, background-color 0s !important, color 0s !important; /* Instant color change */
}

.option-btn.active-option:active {
    border-color: #d97706 !important; /* amber-600 - darker orange for active */
    background-color: #fef3c7 !important; /* amber-50 */
    color: #b45309 !important; /* amber-700 */
    transition: border-color 0s !important, background-color 0s !important, color 0s !important; /* Instant color change */
}

/* Prevent default active state from interfering */
.segment-picker .category-btn:active:not(.active) {
    background-color: inherit !important;
    color: inherit !important;
}

/* Ensure active state is always visible when class is present */
.segment-picker .category-btn.active:active {
    background-color: #fef3c7 !important; /* amber-50 */
    color: #b45309 !important; /* amber-800 - darker orange */
    border: 2px solid #d97706 !important; /* amber-600 - orange border when selected */
}

/* Immediate visual feedback on touch for category and option buttons */
@media (hover: none) and (pointer: coarse) {
    .segment-picker .category-btn:active {
        opacity: 0.8;
    }
    
    .segment-picker .category-btn.active:active {
        opacity: 1;
    }
    
    /* Option buttons - instant orange border on touch */
    /* Override transition-all class from Tailwind */
    .option-btn.transition-all:active,
    .option-btn[class*="transition"]:active {
        border-color: #f59e0b !important; /* amber-500 - orange border */
        background-color: #fef3c7 !important; /* amber-50 */
        color: #d97706 !important; /* amber-700 */
        opacity: 1 !important;
        transition: none !important; /* No transition for instant feedback */
    }
    
    .option-btn:active {
        border-color: #f59e0b !important; /* amber-500 - orange border */
        background-color: #fef3c7 !important; /* amber-50 */
        color: #d97706 !important; /* amber-700 */
        opacity: 1 !important;
        transition: border-color 0s !important, background-color 0s !important, color 0s !important; /* Instant color change */
    }
    
    .option-btn.active-option.transition-all:active,
    .option-btn.active-option[class*="transition"]:active {
        border-color: #d97706 !important; /* amber-600 - darker orange for active */
        background-color: #fef3c7 !important; /* amber-50 */
        color: #b45309 !important; /* amber-700 */
        opacity: 1 !important;
        transition: none !important; /* No transition for instant feedback */
    }
    
    .option-btn.active-option:active {
        border-color: #d97706 !important; /* amber-600 - darker orange for active */
        background-color: #fef3c7 !important; /* amber-50 */
        color: #b45309 !important; /* amber-700 */
        opacity: 1 !important;
        transition: border-color 0s !important, background-color 0s !important, color 0s !important; /* Instant color change */
    }

    /* Ensure active-option state persists after touch ends */
    .option-btn.active-option {
        border-color: #d97706 !important; /* amber-600 - orange border persists */
        background-color: #fef3c7 !important; /* amber-50 */
        color: #b45309 !important; /* amber-700 */
    }
}

/* Remove tap highlight on mobile for all interactive buttons */
button,
.category-btn,
.option-btn {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

/* Disable hover effects on touch devices */
@media (hover: none) and (pointer: coarse) {
    /* Prevent hover transforms and scales on touch devices */
    a:hover,
    button:hover,
    .hover-lift:hover,
    .hover-glow:hover,
    .hover-rotate:hover {
        transform: none !important;
        scale: 1 !important;
    }
    
    /* Prevent hover color changes on touch devices */
    a:hover,
    button:hover {
        background-color: inherit !important;
        color: inherit !important;
        border-color: inherit !important;
    }

    /* Ensure flavor buttons show immediate feedback on touch */
    .flavor-btn:active {
        border-color: #f59e0b !important; /* amber-500 for immediate feedback */
        background-color: #fef3c7 !important; /* amber-50 */
        color: #d97706 !important; /* amber-700 */
        transform: scale(0.98) !important;
        transition: border-color 0s, background-color 0s, color 0s, transform 0.1s !important; /* Instant color change */
    }

    .flavor-btn.selected:active {
        border-color: #d97706 !important; /* amber-600 */
        background-color: #fffbeb !important; /* amber-50 */
        color: #b45309 !important; /* amber-700 */
        transform: scale(0.98) !important;
        transition: border-color 0s, background-color 0s, color 0s, transform 0.1s !important; /* Instant color change */
    }
    }
    
    /* Disable group-hover effects */
    .group:hover * {
        transform: none !important;
        width: auto !important;
    }
}

@media (max-width: 480px) {
    /* Exclude mobile menu logo from any padding at 480px */
    .mobile-menu-logo,
    .mobile-menu-logo img {
        padding: 0 !important;
    }

    /* Ensure announcement bar is visible on small screens */
    #announcementBar {
        z-index: 60 !important;
        padding: 0.5rem 0 !important;
    }

    /* Make navbar even thinner on very small screens */
    #navigationBar .container > div {
        padding-top: 0.375rem !important;
        padding-bottom: 0.375rem !important;
    }

    /* Adjust walking character for very small screens */
    .walking-character {
        max-width: 50px;
        animation-name: walkAcross;
    }

    h1 {
        font-size: 2.125rem !important; /* fib-lg */
    }

    /* Ensure hero section maintains ratio at all screen sizes - override general h1 rule */
    #heroSection .container.relative.z-10 h1.hero-title {
        font-size: var(--hero-base-size) !important;
    }

    #heroSection .container.relative.z-10 p.reveal.fadeInDown {
        font-size: calc(var(--hero-base-size) * var(--hero-subtitle-ratio)) !important;
    }

    #heroSection .container.relative.z-10 p.reveal.fadeInUp {
        font-size: calc(var(--hero-base-size) * var(--hero-subtitle2-ratio)) !important;
    }

    /* Force Comic Relief font in hero section on very small mobile screens */
    #heroSection .hero-title,
    #heroSection .hero-title span,
    #heroSection .comic-relief-hero,
    #heroSection .comic-relief-bold,
    #heroSection p.comic-relief-hero,
    #heroSection h1.comic-relief-hero {
        font-family: "Comic Relief", "Comic Relief", system-ui, -apple-system, sans-serif !important;
        font-weight: 700 !important;
    }

    /* Kiwi Maru font for hero section when Japanese language is selected (very small mobile) */
    #heroSection[data-lang="ja"] .hero-title,
    #heroSection[data-lang="ja"] .hero-title span,
    #heroSection[data-lang="ja"] .comic-relief-hero,
    #heroSection[data-lang="ja"] .comic-relief-bold,
    #heroSection[data-lang="ja"] p.comic-relief-hero,
    #heroSection[data-lang="ja"] h1.comic-relief-hero {
        font-family: "Kiwi Maru", serif !important;
        font-weight: 400 !important;
        font-style: normal !important;
    }

    h2 {
        font-size: 1.313rem !important; /* fib-md */
    }

    #heroSection {
        min-height: 100vh;
        /* padding-bottom: -10px !important; */
        margin-bottom: 0px !important;
    }

    /* Ensure hero title fits on very small screens */
    #heroSection .container {
        width: 100% !important;
        max-width: 100vw !important;
        margin-left: auto;
        margin-right: auto;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        --hero-base-size: clamp(3rem, 9vw, 9rem) !important;
    }

    #heroSection .hero-title {
        flex-wrap: nowrap !important;
        gap: 0.25rem !important;
        padding: 0 0.25rem;
        white-space: nowrap;
    }

    /* Adjust blur circle for very small screens */
    .hero-text-wrapper {
        /* padding: 1rem; */
    }

    /* .hero-blur-circle - REMOVED */

    .mobile-menu a {
        font-size: 1rem;
        padding: 16px 24px;
    }

    /* Exclude logo from mobile menu link padding at 480px */
    .mobile-menu a.mobile-menu-logo {
        padding: 0 !important;
        border-bottom: none !important;
    }
}

/* Button Animations */
.btn-futuristic {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-futuristic::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

@media (hover: hover) {
    .btn-futuristic:hover::before {
        width: 300px;
        height: 300px;
    }
}

/* Card Animations */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

@media (hover: hover) {
    .card-3d:hover {
        transform: rotateY(5deg) rotateX(5deg) translateZ(20px);
    }
}

/* Segment Picker Styling */
.segment-picker {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    width: 100%; /* Ensure full width on mobile */
    flex-wrap: wrap; /* Allow buttons to wrap if needed on very small screens */
}

/* On mobile, allow buttons to wrap and adjust sizing */
@media (max-width: 640px) {
    .segment-picker {
        flex-wrap: nowrap; /* Keep buttons in a row but allow text wrapping inside */
    }
    
    .segment-picker .category-btn {
        padding: 0.5rem 0.5rem !important; /* Reduced horizontal padding on mobile */
        font-size: 0.875rem; /* Slightly smaller font on mobile */
    }
}

.segment-picker .category-btn {
    position: relative;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Break long words if needed */
    overflow-wrap: break-word; /* Modern property for word breaking */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    text-align: center; /* Center text when it wraps */
    line-height: 1.4; /* Better line spacing for multi-line text */
    min-width: 0; /* Allow flex items to shrink below content size */
}

.segment-picker .category-btn.active {
    background-color: #fef3c7 !important; /* amber-50 */
    color: #b45309 !important; /* amber-800 - darker orange */
    border: 2px solid #d97706 !important; /* amber-600 - orange border when selected */
    box-shadow: 0 1px 3px rgba(217, 119, 6, 0.2);
    border-radius: 0.5rem !important; /* rounded-lg to match container */
    padding: 0.5rem 0.75rem !important; /* Adjusted padding for multi-line text */
}

.segment-picker .category-btn:not(.active) {
    background-color: transparent !important;
    color: #6b7280 !important; /* gray-600 */
    border-radius: 0.5rem !important; /* rounded-lg to match container */
    padding: 0.5rem 0.75rem !important; /* Adjusted padding for multi-line text */
}

@media (hover: hover) {
    .segment-picker .category-btn:not(.active):hover {
        color: #374151 !important; /* gray-700 */
        background-color: rgba(255, 255, 255, 0.5) !important;
    }
}

/* Option Button Styling */
.option-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Override transition-all for instant feedback on active */
.option-btn.transition-all:active,
.option-btn[class*="transition"]:active {
    transition: border-color 0s !important, background-color 0s !important, color 0s !important;
}

/* Active option button - orange border persists after selection */
.option-btn.active-option,
.option-btn.active-option.border-gray-300,
.option-btn.active-option.border-amber-600 {
    border-color: #d97706 !important; /* amber-600 - orange border that persists */
    background-color: #fef3c7 !important; /* amber-50 */
    color: #b45309 !important; /* amber-700 */
}

/* Option container fade animation */
#category1Options,
#category2Options {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

#category1Options.hidden,
#category2Options.hidden {
    display: none !important;
}

#category1Options:not(.hidden),
#category2Options:not(.hidden) {
    animation: fadeInUp 0.3s ease-in-out;
}

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

/* Discover Image Container - Fixed Aspect Ratio */
.discover-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 0;
    overflow: hidden;
}

/* Discover Image Styling */
#discoverImage {
    transition: opacity 0.4s ease-in-out;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

/* Image fade animation */
#discoverImage.fade-out {
    opacity: 0;
}

#discoverImage.fade-in {
    opacity: 1;
}

/* Stagger Animation */
.stagger-item {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.5, 0, 0, 1);
}

/* Apply animation state only if explicitly set to inactive */
.stagger-item:not(.active):not(.no-animation) {
    opacity: 0.8;
    transform: translateY(5px);
}

.stagger-item.active {
    opacity: 1;
    transform: translateY(0);
}

/* Instagram Grid Animation */
.instagram-item {
    overflow: hidden;
    opacity: 1 !important;
    filter: none !important;
}

/* Reviews Section Container - Remove horizontal padding */
#reviewsSection .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Reviews Scroll Container */
.reviews-scroll-container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    overflow-x: auto;
    overflow-y: visible;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: calc(1rem + 20px);
    min-height: 200px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.reviews-scroll-container::-webkit-scrollbar {
    display: none;
}

.reviews-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.reviews-scroll-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.reviews-scroll-container .review-card {
    min-width: 300px;
    width: 300px;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Review Card Animation */
.review-card {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Animated Border */
.animated-border {
    position: relative;
    overflow: hidden;
}

.animated-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: #f59e0b;
    border-radius: inherit;
    z-index: -1;
    /* animation: gradientShift 3s ease infinite; - Removed for performance */
    opacity: 0;
    transition: opacity 0.3s;
}

@media (hover: hover) {
    .animated-border:hover::before {
        opacity: 0.1;
    }
}

/* Hero Section Special Effects */
.hero-title {
    color: #000000;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3), 0 0 12px rgba(255, 255, 255, 0.2);
}

/* Remove bottom padding from hero section */
#heroSection {
    padding-bottom: 0 !important;
}

/* Hero Background Image and Video Transitions */
#heroBackgroundImage,
#heroBackgroundVideo {
    transition: opacity 3s ease-in-out;
}

/* Comic Relief Font for Hero Section - Force font on all platforms */
.comic-relief-hero {
    font-family: "Comic Relief", "Comic Relief", system-ui, -apple-system, sans-serif !important;
    color: #000000;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3), 0 0 12px rgba(255, 255, 255, 0.2);
}

/* Ensure hero section uses Comic Relief font on all platforms */
#heroSection .hero-title,
#heroSection .hero-title span,
#heroSection .comic-relief-hero,
#heroSection .comic-relief-bold,
#heroSection p.comic-relief-hero {
    font-family: "Comic Relief", "Comic Relief", system-ui, -apple-system, sans-serif !important;
    font-weight: 700 !important;
}

/* Kiwi Maru font for hero section when Japanese language is selected */
#heroSection[data-lang="ja"] .hero-title,
#heroSection[data-lang="ja"] .hero-title span,
#heroSection[data-lang="ja"] .comic-relief-hero,
#heroSection[data-lang="ja"] .comic-relief-bold,
#heroSection[data-lang="ja"] p.comic-relief-hero {
    font-family: "Kiwi Maru", serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
}

/* Ensure hero title fits on small screens */
#heroSection .container {
    max-width: 100%;
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

#heroSection .hero-title {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.1;
    padding-left: 0;
    padding-right: 0;
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
    flex-wrap: nowrap !important;
    white-space: nowrap;
}

#heroSection .hero-title img {
    max-width: 100%;
    height: auto;
    flex-shrink: 1;
    flex-grow: 0;
    margin-left: 0;
    padding-left: 0;
    min-width: 0;
}

#heroSection .hero-title span {
    flex-shrink: 1;
    flex-grow: 0;
    min-width: 0;
    margin-right: 0;
    padding-right: 0;
    white-space: nowrap;
}

/* White blurred circle behind hero text - REMOVED */
.hero-text-wrapper {
    position: relative;
    /* padding: 2rem; */
}

/* .hero-blur-circle - REMOVED - not visible anyway */

/* Loading Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner {
    border: 3px solid rgba(245, 158, 11, 0.1);
    border-top-color: #f59e0b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Walking Character Animation - Unified for all screen sizes */
/* Moves from right (outside) to left (outside) at constant speed */
@keyframes walkAcross {
    0% {
        left: -100px;
        opacity: 1;
    }
    100% {
        left: calc(100% + 100px);
        opacity: 1;
    }
}

    .walking-character {
        position: absolute;
        top: 0;
        bottom: 0;
        height: 100%;
        width: auto;
        aspect-ratio: 1;
        max-width: 80px;
        z-index: 10;
        pointer-events: none;
        animation: walkAcross 9s linear infinite;
        animation-delay: 0s;
    }

.walking-character {
    pointer-events: auto;
    text-decoration: none;
}

.walking-character video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Ensure navbar container is relative for absolute positioning */
#navigationBar .container {
    position: relative;
}

/* Mobile Logo Styling - Centered, Circle Cutout, Above Video */
.mobile-nav-logo {
    display: none;
}

@media (max-width: 768px) {
    .mobile-nav-logo {
        display: block;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 30px;
        height: 30px;
        z-index: 20;
        border-radius: 50%;
        overflow: hidden;
        pointer-events: auto;
        background: white;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        /* Prevent any movement on touch or hover */
        -webkit-tap-highlight-color: transparent;
        tap-highlight-color: transparent;
        transition: none;
    }

    /* Prevent any transform changes on hover, active, or touch */
    .mobile-nav-logo:hover,
    .mobile-nav-logo:active,
    .mobile-nav-logo:focus {
        transform: translate(-50%, -50%) !important;
        scale: 1 !important;
    }

    /* Prevent touch effects on mobile */
    @media (hover: none) and (pointer: coarse) {
        .mobile-nav-logo:active {
            transform: translate(-50%, -50%) !important;
            scale: 1 !important;
        }
    }

    .mobile-nav-logo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        /* Prevent image movement */
        pointer-events: none;
        transform: none !important;
    }
}

/* Instagram embed styling */
.instagram-embed-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    background: transparent;
    display: block;
    flex-shrink: 0;
    width: 320px;
    min-width: 320px;
    opacity: 1 !important;
    filter: none !important;
}

/* Hide scrollbar for webkit browsers */
#instagramContainer::-webkit-scrollbar {
    display: none;
}

/* Horizontal scroll styling */
#instagramContainer {
    scroll-behavior: smooth;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
}

/* Style Instagram embeds in grid - let Instagram render naturally */
#instagramContainer .instagram-media {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    margin: 0 !important;
    display: block !important;
    vertical-align: top !important;
    border-radius: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
    filter: none !important;
}

/* Override inline styles that limit width */
#instagramContainer .instagram-media[style*="max-width"] {
    max-width: 100% !important;
}

#instagramContainer .instagram-media[style*="min-width"] {
    min-width: 100% !important;
}

/* Ensure iframes render properly */
#instagramContainer .instagram-media iframe {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    border-radius: 0 !important;
    display: block !important;
    vertical-align: top !important;
    border: none !important;
    box-shadow: none !important;
    opacity: 1 !important;
    filter: none !important;
}

/* Make sure images display properly */
#instagramContainer .instagram-media img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    vertical-align: top !important;
    opacity: 1 !important;
    filter: none !important;
}

/* Language Selector Styles */
#languageSelector {
    position: absolute;
    top: 7rem;
    right: 1rem;
    z-index: 30;
}

.lang-btn {
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

.lang-btn.active {
    background-color: rgba(245, 158, 11, 0.9) !important;
    color: white !important;
    border-color: rgba(245, 158, 11, 0.5);
    font-weight: 600;
}

@media (hover: hover) {
    .lang-btn:hover {
        background-color: rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(14px) saturate(180%);
        -webkit-backdrop-filter: blur(14px) saturate(180%);
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

@media (max-width: 768px) {
    #languageSelector {
        top: 6.5rem; /* Below announcement bar + nav bar on mobile */
        right: 0.5rem;
        gap: 0.5rem;
    }

    .lang-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    #languageSelector {
        top: 6.2rem;
        right: 0.5rem;
    }

    .lang-btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.688rem;
    }
}

/* Footer visibility fixes */
#footerSection-root {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    position: relative !important;
    z-index: 10 !important;
}

#footerSection {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    position: relative !important;
    background: rgb(252, 250, 245) !important;
    color: #000000 !important;
    min-height: 200px !important;
    z-index: 10 !important;
}

/* Force footer reveal elements to be visible */
#footerSection .reveal,
#footerSection .reveal-left,
#footerSection .reveal-right,
#footerSection .reveal-scale,
#footerSection .fadeInUp {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

#footerSection .reveal.active,
#footerSection .reveal-left.active,
#footerSection .reveal-right.active,
#footerSection .reveal-scale.active {
    opacity: 1 !important;
    transform: none !important;
}

#footerSection * {
    visibility: visible !important;
}

#footerSection *:not(script):not(style) {
    opacity: 1 !important;
}

/* Ensure footer titles are dark */
#footerSection h3 {
    color: #111827 !important; /* gray-900 - darkest gray */
}

/* Ensure all footer text is dark */
#footerSection p,
#footerSection a,
#footerSection li {
    color: #000000 !important; /* black - darkest color */
}

/* Allow hover state to override for links */
#footerSection a:hover {
    color: #f59e0b !important; /* amber-500 for hover */
}

/* Ensure Initialize Firestore Database button is clickable */
#initializeFirestoreButton:not(:disabled) {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Account navigation button active state - ensure it overrides hover */
.account-nav-btn.bg-amber-50 {
    background-color: #fffbeb !important; /* amber-50 */
    color: #b45309 !important; /* amber-700 */
    border-color: #d97706 !important; /* amber-600 */
}

.account-nav-btn.bg-amber-50:hover {
    background-color: #fef3c7 !important; /* amber-100 */
    color: #b45309 !important; /* amber-700 */
    border-color: #d97706 !important; /* amber-600 */
}

/* Ensure Sign Out button is right-aligned */
#signOutButton {
    text-align: right !important;
    justify-content: flex-end !important;
}

/* Ensure account section dividers have visible padding */
.account-section:not(.hidden) > div.border-t {
    padding-top: 1.5rem !important; /* pt-6 - 24px */
    /* padding-bottom: 1.5rem !important; pb-6 - 24px */
}

/* Ensure spacing is visible when section is shown */
.account-section:not(.hidden) {
    margin-top: 1.5rem !important;
    /* margin-bottom: 1.5rem !important; */
}

/* Custom Radio Button Styling - Border and Background Color */
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    opacity: 0;
    position: absolute;
}

/* Style the label container for radio buttons - override existing border and add background */
label:has(input[type="radio"]) {
    position: relative;
    transition: all 0.2s ease;
}

/* Remove margin from hidden radio input's container effect */
label:has(input[type="radio"]) input[type="radio"] {
    margin-right: 0 !important;
}

/* Hover state - enhance existing hover */
label:has(input[type="radio"]):hover {
    border-color: #d1d5db !important;
}

/* Selected/Checked state - change border color and add background */
label:has(input[type="radio"]:checked) {
    border-color: #d97706 !important;
    background-color: #fef3c7 !important;
}

/* Focus state for accessibility */
label:has(input[type="radio"]:focus-within) {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

/* iOS Safe Area Utilities */
.h-safe-area-bottom {
    height: env(safe-area-inset-bottom, 0);
}

/* Touch manipulation for better mobile interaction */
.touch-manipulation {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Checkout time slot - ensure touchable above overlapping elements */
#pickupTimeSlotSection {
    position: relative;
    z-index: 5;
}

#pickupTimeSlotsGrid {
    touch-action: manipulation;
}

/* Checkout time slot and date picker - mobile touch optimization */
@media (max-width: 640px) {
    .checkout-time-slot-btn {
        min-height: 48px !important;
    }

    .checkout-date-select {
        min-height: 48px !important;
        font-size: 16px !important; /* Prevents iOS zoom on focus */
    }

    #pickupTimeSlotsGrid {
        gap: 12px !important;
    }
}

/* Shake animation for input validation errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}
