/* Global Styles & Variables */
:root {
    --primary-color: #2E5A35;
    /* Deep Green */
    --secondary-color: #8D6E63;
    /* Earthy Brown */
    --accent-color: #C0CA33;
    /* Fresh Leaf Green */
    --text-dark: #1A1A1A;
    --text-light: #F5F5F5;
    --background-light: #F9FDF9;
    --background-off: #F0F4C3;
    /* Light Greeninsh-Yellow */
    --background-beige: #E0C09F;
    /* Beige for About section background */
    --white: #FFFFFF;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
    --header-height: 80px;
}

/* A basic modern reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Ensures padding doesn't break your layout width */
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
    font-size: 15px;
    /* Slightly smaller base */
}

body {
    font-family: var(--font-body);
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 1rem;
}

h2 {
    font-size: 32px;
}

h1,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    color: var(--primary-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img,
video {
    max-width: 100%;
    /* Prevents images from overflowing the screen */
    height: auto;
    display: block;
}

.container {
    max-width: 1100px;
    /* More compact container */
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid var(--primary-color);
    cursor: pointer;
}

.btn:hover {
    background-color: transparent;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--text-dark);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: var(--text-dark);
    color: var(--white);
}

/* Header */
/* CSS Reset or Global overrides if any needed here */

/* Top Banner */
.top-banner {
    background-color: #2F4F4F;
    color: #FFD700;
    text-align: center;
    padding: 5px 0;
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 2px;
}

/* Specific Header Styling to Standout */
h2 {
    font-size: 32px;
    color: var(--primary-color);
    text-transform: none;
    border: none;
    padding-bottom: 0;
}

/* Specific Header Selectors */
h2.about-header,
h2.video-header,
h2.products-header,
h2.contact-header,
h2.inquiry-header {
    font-family: 'Caliber', sans-serif;
    font-size: 2rem;
    /* Reduced from 2.5rem */
}

h2.about-header {
    text-align: left;
}

h2.video-header,
h2.products-header,
h2.contact-header,
h2.inquiry-header {
    text-align: center;
}

/* Header & Nav */
header {
    background-color: white;
    padding: 0;
    margin: 0;
}

/* Consolidated Header Styles */
.logo-wrapper {
    text-align: center;
    padding: 0;
    /* Zero padding */
    margin: 0;
    width: 100%;
}

.logo-img {
    max-width: 250px;
    /* Significantly smaller logo */
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    padding: 0;
}

.header-content {
    width: 100%;
    margin: 0 auto;
}

.nav-center {
    width: 100%;
    background-color: #556B2F;
    /* Dark Olive Green for Nav Strip */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 15px 0;
}

.nav-links {
    display: flex;
    gap: 2rem;
    /* Reduced gap */
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links li {
    display: inline-block;
}

.nav-links a {
    font-weight: 500;
    /* Lighter weight */
    color: white;
    font-size: 0.95rem;
    /* Smaller nav text */
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #FFD700;
    /* Gold hover */
}

.hamburger {
    display: none;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    /* Ensure on top */
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #FFFFFF;
    /* High contrast white bars */
    transition: var(--transition);
}

/* Mobile Responsive Nav */
@media (max-width: 768px) {
    .hamburger {
        display: block;
        top: 50%;
        transform: translateY(-50%);
        right: 15px;
        /* Keep it right aligned in the nav bar area */
        position: absolute;
    }

    /* .nav-links rules removed to avoid conflict with sliding menu implementation below */

    .nav-center {
        justify-content: flex-end;
        /* Push hamburger to right */
        height: 50px;
        /* Reserve space for hamburger line */
    }

    .logo-img {
        width: 80%;
        max-width: 300px;
        height: auto;
        margin: 0 auto;
    }

    .top-banner {
        font-size: 14px;
        padding: 5px;
    }

    h2.about-header,
    h2.video-header,
    h2.products-header,
    h2.contact-header,
    h2.inquiry-header {
        font-size: 28px;
        /* Reduced from 40px */
    }

    .category-filter {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .filter-btn {
        font-size: 16px;
        /* Reduced from 24px */
        margin: 5px;
    }
}

/* Sections */
section {
    padding: 30px 0;
    /* Tighter sections */
}

/* About Split Layout (Full Width) */
#about {
    padding: 0;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 0;
}

.text-side {
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: justify;
    /* Justify text globally */
}

.text-side p {
    text-align: justify;
}

.image-side {
    text-align: center;
    padding: 0;
    height: auto;
    min-height: 100%;
}

.image-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
    max-height: none;
    /* Unlock height */
}

