/* CLS Prevention - Global Layout Stability */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Contain layout calculations */
}

/* Images with reserved space to prevent CLS */
img {
    width: auto;
    height: auto;
}

:root {
    --app-nav-height: calc(65px + env(safe-area-inset-top, 0px));
    --app-footer-height: calc(90px + env(safe-area-inset-bottom, 50px));
}

/* Links with consistent sizing */

/* Prevent font loading CLS */
body {
    font-display: swap;
    /* Ensure fonts don't cause layout shifts */
}

body {
    /* Background handled by critical CSS in index.html for LCP */
    background-image: url("https://wsrv.nl/?url=https://florianbd.com/pic/1.jpg&output=webp&q=55&w=1920");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    font-family: 'Poppins', sans-serif;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    height: 100%;
    height: 100dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    /* Prevent body scroll, content scrolls internally */
    position: fixed !important;
    left: 0;
    top: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: none;
    /* Only allow scrolling in main-content */
}


body.loaded {
    opacity: 1;
}

/* Dark Mode Base */
html.dark-mode,
body.dark-mode {
    color: #e5e7eb;
    background: #0f172a;
    /* fallback under background image */
}

/* Premium App Wrapper - Stabilizes Layout and prevents CLS from dynamic wrapping */
#florian-app-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    contain: layout style;
    /* Layout isolation without paint containment (paint creates containing block for fixed elements) */
    min-height: 100vh;
    /* Critical CLS Fix */
    min-height: 100dvh;
}

/* Page Transitions */
.content-transition-out {
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1),
        opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.97);
    opacity: 0.3;
}

/* Ensure body background is dark on home */
html.dark-mode body,
body.dark-mode {
    background: #0f172a !important;
    background-image: none !important;
}

