:root {
    --primary-green: #2D5A27;
    --secondary-brown: #5D4037;
    --bg-cream: #F9F7F2;
    --text-dark: #333333;
    --text-muted: #666666;
    --white: #ffffff;
    --border-color: rgba(93, 64, 55, 0.1);
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 25px rgba(45, 90, 39, 0.15);
}

html, body {
    overflow-x: hidden;
}

body {
    background-color: var(--bg-cream);
    color: var(--text-dark);
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-cream); }
::-webkit-scrollbar-thumb { background: var(--primary-green); border-radius: 4px; }

/* Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, #3A7233 0%, var(--primary-green) 100%);
    color: var(--white);
    border: none;
    border-radius: 50px;
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: var(--white);
}

.btn-outline-custom {
    background: transparent;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
    border-radius: 50px;
    padding: 8px 22px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    background: var(--primary-green);
    color: var(--white);
}

/* Cards */
.product-card {
    background: var(--white);
    border-radius: 18px;
    border: 1px solid var(--border-color);
    padding: 15px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: var(--shadow-soft);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.product-card .img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 15px;
}

.product-card img {
    transition: transform 0.5s ease;
}

.product-card:hover img {
    transform: scale(1.08);
}

/* Badges */
.badge-custom {
    background: var(--secondary-brown);
    color: var(--white);
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}
.badge-organic {
    background: var(--primary-green);
}

/* Skeleton Loading */
.skeleton {
    background: #e2e2e2;
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
    background-size: 40px 100%;
    background-repeat: no-repeat;
    background-position: left -40px top 0;
    animation: shimmer 1.5s ease infinite;
}

@keyframes shimmer {
    100% { background-position: right 40px top 0; }
}

/* Header & Nav */
.navbar-custom {
    background: rgba(249, 247, 242, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.nav-link-custom {
    color: var(--secondary-brown);
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
}
.nav-link-custom:hover {
    color: var(--primary-green);
}
.nav-link-custom::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-green);
    transition: all 0.3s;
    transform: translateX(-50%);
}
.nav-link-custom:hover::after {
    width: 100%;
}

/* Old footer styles removed - replaced by Premium Footer below */

/* Utils */
.text-primary-green { color: var(--primary-green) !important; }
.text-secondary-brown { color: var(--secondary-brown) !important; }
.bg-cream { background-color: var(--bg-cream) !important; }

/* Micro Interactions */
.ripple {
    position: relative;
    overflow: hidden;
}
.ripple::after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform .5s, opacity 1s;
}
.ripple:active::after {
    transform: scale(0, 0);
    opacity: .3;
    transition: 0s;
}

/* Premium Product Card & Flip Effect */
.product-card {
    background: var(--white);
    border-radius: 18px;
    border: 1px solid var(--border-color);
    padding: 15px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.product-card .img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 15px;
    height: 200px;
}

/* Flip Image Container */
.flip-img-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.flip-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.5s ease, transform 0.6s ease;
}

.flip-img-container .back-img {
    opacity: 0;
    transform: scale(1.1);
}

.product-card:hover .flip-img-container .front-img {
    opacity: 0;
}

.product-card:hover .flip-img-container .back-img {
    opacity: 1;
    transform: scale(1);
}

/* Buttons Fade In */
.card-action-btns {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s ease;
    padding: 0 15px;
}

.product-card:hover .card-action-btns {
    opacity: 1;
    transform: translateY(0);
}

/* Search Suggestions Dropdown */
.search-suggestions {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.search-suggestion-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text-dark);
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover {
    background: #f1f8f1;
}

.search-suggestion-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
}

.search-suggestion-title {
    font-weight: 600;
    margin-bottom: 2px;
    font-size: 0.9rem;
}

.search-suggestion-category {
    font-size: 0.75rem;
    color: var(--primary-green);
}

/* Swiper Custom Overrides */
.swiper-button-next, .swiper-button-prev {
    color: var(--primary-green) !important;
    background: white;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    box-shadow: var(--shadow-soft);
}

.swiper-button-next::after, .swiper-button-prev::after {
    font-size: 16px !important;
    font-weight: bold;
}

.swiper-pagination-bullet-active {
    background: var(--primary-green) !important;
}

