/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary-green: #2E7D32;
    /* Strong Green */
    --accent-red: #D32F2F;
    /* Tomato Red */
    --accent-purple: #7B1FA2;
    /* Cabbage Purple */
    --accent-yellow: #FBC02D;
    /* Pepper Yellow */
    --bg-light: #F9F9F9;
    /* Cream/White */
    --text-dark: #1A1A1A;
    --text-grey: #555;
    --white: #FFFFFF;
    --radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-green);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-green);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #1b5e20;
}

.btn-accent {
    background-color: var(--accent-yellow);
    color: var(--text-dark);
}

.btn-accent:hover {
    background-color: #f9a825;
}

/* Header */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--text-dark);
}

.logo-img {
    height: 70px;
    /* Slightly smaller for better fit */
    width: auto;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-green);
    border-radius: 10px;
    transition: all 0.3s linear;
}

/* Hamburger Animation */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -8px);
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1rem;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-green);
}

@media (max-width: 992px) {
    .nav-menu ul {
        gap: 1.2rem;
    }

    .nav-menu a {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0.8rem 0;
    }

    .logo-img {
        height: 50px;
    }

    .logo-text h2 {
        font-size: 1.1rem !important;
    }

    .mobile-menu-toggle {
        display: flex;
        position: fixed;
        /* Fix to top right */
        top: 25px;
        right: 20px;
        z-index: 1100;
        /* Extremely high */
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--white);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        padding: 100px 20px 40px 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
        transform: translateX(0);
        /* Better than just right for some browsers */
    }

    /* Ensure right: -100% works with transform if we use it, but keeping it simple for now */
    .nav-menu.active {
        right: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 1.2rem;
        align-items: center;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-menu a {
        font-size: 1.5rem;
        font-weight: 700;
        display: block;
        padding: 12px;
        color: var(--text-dark);
        border: none;
        background: transparent !important;
        /* Force remove any box backgrounds */
        box-shadow: none !important;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        color: var(--primary-green);
    }

    .nav-menu .instagram-link {
        margin-top: 30px;
        color: var(--primary-green);
        border: 2px solid var(--primary-green);
        border-radius: 50px;
        padding: 10px 25px;
        font-size: 1.1rem;
    }
}

/* Hero Section */
.hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 20px;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Sections */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
}

/* About */
.about-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-grey);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.product-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 0.85rem;
    color: var(--accent-purple);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.product-title {
    font-size: 1.25rem;
    color: var(--primary-green);
    margin-bottom: 10px;
}

.product-desc {
    font-size: 0.95rem;
    color: var(--text-grey);
    margin-bottom: 20px;
    min-height: 50px;
}

/* Filters */
.filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid var(--primary-green);
    border-radius: 20px;
    background: transparent;
    color: var(--primary-green);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-green);
    color: var(--white);
}

/* Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.contact-info-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.contact-item {
    margin-bottom: 25px;
}

.contact-item h4 {
    color: var(--primary-green);
    margin-bottom: 5px;
}

.map-container iframe {
    width: 100%;
    height: 400px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Footer */
footer {
    background-color: var(--primary-green);
    color: var(--white);
    margin-top: auto;
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h3 {
    color: var(--white);
    border-bottom: 2px solid var(--accent-yellow);
    display: inline-block;
    padding-bottom: 5px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    font-size: 0.9rem;
}

/* Admin Panel */
.admin-login {
    max-width: 400px;
    margin: 80px auto;
    padding: 40px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.admin-header {
    background: #333;
    color: var(--white);
    padding: 15px 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background: #f4f4f4;
    font-weight: 600;
}

.actions {
    display: flex;
    gap: 10px;
}

.btn-danger {
    background-color: var(--accent-red);
    color: var(--white);
    font-size: 0.8rem;
    padding: 5px 10px;
}

/* Responsive */
@media (max-width: 768px) {

    /* Header & Nav */
    header {
        padding: 15px 0;
    }

    header .container {
        flex-direction: column;
        gap: 20px;
    }

    .logo-container {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }

    .logo-img {
        height: 80px;
        /* Increased from default */
        width: auto;
        object-fit: contain;
        /* Removed border-radius to show full text of the new logo */
    }

    .logo-text {
        display: flex;
        flex-direction: column;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        width: 100%;
        padding: 0;
    }

    .nav-menu a {
        display: block;
        padding: 10px;
        background-color: rgba(46, 125, 50, 0.05);
        /* Slight tint for touch targets */
        border-radius: var(--radius);
    }

    /* Hero */
    .hero {
        height: auto;
        min-height: 350px;
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    /* General Layout */
    .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .map-container iframe {
        height: 300px;
    }

    .filters {
        gap: 10px;
    }

    .filter-btn {
        font-size: 0.9rem;
        padding: 6px 12px;
        flex: 1 1 auto;
        /* Make buttons grow on mobile */
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .lightbox-content {
        max-width: 98%;
    }
}

/* Lightbox / Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    /* Higher than header */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.95);
    opacity: 0;
    transition: opacity 0.3s ease;
    /* Flexbox for centering */
    align-items: center;
    justify-content: center;
}

.lightbox.show {
    opacity: 1;
    display: flex;
    /* Override display:block from JS if needed, but JS usually sets block. We need flex for centering. */
}

/* Force flex display when visible for centering */
.lightbox[style*="display: block"] {
    display: flex !important;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 95%;
    max-height: 85vh;
    width: auto;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    animation-name: zoom;
    animation-duration: 0.3s;
    object-fit: contain;
}

@keyframes zoom {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: 300;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
    line-height: 1;
    width: 50px;
    text-align: center;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: var(--primary-green);
    text-decoration: none;
}

/* Carousel */
.carousel-container {
    position: relative;
    max-width: 100%;
    height: 60vh;
    min-height: 400px;
    overflow: hidden;
    background: #000;
}

.carousel-slide {
    display: none;
    height: 100%;
    animation: fadeEffect 1.5s;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    /* Slight overlay for text readability */
}

/* Next & previous buttons */
.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    margin-top: -22px;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    z-index: 12;
    background-color: rgba(0, 0, 0, 0.2);
}

/* Position the "next button" to the right */
.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

/* On hover, add a black background color with a little bit see-through */
.prev:hover,
.next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Make Hero Content overlay the carousel */
.carousel-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #FFFFFF;
    z-index: 10;
    width: 90%;
    max-width: 800px;
    padding: 40px;
    /*background-color: rgba(0, 0, 0, 0.3);*/
    /* Lighter dark background */
    border-radius: 8px;
    backdrop-filter: blur(1px);
    /* Subtle blur effect */
}

.carousel-overlay h1 {
    color: #FFFFFF;
    /* Ensure title is white */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

.carousel-overlay p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    color: #f1f1f1;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    z-index: 11;
}

.dot {
    display: inline-block;
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active,
.dot:hover {
    background-color: var(--primary-green);
    transform: scale(1.2);
}

@keyframes fadeEffect {
    from {
        opacity: 0.4
    }

    to {
        opacity: 1
    }
}

@media (max-width: 768px) {
    .carousel-container {
        height: 400px;
        /* Fixed height for consistency on mobile */
        min-height: 400px;
    }

    .carousel-slide img {
        height: 100%;
    }

    .carousel-overlay {
        padding: 20px;
        width: 95%;
    }

    .carousel-overlay h1 {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }

    .carousel-overlay p {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .carousel-overlay .btn {
        padding: 12px 20px !important;
        font-size: 1rem !important;
    }

    .carousel-dots {
        bottom: 10px;
    }
}