/* * Agrisherry Main Styles
*
* This file contains all the CSS for the Agrisherry website.
* The styles are organized into sections for clarity.
*/

/* --- Global Styles --- */
:root {
    --primary-color: #388e3c;
    --primary-dark: #2e7d32;
    --secondary-color: #fdd835;
    --secondary-dark: #fbc02d;
    --accent-color: #25d366;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --background-light: #f8f9fa;
    --white: #ffffff;
    --shadow-light: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-heavy: 0 8px 32px rgba(0,0,0,0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden; /* Prevents horizontal scroll from animations */
}

/* --- Preloader Styles --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

#preloader-canvas {
    width: 300px;
    height: 100px;
}

/* --- Layout Components --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-spacing {
    padding: 80px 0;
}

.bg-light-gray {
    background-color: var(--background-light);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2em;
    text-align: center;
    color: var(--text-light);
    margin-bottom: 50px;
}

.button {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: var(--shadow-light);
}

.button-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}

.button-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.button-secondary {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.button-secondary:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* --- Header and Navigation --- */
.site-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-logo {
    height: 40px; 
}

.nav-links ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav-links a {
    color: var(--text-color);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
    padding: 5px 0;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    bottom: -5px;
    left: 0;
    transition: width 0.3s ease-in-out;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-form {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.search-form:focus-within {
    box-shadow: 0 0 0 3px rgba(56, 142, 60, 0.2);
    border-color: var(--primary-color);
}

.search-form input {
    border: none;
    padding: 10px 15px;
    outline: none;
    font-size: 1em;
    width: 250px;
    background-color: transparent;
}

.search-form button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-form button:hover {
    background-color: var(--primary-dark);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--white);
    box-shadow: var(--shadow-medium);
    border-radius: var(--border-radius);
    padding: 10px;
    min-width: 200px;
    z-index: 100;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu li a {
    color: var(--text-color);
    padding: 10px 15px;
    display: block;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.dropdown-menu li a:hover {
    background-color: var(--background-light);
    color: var(--primary-dark);
}

.mobile-menu-icon {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.3s ease;
}

/* --- Hero Carousel Styles --- */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    color: white;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.4);
    padding: 30px;
    border-radius: 15px;
    max-width: 800px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

.slide.active .hero-content {
    transform: translateY(0);
    opacity: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 25px;
    color: #f0f0f0;
}

.slider-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
}

.control-dots {
    display: flex;
    gap: 15px;
    margin: 0 20px;
}

.control-dot {
    width: 15px;
    height: 15px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.control-dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
    border-color: #fff;
}

.control-dot.active {
    background-color: var(--primary-color);
    border-color: #fff;
    width: 20px;
    height: 20px;
}

/* --- Product Grids & Cards --- */
.product-section {
    padding: 60px 0;
    background-color: var(--background-light);
}

[data-animate-on-scroll] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 0.8s ease-out;
}

[data-animate-on-scroll].is-visible {
    opacity: 1;
    transform: translateY(0);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    justify-items: center;
}

.product-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image-container {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    border-radius: 12px 12px 0 0;
}

.product-card:hover .product-image-container img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px 15px;
}

.product-title {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    font-size: 1.4em;
    color: var(--primary-color);
    font-weight: bold;
}

.product-actions {
    padding: 15px 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    gap: 10px;
}

.btn-whatsapp {
    background-color: var(--accent-color);
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-whatsapp:hover {
    background-color: #20c058;
    transform: translateY(-2px);
}

.btn-details {
    background-color: var(--background-light);
    color: var(--text-color);
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-details:hover {
    background-color: #e5e5e5;
    transform: translateY(-2px);
}

/* --- Category Grid for Homepage --- */
.category-showcase {
    background-color: var(--white);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    justify-items: center;
}

.category-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    width: 100%;
    padding-bottom: 75%;
}

.category-card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-5px);
}

.category-card a {
    display: block;
    text-decoration: none;
    color: var(--white);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.category-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover img {
    transform: scale(1.05);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.2));
    padding: 20px;
    text-align: center;
    color: white;
}

.category-overlay h4 {
    font-size: 1.2em;
    font-weight: 700;
    margin: 0;
}

/* --- Testimonials Section --- */
.testimonials-section {
    padding: 60px 0;
    background: var(--background-light);
}

.testimonial-slider-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
    cursor: grab;
}

.testimonial-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 30px;
    margin: 0 10px;
    flex-shrink: 0;
    width: calc(100% / 3 - 20px);
    box-shadow: var(--shadow-light);
}

.testimonial-card .rating {
    color: var(--secondary-color);
    font-size: 1.5em;
    margin-bottom: 15px;
}

.testimonial-card .quote {
    font-size: 1.1em;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 15px;
    font-style: italic;
}

.testimonial-card .author {
    font-size: 0.9em;
    color: var(--text-light);
    font-weight: 600;
}

.testimonial-slider-controls {
    display: none; /* Hidden until we have more than one card */
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.prev-testimonial, .next-testimonial {
    background: none;
    border: none;
    font-size: 1.8em;
    color: var(--primary-color);
    cursor: pointer;
    transition: color 0.3s ease;
}

.prev-testimonial:hover, .next-testimonial:hover {
    color: var(--primary-dark);
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .main-nav { 
        flex-wrap: wrap; 
        height: auto; 
        padding: 16px 0; 
    }
    .nav-links { 
        display: none; 
        width: 100%; 
        order: 3; 
        position: absolute;
        top: 80px;
        left: 0;
        background-color: var(--white);
        box-shadow: var(--shadow-medium);
        padding: 20px 0;
        z-index: 999;
    }
    .nav-links.active { 
        display: block; 
    }
    .nav-links ul { 
        flex-direction: column; 
        align-items: center; 
        width: 100%; 
        gap: 0; 
    }
    .nav-links li { 
        width: 100%; 
        text-align: center; 
        border-bottom: 1px solid var(--border-color); 
    }
    .nav-links li:last-child {
        border-bottom: none;
    }
    .nav-links a { 
        padding: 15px 0; 
        display: block; 
    }
    .nav-links a:hover::after {
        width: 0;
    }
    .mobile-menu-icon { 
        display: block; 
    }
    .search-form { 
        display: none; 
    }
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content p { font-size: 1.1rem; }
    .testimonial-card {
        width: calc(100% - 20px);
    }
    .testimonial-slider-controls {
        display: flex;
    }
}

@media (max-width: 768px) {
    .section-title { font-size: 2rem; }
    .product-grid { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: 1fr; }
    .testimonial-card {
        width: calc(100% - 20px);
    }
}
/* Call Button */
.call-button-container {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
}

.call-button {
    display: inline-flex;
    align-items: center;
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

.call-button:hover {
    transform: scale(1.05);
}

.call-button i {
    margin-right: 8px;
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: transform 0.2s ease-in-out;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Why Choose Us Section */
.features {
    padding: 60px 0;
    text-align: center;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.feature-card p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}