/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Inheriting Shell Layout from style.css */
/* Enforce Strict App-Shell Layout (Prevents Body Expansion/Scroll) */
html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Critical: Stops root scroll */
    overscroll-behavior: none;
    /* Stops pull-to-refresh bounce on body */
    position: fixed;
    /* Locks the viewport on mobile */
    left: 0;
    top: 0;
}

body {
    background: url("https://wsrv.nl/?url=https://florianbd.com/pic/tree-bg3.jpg&output=webp&q=70&w=1920");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Shell background handles this */
}

/* Navigation handled by style.css shell */

.nav-left .back-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: transform 0.2s ease;
    filter: brightness(0) invert(1);
}

.nav-left .back-icon:hover {
    transform: scale(1.1);
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nursery-logo {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoFloat 3s ease-in-out infinite;
}

.nursery-logo i {
    color: white;
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.nav-center .nav-title {
    color: white;
    font-size: 21px;
    /* Slightly smaller for brand feel */
    font-weight: 700;
    margin: 0;
    letter-spacing: 0px;
    background: white;
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes gradientShift {
    0% {
        background-position: 200% 0;
    }

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

.nav-right .cart-icon {
    position: relative;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.nav-right .cart-icon:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.nav-right .cart-icon-img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff4757;
    color: white;
    font-size: 10px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* Products Discovery Hub */
.products-discovery {
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: transparent;
    z-index: 100;
}

/* Ensure Scroll Indicator is Visible */
.scroll-progress-container {
    z-index: 2000 !important;
    top: var(--app-nav-height) !important;
}

.search-input-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 50px;
    height: 55px;
    display: flex;
    align-items: center;
    padding: 0 25px;
    gap: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.search-input-wrapper:focus-within {
    background: #ffffff;
    border-color: #00a651;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 166, 81, 0.15);
}

.search-input-wrapper i {
    color: #00a651;
    font-size: 18px;
}

.search-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 15px;
    font-weight: 500;
    color: #1e293b;
    font-family: inherit;
}

.search-input-wrapper input::placeholder {
    color: #94a3b8;
}

#clearSearch {
    background: #f1f5f9;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
}

#clearSearch:hover {
    background: #e2e8f0;
    color: #ef4444;
}

#clearSearch i {
    font-size: 12px;
    color: inherit;
}

/* Category Pills */
.category-pills-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 5px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-pills-container::-webkit-scrollbar {
    display: none;
}

.category-pill {
    flex-shrink: 0;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.category-pill i {
    font-size: 14px;
    opacity: 0.7;
}

.category-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.category-pill.active {
    background: #007a3b;
    border-color: #007a3b;
    box-shadow: 0 5px 15px rgba(0, 122, 59, 0.4);
}

.category-pill.active i {
    opacity: 1;
}

/* Category Scroll Navigation - Only for PC */
.category-scroll-wrapper {
    position: relative;
    width: 100%;
}

.nav-arrow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    display: none;
    /* Initially hidden */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-arrow-btn.prev {
    left: 5px;
}

.nav-arrow-btn.next {
    right: 5px;
}

@media (min-width: 1024px) {
    .nav-arrow-btn:hover {
        background: #00a651;
        border-color: #00a651;
        opacity: 1 !important;
        transform: translateY(-50%) scale(1.15);
    }
}

/* Base visibility logic */
.category-scroll-wrapper.show-scroll-buttons .nav-arrow-btn {
    display: flex;
    opacity: 0.6;
}

.category-scroll-wrapper.show-scroll-buttons:hover .nav-arrow-btn {
    opacity: 0.9;
}

/* Scroll Navigation Helper Classes */
.category-scroll-wrapper.show-scroll-buttons .nav-arrow-btn {
    display: flex;
}

.category-scroll-wrapper.hide-prev .nav-arrow-btn.prev {
    opacity: 0 !important;
    pointer-events: none;
}

.category-scroll-wrapper.hide-next .nav-arrow-btn.next {
    opacity: 0 !important;
    pointer-events: none;
}

/* Filter Sort Bar */
.filter-sort-bar {
    display: flex;
    gap: 12px;
}

.filter-pill {
    padding: 10px 18px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-count {
    letter-spacing: 0.4px;
    font-weight: 700;
    padding: 7px 15px;
    color: white;
    background: #0eaf49;
    border-radius: 20px;
    font-size: 13px;
}

button#sortTrigger {
    font-weight: 700;
    font-size: 12px;
    color: white;
    background: #ffffff00;
    border: none;
    padding: 0px 10px;
}

.filter-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-pill i {
    font-size: 12px;
    color: #00a651;
}

/* Sort Menu */
.sort-menu {
    position: absolute;
    top: 240px;
    left: 15px;
    width: 200px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 10px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    animation: menuFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sort-menu.active {
    display: flex;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sort-option {
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #00a651;
}

.sort-option.active {
    background: rgba(0, 166, 81, 0.1);
    color: #00a651;
    font-weight: 700;
}

/* Main Content - Independent Scrollable Area */
.main-content {
    flex: 1;
    /* Fills remaining vertical space */
    overflow-y: auto;
    /* Internal scroll */
    overflow-x: hidden;
    /* Zero horizontal scroll */
    width: 100%;
    height: 100%;
    margin-bottom: 80px;
    padding: 0px 10px 0px;
    -webkit-overflow-scrolling: touch;
    /* Smooth iOS scroll */
}

/* Default Product Grid - Masonry Flow (Pinterest Style) */
.product-grid {
    column-count: 2;
    column-gap: 15px;
    margin-bottom: 20px;
}

/* Scoped Masonry Grid - Only for products.php */
.products-list-page .product-grid {
    display: block;
    /* Switch from grid to block for column-count */
    column-count: 2;
    /* Default mobile masonry */
    column-gap: 15px;
    /* Side gap */
    margin-bottom: 20px;
    width: 100%;
}

/* Ensure cards behave as masonry blocks */
.products-list-page .product-card {
    break-inside: avoid;
    margin-bottom: 15px;
    /* Bottom gap */
    height: auto !important;
    /* Allow variable height */
}

/* Product Card */
.product-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    break-inside: avoid;
    /* Maintain masonry compatibility */
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle border definition */
}

.product-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(0, 166, 81, 0.1),
            transparent);
    transition: left 0.5s ease;
}

.product-card:hover::before {
    left: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 166, 81, 0.3);
}