.bg-beige {
    background-color: #D9C0A4;
    /* Updated About Us Color */
}

#videos {
    background-color: #F4E1A1;
    /* Updated Video Color */
    text-align: center;
    padding-bottom: 80px;
}

/* ZigZag Video Layout */
.video-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    /* Reduced gap from 60px */
    margin-top: 30px;
    max-width: 1000px;
    /* Reduced max-width */
    margin-left: auto;
    margin-right: auto;
}

.video-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    text-align: left;
}

.video-row.reverse {
    flex-direction: row-reverse;
    /* Video (Item 1) -> Right, Text (Item 2) -> Left? No.
                                    row-reverse places Item 1 at End (Right) and Item 2 at Start (Left) if ltr?
                                    Actually:
                                    row: 1 -> 2
                                    row-reverse: 2 <- 1 (visually Item 1 is Right, Item 2 is Left)
                                    So Wrapper (1) is Right, Description (2) is Left. Correct. */
}

.video-wrapper {
    flex: 1;
    max-width: 500px;
    /* Reduced max-width */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.video-wrapper iframe {
    width: 100%;
    height: 280px;
    /* Reduced height */
    display: block;
}

.video-description {
    flex: 1;
    padding: 10px;
}

.video-description h3 {
    font-size: 1.5rem;
    /* Reduced from 2rem */
    color: var(--primary-color);
    margin-bottom: 10px;
}

.video-description p {
    font-size: 1rem;
    /* Reduced from 1.2rem */
    color: #444;
}

@media (max-width: 900px) {

    .video-row,
    .video-row.reverse {
        flex-direction: column;
        /* Stack vertically: Wrapper then Description */
        text-align: center;
    }

    .video-wrapper {
        width: 100%;
        max-width: 100%;
    }
}

#products {
    background: linear-gradient(135deg, #556B2F, #3E2723);
    /* Earthy Gradient (Olive to Dark Brown) */
    color: white;
    /* Ensure text is readable */
    font-family: 'Caliber', sans-serif;
    /* Applied to entire section */
}

#products h2 {
    color: #FFD700;
    /* Gold heading for contrast */
}

/* Force Caliber on all headings in products section to override global Playfair */
#products h3,
#products h4,
#products h5,
#products h6 {
    font-family: 'Caliber', sans-serif;
}

#products .product-item {
    color: var(--text-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Smooth transition for card lift */
}

#products .product-item:hover {
    transform: translateY(-10px);
    /* Lift card */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    /* Stronger shadow */
}

/* Reviews Section */
.reviews-section {
    background-color: #6B8E23;
    /* Updated Reviews Color */
    padding: 40px 0;
    text-align: center;
}

/* ... existing code ... */

.product-img img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    transition: transform 0.5s ease;
    /* Slower, smoother zoom */
}

.product-item:hover .product-img img {
    transform: scale(1.15);
    /* Enlarge image more significantly */
}

.reviews-container {
    background-color: #111;
    color: white;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 15px;
}

.review-btn {
    background-color: #1877F2;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Contact/Reach Out Section */
#contact {
    background-color: #7B5E3C;
    /* Updated Contact Color */
    color: black;
    padding-bottom: 0;
}

.reach-out-section {
    background-color: #6B8E23;
    /* Updated Reach Out Color */
    color: white;
}

