:root {
    --emerald: #10b981;
    --forest: #065f46;
    --sage: #a7f3d0;
    --moss: #6b7280;
    --white: #ffffff;
    --beige: #fef3c7;
    --charcoal: #1f2937;
    --light-gray: #f9fafb;
    --transition: all 0.3s ease;
}

.dark-mode {
    --emerald: #34d399;
    --forest: #047857;
    --sage: #a7f3d0;
    --moss: #9ca3af;
    --white: #111827;
    --beige: #fef3c7;
    --charcoal: #f9fafb;
    --light-gray: #1f2937;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--charcoal);
    background-color: var(--white);
    transition: var(--transition);
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.dark-mode header {
    background-color: rgba(17, 24, 39, 0.95);
}

.header-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.logo {
    text-align: center;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-image {
    height: 40px;
    width: auto;
}

.logo-icon {
    font-size: 12px;
    color: var(--emerald);
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--forest);
}

.dark-mode .logo-text {
    color: var(--sage);
}

nav {
    width: 100%;
    display: flex;
    justify-content: center;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--charcoal);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.dark-mode nav a {
    color: var(--sage);
}

nav a:hover {
    color: var(--emerald);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--emerald);
    transition: var(--transition);
}

nav a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--charcoal);
    cursor: pointer;
    transition: var(--transition);
}

.dark-mode .theme-toggle {
    color: var(--sage);
}

.theme-toggle:hover {
    color: var(--emerald);
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1497366754035-f200968a6e72?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2069&q=80') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    animation: fadeIn 1s ease-out;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--emerald);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--forest);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* About Section */
.about {
    padding: 100px 0;
    background-color: var(--light-gray);
}

.dark-mode .about {
    background-color: #1a2435;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--forest);
    margin-bottom: 15px;
}

.dark-mode .section-title h2 {
    color: var(--sage);
}

.section-title p {
    color: var(--moss);
    max-width: 600px;
    margin: 0 auto;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--forest);
}

.dark-mode .about-text h3 {
    color: var(--sage);
}

.about-text p {
    margin-bottom: 20px;
    color: var(--moss);
}

.about-image {
    width: 380px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.about-image:hover img {
    transform: scale(1.05);
}

/* Categories Section */
.categories {
    padding: 100px 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.category-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    cursor: pointer;
}

.dark-mode .category-card {
    background-color: #1a2435;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.category-image {
    height: 200px;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-content {
    padding: 20px;
}

.category-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--forest);
}

.dark-mode .category-content h3 {
    color: var(--sage);
}

.category-content p {
    color: var(--moss);
}

/* Category Modal Styles */
.category-modal-content {
    width: 90vw;
    height: 90vh;
    max-width: 1200px;
    max-height: 800px;
    background: var(--white);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dark-mode .category-modal-content {
    background: #1a2435;
}

.modal-body {
    flex: 1;
    overflow: hidden;
    padding: 0;
}

.modal-header {
    padding: 30px 30px 20px;
    text-align: center;
}

.modal-header h2 {
    color: var(--forest);
    font-size: 2rem;
    margin-bottom: 10px;
}

.dark-mode .modal-header h2 {
    color: var(--sage);
}

/* FIXED Modal Grid - removed 200% width/height */
.category-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 15px;
    padding: 30px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.category-product-card {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.category-product-image {
    width: 100%;
    height: 100%;
}

.category-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.dark-mode .category-product-card {
    background: #1a2435;
}

.category-product-card:hover {
    transform: scale(1.05);
}

.category-product-card:hover .category-product-image img {
    transform: scale(1.1);
}

/* Featured Products */
.featured {
    padding: 100px 0;
    background-color: var(--light-gray);
}

.dark-mode .featured {
    background-color: #1a2435;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.dark-mode .product-card {
    background-color: #1a2435;
}

.product-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 185, 129, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.view-details {
    background-color: var(--white);
    color: var(--forest);
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
}

.product-content {
    padding: 20px;
}

.product-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--forest);
}