.product-image-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 12px;
}

.product-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #00a651;
    box-shadow: 0 6px 20px rgba(0, 166, 81, 0.2);
    transition: transform 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.product-image-secondary {
    width: 75%;
    height: 75%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #00a651;
    box-shadow: 0 3px 10px rgba(0, 166, 81, 0.3);
    transition: transform 0.3s ease;
    position: absolute;
    top: 23%;
    left: -37%;
    rotate: -40deg;
    /* z-index: 2; */
    transform: scale(1);
}

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

.nursery-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    margin: 0px 0 -2px 0;
    padding: 6px 0px;
    background: linear-gradient(135deg,
            rgba(0, 166, 81, 0.08),
            rgba(0, 212, 106, 0.08));
    border-radius: 20px;
    border: 1px solid rgba(0, 166, 81, 0.15);
}

@media (min-width: 992px) {
    .general-nursery-info {
        position: relative;
    }

    .general-nursery-info .nursery-logo-wrapper,
    .general-nursery-info .nursery-details {
        flex-shrink: 0;
    }

    .general-nursery-info .general-nursery-sparkle {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        margin-left: 0 !important;
    }
}

.nursery-logo-img {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #00a651;
}

.nursery-details {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.nursery-name-wrapper {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.nursery-name {
    display: block;
    font-size: 9px;
    font-weight: 600;
    color: #007a3b;
    width: 90px !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* Super Perfect Marquee Animation */
.nursery-name.marquee {
    display: flex;
    width: max-content;
    animation: nurseryMarquee 2s linear infinite;
    will-change: transform;
    backface-visibility: hidden;
}

.marquee-gap {
    padding: 0 20px;
    display: inline-block;
}

@keyframes nurseryMarquee {
    0% {
        transform: translate3d(0, 0, 0);
    }

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

.nursery-name-wrapper:hover .nursery-name.marquee {
    animation-play-state: paused;
}

.nursery-logo-wrapper {
    margin-left: 7px;
}

/* The actual logo image — this was missing, causing logos to render at 0x0 */
.nursery-logo-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(0, 166, 81, 0.3);
    background-color: #f0faf5;
    display: block;
    flex-shrink: 0;
    opacity: 0;
    animation: logoFadeIn 0.5s ease 0.1s forwards;
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Auto-Repaired Fade-In Effect */
.auto-repaired-fade-in {
    animation: autoRepairFade 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    will-change: opacity, filter;
}

@keyframes autoRepairFade {
    0% {
        opacity: 0.3;
        filter: grayscale(1) blur(2px);
    }

    100% {
        opacity: 1;
        filter: grayscale(0) blur(0);
    }
}

/* Verified Nursery Logo Precision Styles */
.detail-nursery-logo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(0, 166, 81, 0.3);
    background-color: #f0faf5;
    display: block;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.detail-nursery-logo:hover {
    transform: scale(1.1);
}

/* Universal Verified Logo Styling */
.nursery-logo-img.verified-logo,
.detail-nursery-logo.verified-logo {
    border: 1.5px solid #00A651 !important;
    box-shadow: 0 0 12px rgba(0, 166, 81, 0.25);
    padding: 1px;
    background: white;
}

.verified-logo-container {
    position: relative;
    display: inline-flex;
    margin-right: 12px;
}

.verified-badge-pill {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: linear-gradient(135deg, #00A651 0%, #00d26a 100%);
    color: white;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    border: 1.5px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.verified-badge {
    position: absolute;
    background: linear-gradient(135deg, #00A651 0%, #00d26a 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 5;
    animation: verifiedPulse 2s infinite;
}

@keyframes verifiedPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 166, 81, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(0, 166, 81, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 166, 81, 0);
    }
}

.nursery-business-type {
    position: absolute;
    /* left: 111px; */
    /* top: 127px; */
    font-size: 7px;
    font-weight: 600;
    color: transparent;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: transparent;
    padding: 2px 6px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 2px;
}

.category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #008f45, #00a651);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(0, 166, 81, 0.3);
    overflow: hidden;
}

.category-badge.marquee {
    width: 110px;
    white-space: nowrap;
    display: flex;
}

.category-badge.marquee span {
    display: inline-block;
    animation: nurseryMarquee 5s linear infinite;
}

.availability-badge {
    position: absolute;
    top: 100px;
    right: 5px;
    padding: 5px 5px;
    border-radius: 50px;
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    z-index: 0;
}

.availability-badge.in-stock {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.4);
}

.availability-badge.low-stock {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #212529;
    box-shadow: 0 0 15px rgba(253, 126, 20, 0.4);
}

.availability-badge.out-of-stock {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.4);
}

@keyframes badgeGlow {
    0% {
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    }

    100% {
        box-shadow:
            0 0 15px currentColor,
            0 0 20px currentColor;
    }
}

.product-top-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 5;
}

.wishlist-btn {
    position: relative;
    top: 0;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 15px rgba(0, 0, 0, 0.1);
}

.wishlist-btn i {
    color: #94a3b8;
    /* Professional slate default */
    font-size: 16px;
    transition: all 0.3s ease;
}

.wishlist-btn:hover {
    transform: scale(1.1);
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.wishlist-btn:hover i {
    color: #00a651;
    /* Match brand color on hover */
}

.compare-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 15px rgba(0, 0, 0, 0.1);
}

.compare-btn-icon i {
    color: #007a3b;
    font-size: 14px;
}

.compare-btn-icon:hover {
    background: #f34141;
    transform: scale(1.1);
}

.compare-btn-icon:hover i {
    color: white;
}

.wishlist-btn.active i {
    color: #ef4444;
    /* Brighter, more modern red */
    animation: heartPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }

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

.product-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: left;
}

