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

/* Global Design Tokens & Layout Config */
:root {
    --nav-height-mobile: 80px;
    --nav-height-desktop: 90px;
}

/* Base resets & layout */
html {
    scroll-behavior: smooth;
    height: auto;
    overflow-x: hidden !important;
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden !important;
    overflow-y: auto;
}

/* Empêcher le débordement horizontal sur tous les éléments */
* {
    box-sizing: border-box;
}

/* Fix spécifique pour les formulaires de filtres */
@media (max-width: 768px) {
    form.flex.flex-wrap,
    form.flex.flex-col {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Centrer les filtres dans la page des réservations */
    .max-w-4xl.mx-auto {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Centrer la barre des filtres */
    .flex.flex-wrap.items-center.gap-3 {
        justify-content: center !important;
    }
}

/* Global Layout Nodes */
/* Les headers utilisent 'sticky' via Tailwind. Ce bloc CSS ne force plus de position */
/* pour éviter le double-espace entre header et contenu. */
header.system-header,
header.dashboard-header,
.client-header,
.admin-header {
    flex-shrink: 0;
    position: fixed !important;
    top: 0 !important;
    z-index: 9999 !important;
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    transition: all 0.3s ease;
}

@media (min-width: 1024px) {
    .admin-header,
    .client-header {
        left: var(--sidebar-width) !important;
        width: calc(100% - var(--sidebar-width)) !important;
    }
}

/* Force le header à rester collé, même sur la page d'accueil */
#main-header {
    position: fixed !important;
    top: 0 !important;
    z-index: 9999 !important;
}

/* Fixer la section droite (profil, notifications) à droite du header */
header .flex.items-center.gap-4:last-child,
header .flex.items-center.gap-2:last-child,
header .flex.items-center.gap-2.sm\:gap-4:last-child,
#main-header .flex.items-center.gap-4:last-child,
#main-header .flex.items-center.gap-2:last-child,
#main-header .flex.items-center.gap-2.sm\:gap-4:last-child,
.admin-header .flex.items-center.gap-4:last-child,
.admin-header .flex.items-center.gap-2:last-child,
.admin-header .flex.items-center.gap-2.sm\:gap-4:last-child {
    margin-left: auto !important;
    margin-right: 0 !important;
    padding-right: 0 !important;
    flex-shrink: 0 !important;
    position: relative !important;
    right: 0 !important;
}

/* Ajouter un padding constant à droite du header pour compenser et aligner parfaitement */
header, #main-header, .admin-header {
    padding-right: 1rem !important;
}

/* Assurer que la lightbox est au-dessus de TOUT (header, sidebar, modales...) */
#serviceLightbox, #modeleLightbox {
    z-index: 99999 !important;
}

/* Faire en sorte que le header prenne TOUTE la largeur en mobile */
@media (max-width: 1023px) {
    header, #main-header, #cuisinier-header, #etablissement-header, #marchand-header, #livreur-header, #responsable-header {
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        box-sizing: border-box !important;
    }
}

/* Assurer que la sidebar client/admin est au-dessus du header en desktop */
@media (min-width: 1024px) {
    .sidebar {
        z-index: 99999 !important;
    }
}

/* Sur écrans larges, client et admin headers sont décalés pour ne pas superposer le sidebar */
@media (min-width: 1024px) {
    header.client-header,
    header.admin-header,
    .dashboard-header.client-header,
    .dashboard-header.admin-header,
    #cuisinier-header,
    #etablissement-header,
    #marchand-header,
    #livreur-header,
    #responsable-header {
        left: var(--sidebar-width) !important;
        width: calc(100% - var(--sidebar-width)) !important;
        max-width: calc(100% - var(--sidebar-width)) !important;
        right: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Ajout d'un espace en haut du main pour compenser le header fixe */
main {
    flex-grow: 1;
    margin-top: 0 !important;
}

/* Global Layering System (Z-Index Fix) */
/* ------------------------------------ */
/* Goal: Standardize stacking to prevent content from 'traversing' fixed elements. */

nav.fixed,
header.fixed,
.mobile-nav-container {
    z-index: 1100 !important;
}

/* Level 2: Overlays (Search, Sidebar) */
#sidebarOverlay,
.search-overlay,
#notification-global-dropdown {
    z-index: 9998 !important;
}

