/* Modern Fresh Harvest Market Styles */
:root {
    /* Color Palette */
    --primary-color: #2e8b57;
    --primary-dark: #1f6e3d;
    --primary-light: #e8f5e9;
    --secondary-color: #ff9f1c;
    --accent-color: #ff6b6b;
    --dark-color: #2d3436;
    --light-color: #f8f9fa;
    --gray-color: #636e72;
    --light-gray: #dfe6e9;
    --danger-color: #ff4757;
    /* Spacing */
    --section-padding: 2rem 5%;
    --content-max-width: 2000px;
    --card-radius: 12px;
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
    /* Transitions */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-slow: all 0.5s ease;
    /* Typography */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
}

/* Base Styles */
body, #fresh-harvest-page {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0;
}

h1 {
    font-size: var(--text-5xl);
}

h2 {
    font-size: var(--text-4xl);
}

.product-name {
    font-size: var(--text-lg);
}

/* Layout Components */
.content-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--section-padding);
    width: 100%;
}

/* Hero Section */
.hero-banner {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&w=2000&q=80') no-repeat center center/cover;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 270px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    margin-bottom: 2.5rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* Search Component */
.search-container {
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.search-bar {
    display: flex;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    &:focus-within

{
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    font-size: 1rem;
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    &::placeholder

{
    color: var(--gray-color);
    opacity: 0.7;
}

}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 2rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    &:hover

{
    background-color: var(--primary-dark);
}

}
}

/* Section Styling */
.section-title {
    position: relative;
    padding-bottom: 0.8rem;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    &::after

{
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

}

/* Grid Components */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.category-card {
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition-normal);
    text-align: center;
    &:hover

{
    transform: translateY(-8px);
}

}

.category-img {
    aspect-ratio: 1/1;
    background-size: cover;
    background-position: center;
    border-radius: var(--card-radius);
    margin-bottom: 1rem;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    &::after

{
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.03) 100%);
}

.category-card:hover & {
    box-shadow: var(--shadow-lg);
}

}

.category-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

/* Flash Deals */
.flash-deals {
    background-color: var(--light-color);
    border-radius: var(--card-radius);
    padding: 1rem;
    margin: 1.5rem 0;
}

.deals-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.2rem;
    margin-bottom: 0.8rem;
}

.countdown {
    background: linear-gradient(135deg, var(--danger-color), var(--accent-color));
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}

/* Product Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.product-card {
    background: white;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    &:hover

{
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 0, 0, 0.1);
}

}

.discount-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--danger-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

.product-image {
    --transition-slow: 300ms ease-in-out; /* Define if not in root */
    background: white;
    width: 100%; /* Ensures responsiveness */
    height: 100px; /* Fixed height (adjust as needed) */
    padding: 0.5rem;
    border-radius: 0.25rem; /* Soft edges for modern look */
    overflow: hidden; /* Clips content (e.g., zoom effects) */
    display: flex; /* Better alignment control */
    align-items: center; /* Vertically centers image */
    justify-content: center; /* Horizontally centers image */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* Subtle depth */
    transition: var(--transition-slow);
}

    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Ensures image covers container */
        object-position: center; /* Focus on center (good for products) */
        transition: inherit; /* Inherits parent’s transition */
    }

    /* Hover Effects (Optional) */
    .product-image:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Elevate on hover */
    }

        .product-image:hover img {
            transform: scale(1.02); /* Subtle zoom effect */
        }

.product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1rem;
}

.product-meta {
    display: flex;
    flex-direction: column;
    gap: 0;
}
    
.weight {
    font-size: 0.85rem;
    color: var(--gray-color);
    font-weight: 500;
}

.pricing {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.price {
    color: var(--primary-dark);
    font-size: 1.25rem;
    font-weight: 700;
}

.discount-price {
    font-size: 0.9rem;
    color: var(--gray-color);
    text-decoration: line-through;
    margin-bottom: 0.75rem;
}

.add-to-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--primary-color);
    color: white;
    padding: 0.2rem;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition-fast);
    text-decoration: none;
    margin-top: auto;
    width: 100%;
    &:hover

{
    background-color: var(--primary-light);
    color: var(--primary-color);
    transform: translateY(-1px);
}

}

.quantity-controls {
    margin-top: auto;
    padding-top: 1rem;
}

/* Features Section */
.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    background: linear-gradient(135deg, #f9fbf8 0%, #f1f8e9 100%);
    border-radius: var(--card-radius);
    padding: 3rem 2rem;
    margin: 3rem 0;
}

.feature {
    text-align: center;
    padding: 1.5rem;
    transition: var(--transition-normal);
    &:hover

{
    transform: translateY(-5px);
}

}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: var(--transition-normal);
    .feature:hover &

{
    transform: scale(1.1);
    color: var(--primary-dark);
}

}

.feature h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.feature p {
    color: var(--gray-color);
    font-size: 0.95rem;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 25px;
    height: 25px;
    background: #6200EE;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 100;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    &:hover

{
    transform: translateY(-3px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
}

&:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */

@media (max-width: 991.98px) {
    :root {
        --section-padding: 2.5rem 5%;
    }

    .flash-deals {
        padding: 1.5rem;
    }

    .features-section {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
}

@media (max-width: 767.98px) {
    :root {
        --section-padding: 1.5rem 5%;
    }

    .hero-banner {
        min-height: 250px;
    }

    .search-bar {
        button span

{
    display: none;
}

button {
    padding: 0 1.5rem;
}

}

.category-grid,
.product-grid {
    grid-template-columns: repeat(2, 1fr);
}

.product-info {
    padding: 1rem;
}

}

/* Medium screens (tablets) */
@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large screens (small desktops) */
@media (min-width: 800px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Extra large screens */
@media (min-width: 1000px) {
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Super large screens */
@media (min-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Maximum columns (only for very wide screens) */
@media (min-width: 1400px) {
    .product-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