.dark-mode .product-content h3 {
    color: var(--sage);
}

.product-content p {
    color: var(--moss);
    margin-bottom: 15px;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--emerald);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--white);
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

.dark-mode .modal-content {
    background-color: #1a2435;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: var(--charcoal);
    cursor: pointer;
    z-index: 10;
}

.dark-mode .close-modal {
    color: var(--sage);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
}

.modal-image img {
    width: 100%;
    border-radius: 10px;
}

.modal-details h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--forest);
}

.dark-mode .modal-details h2 {
    color: var(--sage);
}

.modal-details p {
    color: var(--moss);
    margin-bottom: 20px;
}

.modal-features {
    margin-bottom: 20px;
}

.modal-features li {
    margin-bottom: 8px;
    color: var(--moss);
}

.modal-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--emerald);
    margin-bottom: 20px;
}

/* Catalogue Section */
.catalogue {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.dark-mode .catalogue {
    background-color: #1a2435;
}

.catalogue-toolbar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Contact Section */
.contact {
    padding: 100px 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--forest);
}

.dark-mode .contact-info h3 {
    color: var(--sage);
}

.contact-info p {
    color: var(--moss);
    margin-bottom: 30px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--emerald);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
}

.contact-details h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--forest);
}

.dark-mode .contact-details h4 {
    color: var(--sage);
}

.contact-details p {
    color: var(--moss);
    margin: 0;
}

.contact-form {
    background-color: var(--light-gray);
    padding: 30px;
    border-radius: 10px;
}

.dark-mode .contact-form {
    background-color: #1a2435;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--forest);
    font-weight: 500;
}

.dark-mode .form-group label {
    color: var(--sage);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Inter', sans-serif;
    background-color: var(--white);
    color: var(--charcoal);
    transition: var(--transition);
}

.dark-mode .form-group input,
.dark-mode .form-group textarea,
.dark-mode .form-group select {
    background-color: #111827;
    border-color: #374151;
    color: var(--sage);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--emerald);
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: var(--forest);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.footer-logo .logo-icon {
    font-size: 28px;
}

.footer-logo .logo-text {
    font-size: 24px;
    color: var(--white);
}

.footer-about p {
    margin-bottom: 20px;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--emerald);
    transform: translateY(-3px);
}

.footer-heading {
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--emerald);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Mobile (767px and below) */
@media (max-width: 767px) {
    .container { width: 95%; padding: 0 15px; }
    
    .header-container { flex-direction: column; gap: 15px; }
    
    nav ul { gap: 15px; flex-wrap: wrap; }
    
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    
    .section-title h2 { font-size: 1.8rem; }
    
    .about-content,
    .contact-content { grid-template-columns: 1fr; gap: 30px; }
    
    .categories-grid,
    .products-grid { grid-template-columns: 1fr; gap: 20px; }
    
    .footer-content { grid-template-columns: 1fr; gap: 30px; text-align: center; }
    
    .social-links { justify-content: center; }
    
    .category-modal-content { width: 95vw; height: 90vh; }
    .category-products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 20px; }
    
    .modal-body { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
}

/* Tablet (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .container { width: 90%; }
    
    .categories-grid,
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    
    .footer-content { grid-template-columns: 2fr 1fr 1fr; }
    
    .category-modal-content { width: 92vw; height: 88vh; max-width: 1100px; }
    .category-products-grid { grid-template-columns: repeat(3, 1fr); gap: 15px; padding: 25px; }
}

/* Desktop (1200px+) */
@media (min-width: 1200px) {
    .container { width: 85%; max-width: 1200px; }
    
    .categories-grid,
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    
    .footer-content { grid-template-columns: 2fr 1fr 1fr 1fr; }
    
    .category-modal-content { width: 85vw; height: 80vh; max-width: 1300px; max-height: 800px; }
    .category-products-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 30px; }
}