/* Level 3: Sidebars, Modals & Floating Menus */
.sidebar,
.modal,
.toast-container,
#profileMenu {
    z-index: 9999 !important;
}



/* Animations de texte */
.animated-text {
    background: linear-gradient(90deg,
            #893612 0%,
            #bf8c2a 20%,
            #8f7009 40%,
            #893612 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShimmer 4s linear infinite;
    display: inline-block;
    padding-right: 0.1em;
}

@keyframes textShimmer {
    to {
        background-position: 200% center;
    }
}

/* Premium Text Reveal Animation */
.premium-reveal-container {
    perspective: 1000px;
}

.reveal-word {
    opacity: 0;
    transform: translateY(30px) rotateX(-20deg);
    animation: revealUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes revealUp {
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

/* Aurora Background Orbs */
.aurora-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.aurora-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: auroraFloat 20s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: #893612;
    top: -10%;
    left: -10%;
    animation-duration: 25s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: #8f7009;
    bottom: -10%;
    right: -10%;
    animation-duration: 30s;
    animation-delay: -5s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: #4a4a4a;
    top: 40%;
    left: 40%;
    animation-duration: 22s;
    animation-delay: -10s;
}

@keyframes auroraFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(100px, 150px) scale(1.2);
    }
}

/* App Name Brand Animation - Shadow-free & Design Underline */
.app-name-brand {
    position: relative;
    display: inline-block;
    color: var(--primary-color, #893612);
    animation: brandSubtlePulse 4s ease-in-out infinite;
}

.app-name-brand::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #893612, #bf8c2a, #8f7009);
    transition: width 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-word.visible .app-name-brand::after {
    width: 100%;
}

@keyframes brandSubtlePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
        opacity: 0.9;
    }
}

/* Generalized Sparkle Card Utility */
.spark-card {
    position: relative;
    background: #fff;
    border-radius: 1.25rem;
    /* Reduced from 1.5rem */
    padding: 1.5px;
    /* Thinner border */
    overflow: hidden;
    z-index: 1;
    height: 100%;
}

.spark-card::before {
    content: '';
    position: absolute;
    inset: -150%;
    background: conic-gradient(transparent,
            transparent,
            transparent,
            rgba(137, 54, 18, 0.6),
            rgba(143, 112, 9, 0.6),
            transparent,
            transparent);
    animation: rotateSpark 5s linear infinite;
    z-index: -1;
}

.spark-card::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: #fff;
    border-radius: 1.4rem;
    z-index: -1;
}

/* Specific for Video to keep its black background */
.video-premium-container.spark-card::after {
    background: #000;
}

@keyframes rotateSpark {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Optimization for Hero Section */
@media (max-width: 768px) {
    section.relative.overflow-hidden.min-h-\[60vh\] {
        min-height: auto !important;
        padding-top: 5rem !important;
        padding-bottom: 3rem !important;
    }

    .premium-reveal-container {
        padding: 0 1rem !important;
        gap: 0.4rem !important;
    }

    h1.text-4xl.md\:text-7xl {
        font-size: 2.25rem !important;
        /* 4xl equivalent or slightly smaller */
        line-height: 1.2 !important;
    }

    h1 .animated-text {
        font-size: 2.5rem !important;
        /* md:text-7xl reduced */
    }

    .space-y-4>*+* {
        margin-top: 0.75rem !important;
    }
}

.animated-text-slow {
    background: linear-gradient(90deg,
            #893612 0%,
            #8f7009 50%,
            #893612 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient 6s ease infinite;
}

/* Effet de glitch */
.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch-text::before {
    color: #893612;
    z-index: -1;
    animation: glitch 3s infinite;
}

.glitch-text::after {
    color: #8f7009;
    z-index: -2;
    animation: glitch 3s infinite reverse;
}

/* Cards avec effet de bordure animée */
.animated-border-card {
    position: relative;
    border: 2px solid transparent;
    border-radius: 1rem;
    background: linear-gradient(white, white) padding-box,
        linear-gradient(90deg, #893612, #8f7009, #893612) border-box;
    background-size: 200% 100%;
    animation: borderFlow 4s linear infinite;
    transition: transform 0.3s ease;
}

.animated-border-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(137, 54, 18, 0.1);
}

/* Effet de brillance */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: rotate(30deg);
    animation: shine 3s infinite;
}

/* Glassmorphism Utility */
.glass-card {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 16px 0 rgba(137, 54, 18, 0.03);
    /* Reduced shadow */
    transition: all 0.4s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(137, 54, 18, 0.1);
}

/* Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.scroll-reveal.visible,
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

.animate-fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

/* Premium Reveal Animation - Word by Word */
.premium-reveal-container {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    max-width: 100%;
    padding: 0 2rem;
}

.reveal-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-word.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-icon-floating {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%) translateZ(0);
    width: 80px;
    height: 80px;
    z-index: 10;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 15px rgba(137, 54, 18, 0.3));
}