.contact-layout {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.map-container {
    width: 100%;
    height: auto;
    background-color: #ddd;
    padding-bottom: 20px;
    /* Add space for button */
}

.map-container iframe {
    width: 100%;
    height: 400px;
    border: 0;
}

/* Inquiry Form Styling */
.inquiry-form {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
}

.inquiry-form .form-group {
    margin-bottom: 30px;
    text-align: left;
    /* Align labels left */
}

.inquiry-form label {
    display: block;
    color: white;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.inquiry-form input,
.inquiry-form textarea {
    width: 100%;
    padding: 15px 0;
    /* Horizontal padding 0 for underline look */
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.7);
    color: white;
    font-size: 1.1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

.inquiry-form textarea {
    border: 1px solid rgba(255, 255, 255, 0.5);
    /* Full border for textarea usually looks better, or just underline? User image showed box for message usually. Let's stick to box for textarea validation */
    padding: 15px;
}

.inquiry-form input:focus,
.inquiry-form textarea:focus {
    border-color: white;
}

.inquiry-form button {
    background-color: white;
    color: #2E5A35;
    /* Dark Green Text */
    border: none;
    padding: 15px 60px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    /* Pill Shape */
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 20px;
    display: inline-block;
}

.inquiry-form button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.inquiry-form input::placeholder,
.inquiry-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.inquiry-form input:focus,
.inquiry-form textarea:focus {
    outline: none;
    border-bottom: 1px solid var(--accent-color);
}

.inquiry-form button {
    background-color: white;
    color: #6B8E23;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
}

/* Products Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.product-item {
    text-align: center;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.product-category {
    font-size: 0.8rem;
    color: #8D6E63;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    font-weight: 600;
    font-family: 'Caliber', sans-serif;
}

.product-price {
    margin-top: 10px;
    font-size: 1.1rem;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9em;
    margin-right: 8px;
}

.current-price {
    color: var(--primary-color);
    font-weight: 700;
}

.product-img {
    background-color: transparent;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    padding: 10px;
}

.product-img img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-item:hover .product-img img {
    transform: scale(1.05);
}

/* Footer */
footer {
    background-color: #1A1A1A;
    color: #888;
    padding: 40px 0;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: var(--header-height);
        height: calc(100vh - var(--header-height));
        background-color: var(--white);
        flex-direction: column;
        width: 100%;
        text-align: center;
        padding-top: 2rem;
        transition: 0.5s;
        box-shadow: -2px 5px 10px rgba(0, 0, 0, 0.1);
        z-index: 2000;
        /* Ensure on top of everything */
    }

    .nav-links.active {
        right: 0;
        display: flex !important;
        /* Force visible */
    }

    .nav-links li {
        display: block;
        margin: 20px 0;
    }

    .nav-links a {
        color: #1A1A1A;
        /* Dark text for mobile menu */
        font-size: 1.2rem;
    }

    /* .nav-links.active moved up */

    .hamburger {
        display: block;
    }

    .split-layout {
        grid-template-columns: 1fr;
    }

    /* CSS Reset or Global overrides if any needed here */

    .image-side {
        height: 300px;
        order: 1;
        /* Image after text on mobile as discussed */
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .modal-images {
        padding: 10px;
    }
}

.modal-reviews-section {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.reviews-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
    /* Space for scrollbar */
    margin-bottom: 20px;
}

/* Scrollbar styling for reviews */
.reviews-list::-webkit-scrollbar {
    width: 6px;
}

.reviews-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.reviews-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.review-item-modal {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid var(--primary-color);
}

.modal-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}

.modal-thumbnails img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    /* Ensure full product visible */
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-thumbnails img.active-thumb {
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(46, 90, 53, 0.5);
    transform: scale(1.05);
}

/* Category Filter */
.category-filter {
    margin-bottom: 30px;
}

.filter-btn {
    border: none;
    background: #f0f0f0;
    padding: 8px 16px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
    transition: background 0.3s, color 0.3s;
    font-size: 1rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: #2E5A35;
    color: white;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(to bottom, #FFFFFF, #F1F8E9);
    /* Soft Herbal Gradient */
    margin: 5vh auto;
    font-family: 'Caliber', sans-serif;
    /* Apply Caliber to Modal */
    /* Center vertically better */
    padding: 0;
    border-radius: 10px;
    width: 90vw;
    /* Increased width to fill page */
    max-width: 1200px;
    /* Optional cap */
    min-height: 80vh;
    /* Increased height */
    /* Force substantial height */
    max-width: none;
    /* Remove cap */
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideDown 0.4s ease;
    display: flex;
    flex-direction: column;
}

/* Force Caliber on headings inside modal */
.modal-content h2,
.modal-content h3,
.modal-content h4 {
    font-family: 'Caliber', sans-serif;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 10px;
    cursor: pointer;
    z-index: 10;
}

.close-modal:hover,
.close-modal:focus {
    color: #000;
    text-decoration: none;
}

.modal-body {
    display: flex;
    flex-wrap: wrap;
    flex: 1;
    /* Fill height */
}

.modal-images {
    flex: 1 1 50%;
    /* Give image side more space */
    padding: 30px;
    background: #f9f9f9;
    text-align: center;
    display: flex;
    /* Flex to center image vertically */
    flex-direction: column;
    justify-content: center;
}

.modal-images img#modal-main-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    max-height: 60vh;
    /* Allow image to be tall */
    object-fit: contain;
}

.modal-thumbnails {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.modal-thumbnails img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.modal-thumbnails img:hover,
.modal-thumbnails img.active-thumb {
    border-color: #2E5A35;
}

.modal-details {
    flex: 1 1 50%;
    padding: 30px;
}

.modal-details h2 {
    color: #2E5A35;
    margin-bottom: 20px;
    font-size: 2.5rem;
}

.modal-category {
    color: #8D6E63;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 1.2rem;
    /* Enlarge category */
    margin-bottom: 20px;
}

.modal-details .product-price {
    font-size: 2rem;
    margin-bottom: 20px;
}

.modal-description {
    font-size: 1rem;
    line-height: 1.8;
}


@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .modal-images {
        padding: 10px;
    }
}

/* Review System Styles */
.modal-rating-summary {
    color: #FFD700;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.rating-count {
    color: #777;
    font-size: 0.9rem;
    margin-left: 5px;
}

.review-item-modal {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #eee;
}

.btn-secondary {
    background: #eee;
    color: #333;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #ddd;
}

.star-rating-input span:hover,
.star-rating-input span:hover~span {
    color: #FFD700;
}

/* Hover Rating Text on Product Card */
.product-item {
    position: relative;
    /* Ensure absolute child aligns to this */
}

.hover-rating-text {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #FFD700;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    /* Let clicks pass through */
}

/* --- Homepage Review Widget Styles --- */
.homepage-review-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: left;
    transition: transform 0.2s;
    height: auto;
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Responsive Carousel: Default Mobile (1 card) */
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: start;
}

/* Tablet: 2 cards */
@media (min-width: 600px) {
    .homepage-review-card {
        flex: 0 0 calc(50% - 10px);
        /* 10px is half of 20px gap */
    }
}

/* Desktop: 3 cards */
@media (min-width: 900px) {
    .homepage-review-card {
        flex: 0 0 calc(33.333% - 13.333px);
        /* 40px gap total / 3 cards = 13.33px */
    }
}

.homepage-review-card:hover {
    transform: translateY(-5px);
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.reviewer-name {
    font-weight: bold;
    color: #333;
}

.review-stars {
    font-size: 1.1rem;
}

.review-text {
    color: #555;
    line-height: 1.5;
}

/* Carousel Navigation Arrows */
.nav-arrow {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    color: #2E5A35;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    /* Prevent squishing */
    line-height: 1;
}

.nav-arrow:hover {
    background-color: #2E5A35;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.nav-arrow:active {
    transform: scale(0.95);
}

@media (max-width: 480px) {
    .nav-arrow {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
}