/* Sold Badge Positioning & Styling */
.product-pricing {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Left align to match title */
    gap: 4px;
    margin-bottom: -10px;
}

/* Specific Alignment for Products Page Grid */
.products-list-page .product-pricing {
    margin-top: auto;
    /* Push to bottom for perfect alignment in grid rows */
}

.product-price {
    font-size: 19px;
    font-weight: 800;
    color: #007a3b;
    margin-bottom: 0;
    letter-spacing: -0.5px;
}

.sold-badge {
    display: none;
    position: absolute;
    top: 110px;
    left: 10px;
    align-items: center;
    gap: 3px;
}

.sold-badge i {
    font-size: 10px;
    color: #666;
}

.sold-badge span {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
}

html.dark-mode .sold-badge {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

html.dark-mode .sold-badge span {
    color: #cbd5e1;
}

.rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-bottom: 12px;
}

.rating i {
    color: #ffc107;
    font-size: 13px;
}

/* Actions container removed */

/* View details button removed for premium grid */

.quick-add-btn {
    position: absolute;
    bottom: 9px;
    right: 9px;
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid rgba(0, 166, 81, 0.2);
    border-radius: 50%;
    color: #00a651;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 10;
}

.quick-add-btn:hover {
    background: #00a651;
    color: white;
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 8px 20px rgba(0, 166, 81, 0.3);
    border-color: #00a651;
}

.quick-add-btn.success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #00a651;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

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

.loading-state p {
    color: #666;
    font-size: 16px;
    font-weight: 500;
}

