/* MODERN BOTANICAL BENTO THEME */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: #F4F2ED;
    --bg-white: #FFFFFF;
    --primary: #1A3C28;
    --accent: #E86A33;
    --surface-soft: #E6EBE6;
    --text-main: #1A1A1A;
    --text-muted: #666666;

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;

    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
}

/* --- NAVBAR STYLES (FOUNDER STYLE) --- */
.navbar {
    position: fixed;
    top: 20px;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0 20px;
}

.navbar .container-nav {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 15px 30px;
    border-radius: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.logo-container {
    display: flex;
    align-items: center;
}

.nursery-logo-top {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.logo-container a:hover .nursery-logo-top {
    transform: scale(1.05);
}

.logo-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text {
    font-weight: 900;
    font-size: 24px;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #1A3C28, #E86A33);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-badge {
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 50px;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-item-top {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.nav-item-top:hover {
    color: var(--accent);
}

.nav-btn-top {
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* LAYOUT GRID */
.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* SIDEBAR STYLES */
.sidebar {
    background: var(--bg-white);
    padding: 2rem;
    position: fixed;
    top: 100px;
    width: 280px;
    height: calc(100vh - 100px);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 100;
}

.brand {
    display: none;
}

.nav-menu {
    list-style: none;
    margin-top: 1rem;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link.active,
.nav-link:hover {
    background: var(--surface-soft);
    color: var(--primary);
}

.nav-link i {
    width: 20px;
    text-align: center;
}

.user-actions {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 1.5rem;
}

.cart-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    transition: transform 0.2s;
}

/* MAIN CONTENT AREA */
.main-content {
    grid-column: 2;
    padding: 2rem;
    padding-top: 120px;
    margin-bottom: 4rem;
    min-width: 0;
}

/* BENTO HERO */
.bento-hero {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 300px 200px;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.bento-box {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-card);
}

.hero-main {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    background: var(--primary);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero-main h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    max-width: 400px;
}

.hero-main p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    max-width: 400px;
    margin-bottom: 2rem;
}

.hero-bg-img {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    object-fit: cover;
    mask-image: linear-gradient(to right, transparent, black 40%);
    -webkit-mask-image: linear-gradient(to right, transparent, black 40%);
}

.hero-offer {
    grid-column: 2 / 4;
    background: #FFD8A8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3rem;
}

.hero-offer h2 {
    color: #5E3013;
    font-size: 2rem;
}

.hero-offer .badge {
    background: #E86A33;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
}

.hero-stat {
    grid-column: 2 / 3;
    background: var(--surface-soft);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.stat-num {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
}

.hero-cta {
    grid-column: 3 / 4;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px dashed #ddd;
}

.circle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: transform 0.4s ease;
}

/* CATEGORY TABS (Perfectly styled) */
.category-filter {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding: 5px 5px 15px 5px;
    align-items: center;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.category-filter::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    flex-shrink: 0;
    padding: 10px 20px;
    background: var(--bg-white);
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    font-family: 'Outfit', sans-serif;
    color: var(--text-muted);
}

.filter-chip i {
    font-size: 0.9rem;
    opacity: 0.8;
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 5px 15px rgba(26, 60, 40, 0.3);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.filter-chip.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.8);
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--primary);
    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.1);
}

.nav-arrow-btn.prev {
    left: 10px;
    opacity: 0;
}

.nav-arrow-btn.next {
    right: 10px;
    opacity: 0;
}

@media (min-width: 1024px) {
    .category-scroll-wrapper:hover .nav-arrow-btn {
        opacity: 0.8;
        display: flex;
    }

    .nav-arrow-btn:hover {
        background: var(--primary);
        border-color: var(--primary);
        color: white;
        opacity: 1 !important;
        transform: translateY(-50%) scale(1.1);
    }
}

/* Hide on Mobile */
@media (max-width: 1023px) {
    .nav-arrow-btn {
        display: none !important;
    }
}

/* 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-chip:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* SHOP GRID */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
    border-color: var(--primary);
}

.card-img-wrapper {
    background: var(--bg-main);
    border-radius: var(--radius-md);
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.card-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.img-back {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
}

.product-card:hover .img-back {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.product-card:hover .img-front.has-back {
    opacity: 0;
}

/* Quick Add */
.quick-add {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.3s;
    color: var(--primary);
    border: none;
    cursor: pointer;
    z-index: 5;
}

.product-card:hover .quick-add {
    transform: translateY(0);
    opacity: 1;
}

.quick-add:hover {
    background: var(--primary);
    color: white;
}

/* Card details styling */
.card-nursery {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 2px 0;
}

.nursery-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);
    background: #f8f8f8;
}

.card-nursery span {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: -0.2px;
}

.verified-tick {
    color: #1da1f2;
    font-size: 0.75rem;
    filter: drop-shadow(0 0 2px rgba(29, 161, 242, 0.2));
}

.card-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.sold-count {
    color: var(--accent);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.1rem;
}

.rating {
    font-size: 0.8rem;
    color: #FFB800;
}

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 10;
    text-transform: capitalize;
}

