/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2d5a27;
    --secondary-color: #7fb069;
    --accent-color: #d4a574;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --white: #ffffff;
    --light-bg: #f8f9fa;
    --border-color: #e9ecef;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --max-width: 1200px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 20px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.logo span {
    font-size: 0.8rem;
    color: var(--secondary-color);
    font-weight: 400;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-actions button {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem;
}

.nav-actions button:hover {
    color: var(--primary-color);
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent-color);
    color: var(--white);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.mobile-menu-btn {
    display: none;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 120px 20px 60px;
    max-width: var(--max-width);
    margin: 0 auto;
    gap: 3rem;
}

.hero-content {
    flex: 1;
}

.hero-content h2 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 500px;
}

.cta-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.cta-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.hero-image {
    flex: 1;
}

.hero-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
}

.search-content {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary-color);
}

.search-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.search-results {
    background: var(--white);
    margin-top: 1rem;
    border-radius: var(--border-radius);
    max-height: 400px;
    overflow-y: auto;
}

/* Categories */
.categories {
    padding: 80px 0;
    background: var(--light-bg);
}

.categories h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.category-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

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

.category-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.category-card h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.category-card p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-light);
}

/* Products */
.products {
    padding: 80px 0;
}

.products h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--white);
    border: 2px solid var(--border-color);
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

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

.product-image {
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.product-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    color: #ffc107;
}

.rating-text {
    color: var(--text-light);
    font-size: 0.9rem;
}

.add-to-cart {
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.8rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.add-to-cart:hover {
    background: var(--secondary-color);
}

/* Product Modal */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1;
    color: var(--text-light);
}

.modal-body {
    padding: 2rem;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.product-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image img {
    width: 100%;
    border-radius: var(--border-radius);
}

.thumbnail-images {
    display: flex;
    gap: 0.5rem;
}

.thumbnail {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
}

.thumbnail:hover,
.thumbnail.active {
    opacity: 1;
}

.product-details h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.product-details .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.product-details .description {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.quantity-btn {
    background: var(--border-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.2rem;
}

.quantity-input {
    width: 60px;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.5rem;
}

.reviews-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.review {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.review:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.reviewer-name {
    font-weight: 600;
    color: var(--primary-color);
}

.review-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--light-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

.feature h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.feature p {
    color: var(--text-light);
}

.about-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* Blog Section */
.blog {
    padding: 80px 0;
}

.blog h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 1.5rem;
}

.blog-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.blog-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.read-more {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--primary-color);
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: var(--light-bg);
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-item i {
    color: var(--secondary-color);
    width: 20px;
}

.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: block;
}

.submit-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    width: 100%;
}

.submit-btn:hover {
    background: var(--secondary-color);
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 2000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.cart-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: var(--accent-color);
    font-weight: 600;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.cart-total {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.checkout-btn {
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.checkout-btn:hover {
    background: var(--secondary-color);
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1500;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.chat-toggle:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 300px;
    height: 400px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    display: none;
    flex-direction: column;
}

.chat-window.open {
    display: flex;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--primary-color);
    color: var(--white);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.chat-minimize {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.message {
    margin-bottom: 1rem;
    padding: 0.8rem;
    border-radius: var(--border-radius);
    max-width: 80%;
}

.bot-message {
    background: var(--light-bg);
    align-self: flex-start;
}

.user-message {
    background: var(--primary-color);
    color: var(--white);
    align-self: flex-end;
    margin-left: auto;
}

.chat-input {
    display: flex;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.chat-input input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    outline: none;
}

.chat-input button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.8rem 1rem;
    margin-left: 0.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-section p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary-color);
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: var(--border-radius);
    outline: none;
}

.newsletter-form button {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow);
    }
    
    .nav-menu.open {
        left: 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 100px 20px 40px;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .category-grid,
    .product-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .chat-window {
        width: 280px;
        height: 350px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
    }
    
    .filter-btn {
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .categories h2,
    .products h2,
    .about h2,
    .blog h2,
    .contact h2 {
        font-size: 2rem;
    }
    
    .nav-container {
        padding: 1rem 15px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .hero,
    .categories,
    .products,
    .about,
    .blog,
    .contact {
        padding: 60px 0;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
button:focus,
input:focus,
textarea:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --shadow: 0 2px 10px rgba(0,0,0,0.3);
        --shadow-hover: 0 5px 20px rgba(0,0,0,0.4);
    }
}