/* No Results State */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.no-results i {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 20px;
    color: #666;
    margin-bottom: 10px;
}

.no-results p {
    font-size: 14px;
    color: #999;
}

/* Floating Cart Button */
.floating-cart-btn {
    position: fixed;
    bottom: 90px;
    bottom: calc(110px + env(safe-area-inset-bottom));
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00a651, #00d46a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(0, 166, 81, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
}

.floating-cart-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 30px rgba(0, 166, 81, 0.5);
}

.floating-cart-btn i {
    color: white;
    font-size: 26px;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: 0px;
    background-color: #ff4757;
    color: white;
    font-size: 11px;
    font-weight: 700;
    height: 22px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.cart-count.show {
    display: flex;
}

/* Bottom Navigation Bar */

/* --- PREMIUM HANGING SHOWCASE --- */
.hanging-showcase-container {
    position: absolute;
    top: 100%;
    right: 70px;
    display: flex;
    gap: 10px;
    z-index: 1001;
    pointer-events: auto;
}

.hanging-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: top center;
    animation: showcaseSwing 8s ease-in-out infinite;
}

.hanging-item.item-1 {
    animation-delay: 0s;
}

.hanging-item.item-2 {
    animation-delay: -1.5s;
}

.hanging-item.item-3 {
    animation-delay: -3.5s;
}

.hanging-item .rope {
    width: 1px;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.6),
            rgba(255, 255, 255, 0.1));
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}

.item-1 .rope {
    height: 45px;
}

.item-2 .rope {
    height: 75px;
}

.item-3 .rope {
    height: 55px;
}

.circle-frame {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    padding: 3px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 0 15px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.circle-frame::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg,
            rgba(0, 166, 81, 0.5),
            transparent,
            rgba(0, 212, 106, 0.5));
    -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: opacity 0.4s ease;
}

.circle-frame:hover {
    transform: scale(1.15) translateY(5px);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow:
        0 15px 45px rgba(0, 166, 81, 0.4),
        0 0 20px rgba(0, 166, 81, 0.2);
}

.verified-badge {
    background: #52ff88 !important;
}

.circle-frame:hover::after {
    opacity: 1;
}

.circle-frame img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    opacity: 0.9;
    filter: brightness(1.1) contrast(1.1);
    transition: transform 0.6s ease;
}

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

.showcase-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0, 166, 81, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.circle-frame:hover .showcase-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Winner Spotlight Animation */
.hanging-item.winner-active .circle-frame {
    border-color: rgba(255, 215, 0, 0.6);
    /* Gold border for winners */
    box-shadow: 0 0 20px rgba(0, 166, 81, 0.2);
}

.hanging-item.winner-active img {
    opacity: 1;
    filter: brightness(1.2) contrast(1.1);
}

/* Micro-interaction for winner update */
@keyframes winnerPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

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

.winner-pop {
    animation: winnerPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes showcaseSwing {

    0%,
    100% {
        transform: rotate(-4deg);
    }

    50% {
        transform: rotate(4deg);
    }
}

@media (max-width: 480px) {
    .product-badges-container {
        position: absolute;
        top: 195px !important;
        left: 0px;
        display: flex;
        flex-direction: column;
        gap: 6px;
        z-index: 2;
        pointer-events: none;
    }

    .hanging-showcase-container {
        right: 2px;
        gap: 0px;
    }

    .circle-frame {
        width: 50px;
        height: 50px;
    }

    .item-1 .rope {
        height: 35px;
    }

    .item-2 .rope {
        height: 60px;
    }

    .item-3 .rope {
        height: 42px;
    }

    .price-container {
        top: -5px;
        left: 0px;
        position: relative;
        display: flex;
        gap: 5px;
        flex-wrap: wrap;
        align-items: flex-end;
    }
}

/* --- HANGING MOON (DARK MODE ONLY) --- */
.hanging-moon-container {
    position: absolute;
    top: 100%;
    /* Attach to bottom of nav */
    right: 70px;
    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;
    }
}

/* Responsive Design */
@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }

    .main-content {
        padding: 0px 10px 0px;
    }
}