.out-of-stock-overlay {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-weight: 700;
    font-size: 1.2rem;
    z-index: 4;
}

.shop-grid:has(.product-card:hover) .product-card:not(:hover) {
    opacity: 0.9;
    filter: blur(0.5px);
}

/* MOBILE RESPONSIVENESS */
@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 1fr;
    }

    .navbar {
        padding: 0 10px;
    }

    .navbar .container-nav {
        padding: 17px 20px;
        padding-right: 15px;
    }

    .logo-text {
        font-size: 15px;
    }

    .logo-badge {
        background: var(--accent);
        color: white;
        font-size: 7px;
        font-weight: 800;
        padding: 4px 6px;
        border-radius: 50px;
        letter-spacing: 1px;
    }

    .hero-offer .badge {
        position: relative;
        background: #E86A33;
        color: white;
        padding: 0.5rem 1.5rem;
        border-radius: 50px;
        font-weight: 600;
        left: 205px;
    }

    .logo {
        display: flex;
        align-items: center;
        gap: 2px;
    }

    .nav-links {
        display: flex;
        gap: 10px;
    }

    .nav-item-top {
        text-decoration: none;
        color: var(--text-muted);
        font-weight: 600;
        font-size: 10px;
        transition: all 0.3s;
    }

    .card-info h3 {
        font-size: .8rem;
        margin-bottom: 0px;
        line-height: 1.4;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hero-main p {
        color: rgba(255, 255, 255, 0.7);
        font-size: 8px;
        max-width: 400px;
        margin-bottom: 2rem;
    }

    .price {
        font-weight: 700;
        color: var(--accent);
        font-size: 15px;
    }

    .card-meta {
        display: flex;
        justify-content: space-between;
        font-size: 0.8rem;
        color: var(--text-muted);
        margin-bottom: 0px;
    }

    .category-tag {
        font-size: 12px;
    }

    .sidebar {
        position: fixed;
        top: auto;
        bottom: 0;
        width: 100%;
        height: auto;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        border-right: none;
        padding: 0.8rem 1.5rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-around;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
        z-index: 2000;
    }

    .nav-menu {
        margin-top: 0;
        display: none;
    }

    .user-actions {
        display: none;
    }

    .nav-btn-top {
        background: var(--primary);
        color: white;
        text-decoration: none;
        padding: 6px 7px;
        border-radius: 50px;
        font-size: 8px;
        font-weight: 700;
        transition: all 0.3s;
        display: flex;
        align-items: center;
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
        padding-top: 100px;
        padding-bottom: calc(var(--app-footer-height) + 20px);
        grid-column: 1;
    }

    .bento-hero {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 1rem;
    }

    .hero-main {
        grid-column: 1;
        grid-row: auto;
        min-height: 150px;
    }

    .hero-offer {
        grid-column: 1;
        grid-row: auto;
        min-height: 100px;
    }

    .hero-stat,
    .hero-cta {
        grid-column: 1;
        grid-row: auto;
        height: 115px;
    }

    .shop-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .product-card {
        padding: 8px;
        border-radius: var(--radius-md);
    }

    .card-img-wrapper {
        height: 160px;
    }

    .quick-add {
        opacity: 1;
        transform: translateY(0);
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .card-nursery span {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hero-main h1 {
        font-size: 2.2rem;
    }

    .nursery-logo-top {
        display: none;
        width: 38px;
        height: 38px;
        border-radius: 50%;
        object-fit: cover;
        border: 1.5px solid white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        transition: transform 0.3s ease;
    }
}

/* FLOATING CART BUTTON (Refined & Perfect) */
.floating-cart-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(26, 60, 40, 0.3);
    z-index: 3000;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.floating-cart-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 35px rgba(26, 60, 40, 0.4);
    background: linear-gradient(135deg, var(--primary), #2a5a3b);
}

.floating-cart-btn i {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.floating-cart-btn:hover i {
    transform: rotate(-10deg);
}

.floating-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--accent);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Animations that were missing */
@keyframes pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.25);
    }

    100% {
        transform: scale(1);
    }
}

.pop {
    animation: pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px) rotate(-4deg);
    }

    75% {
        transform: translateX(4px) rotate(4deg);
    }
}

.shake {
    animation: shake 0.4s ease-in-out;
}

@media (max-width: 1024px) {
    .floating-cart-btn {
        bottom: 90px;
        right: 20px;
        width: 65px;
        /* Harmonized size (not 70px to avoid clunk, but close to user desire) */
        height: 65px;
        font-size: 24px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    }

    .floating-count {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
        top: 0;
        right: 0;
        border-width: 2px;
    }
}

/* Database Sync Animations */
@keyframes pulse-sync {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(232, 106, 51, 0.4);
    }

    50% {
        transform: scale(1.3);
        box-shadow: 0 0 0 10px rgba(232, 106, 51, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(232, 106, 51, 0);
    }
}

.pulse-sync {
    animation: pulse-sync 0.6s ease-out !important;
}