/* Premium Category Showcase */
.animated-underline {
    width: 0;
    transition: width 1s ease-in-out;
}
.aos-animate .animated-underline {
    width: 80px !important;
}

.premium-category-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.premium-category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(45, 90, 39, 0.15);
    border-color: rgba(45, 90, 39, 0.3);
    background: rgba(255, 255, 255, 0.9);
}

.category-img-ring {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
    transition: all 0.6s ease;
    position: relative;
}

.premium-category-card:hover .category-img-ring {
    background: linear-gradient(135deg, var(--primary-green), #7db875);
    transform: rotate(360deg);
    box-shadow: 0 0 20px rgba(45, 90, 39, 0.3);
}

.category-img-inner {
    width: 100%;
    height: 100%;
}

.category-img-inner img {
    transition: transform 0.6s ease;
}

.premium-category-card:hover .category-img-inner img {
    transform: scale(1.15);
}

.category-title {
    color: var(--secondary-brown);
}

.premium-category-card:hover .category-title {
    color: var(--primary-green);
}

.category-underline {
    width: 0;
    height: 2px;
    background-color: var(--primary-green);
    transition: width 0.4s ease;
}

.premium-category-card:hover .category-underline {
    width: 40px;
}

.category-arrow {
    transform: translateY(10px);
}

.premium-category-card:hover .category-arrow {
    opacity: 1 !important;
    transform: translateY(0);
}

.category-btn-next, .category-btn-prev {
    background: white;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    top: 55%;
}
.category-btn-next::after, .category-btn-prev::after {
    font-size: 1.2rem !important;
    font-weight: bold;
}
.category-btn-next { right: -15px; }
.category-btn-prev { left: -15px; }
.transition-color { transition: color 0.3s ease; }
.transition-all { transition: all 0.4s ease; }

/* Navbar Solid State */
#main-navbar {
    background: rgba(249, 247, 242, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

#main-navbar.navbar-scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

/* Premium Marquee */
.premium-topbar {
    background: linear-gradient(90deg, #2D5A27, #3F7A35);
}
.marquee-container {
    width: 100%;
    overflow: hidden;
}
.marquee-content {
    animation: scroll-marquee 25s linear infinite;
}
.marquee-content:hover {
    animation-play-state: paused;
}
@keyframes scroll-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* -50% because we duplicated the content */
}
.white-space-nowrap { white-space: nowrap; }

/* Premium Search Bar */
.search-pill {
    background: #f1f3f1;
    border: 2px solid transparent;
    border-radius: 50px;
    transition: all 0.3s ease;
}
.search-form:focus-within .search-pill {
    background: white;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(45, 90, 39, 0.1) !important;
}

/* Nav Action Icons */
.nav-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: var(--secondary-brown);
    font-size: 1.25rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}
.nav-icon-btn:hover {
    color: var(--primary-green);
    background: rgba(45, 90, 39, 0.08);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(45, 90, 39, 0.15);
}

/* Header Badges */
.header-badge {
    background-color: var(--primary-green) !important;
    color: white !important;
    font-size: 0.7rem;
    padding: 0.35em 0.55em;
    border: 2px solid white;
    top: 5px !important;
    right: -2px !important;
    transform: translate(0, -50%) !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Premium Login Button */
.btn-login-custom {
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
    background: white;
    padding: 8px 26px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.btn-login-custom:hover {
    background: var(--primary-green);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(45, 90, 39, 0.2) !important;
}

/* User Avatar */
.nav-user-btn {
    padding: 5px 10px 5px 5px !important;
    border-radius: 50px;
    transition: all 0.3s ease;
}
.nav-user-btn:hover {
    background: rgba(0,0,0,0.03);
}
.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #e8ede8;
    color: var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Testimonial Card */
.testimonial-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    text-align: center;
    position: relative;
    margin: 20px 10px;
}
.testimonial-card::before {
    content: '\201C';
    font-size: 60px;
    color: var(--primary-green);
    opacity: 0.2;
    position: absolute;
    top: -10px;
    left: 20px;
}

/* Premium Footer */
.footer-premium {
    background: var(--secondary-brown);
    padding: 60px 20px 30px 20px;
}
@media (min-width: 992px) {
    .footer-premium {
        padding: 80px 0 30px 0;
    }
}
.footer-premium .footer-container {
    max-width: 1200px;
    margin: 0 auto;
}
.newsletter-wrapper {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.newsletter-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50px;
    padding: 15px 25px;
    transition: all 0.3s ease;
}
.newsletter-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-green);
    color: white;
    box-shadow: 0 0 15px rgba(45, 90, 39, 0.5);
    outline: none;
}
.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}
.newsletter-btn {
    border-radius: 50px;
    padding: 15px 30px;
    width: 100%;
    background: #4a8b41;
    border: 1px solid #5fa655;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.newsletter-btn:hover {
    background: #5fa655;
    border-color: #7db875;
}
@media (min-width: 992px) {
    .newsletter-form {
        flex-direction: row;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        padding: 5px;
        gap: 0;
    }
    .newsletter-input {
        background: transparent;
        border: none;
        padding: 15px 25px;
        flex: 1;
    }
    .newsletter-input:focus {
        background: transparent;
        box-shadow: none;
    }
    .newsletter-btn {
        width: auto;
        padding: 12px 30px;
    }
}
.footer-logo {
    transition: transform 0.3s ease;
}
.footer-logo:hover {
    transform: scale(1.05);
}
.social-icons .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}
.social-icons .social-icon:hover {
    background: #4a8b41; /* Brighter green for better contrast on brown */
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.footer-heading {
    position: relative;
    display: inline-block;
}
.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 2px;
    background: #8ec67b; /* Brighter green for visibility */
    transition: width 0.3s ease;
}
.footer-heading:hover::after {
    width: 100%;
}
.footer-links li {
    margin-bottom: 12px;
}
.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}
.footer-links a:hover {
    color: #ffffff; /* Changed from dark primary-green to white for visibility */
    transform: translateX(5px);
}
.payment-icons i {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}
.payment-icons i:hover {
    color: white;
    transform: scale(1.2);
}
.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
}
.letter-spacing-1 {
    letter-spacing: 1px;
}
.copyright-text p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

