:root {
    --primary-green: #2e7d32;
    --secondary-green: #4caf50;
    --accent-orange: #ff9800;
    --text-dark: #333;
    --text-light: #fff;
    --bg-light: #f9f9f9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Header */
header {
    background-color: var(--text-light);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background-color: var(--primary-green);
    color: var(--text-light);
    padding: 5px 0;
    font-size: 0.9rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-green);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-green);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
    /* Ensure it's above everything */
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    /* Explicit color */
    margin: 3px 0;
    transition: 0.4s;
}

/* Hero Section */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    background-color: var(--accent-orange);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #f57c00;
}
/* for admin */
.btn-success {
    background-color: #2ecc71;
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn-secondary {
    background-color: #95a5a6;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* Form Validation */
.is-invalid {
    border-color: #dc3545 !important;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 80%;
    color: #dc3545;
}

/* Sections */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-green);
}

/* Products */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--text-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-img {
    height: 200px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    margin-bottom: 10px;
    color: var(--primary-green);
}

/* Contact Form */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

textarea.form-control {
    height: 150px;
}

/* Footer */
footer {
    background-color: #222;
    color: var(--text-light);
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: var(--accent-orange);
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
}

.copyright {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 20px;
    color: #888;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px;
        /* Adjust based on header height */
        left: 0;
        background-color: var(--text-light);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 15px 0;
        text-align: center;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2rem;
    }

    /* Mobile Product Layout */
    .product-card {
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    .product-img {
        width: 40%;
        height: 150px;
        /* Fixed height for consistency */
    }

    /* Hero Section */
    .hero {
        background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/hero-bg.jpg');
        background-size: cover;
        background-position: center;
        height: 500px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        color: var(--text-light);
    }

    .hero h1 {
        font-size: 3rem;
        margin-bottom: 20px;
    }

    .btn {
        display: inline-block;
        padding: 10px 25px;
        background-color: var(--accent-orange);
        color: var(--text-light);
        text-decoration: none;
        border-radius: 5px;
        transition: background-color 0.3s;
    }

    .btn:hover {
        background-color: #f57c00;
    }

    /* Sections */
    .section {
        padding: 60px 0;
    }

    .section-title {
        text-align: center;
        margin-bottom: 40px;
        color: var(--primary-green);
    }

    /* Products */
    .product-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 30px;
    }

    .product-card {
        background: var(--text-light);
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s;
    }

    .product-card:hover {
        transform: translateY(-5px);
    }

    .product-img {
        height: 200px;
        background-color: #eee;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #888;
    }

    .product-info {
        padding: 20px;
    }

    .product-info h3 {
        margin-bottom: 10px;
        color: var(--primary-green);
    }

    /* Contact Form */
    .contact-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        display: block;
        margin-bottom: 5px;
    }

    .form-control {
        width: 100%;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 4px;
    }

    textarea.form-control {
        height: 150px;
    }

    /* Footer */
    footer {
        background-color: #222;
        color: var(--text-light);
        padding: 40px 0 20px;
    }

    .footer-content {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 40px;
        margin-bottom: 40px;
    }

    .footer-section h3 {
        color: var(--accent-orange);
        margin-bottom: 20px;
    }

    .footer-section ul {
        list-style: none;
    }

    .footer-section ul li {
        margin-bottom: 10px;
    }

    .footer-section a {
        color: #ccc;
        text-decoration: none;
    }

    .copyright {
        text-align: center;
        border-top: 1px solid #444;
        padding-top: 20px;
        color: #888;
    }

    /* Responsive */
    @media (max-width: 768px) {
        .menu-toggle {
            display: flex;
        }

        .nav-links {
            display: none;
            flex-direction: column;
            width: 100%;
            position: absolute;
            top: 70px;
            /* Adjust based on header height */
            left: 0;
            background-color: var(--text-light);
            box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
            padding: 20px 0;
        }

        .nav-links.active {
            display: flex;
        }

        .nav-links li {
            margin: 15px 0;
            text-align: center;
        }

        .contact-container {
            grid-template-columns: 1fr;
        }

        .hero h1 {
            font-size: 2rem;
        }

        /* Mobile Product Layout */
        .product-card {
            display: flex;
            flex-direction: row;
            align-items: center;
        }

        .product-img {
            width: 40%;
            height: 150px;
            /* Fixed height for consistency */
        }

        .product-info {
            width: 60%;
            padding: 15px;
        }

        .product-info h3 {
            font-size: 1.1rem;
            margin-bottom: 5px;
        }
    }

    /* Carousel Styles */
    .carousel-container {
        width: 100%;
        overflow: hidden;
        padding: 20px 0;
        position: relative;
    }

    .carousel-track {
        display: flex;
        gap: 30px;
        overflow-x: auto;
        scroll-behavior: smooth;
        padding-bottom: 20px;
        /* Hide scrollbar space */
        -ms-overflow-style: none;
        /* IE and Edge */
        scrollbar-width: none;
        /* Firefox */
    }

    .carousel-track::-webkit-scrollbar {
        display: none;
    }

    .carousel-item {
        flex: 0 0 auto;
        width: 280px;
        /* Fixed width for carousel items */
    }

    /* Ensure product cards inside carousel look good */
    .carousel-item .product-card {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    /* Mobile adjustments for carousel */
    @media (max-width: 768px) {
        .carousel-item {
            width: 85vw;
            /* Wider on mobile */
        }

        /* Revert mobile specific product card layout for carousel items if needed, 
       or let them inherit the horizontal layout. 
       If we want vertical cards in carousel on mobile: */
        .carousel-item .product-card {
            flex-direction: column;
        }

        .carousel-item .product-img {
            width: 100%;
            height: 200px;
        }

        .carousel-item .product-info {
            width: 100%;
        }
    }
    
    
    /* Admin / Utility Styles */
    .card {
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        padding: 2rem;
        margin-bottom: 2rem;
        border: 1px solid #eee;
    }

    .bg-light {
        background-color: #fff !important;
        /* Override bootstrap-like naming to keep it clean white or use var(--bg-light) */
    }

    .mx-auto {
        margin-left: auto;
        margin-right: auto;
    }

    .mt-5 {
        margin-top: 3rem;
    }

    .row {
        display: flex;
        flex-wrap: wrap;
        margin-right: -15px;
        margin-left: -15px;
    }

    .col-md-6 {
        position: relative;
        width: 100%;
        padding-right: 15px;
        padding-left: 15px;
        flex: 0 0 50%;
        max-width: 50%;
    }

    @media (max-width: 768px) {
        .col-md-6 {
            flex: 0 0 100%;
            max-width: 100%;
        }
    }

    /* Enhanced Form Controls */
    .form-group {
        margin-bottom: 1.5rem;
    }

    .form-group label {
        font-weight: 600;
        color: var(--text-dark);
        margin-bottom: 0.5rem;
        display: block;
    }

    .form-control {
        display: block;
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        line-height: 1.5;
        color: #495057;
        background-color: #fff;
        background-clip: padding-box;
        border: 1px solid #ced4da;
        border-radius: 0.375rem;
        transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    }

    .form-control:focus {
        color: #495057;
        background-color: #fff;
        border-color: var(--secondary-green);
        outline: 0;
        box-shadow: 0 0 0 0.2rem rgba(46, 125, 50, 0.25);
    }

    /* Admin Table */
    .admin-table {
        width: 100%;
        border-collapse: collapse;
        background: #fff;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
        margin-top: 1rem;
    }

    .admin-table thead tr {
        background-color: var(--primary-green);
        color: #ffffff;
        text-align: left;
        font-weight: bold;
    }

    .admin-table th,
    .admin-table td {
        padding: 12px 15px;
        border-bottom: 1px solid #dddddd;
    }

    .admin-table tbody tr {
        border-bottom: 1px solid #dddddd;
    }

    .admin-table tbody tr:nth-of-type(even) {
        background-color: #f3f3f3;
    }

    .admin-table tbody tr:last-of-type {
        border-bottom: 2px solid var(--primary-green);
    }

    .admin-table tbody tr:hover {
        background-color: #f1f8e9;
        /* Light green hover */
    }

    .admin-actions {
        display: flex;
        gap: 10px;
    }