@media (max-width: 480px) {
    .hanging-moon-container {
        position: absolute;
        top: 100%;
        right: 30px;
        display: none;
        flex-direction: column;
        align-items: center;
        z-index: 1001;
        pointer-events: none;
        transform-origin: top center;
        animation: moonSwing 4s ease-in-out infinite;
    }

    .product-image-wrapper {
        margin-top: 9px;
        width: 90px;
        height: 90px;
    }

    .product-name {
        font-size: 15px;
        min-height: 36px;
    }

    .product-price {
        font-size: 18px !important;
    }

    .view-details-btn {
        font-size: 9px;
        padding: 0px 0px;
    }

    .quick-add-btn {
        width: 40px;
        height: 40px;
    }

    .nursery-business-type {
        position: absolute;
        left: 100px;
        top: 125px;
        font-size: 7px;
        font-weight: 600;
        color: transparent;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        background: transparent;
        /* padding: 2px 6px; */
        border-radius: 10px;
        display: inline-block;
        margin-top: 2px;
    }

    .discount-percentage-badge {
        /* position: absolute !important; Removed to allow flow alignment */
        /* left: 12px !important; */
        background: linear-gradient(135deg, #ff3366 0%, #ff6b9d 100%);
        color: white;
        font-size: 0.75rem;
        font-weight: 700;
        padding: 3px 8px;
        border-radius: 20px;
        display: inline-flex;
        align-items: center;
        gap: 3px;
        box-shadow: 0 2px 8px rgba(255, 51, 102, 0.3);
        align-self: flex-start;
        /* Ensure it stays left */
        margin-left: 0;
    }
}

/* Premium Scroll Reveal Overrides */
.product-card.scroll-reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    visibility: hidden;
}

.product-card.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}

/* snappy hover transition AFTER reveal */
.product-card.scroll-reveal.active:hover {
    transition: transform 0.3s ease !important;
}

/* 3D Moving AI Button */
.floating-3d-btn {
    position: fixed;
    bottom: 90px;
    bottom: calc(110px + env(safe-area-inset-bottom));
    left: 20px;
    width: 60px;
    height: 60px;
    z-index: 1000;
    transform-style: preserve-3d;
    perspective: 1000px;
    cursor: pointer;
    text-decoration: none;
    animation: float3D 6s ease-in-out infinite;
}

