:root {
    --primary-color: #2e7d32;
    --secondary-color: #4caf50;
    --accent-color: #81c784;
    --text-color: #333;
    --bg-color: #f9fbf9;
    --white: #ffffff;
    --footer-bg: #1b5e20;
    --btn-orange: #ff9f43;
    --btn-orange-hover: #f39c12;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--secondary-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.nav-icons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-color);
}

/* Dropdown Menu */
.nav-links li {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1001;
    top: 100%;
    left: 0;
    border-radius: 4px;
    padding: 0.5rem 0;
    list-style: none;
}

.dropdown-content li {
    padding: 0;
}

.dropdown-content li a {
    color: var(--text-color);
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}

.dropdown-content li a:hover {
    background-color: #f1f1f1;
    color: var(--secondary-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropbtn i {
    font-size: 0.8em;
    margin-left: 5px;
}

/* Search Bar */
.search-bar-container {
    display: none;
    background-color: #f1f1f1;
    padding: 10px 5%;
    border-bottom: 1px solid #ddd;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-form input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 20px;
    outline: none;
}

.close-search {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    margin-left: 10px;
    padding: 0 10px;
}

.close-search:hover {
    color: var(--primary-color);
}

.cart-icon {
    position: relative;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--secondary-color);
    color: var(--white);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Hero Section - Removed */
/* .hero { ... } */

/* Global Button Style (restored) */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: var(--secondary-color);
}

/* Hero Slider */
.hero-slider {
    position: relative;
    /* height: 60vh;  Removed fixed height */
    overflow: hidden;
    background-color: #f0f0f0;
}

.slider-wrapper {
    display: flex;
    height: auto; /* Changed from 100% */
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    /* height: 100%; Removed fixed height */
    background-size: cover;
    background-position: center;
    position: relative;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.banner-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Desktop: Limit height of banners (prevent them from being too tall) */
@media (min-width: 769px) {
    .banner-img {
        height: 400px; /* Fixed height for desktop */
        object-fit: cover; /* Crop top/bottom to maintain aspect ratio */
        object-position: center;
    }
}

/* Fallback/Default Slide needs height */
.default-slide {
    height: 60vh;
}

/* Content inside default slide */
.hero-content {
    background: rgba(0, 0, 0, 0.4);
    padding: 2rem;
    border-radius: 8px;
    color: white;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white !important;
    text-shadow: 2px 2px 4px black;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: white !important;
    background: transparent !important;
}

.hero-content .btn {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

.slider-controls button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
}

.prev-slide { left: 0; }
.next-slide { right: 0; }

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        gap: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 1rem;
    }

    /* Mobile Dropdown */
    .dropdown-content {
        position: static;
        box-shadow: none;
        background-color: #f9f9f9;
        display: none;
        width: 100%;
    }

    .dropdown:hover .dropdown-content {
        display: block;
    }

    .default-slide { height: 40vh; }
    .hero-content h1 { font-size: 2rem; }
    
    .products-section, .features, footer {
        padding-top: 2rem;
        padding-bottom: 2rem;
        margin-top: 2rem;
    }

    .section-title {
        margin-bottom: 2rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for mobile */
        gap: 10px; /* Reduced gap for mobile */
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .feature-item {
        min-width: 100%;
    }
}

/* Categories Section */
.categories-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 5%;
}

.categories-grid {
    display: flex;
    justify-content: flex-start;
    flex-wrap: nowrap; /* No wrapping, horizontal scroll */
    gap: 1.5rem;
    overflow-x: auto; /* Enable horizontal scroll */
    padding-bottom: 20px; /* Space for scrollbar */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #888 #f1f1f1; /* Firefox */
    -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
}

/* Custom Scrollbar for Chrome/Safari/Edge */
.categories-grid::-webkit-scrollbar {
    height: 8px;
}