/* Inputs and slider in dark mode */
body.dark-mode .search-input {
    background: #0b1220;
    color: #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

body.dark-mode .news-card {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

/* Main Navigation Layout handled at the bottom of the file */

/* Glassmorphic Scroll Indicator */
.scroll-progress-container {
    position: fixed;
    top: var(--app-nav-height);
    /* Directly under the fixed nav */
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1001;
    pointer-events: none;
}

.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #007a3b, #00ff87);
    box-shadow: 0 0 10px rgba(0, 122, 59, 0.5);
    transition: width 0.15s ease-out;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

.nav-left .nav-title {
    color: white;
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    transition: color 0.3s ease;
}

.nav-left i {
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.nav-left i:hover {
    transform: scale(1.1);
}

.nav-left .back-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: transform 0.2s ease;
    filter: brightness(0) invert(1);
    /* Makes the image white */
}

.nav-left .back-icon:hover {
    transform: scale(1.1);
}

.nav-center {
    margin-left: 10px !important;
    flex: 1;
    display: flex;
    justify-content: center;
}

.search-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 12px 15px 12px 35px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 110px;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 14px;
    color: #fff;
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input:focus {
    background-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

/* High-Tech Search Icons */
.search-extra-icons {
    position: absolute;
    right: 15px;
    display: flex;
    gap: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    z-index: 2;
}

.search-extra-icons i {
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-extra-icons i:hover {
    color: #fff;
    transform: scale(1.2);
}

.nav-right {
    display: flex;
    align-items: center;
}

.chat-icon-container {
    position: relative;
    left: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.chat-icon-container:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

.chat-icon-img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.nav-right .chat-icon {
    width: 42px;
    /* Slightly increased size */
    height: 42px;
    /* Slightly increased size */
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Smooth transition for all properties */
}

/* Chat styles refined... */

/* Greeting Section */
.greeting-section {
    padding: 0px 0 0px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.greeting-text h2 {
    color: white;
    font-size: 20px;
    font-weight: 700;
    margin: -7px 0px;
}

.greeting-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    margin: 4px 0 0;
}

.weather-widget {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 18px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.weather-widget:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.weather-info {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.temp {
    color: white;
    font-weight: 800;
    font-size: 18px;
    line-height: 1;
    margin-bottom: 2px;
}

.condition {
    color: rgba(255, 255, 255, 0.9);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.weather-icon {
    font-size: 28px;
    color: #ffd700;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.4));
}

/* Skeleton Loading - CLS Prevention */
.skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.05) 25%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    contain: layout style paint;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.news-skeleton {
    width: 100%;
    height: 150px;
    border-radius: 75px;
    contain: layout style;
}

.category-skeleton {
    min-width: 85px;
    height: 115px;
    /* Matched to img + text height */
    border-radius: 15px;
    /* More card-like for better visualization */
    flex-shrink: 0;
    contain: layout style;
}

.nursery-skeleton {
    min-width: 75px;
    height: 105px;
    /* Matched to img + text height */
    border-radius: 15px;
    flex-shrink: 0;
    contain: layout style;
}

.product-card-skeleton {
    width: 100%;
    height: 295px;
    /* Precision Match: Aligned with product-card max-height on Desktop */
    border-radius: 20px;
    contain: layout style;
}

@media (max-width: 480px) {
    .product-card-skeleton {
        height: 245px;
        /* Precision Match: Aligned with product-card height on Mobile */
    }
}

.package-skeleton {
    min-width: 280px;
    max-width: 280px;
    height: 275px;
    /* Precision Match: Adjusted from 200px to avoid 75px layout shift */
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    contain: layout style;
}

/* Main Content */
/* Main Content - Independent Scrollable Area */
.main-content {
    flex: 1;
    contain: layout style;
    /* Layout isolation only — strict/size containment causes collapse with flex:1 */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding: 20px;
    padding-top: var(--app-nav-height) !important;
    padding-bottom: calc(var(--app-footer-height) + 25px) !important;
    /* Reserve space for bottom nav + breathing room */
    z-index: 1;
    touch-action: pan-y !important;
    /* Enable scrolling only here */
}

/* CLS Prevention - Reserve space for dynamic footer */
/* #footerContainer is kept for backward compatibility on other pages */
#footerContainer {
    flex-shrink: 0;
    width: 100%;
}


/* Section Titles */
/* Neon Section Titles with Glitch */
.section-title {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    position: relative;
    cursor: default;
}

.section-title:hover {
    text-shadow: 0 0 10px rgba(0, 255, 135, 0.5), 0 0 20px rgba(0, 255, 135, 0.2);
}



/* Section Headers - Prevent CLS */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0px;
    margin-bottom: 5px;
    width: 100%;
    cursor: pointer;
    contain: layout style;
}

/* View All Links - Consistent sizing */
.view-all {
    color: #007a3b;
    font-weight: 600;
    font-size: 13px;
    background: rgba(255, 255, 255, 0);
    padding: 6px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    min-width: 100px;
    /* Prevent width shifts */
    text-align: center;
    contain: layout style;
}

.view-all:hover {
    background: #007a3b;
    color: #fff;
    transform: translateX(3px);
}

.view-all i {
    font-size: 10px;
}

/* Ambient Glow Slider */
.news-slider-wrapper {
    position: relative;
    margin-bottom: 25px;
    min-height: 150px;
    /* Reserve space for slider */
}

.ambient-glow {
    position: absolute;
    top: 10%;
    left: 10%;
    right: 10%;
    bottom: 10%;
    background: #00A651;
    filter: blur(40px);
    opacity: 0.15;
    z-index: 1;
    border-radius: 500px;
    transition: background 0.8s ease;
}

.news-slider {
    position: relative;
    height: 150px;
    overflow: hidden;
    border-radius: 500px;
    z-index: 5;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.news-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    /* Smoother transition for news cards */
    background: linear-gradient(135deg, #00A651, #008f45);
    border-radius: 500px;

}

/* Dark Mode: cards and text on home */
html.dark-mode .section-title,
body.dark-mode .section-title {
    color: #e5e7eb;
}

html.dark-mode .category-item span,
html.dark-mode .nursery-item span,
body.dark-mode .category-item span,
body.dark-mode .nursery-item span {
    color: #e5e7eb;
}

.news-card.active {
    opacity: 1;
    transition: opacity 0.6s ease-in-out;
    /* Ensure active state also has smooth transition */
}

.news-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 20px;
}

.news-text {
    flex: 1;
    color: white;
}

.plant-name {
    font-size: 26px;
    /* Increased font size for impact */
    font-weight: 700;
    margin-bottom: 6px;
    /* Adjusted margin */
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
    /* Enhanced text shadow */
}

.plant-price {
    font-size: 17px;
    /* Slightly increased font size */
    font-weight: 500;
    /* Adjusted font weight */
    opacity: 0.95;
    /* Slightly increased opacity */
}

.news-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid rgba(255, 255, 255, 0.4);
    /* Slightly thicker and more opaque border */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.5s ease;
}

@keyframes scanLine {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

/* Futuristic Expiry Badge */
.expiry-badge {
    position: absolute;
    top: 105px;
    right: 90px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid rgba(0, 166, 81, 0.5);
    color: #00ff7f;
    font-size: 12px;
    font-weight: 700;
    z-index: 25;
    box-shadow: 0 0 15px rgba(0, 255, 127, 0.3), inset 0 0 10px rgba(0, 255, 127, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes badgeGlow {
    from {
        box-shadow: 0 0 10px rgba(0, 255, 127, 0.2);
        border-color: rgba(0, 166, 81, 0.3);
    }

    to {
        box-shadow: 0 0 20px rgba(0, 255, 127, 0.5);
        border-color: rgba(0, 255, 127, 0.8);
    }
}

.expiry-badge i {
    font-size: 12px;
    animation: rotateClock 5s infinite linear;
}

@keyframes rotateClock {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Expired Card State - Super Futuristic "Power Down" */
.news-card--expired {
    position: relative;
    pointer-events: none;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card--expired::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 30%, rgba(0, 0, 0, 0.8) 100%),
        rgba(20, 0, 0, 0.3);
    pointer-events: none;
    z-index: 4;
    border-radius: 500px;
}

.news-card--expired .news-image img {
    filter: saturate(0) brightness(0.3) contrast(1.2);
    transform: scale(0.98);
}

.news-card--expired .news-text {
    opacity: 0.3;
    filter: blur(1px);
    transform: scale(0.95);
    transition: all 1s ease;
}

.news-card--expired .expiry-badge {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff3b30;
    color: #ff3b30;
    box-shadow: 0 0 15px rgba(255, 59, 48, 0.5);
    animation: none;
}

/* Cyberpunk Expired Ribbon */
.expired-ribbon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-5deg);
    background: #ff3b30;
    color: white;
    padding: 12px 40px;
    font-weight: 900;
    font-size: 18px;
    letter-spacing: 4px;
    text-transform: uppercase;
    box-shadow: 0 0 30px rgba(255, 59, 48, 0.8), inset 0 0 15px rgba(0, 0, 0, 0.3);
    z-index: 6;
    white-space: nowrap;
    border-radius: 2px;
    border-left: 5px solid white;
    border-right: 5px solid white;
    /* animation: ribbonGlow 1.5s infinite alternate; */
}

@keyframes ribbonGlow {
    from {
        opacity: 0.8;
        transform: translate(-50%, -50%) rotate(-5deg) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(-5deg) scale(1.05);
        text-shadow: 0 0 10px white;
    }
}

/* Slider Dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Smooth transition for all properties */
}

.dot.active {
    background-color: #00A651;
    transform: scale(1.3);
    /* Slightly increased scale for active dot */
    box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.3);
    /* Added subtle shadow */
    transition: all 0.3s ease;
    /* Ensured smooth transition for active dot */
}

/* Category Section */
.category-section {
    margin-bottom: 5px;
    contain: layout style;
}

.category-scroll {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    padding: 0px 0px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-height: 115px;
    /* Reserve space for categories */
    contain: layout style paint;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

/* Category Section */
.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 85px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 8px;
}

.category-item:hover {
    transform: translateY(-5px);
}

.category-item img {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
    transition: all 0.4s ease;
}

.category-item:hover img {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

.category-item span {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
}

/* Nursery Section */
.nursery-section {
    margin-bottom: 30px;
    contain: layout style;
}

.nursery-scroll {
    display: flex;
    gap: 35px;
    overflow-x: auto;
    padding: 5px 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-height: 105px;
    /* Reserve space for nurseries */
    contain: layout style paint;
}

.nursery-scroll::-webkit-scrollbar {
    display: none;
}

.nursery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 75px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 8px;
    border-radius: 12px;
    position: relative;
    /* Added for status dot positioning */
}

/* Status Indicator Core */
.nursery-img-wrapper {
    position: relative;
    width: 75px;
    height: 75px;
}

.status-badge-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #00A651;
    border: 2px solid #fff;
    border-radius: 50%;
    z-index: 10;
    display: none;
    box-shadow: 0 0 8px rgba(0, 166, 81, 0.4);
}

.has-active-status .status-badge-dot {
    display: block;
}

/* Verified Badge & Border Styles */
.verified-badge {
    position: absolute;
    top: -2px;
    right: 50px;
    background: #52ff88;
    color: #004d1a;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 1px solid #fff;
    z-index: 15;
    box-shadow: 0 2px 8px rgba(82, 255, 136, 0.4);
    animation: verifiedAppear 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes verifiedAppear {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

body.dark-mode .verified-badge {
    border-color: #0f172a;
    background: #52ff88;
    color: #000;
}

img.verified-logo {
    border: 1px solid #52ff88 !important;
    box-shadow: 0 0 12px rgba(82, 255, 136, 0.25);
}

/* Status dot moves if verified badge is present or we place verified at top-right */
.nursery-img-wrapper .status-badge-dot {
    bottom: 2px;
    right: 2px;
}

/* Sleek Pulse Animation */
.has-active-status .status-badge-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid #00A651;
    border-radius: 50%;
    animation: statusDotPulse 2s infinite;
}

@keyframes statusDotPulse {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

body.dark-mode .status-badge-dot {
    border-color: #0f172a;
}

.nursery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    /* Added subtle shadow on hover */
}

.nursery-item img {
    width: 75px;
    /* Slightly increased size */
    height: 75px;
    /* Slightly increased size */
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.15);
    /* Enhanced shadow */
    transition: all 0.4s ease;
    /* Slightly longer transition for image effects */
}

/* --- PREMIUM PRODUCT BADGES SYSTEM --- */
.product-badges-container {
    position: absolute;
    top: 212px;
    left: 0px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
    pointer-events: none;
}

/* Detail Page Specific Positioning - Scaled up for clarity */
.main-image-container .product-badges-container {
    top: 25px;
    left: 15px;
    z-index: 30;
    gap: 10px;
}

.main-image-container .promo-badge {
    padding: 6px 15px;
    font-size: 11px;
    border-radius: 100px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.main-image-container .promo-badge i {
    font-size: 13px;
}

.promo-badge {
    padding: 2px 7px;
    border-radius: 0px 15px 15px 0px;
    font-size: 7px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    white-space: nowrap;
    animation: badgeEntrance 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes badgeEntrance {
    from {
        transform: translateX(-30px) scale(0.8);
        opacity: 0;
    }

    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* Badge Variants - Curated Premium Gradients */
.badge-new {
    background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.badge-trending {
    background: linear-gradient(135deg, #FF3CAC 0%, #784BA0 50%, #2B86C5 100%);
    position: relative;
    overflow: hidden;
}

.badge-trending::after {
    content: '';
    position: absolute;
    inset: -100%;
    background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: rotate(45deg);
    animation: badgeShine 3.5s infinite linear;
}

@keyframes badgeShine {
    0% {
        transform: translateX(-150%) rotate(45deg);
    }

    100% {
        transform: translateX(150%) rotate(45deg);
    }
}

.badge-popular {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.badge-bestseller {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #4a3700;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.badge-featured {
    background: linear-gradient(135deg, #8E2DE2 0%, #4A00E0 100%);
}

.badge-limited {
    background: linear-gradient(135deg, #F00000 0%, #DC281E 100%);
    animation: badgeGlowPulse 2.5s infinite;
}

@keyframes badgeGlowPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(240, 0, 0, 0.4);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 20px 5px rgba(240, 0, 0, 0.2);
        transform: scale(1.05);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(240, 0, 0, 0.4);
        transform: scale(1);
    }
}

.badge-soldout {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(15px);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.1);
    opacity: 0.9;
}

.badge-comingsoon {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #0d2e28;
    border: 1.5px dashed rgba(255, 255, 255, 0.5);
}

/* Icon style in badges */
.promo-badge i {
    font-size: 11px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

body.dark-mode .promo-badge {
    border-color: rgba(255, 255, 255, 0.15);
}

.nursery-item:hover img {
    border-color: #00A651;
    box-shadow: 0 10px 32px rgba(0, 166, 81, 0.35);
    /* Further enhanced shadow on hover */
    transform: scale(1.05);
}

.nursery-item span {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
}

.category-item {
    min-height: 115px;
    /* Precision Match: Category Skeleton */
}

.nursery-item {
    min-height: 105px;
    /* Precision Match: Nursery Skeleton */
}

/* Packages Section */
.packages-section {
    margin-bottom: 30px;
    contain: layout style;
}

.package-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-height: 200px;
    scroll-behavior: smooth;
    contain: layout style paint;
}

.package-scroll::-webkit-scrollbar {
    display: none;
}

.package-item {
    display: flex;
    flex-direction: column;
    min-width: 280px;
    max-width: 280px;
    min-height: 275px;
    /* Precision Match: Avoid 75px shift when skeletons are replaced */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.package-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(27, 94, 32, 0.15);
    border-color: rgba(102, 187, 106, 0.5);
}

.package-item::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    border-radius: 20px;
    background: linear-gradient(135deg, transparent, rgba(102, 187, 106, 0.3), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: 0.4s opacity;
}

.package-item:hover::before {
    opacity: 1;
}

.package-image-wrapper {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, rgba(27, 94, 32, 0.08), rgba(102, 187, 106, 0.15));
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
    overflow: hidden;
}

.package-image-wrapper img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.1));
    animation: packageFloat 3s infinite ease-in-out;
}

@keyframes packageFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.package-info {
    flex: 1;
}

.package-name {
    font-size: 16px;
    font-weight: 700;
    color: #0B3D2E;
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.package-tagline {
    font-size: 11px;
    color: #5a7d6e;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.package-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
}

.package-price {
    font-size: 20px;
    font-weight: 900;
    color: #1B5E20;
    font-family: 'Outfit', 'Poppins', sans-serif;
}

.package-old-price {
    position: absolute;
    top: 220px;
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.package-offer-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 4px;
}

.package-offer-badge.emerald {
    background: linear-gradient(135deg, #00C853, #64DD17);
    color: white;
}

.package-offer-badge.gold {
    background: linear-gradient(135deg, #C8A951, #E8C35E);
    color: black;
}

.package-offer-badge.ruby {
    background: linear-gradient(135deg, #FF5252, #FF1744);
    color: white;
}

.package-offer-badge.sapphire {
    background: linear-gradient(135deg, #2979FF, #00B0FF);
    color: white;
}

.package-offer-badge.neon {
    background: linear-gradient(135deg, #6200EA, #D500F9);
    color: white;
}

/* Package Skeleton Loader */
.package-skeleton {
    min-width: 280px;
    max-width: 280px;
    height: 275px;
    /* Precision Match: Adjusted from 200px to avoid 75px layout shift */
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.package-skeleton::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: skeletonLoading 1.5s infinite;
}

@keyframes skeletonLoading {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Dark Mode Support */
body.dark-mode .package-item {
    background: rgba(17, 24, 39, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .package-item:hover {
    background: rgba(17, 24, 39, 1);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

body.dark-mode .package-name {
    color: #e5e7eb;
}

body.dark-mode .package-tagline {
    color: #9ca3af;
}

body.dark-mode .package-skeleton {
    background: rgba(255, 255, 255, 0.05);
}


/* Strictly Stationary Top Navigation */
.top-nav {
    background-color: #00A651;
    padding: 0 20px;
    padding-top: env(safe-area-inset-top, 0px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed !important;
    top: 0 !important;
    left: 0;
    width: 100%;
    z-index: 10000;
    border-top: none;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    height: var(--app-nav-height) !important;
    box-sizing: border-box;
}



/* Responsive Design */
@media (max-width: 480px) {
    .nursery-img-wrapper .status-badge-dot {
        bottom: -10px;
        right: -6px;
    }

    .product-badges-container {
        position: absolute;
        top: 207px;
        left: 0px;
        display: flex;
        flex-direction: column;
        gap: 6px;
        z-index: 2;
        pointer-events: none;
    }

    .main-content {
        padding: 0 3px;
        padding-bottom: calc(120px + env(safe-area-inset-bottom));
    }

    .news-content {
        padding: 15px;
    }

    .plant-name {
        font-size: 20px;
    }

    .plant-price {
        font-size: 14px;
    }

    .news-image {
        width: 100px;
        height: 100px;
    }

    .category-item img {
        width: 90px;
        height: 90px;
    }

    .nursery-item img {
        width: 90px;
        height: 90px;
    }

    .section-title {
        margin-top: 0px;
        font-size: 20px;
    }
}

@media (max-width: 360px) {
    .top-nav {
        padding: 12px 15px;
    }

    .search-input {
        font-size: 13px;
        padding: 8px 12px 8px 30px;
    }

    .nav-right .chat-icon {
        width: 35px;
        height: 35px;
    }

    .news-content {
        padding: 12px;
    }

    .plant-name {
        font-size: 18px;
    }

    .news-image {
        width: 90px;
        height: 90px;
    }
}

/* Smooth scrolling for horizontal scrolls */
.category-scroll,
.nursery-scroll {
    scroll-behavior: smooth;
}

/* Loading animation for images */
img {
    transition: opacity 0.3s ease;
}

img[src] {
    opacity: 1;
}

/* Focus states for accessibility */
.search-input:focus,
.nav-item:focus,
.category-item:focus,
.nursery-item:focus {
    outline: 2px solid #00A651;
    outline-offset: 2px;
}

/* Smooth Item Transitions */
.category-item,
.nursery-item,
.product-card,
.news-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

.category-item:hover,
.nursery-item:hover,
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.category-item:active,
.nursery-item:active,
.product-card:active {
    transform: scale(0.95);
}

/* Page load fade in up for sections */
.news-section,
.category-section,
.nursery-section,
.products-section {
    animation: fadeInUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    opacity: 0;
    contain: layout style;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-section {
    animation-delay: 0.1s;
}

.nursery-section {
    animation-delay: 0.2s;
}

.products-section {
    animation-delay: 0.3s;
}

/* Loading and error states */
.loading,
.error,
.no-nurseries,
.no-categories {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-size: 14px;
}

.loading {
    color: #00A651;
}

.error {
    color: #ef4444;
}

.no-nurseries,
.no-categories {
    color: #6b7280;
}

.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #ef4444;
}

.error-message h2 {
    margin-bottom: 15px;
    color: #dc2626;
}

.error-message p {
    margin-bottom: 20px;
    font-size: 16px;
}

.error-message button {
    padding: 10px 20px;
    background: #00A651;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.error-message button:hover {
    background: #008f45;
}

/* Enhanced Page Loader - Perfect Sliding Transitions */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #00A651;
    z-index: 99999999 !important;
    /* Above everything including navs */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.6s cubic-bezier(0.85, 0, 0.15, 1);
    will-change: transform;
    pointer-events: all;
    contain: strict;
    transform: translateZ(0);
    /* Hardware acceleration */
}

/* Entrance: Reveal the page by sliding up */
.page-loader.exit-up {
    transform: translateY(-100%);
    pointer-events: none;
}

/* Exit: Start from above the screen */
.page-loader.outgoing-start {
    transform: translateY(-100%);
}

/* Exit: Slide down to cover the screen */
.page-loader.outgoing-active {
    transform: translateY(0);
    pointer-events: all;
}

/* Initial state on reload should be covering the screen */
.page-loader.incoming {
    transform: translateY(0);
}


.loader-content {
    text-align: center;
    color: white;
    animation: loaderContentFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    will-change: transform, opacity;
    transform: translateZ(0);
}

@keyframes loaderContentFadeIn {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.loader-logo {
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: loaderPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    will-change: transform, box-shadow;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.loader-logo::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: loaderRipple 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    will-change: transform, opacity;
    transform: translateZ(0);
}

.loader-logo i {
    color: #00A651;
    font-size: 42px;
    animation: loaderIconSpin 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.loader-brand,
.loader-text {
    font-weight: 800;
    font-size: 26px;
    letter-spacing: 5px;
    color: white;
    margin-bottom: 30px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.p-bar-container {
    width: 220px;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    margin: 0 auto;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.p-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #fff, #bfffdb);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* GPU-Optimized Animations - Only transform and opacity */
@keyframes loaderPulse {

    0%,
    100% {
        transform: scale3d(0.95, 0.95, 1) translateZ(0);
    }

    50% {
        transform: scale3d(1.05, 1.05, 1) translateZ(0);
    }
}

@keyframes loaderRipple {
    0% {
        transform: scale3d(0.8, 0.8, 1) translateZ(0);
        opacity: 1;
    }

    100% {
        transform: scale3d(2, 2, 1) translateZ(0);
        opacity: 0;
    }
}

@keyframes loaderIconSpin {

    0%,
    100% {
        transform: rotate3d(0, 0, 1, 0deg) scale3d(1, 1, 1) translateZ(0);
    }

    25% {
        transform: rotate3d(0, 0, 1, -10deg) scale3d(1.1, 1.1, 1) translateZ(0);
    }

    75% {
        transform: rotate3d(0, 0, 1, 10deg) scale3d(0.9, 0.9, 1) translateZ(0);
    }
}

@keyframes loaderTextShimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Smooth Item Transitions */
.category-item,
.nursery-item,
.product-card,
.news-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

.category-item:active,
.nursery-item:active,
.product-card:active {
    transform: scale(0.92) !important;
}

/* Important Laggy Places Improvements */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 30px;
}

.loading::before {
    content: "";
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0, 166, 81, 0.2);
    border-top: 3px solid #00A651;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Dark Mode Transition */
body {
    transition: background-color 0.4s ease, color 0.4s ease, opacity 0.5s ease;
}



/* Flying Add-to-Cart Animation */
.flying-plant {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Heart Explosion Animation */
.heart-particle {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    color: #ff4757;
    font-size: 20px;
    animation: heartFly 1s forwards ease-out;
}

@keyframes heartFly {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* Pull to Refresh Premium Styles */
.pull-to-refresh-container {
    position: fixed;
    top: -65px;
    left: 0;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    pointer-events: none;
    transition: transform 0.2s cubic-bezier(0.2, 0, 0.2, 1), opacity 0.2s ease;
    opacity: 0;
}

.pull-to-refresh-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 166, 81, 0.3);
    border: 1px solid rgba(0, 166, 81, 0.2);
    color: #00A651;
    font-size: 18px;
    transform: rotate(0deg);
}

.pull-to-refresh-container.visible {
    opacity: 1;
}

.pull-to-refresh-container.refreshing .pull-to-refresh-content {
    animation: refreshSpin 0.8s linear infinite;
}

@keyframes refreshSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

body.dark-mode .pull-to-refresh-content {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(0, 255, 135, 0.3);
    box-shadow: 0 4px 20px rgba(0, 255, 135, 0.2);
    color: #00ff87;
}


/* Page Shutter Transition */
.page-shutter {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.shutter-part {
    flex: 1;
    background: #00A651;
    width: 100%;
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.shutter-part.top {
    transform: translateY(-100%);
}

.shutter-part.bottom {
    transform: translateY(100%);
}

.page-shutter.active .shutter-part {
    transform: translateY(0);
    pointer-events: all;
}

/* For Fade-Scale fallback/combination */
.fade-scale-in {
    animation: fadeScaleIn 0.5s forwards ease-out;
}

@keyframes fadeScaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll Reveal Animations */
body .scroll-reveal {
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: opacity, transform;
}

body .scroll-reveal.active {
    opacity: 1;
    transform: scale(1);
}

/* Ensure snappy hover effects despite slow reveal transition */
body .scroll-reveal.active:hover {
    transition: all 0.3s ease !important;
}

/* Staggered delays for grids */
.product-card:nth-child(1) {
    transition-delay: 50ms;
}

.product-card:nth-child(2) {
    transition-delay: 100ms;
}

.product-card:nth-child(3) {
    transition-delay: 150ms;
}

.product-card:nth-child(4) {
    transition-delay: 200ms;
}

.product-card:nth-child(5) {
    transition-delay: 50ms;
}

.product-card:nth-child(6) {
    transition-delay: 100ms;
}

.product-card:nth-child(7) {
    transition-delay: 150ms;
}

.product-card:nth-child(8) {
    transition-delay: 200ms;
}

/* Section Header Animation */
.section-header.scroll-reveal {
    transform: translateX(-20px);
}

.section-header.scroll-reveal.active {
    transform: translateX(0);
}


@keyframes bannerGlowCompare {
    0% {
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 0 20px rgba(50, 100, 255, 0.1);
    }

    100% {
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 0 30px rgba(50, 100, 255, 0.3);
    }
}

/* --- HANGING MOON (DARK MODE ONLY) --- */
.hanging-moon-container {
    position: absolute;
    top: 100%;
    /* Attach to bottom of nav */
    right: 20px;
    display: none;
    /* Hidden by default */
    flex-direction: column;
    align-items: center;
    z-index: 1001;
    pointer-events: none;
    transform-origin: top center;
    animation: moonSwing 4s ease-in-out infinite;
}

/* Show only in dark mode */
html.dark-mode .hanging-moon-container,
body.dark-mode .hanging-moon-container {
    display: flex;
}

.rope {
    width: 2px;
    height: 35px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2));
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

.moon {
    width: 32px;
    height: 32px;
    background: radial-gradient(circle at 30% 30%, #fdfcf0, #ebe29d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(253, 252, 240, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.2);
    margin-top: -2px;
}

.moon i {
    font-size: 14px;
    color: #2D3436;
    opacity: 0.3;
}

@keyframes moonSwing {

    0%,
    100% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg);
    }
}

#moonToggle.retracting {
    animation: moonRetract 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards !important;
}

@keyframes moonRetract {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    30% {
        transform: translateY(15px) scale(1.1);
        opacity: 1;
    }

    100% {
        transform: translateY(-150px) scale(0.5);
        opacity: 0;
    }
}

/* Neural Global Sync Pulse */
@keyframes sync-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

.shutter-part.top {
    transform: translateY(-100%);
}

.shutter-part.bottom {
    transform: translateY(100%);
}

.page-shutter.active .shutter-part {
    transform: translateY(0);
    pointer-events: all;
}

/* For Fade-Scale fallback/combination */
.fade-scale-in {
    animation: fadeScaleIn 0.5s forwards ease-out;
}

@keyframes fadeScaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll Reveal Animations */
body .scroll-reveal {
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: opacity, transform;
}

body .scroll-reveal.active {
    opacity: 1;
    transform: scale(1);
}

/* Ensure snappy hover effects despite slow reveal transition */
body .scroll-reveal.active:hover {
    transition: all 0.3s ease !important;
}

/* Staggered delays for grids */
.product-card:nth-child(1) {
    transition-delay: 50ms;
}

.product-card:nth-child(2) {
    transition-delay: 100ms;
}

.product-card:nth-child(3) {
    transition-delay: 150ms;
}

.product-card:nth-child(4) {
    transition-delay: 200ms;
}

.product-card:nth-child(5) {
    transition-delay: 50ms;
}

.product-card:nth-child(6) {
    transition-delay: 100ms;
}

.product-card:nth-child(7) {
    transition-delay: 150ms;
}

.product-card:nth-child(8) {
    transition-delay: 200ms;
}

/* Section Header Animation */
.section-header.scroll-reveal {
    transform: translateX(-20px);
}

.section-header.scroll-reveal.active {
    transform: translateX(0);
}


@keyframes bannerGlowCompare {
    0% {
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 0 20px rgba(50, 100, 255, 0.1);
    }

    100% {
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 0 30px rgba(50, 100, 255, 0.3);
    }
}

/* --- HANGING MOON (DARK MODE ONLY) --- */
.hanging-moon-container {
    position: absolute;
    top: 100%;
    /* Attach to bottom of nav */
    right: 20px;
    display: none;
    /* Hidden by default */
    flex-direction: column;
    align-items: center;
    z-index: 1001;
    pointer-events: none;
    transform-origin: top center;
    animation: moonSwing 4s ease-in-out infinite;
}

/* Show only in dark mode */
html.dark-mode .hanging-moon-container,
body.dark-mode .hanging-moon-container {
    display: flex;
}

.rope {
    width: 2px;
    height: 35px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2));
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

.moon {
    width: 32px;
    height: 32px;
    background: radial-gradient(circle at 30% 30%, #fdfcf0, #ebe29d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(253, 252, 240, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.2);
    margin-top: -2px;
}

.moon i {
    font-size: 14px;
    color: #2D3436;
    opacity: 0.3;
}

@keyframes moonSwing {

    0%,
    100% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg);
    }
}

#moonToggle.retracting {
    animation: moonRetract 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards !important;
}

@keyframes moonRetract {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    30% {
        transform: translateY(15px) scale(1.1);
        opacity: 1;
    }

    100% {
        transform: translateY(-150px) scale(0.5);
        opacity: 0;
    }
}

/* Neural Global Sync Pulse */
@keyframes sync-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

.sync-pulse {
    animation: sync-pulse 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}


/* 
   ==========================================================================
   THE MOBILE PERFECTION CORE - ABSOLUTE STABILITY 
   ==========================================================================
*/

:root {
    --app-nav-height: calc(65px + env(safe-area-inset-top, 0px));
    --app-footer-height: calc(90px + env(safe-area-inset-bottom, 50px));
}

html,
body {
    height: 100% !important;
    height: 100dvh !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    overscroll-behavior: none !important;
    display: flex !important;
    flex-direction: column !important;
}

#florian-app-wrapper {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    height: 100dvh !important;
    width: 100% !important;
    overflow: hidden !important;
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    z-index: 1 !important;
}

/* Specific wrappers that are intended to be the scrollable region */
.main-content,
#mainContent,
.scrollable-body,
.page-container-scroll {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    position: relative !important;
    padding-top: var(--app-nav-height) !important;
    padding-bottom: calc(var(--app-footer-height) + 40px) !important;
    box-sizing: border-box !important;
    touch-action: pan-y !important;
    pointer-events: auto !important;
    contain: layout style;
    will-change: transform;
}

.top-nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: var(--app-nav-height) !important;
    z-index: 2000000 !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    background-color: #00A651 !important;
    /* Ensure brand color */
    transform: translateZ(0);
}

.bottom-nav,
#appFooter {
    position: fixed !important;
    bottom: -7px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: var(--app-footer-height) !important;
    z-index: 2000000 !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: flex-start !important;
    padding-top: 12px !important;
    padding-bottom: calc(15px + env(safe-area-inset-bottom, 50px)) !important;
    box-sizing: border-box !important;
    transform: translateY(0) translateZ(0);
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s ease;
    will-change: transform, opacity;
}

#appFooter.footer-hidden,
.footer-hidden~.floating-cart-btn,
.footer-hidden+.floating-cart-btn {
    transform: translateY(110%) translateZ(0);
    opacity: 0;
    pointer-events: none;
}

/* Fix for Scroll Progress Indicator */
.scroll-progress-container {
    top: var(--app-nav-height) !important;
    z-index: 2000001 !important;
    position: fixed !important;
}