/* Premium Mobile Bottom Nav */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 1030;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.08) !important;
}
.mobile-bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 0 10px 0;
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.3s ease;
}
.mobile-bottom-nav .nav-item:hover, 
.mobile-bottom-nav .nav-item.active {
    color: var(--primary-green);
}
.mobile-bottom-nav .nav-icon {
    font-size: 1.3rem;
    margin-bottom: 6px;
    transition: transform 0.3s ease;
}
.mobile-bottom-nav .nav-item:hover .nav-icon,
.mobile-bottom-nav .nav-item.active .nav-icon {
    transform: translateY(-3px);
}
.mobile-bottom-nav .nav-text {
    font-size: 0.7rem;
    font-weight: 600;
}
.mobile-bottom-nav .cart-nav-badge {
    font-size: 0.65rem;
    padding: 0.35em 0.6em;
    border: 2px solid white;
    top: 5px !important;
}
@media (max-width: 991px) {
    body {
        padding-bottom: 80px; /* Space for bottom nav */
    }
}

/* Product Hover Effects */
.product-img-wrapper .img-front,
.product-img-wrapper .img-back {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease-in-out;
}
.product-img-wrapper .img-back {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}
@media (hover: hover) {
    .product-img-wrapper.has-back-img:hover .img-back {
        opacity: 1;
    }
    .product-img-wrapper.has-back-img:hover .img-front {
        opacity: 0;
    }
}
/* WhatsApp Floating Button */
.whatsapp-floating-btn {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 90px; /* Above the mobile bottom nav */
    right: 20px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0px 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.whatsapp-floating-btn:hover {
    background-color: #128C7E;
    color: #FFF;
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0px 8px 25px rgba(37, 211, 102, 0.6);
}
.whatsapp-floating-btn i {
    margin-top: 2px;
}

@media (max-width: 991px) {
    .whatsapp-floating-btn {
        width: 55px;
        height: 55px;
        bottom: 90px; /* Make sure it sits above the mobile bottom nav bar */
        right: 15px;
        font-size: 28px;
    }
}
@media (min-width: 992px) {
    .whatsapp-floating-btn {
        bottom: 30px; /* standard desktop spacing */
        right: 30px;
        width: 65px;
        height: 65px;
        font-size: 35px;
    }
}