.categories-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.categories-grid::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.categories-grid::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.category-item {
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    width: 180px; /* Wider card */
    min-width: 160px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    
    /* Card Styling (Reference Image) */
    background: #ffffff;
    border-radius: 24px; /* Very rounded corners */
    padding: 25px 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06); /* Soft diffused shadow */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.category-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.category-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover; /* Ensure image fills circle */
    margin-bottom: 1rem;
    
    /* Circle Background Look */
    background-color: #f7f7f7; /* Light grey circle background */
    border: 1px solid #f0f0f0;
    padding: 5px; /* Slight inner spacing */
    transition: border-color 0.3s ease;
}

.category-item:hover .category-img {
    border-color: var(--primary-color);
}

.category-name {
    font-size: 1rem;
    font-weight: 700; /* Bold text */
    margin: 0;
    color: #333; /* Dark text */
    transition: color 0.3s;
    line-height: 1.3;
}

.category-item:hover .category-name {
    color: var(--primary-color);
}

@media (max-width: 480px) {
    .categories-grid {
        gap: 1rem;
    }
    .category-item {
        width: 100px;
    }
    .category-img {
        width: 80px;
        height: 80px;
    }
    .category-name {
        font-size: 0.85rem;
    }
}

/* Products Section */
.products-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 5%;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.product-card {
    background: var(--white);
    border: 1px solid #eee; /* Light border */
    border-radius: 8px;
    overflow: hidden;
    padding: 15px; /* Inner spacing */
    transition: box-shadow 0.3s;
    text-align: center; /* Center alignment */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.product-card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: contain; /* Ensure image fits nicely */
    background-color: #fff;
    margin-bottom: 1rem;
}

.product-info {
    padding: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-category {
    display: none; /* Hide category to match image style */
}

.product-title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0.5rem 0;
    color: var(--text-color);
    line-height: 1.3;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem; /* Space before button */
    display: block;
}

.product-btn {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--primary-color);
    border: none;
    color: var(--white);
    border-radius: 5px;
    transition: background-color 0.3s;
    cursor: pointer;
    text-transform: capitalize;
    font-weight: 600;
}

.product-btn:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Features Section */
.features {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 4rem 5%;
    margin-top: 4rem;
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.feature-item {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--white);
    padding: 4rem 5% 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: #ddd;
    text-decoration: none;
}

.footer-section ul li a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    font-size: 0.9rem;
    color: #aaa;
}

/* Shop Page Layout */
.shop-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 5%;
    display: flex;
    gap: 2rem;
}

.shop-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    height: fit-content;
}

.shop-content {
    flex-grow: 1;
}

.filter-section {
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    cursor: pointer;
    font-size: 0.95rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
}

.price-inputs input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.sort-select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
}

@media (max-width: 768px) {
    .shop-container {
        flex-direction: column;
    }
    
    .shop-sidebar {
        width: 100%;
    }
}
.no-products {
    grid-column: 1 / -1; /* Span full width of grid */
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Mobile Filter Styles */
.shop-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-toggle {
    display: none; /* Hidden on Desktop */
    padding: 8px 15px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.close-sidebar {
    display: none;
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #555;
    z-index: 1001;
}

@media (max-width: 768px) {
    .shop-header {
        flex-direction: row; /* Keep row on mobile for title and button */
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .shop-header h2 {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .shop-controls {
        width: 100%;
        justify-content: space-between;
    }

    .filter-toggle {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .shop-sidebar {
        position: fixed;
        top: 0;
        right: -100%; /* Hidden on Right */
        left: auto;
        width: 280px;
        height: 100vh;
        background: #fff;
        z-index: 1000;
        padding-top: 3rem; /* Space for close button */
        overflow-y: auto;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    }

    .shop-sidebar.active {
        right: 0;
    }

    .close-sidebar {
        display: block;
        left: 15px; /* Move close button to left since sidebar is on right */
        right: auto;
    }
    
    /* Overlay effect when sidebar is open */
    .shop-sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: -1;
        pointer-events: all;
        cursor: pointer;
    }
}

/* Product Variant Modal Styles */
.variant-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.variant-btn {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.2s;
    min-height: 70px;
}

.variant-btn:hover {
    border-color: var(--primary-color);
    background: #f1f8e9;
}

.variant-btn.active {
    border-color: var(--primary-color);
    background: #e8f5e9;
    box-shadow: 0 0 0 1px var(--primary-color) inset;
    position: relative;
}