@keyframes glideReveal {
    0% {
        left: -50px;
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    25% {
        left: 100%;
        opacity: 1;
    }

    30% {
        left: 120%;
        opacity: 0;
    }

    100% {
        left: 120%;
        opacity: 0;
    }
}

.elegant-serif {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
}

/* Video Container Style with Spark Border */
.video-premium-container {
    position: relative;
    border-radius: 2.5rem;
    background: #000;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4px;
    /* Space for the spark border */
    overflow: hidden;
    z-index: 1;
}

.video-premium-container::before {
    content: '';
    position: absolute;
    inset: -200%;
    background: conic-gradient(transparent,
            transparent,
            transparent,
            #893612,
            #8f7009,
            transparent,
            transparent);
    animation: rotateSpark 4s linear infinite;
    z-index: -1;
}

.video-premium-container::after {
    content: '';
    position: absolute;
    inset: 4px;
    background: #000;
    border-radius: 2.3rem;
    z-index: -1;
}

@keyframes rotateSpark {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.video-content-wrapper {
    position: relative;
    border-radius: 2.2rem;
    overflow: hidden;
    height: 100%;
    min-height: 400px;
    /* Base height for mobile */
}

@media (min-width: 768px) {
    .video-content-wrapper {
        min-height: 600px;
        /* Increased height for desktop */
    }
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.8));
    pointer-events: none;
}

/* Menu 3D Cards */
.feature-card-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.feature-card-3d:hover {
    transform: rotateX(5deg) rotateY(5deg);
}

/* Particle background */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: linear-gradient(135deg, #893612, #8f7009);
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite;
}

/* Texte avec animation de typing */
.typing-animation {
    overflow: hidden;
    border-right: 3px solid #893612;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: #893612
    }
}

/* Menu Item Underline Animation */
.menu-item {
    position: relative;
    padding-bottom: 4px;
}

.menu-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #893612, #8f7009);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.5, 0, 0, 1);
}

