/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Inheriting Shell Layout from style.css */
body {
    background: url("pic/tree-bg3.jpg");
    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: 24px;
    /* Slightly smaller for brand feel */
    font-weight: 700;
    margin: 0;
    letter-spacing: 1.5px;
    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: 61px !important;
}

.search-trigger-pill {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    height: 55px;
    display: flex;
    align-items: center;
    padding: 0 25px;
    gap: 15px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-trigger-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #00A651;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.search-trigger-pill i {
    color: #00A651;
    font-size: 18px;
}

.search-trigger-pill span {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
}

.search-trigger-pill kbd {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 10px;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.4);
}

/* 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: #00A651;
    border-color: #00A651;
    box-shadow: 0 5px 15px rgba(0, 166, 81, 0.4);
}

.category-pill.active i {
    opacity: 1;
}

/* 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-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 - Padded for Product Layout */
.main-content {
    margin-bottom: 0px;
    padding: 0px 10px 0px;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
    margin-bottom: 20px;
}

/* 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;
}

.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: 6px;
    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);
}

.nursery-logo-img {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #00A651;
}

.nursery-name {
    font-size: 9px;
    font-weight: 600;
    color: #00A651;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.nursery-business-type {
    /* position: absolute; */
    /* left: 111px; */
    /* top: 127px; */
    font-size: 7px;
    font-weight: 600;
    color: black;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: rgba(139, 69, 19, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 2px;
}


.category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #00A651, #00d46a);
    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);
}

.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: #4ade80;
    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: center;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #00A651;
    margin-bottom: 8px;
}

.rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-bottom: 12px;
}

.rating i {
    color: #FFC107;
    font-size: 13px;
}

.product-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.view-details-btn {
    flex: 1;
    background: linear-gradient(135deg, #00A651, #00d46a);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 166, 81, 0.3);
}

.view-details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 166, 81, 0.4);
}

.quick-add-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #00A651, #00d46a);
    border: none;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

.quick-add-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.5);
}

.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 */

/* --- 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: 13px;
        min-height: 36px;
    }

    .product-price {
        font-size: 16px;
    }

    .view-details-btn {
        font-size: 9px;
        padding: 0px 0px;
    }

    .quick-add-btn {
        width: 35px;
        height: 35px;
    }

    .nursery-business-type {
        position: absolute;
        left: 111px;
        top: 127px;
        font-size: 7px;
        font-weight: 600;
        color: #000000;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        background: transparent;
        /* padding: 2px 6px; */
        border-radius: 10px;
        display: inline-block;
        margin-top: 2px;
    }


}

/* 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;
}