.floating-3d-btn .btn-face {
    position: absolute;
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 10px;
    font-family: "Poppins", sans-serif;
    backface-visibility: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cube Construction */
.floating-3d-btn .front {
    transform: translateZ(30px);
    background: linear-gradient(135deg, #00a651, #00d46a);
    border-radius: 15px;
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.3);
    z-index: 2;
}

.floating-3d-btn .back {
    transform: rotateY(180deg) translateZ(30px);
    background: #007a3d;
    border-radius: 15px;
}

.floating-3d-btn .right {
    transform: rotateY(90deg) translateZ(30px);
    width: 60px;
    background: #008f45;
    border-radius: 15px;
}

.floating-3d-btn .left {
    transform: rotateY(-90deg) translateZ(30px);
    width: 60px;
    background: #008f45;
    border-radius: 15px;
}

.floating-3d-btn .top {
    transform: rotateX(90deg) translateZ(30px);
    height: 60px;
    background: #00d46a;
    border-radius: 15px;
}

.floating-3d-btn .bottom {
    transform: rotateX(-90deg) translateZ(30px);
    height: 60px;
    background: #005c2e;
    border-radius: 15px;
    box-shadow: 0 30px 40px rgba(0, 0, 0, 0.4);
}

.floating-3d-btn i {
    font-size: 24px;
    margin-bottom: 2px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Glow Effect */
.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(28px);
    width: 40px;
    height: 40px;
    background: radial-gradient(circle,
            rgba(255, 255, 255, 0.8) 0%,
            transparent 70%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.floating-3d-btn:hover .glow-effect {
    opacity: 0.6;
}

/* Animations */
@keyframes float3D {
    0% {
        transform: translateY(0) rotateY(0deg) rotateX(0deg);
    }

    25% {
        transform: translateY(-15px) rotateY(-10deg) rotateX(5deg);
    }

    50% {
        transform: translateY(0) rotateY(0deg) rotateX(0deg);
    }

    75% {
        transform: translateY(-8px) rotateY(10deg) rotateX(-5deg);
    }

    100% {
        transform: translateY(0) rotateY(0deg) rotateX(0deg);
    }
}

.floating-3d-btn:hover {
    animation-play-state: paused;
    transform: scale(1.1) rotateY(360deg);
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- NEW ANIMATION: ICON CRUSH & SHATTER --- */
.morph-btn {
    position: relative;
    width: 110px !important;
    height: 40px !important;
    padding: 0 !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    border: none !important;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Container */
.morph-track {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Common State Styles */
.morph-state {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0;
    pointer-events: none;

    /* 12s Cycle */
    animation: stateLifeCycle 12s infinite linear;
}

/* Staggered Starts */
.morph-state:nth-child(1) {
    animation-delay: 0s;
}

.morph-state:nth-child(2) {
    animation-delay: 4s;
}

.morph-state:nth-child(3) {
    animation-delay: 8s;
}

/* Inner Animations - Refined per State */
.state-home i {
    animation: homeSlide 12s infinite cubic-bezier(0.7, 0, 0.3, 1) !important;
}

.state-home span {
    animation: homeText 12s infinite cubic-bezier(0.7, 0, 0.3, 1) !important;
}

.state-fresh i {
    animation: leafErase 12s infinite cubic-bezier(0.7, 0, 0.3, 1) !important;
    animation-delay: 4s !important;
}

.state-fresh span {
    animation: leafText 12s infinite cubic-bezier(0.7, 0, 0.3, 1) !important;
    animation-delay: 4s !important;
}

.state-organic i {
    animation: organicCover 12s infinite cubic-bezier(0.7, 0, 0.3, 1) !important;
    animation-delay: 8s !important;
}

.state-organic span {
    animation: organicText 12s infinite cubic-bezier(0.7, 0, 0.3, 1) !important;
    animation-delay: 8s !important;
}

/* --- KEYFRAMES --- */

@keyframes stateLifeCycle {
    0% {
        opacity: 0;
        z-index: 1;
    }

    5% {
        opacity: 1;
        z-index: 10;
    }

    30% {
        opacity: 1;
        z-index: 10;
    }

    35% {
        opacity: 0;
        z-index: 1;
    }

    100% {
        opacity: 0;
        z-index: 1;
    }
}

/* --- STATE 1: HOME SLIDE --- */
@keyframes homeSlide {
    0% {
        transform: translateX(-50px);
        opacity: 0;
    }

    5% {
        transform: translateX(0);
        opacity: 1;
    }

    20% {
        transform: translateX(0);
    }

    30% {
        transform: translateX(110px);
        opacity: 1;
    }

    35% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

@keyframes homeText {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    5% {
        opacity: 1;
        transform: scale(1);
    }

    22% {
        opacity: 1;
        transform: translateX(0);
    }

    28% {
        opacity: 0;
        transform: translateX(20px);
    }

    100% {
        opacity: 0;
    }
}

/* --- STATE 2: LEAF ERASE --- */
@keyframes leafErase {
    0% {
        transform: translateX(-30px) rotate(-20deg);
        opacity: 0;
    }

    5% {
        transform: translateX(0) rotate(0);
        opacity: 1;
    }

    20% {
        transform: translateX(0) rotate(0);
    }

    25% {
        transform: translateX(40px) rotate(15deg);
    }

    30% {
        transform: translateX(100px) rotate(30deg);
        opacity: 1;
    }

    35%,
    100% {
        opacity: 0;
    }
}

@keyframes leafText {
    0% {
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    22% {
        opacity: 1;
        width: auto;
    }

    28% {
        opacity: 0;
        width: 0;
        transform: translateX(10px);
        overflow: hidden;
    }

    100% {
        opacity: 0;
    }
}

/* --- STATE 3: ORGANIC COVER --- */
@keyframes organicCover {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    5% {
        transform: scale(1);
        opacity: 1;
    }

    20% {
        transform: scale(1);
    }

    25% {
        transform: scale(15);
    }

    /* Covers the section */
    30% {
        transform: scale(20);
        opacity: 1;
    }

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

@keyframes organicText {
    0% {
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    22% {
        opacity: 1;
        transform: scale(1);
    }

    26% {
        opacity: 0;
        transform: scale(1.5);
    }

    100% {
        opacity: 0;
    }
}

/* Badges Container - Right Aligned */
.product-badges-container {
    position: absolute;
    top: 220px;
    right: 0px;
    /* Hang slightly off right edge */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    z-index: 6;
}

.promo-badge {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    font-size: 6px;
    font-weight: 700;
    padding: 1px 3px;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    text-transform: uppercase;
    box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.1);
}

.badge-bestseller {
    background: linear-gradient(135deg, #ffd700, #ffa000);
    color: #000;
}

.badge-trending {
    background: linear-gradient(135deg, #ff5252, #d32f2f);
}

/* --- STATE THEMES --- */
/* Kept generic colors for clarity or use theme colors */

.state-home {
    background: #ffffff;
    color: #00a651;
}

.state-fresh {
    background: #00a651;
    color: #ffffff;
}

.state-fresh i {
    animation: leafShake 2.5s infinite ease-in-out;
}

@keyframes leafShake {

    0%,
    100% {
        transform: rotate(0);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

.state-organic {
    background: linear-gradient(135deg, #628eff 0%, #353535 100%);
    color: #c8e6c9;
    /* Soft pale green text */
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.state-organic i {
    color: #4caf50;
    /* Brighter green for seedling */
    animation: growUp 3s infinite ease-in-out;
}

@keyframes growUp {

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

    50% {
        transform: scale(1.2) translateY(-2px);
    }
}

/* Animations Handled Individually Above */

/* Dark Mode Support Updates */
html.dark-mode .state-home,
body.dark-mode .state-home {
    background: #1e293b;
    color: #10b981;
}

/* Hover Effects */
.morph-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 166, 81, 0.3);
}

.morph-btn:active {
    transform: scale(0.95);
}

/* Glint Animation */
.morph-glint {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    animation: glintMove 5s infinite linear;
    pointer-events: none;
    z-index: 20;
}

@keyframes glintMove {
    0% {
        left: -100%;
    }

    20%,
    100% {
        left: 100%;
    }
}

@keyframes pulseGlow {

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

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Dark Mode Support */
html.dark-mode .state-web,
body.dark-mode .state-web {
    background: #1e293b;
    color: #10b981;
}

html.dark-mode .morph-btn,
body.dark-mode .morph-btn {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* Package Portal Button (Adapted from Profile) */
.package-cta-container {
    margin: 20px 5px 30px 5px;
    padding: 0 5px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.package-portal-btn {
    width: 100%;
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 20px 30px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(27, 94, 32, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.package-portal-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg) translateX(-150%);
    transition: transform 0.5s;
}

.package-portal-btn:hover::before {
    transform: skewX(-25deg) translateX(150%);
    transition: transform 0.7s;
}

.package-portal-btn:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 15px 35px rgba(27, 94, 32, 0.35);
}

.package-portal-btn i.main-icon {
    font-size: 24px;
    background: rgba(255, 255, 255, 0.2);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 15px;
}

.pkg-btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
}

.pkg-btn-title {
    font-size: 18px;
    font-weight: 800;
    font-family: "Outfit", sans-serif;
}

.pkg-btn-subtitle {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.9;
    margin-top: 2px;
}

/* Animation Elements */
.cart-anim-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.cart-icon-anim {
    position: absolute;
    bottom: 12px;
    left: -40px;
    font-size: 24px !important;
    color: rgba(255, 255, 255, 0.15) !important;
    background: none !important;
    width: auto !important;
    height: auto !important;
    animation: driveCart 4s linear infinite;
    transform: rotate(-5deg);
}

.wind-lines {
    position: absolute;
    bottom: 18px;
    left: -60px;
    width: 30px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow:
        0 -5px 0 rgba(255, 255, 255, 0.2),
        0 5px 0 rgba(255, 255, 255, 0.2);
    animation: driveWind 4s linear infinite;
}

@keyframes driveCart {
    0% {
        left: -40px;
        opacity: 0;
        transform: rotate(-5deg) translateY(0);
    }

    5% {
        opacity: 1;
    }

    20% {
        transform: rotate(5deg) translateY(-2px);
    }

    40% {
        transform: rotate(-5deg) translateY(0);
    }

    60% {
        transform: rotate(5deg) translateY(-2px);
    }

    80% {
        opacity: 1;
    }

    90% {
        opacity: 0;
    }

    100% {
        left: 110%;
        opacity: 0;
        transform: rotate(-5deg) translateY(0);
    }
}

@keyframes driveWind {
    0% {
        left: -60px;
        opacity: 0;
    }

    5% {
        opacity: 0.5;
    }

    90% {
        opacity: 0.5;
    }

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

/* --- MORPH BUTTON (From Profile) --- */
.morph-btn {
    position: relative;
    width: 110px !important;
    height: 40px !important;
    padding: 0 !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    border: none !important;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    margin-left: 20px;
}

.morph-track {
    display: flex;
    flex-direction: column;
    height: 300%;
    width: 100%;
    animation: morphVerticalCycle 8s cubic-bezier(0.85, 0, 0.15, 1) infinite;
}

.morph-state {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* State Themes */
.state-web {
    background: #ffffff;
    color: #00a651;
}

.state-explore {
    background: #008f45;
    color: #ffffff;
    overflow: hidden;
}

.state-explore i {
    animation: rocketFly 2.66s infinite ease-in;
}

.state-universe {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #38bdf8;
    position: relative;
    box-shadow: inset 0 0 15px rgba(56, 189, 248, 0.4);
    overflow: hidden;
}

.state-universe i {
    text-shadow: 0 0 10px #38bdf8;
    animation: starPulseFly 2.66s infinite ease-in;
}

.state-universe::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center,
            rgba(56, 189, 248, 0.2) 0%,
            transparent 70%);
    animation: pulseGlow 2s infinite ease-in-out;
}

/* Hover Effects */
.morph-btn:hover {
    transform: scale(1.05);
    box-shadow:
        0 0 20px rgba(255, 255, 255, 0.4),
        0 0 10px rgba(0, 166, 81, 0.3);
}

.morph-btn:active {
    transform: scale(0.95);
}

/* Glint Animation */
.morph-glint {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    animation: glintMove 4s infinite linear;
    pointer-events: none;
}

/* Keyframes */
@keyframes morphVerticalCycle {

    0%,
    25% {
        transform: translateY(0);
    }

    29% {
        transform: translateY(-35.333%);
    }

    33%,
    58% {
        transform: translateY(-33.333%);
    }

    62% {
        transform: translateY(-68.666%);
    }

    66%,
    91% {
        transform: translateY(-66.666%);
    }

    95% {
        transform: translateY(2%);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes pulseGlow {

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

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes glintMove {
    0% {
        left: -100%;
    }

    15%,
    100% {
        left: 100%;
    }
}

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

    40% {
        transform: translate(0, 0) scale(1.5);
        opacity: 1;
    }

    70% {
        transform: translate(20px, -40px) scale(2);
        opacity: 0;
    }

    71% {
        transform: translate(-20px, 40px) scale(0.5);
        opacity: 0;
    }

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

@keyframes starPulseFly {
    0% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }

    40% {
        transform: scale(3) rotate(180deg);
        opacity: 1;
        filter: blur(0px);
    }

    70% {
        transform: scale(6) rotate(360deg);
        opacity: 0;
        filter: blur(4px);
    }

    71% {
        transform: scale(0) rotate(0);
        opacity: 0;
    }

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

/* Responsive Masonry Layout - Scoped to Products Page Only */
@media (min-width: 768px) {
    .products-list-page .product-grid {
        column-count: 2;
        /* Maintains 2 for tablet for better density */
        column-gap: 15px;
    }
}

@media (min-width: 1024px) {
    .products-list-page .product-grid {
        column-count: 4;
        /* 4 items per row on PC as requested */
        column-gap: 15px;
    }
}

@media (min-width: 1440px) {
    .products-list-page .product-grid {
        column-count: 4;
        column-gap: 20px;
    }
}

/* Promo Card Styles */
.promo-card {
    background-size: cover;
    background-position: center;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    text-align: left;
    padding: 20px;
    overflow: hidden;
    position: relative;
    grid-column: span 1;
    /* Default */
    min-height: 250px;
    /* Ensure visibility */
    transition:
        transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.3s ease;
}

.promo-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.1),
            rgba(0, 0, 0, 0.8));
    z-index: 1;
}

.promo-content {
    position: relative;
    z-index: 2;
    color: white;
    width: 100%;
}

.promo-tag {
    background: #00a651;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.promo-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Refined Promo Styling - Matches Product Cards */
.promo-card {
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    text-align: left;
    padding: 20px;
    overflow: hidden;
    position: relative;
    grid-column: span 1;
    /* Ensure fill height */
    height: 100%;
    min-height: 230px;
    transition:
        transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.3s ease;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.promo-card::before {
    content: "";
    position: absolute;
    inset: 0;
    /* Sophisticated gradient for text legibility */
    background: linear-gradient(to top, rgb(0 0 0 / 29%) 0%, rgb(0 0 0 / 0%) 50%, rgb(0 0 0 / 0%) 100%);
    z-index: 1;
    transition: background 0.3s ease;
}

.promo-content {
    position: relative;
    z-index: 2;
    color: white;
    width: 100%;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.promo-tag {
    background: #00a651;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 8px;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.promo-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.15;
    color: #fff;
    font-family: "Poppins", sans-serif;
}

.promo-subtitle {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.95;
    margin-bottom: 16px;
    line-height: 1.4;
    max-width: 90%;
    color: rgba(255, 255, 255, 0.95);
}

.promo-btn {
    background: white;
    color: #00a651;
    border: none;
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
}

/* Wide variant */
.promo-wide {
    grid-column: span 2;
}

/* Hover Effects */
.promo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.promo-card:hover .promo-btn {
    transform: scale(1.05) translateX(5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .promo-wide {
        grid-column: span 2;
    }
}