.menu-item:hover::after,
.menu-item.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Scrollbar Hiding */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Premium Scroll Mask */
.scroll-mask {
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

/* Elegant Serif Font Helper */
.elegant-serif {
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

.animated-text-gradient {
    background: linear-gradient(135deg, #893612, #8f7009, #893612);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 5s ease infinite;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Boutons avec effet de pulse */
.btn-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(137, 54, 18, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(137, 54, 18, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(137, 54, 18, 0);
    }
}

/* Stat counter animation */
.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #893612, #8f7009);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    animation: countUp 2s ease-out;
}

/* Loader personnalisé */
.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(137, 54, 18, 0.1);
    border-top-color: #893612;
    border-right-color: #8f7009;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Ecosystem Bento Grid Animations */
.hover-magnetic {
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

.hover-magnetic:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 30px 60px -15px rgba(137, 54, 18, 0.15);
    z-index: 10;
}

/* Effet de vague pour les sections */
.wave-bg {
    position: relative;
    overflow: hidden;
}

.wave-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(137, 54, 18, 0.05) 50%, transparent 70%);
    animation: wave 10s linear infinite;
}

@keyframes wave {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* --- OPTIMISATION RESPONSIVE GLOBALE (Correction des espaces extérieurs) --- */
@media (max-width: 768px) {

    /* Correction spécifique pour le corps de page */
    html,
    body {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    /* Hero Edge-to-Edge */
    .hero-slide {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .hero-slide .premium-reveal-container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    section.h-screen {
        margin: 0 !important;
        width: 100% !important;
    }

    main {
        /* NE PAS toucher padding-bottom ici — géré par la règle bottom-nav ci-dessous */
    }

    /* Préserver le padding sur les containers pour éviter le décalage */
    .container {
        max-width: 100% !important;
    }
}

/* ============================================================
   FIX UNIVERSEL — Barre de navigation mobile (bottom nav 70px)
   Garantit que la bottom nav ne cache JAMAIS du contenu.
   S'applique sur TOUS les espaces (client, etablissement, admin…)
   ============================================================ */
@media (max-width: 1024px) {

    /* body : padding-bottom global protecteur */
    body {
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* main et conteneurs principaux — priorité maximale */
    main,
    .main-content,
    [role="main"],
    #main-content,
    .page-content {
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Quand un input/textarea est focus, scroller pour qu'il reste visible */
    input:focus,
    textarea:focus,
    select:focus {
        scroll-margin-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
    }

    /* Zones de saisie fixes (messagerie, commentaires) */
    .chat-input-zone,
    .message-input-container,
    [class*="input-bar"] {
        bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* ============================================================
   CLEAR UI — Suppression Globale des Ombres
   Applique un style plat "Clear" aux en-têtes et au panier.
   ============================================================ */
header,
nav,
.admin-header,
.client-header,
#globalCartDrawer,
#mobileCartTopBar button,
.sidebar-toggle-btn,
#globalNotificationsDropdown,
.notification-global-badge {
    box-shadow: none !important;
}

/* ============================================================
   PREMIUM MOBILE NAVIGATION & HORIZONTAL POP-BAR
   ============================================================ */

/* Bottom Nav Styles */
.mobile-nav-container {
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.03) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-nav-item {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-item.active {
    color: #893612;
}

.mobile-nav-item.active svg {
    transform: translateY(-2px);
    filter: drop-shadow(0 4px 6px rgba(137, 54, 18, 0.2));
}

/* Central Floating Button */
.nav-center-button {
    position: relative;
    width: 48px;
    height: 48px;
    margin-top: -18px;
    background: #893612;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 6px 16px rgba(137, 54, 18, 0.25);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 70;
}

.nav-center-button:active {
    transform: scale(0.9) rotate(5deg);
}

/* Pulsing effect removed as requested */

/* Horizontal Pop-Bar (Modern Menu) */
.mobile-bottom-sheet {
    position: fixed;
    bottom: 85px;
    left: 12px;
    right: 12px;
    background: #ffffff;
    border-radius: 24px;
    z-index: 12000;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.mobile-bottom-sheet.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.bottom-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.bottom-sheet-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Vertical Grid Layout */
.sheet-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 8px;
    max-height: 55vh;
    overflow-y: auto;
}

.sheet-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.sheet-link:active {
    transform: scale(0.9);
    background: white;
}

.sheet-link-icon {
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #893612;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

/* Global Safety Rule for Lucide Icons */
i[data-lucide],
.lucide,
svg.lucide {
    display: inline-block !important;
    vertical-align: middle;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.sheet-link-icon i,
.sheet-link-icon svg {
    width: 16px !important;
    height: 16px !important;
}

.sheet-link-text {
    font-size: 8px;
    font-weight: 700;
    color: #333333;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Handle is not needed for horizontal bar but could be used as a decoration */
.sheet-handle {
    display: none;
}

/* ==========================================================================
   PREMIUM SKELETON LOADER SYSTEM (SHIMMER EFFECT)
   ========================================================================== */

@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f5f3f0 25%, #ede9e3 50%, #f5f3f0 75%) !important;
    background-size: 200% 100% !important;
    animation: skeleton-shimmer 1.6s infinite linear !important;
    position: relative;
    overflow: hidden;
}

/* Optional Dark Ambient overrides if needed */
.dark .skeleton {
    background: linear-gradient(90deg, #2a2825 25%, #383530 50%, #2a2825 75%) !important;
}

/* Stories Slider skeletons */
.story-card.skeleton {
    background: linear-gradient(90deg, #f5f3f0 25%, #ede9e3 50%, #f5f3f0 75%) !important;
    background-size: 200% 100% !important;
    animation: skeleton-shimmer 1.6s infinite linear !important;
}

.story-grid-skeleton-item {
    pointer-events: none;
    box-shadow: none !important;
}