/* Global Styles */
:root {
    --primary: #2c5530;
    --secondary: #6b8e23;
    --accent: #d4af37;
    --light: #f8f9fa;
    --dark: #343a40;
    --text: #333;
    --text-light: #6c757d;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: #f3f4f6; /* subtle app-like background */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3, h4, h5 {
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%; /* Allow images to fill their containers */
    height: auto;    /* Maintain aspect ratio */
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

.section {
    padding: 40px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: var(--accent);
    margin: 15px auto;
}

/* Animation for elements scrolling into view */
.section-title {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Header Styles */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center; /* This will vertically center the logo and nav menu */
    padding: 15px 0;
}

.logo {
    display: flex;
    flex-direction: row; /* Align logo and (hidden) tagline side-by-side */
    align-items: center;
}

.logo h1 {
    font-size: 28px;
    margin-bottom: 0;
    color: var(--primary);
}

.logo a {
    display: flex; /* Use flex to help center the image */
    align-items: center;
}

.logo .header-logo {
    height: auto;
    width: 60px; /* Adjusted logo width */
}

.logo p {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 0;
}

.nav-menu {
    display: flex;
}

.nav-menu li {
    margin-left: 25px;
}

.nav-menu a {
    font-weight: 500;
    position: relative;
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--primary);
    transform: translateY(-2px);
}

.nav-menu a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-menu a:hover:after, .nav-menu a.active:after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('product_images/final_banner.jpeg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 150px 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: white;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
}

/* Highlights Section */
.highlights {
    background-color: var(--light);
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.highlight-card {
    text-align: center;
    padding: 30px 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.highlight-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.highlight-icon {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 20px;
}

.highlight-card h3 {
    margin-bottom: 15px;
}

/* Featured Products */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
    max-width: 600px;
    width: 100%;
}

#main-product {
    width: 100%;
    max-width: 600px;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.product-img {
    /* Uniform product image height for featured product cards */
    height: 260px;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

/* Homepage featured product sliders: arrows & dots */
.homepage-featured-products .product-img {
    position: relative;
}

.homepage-slideshow {
    width: 100%;
    height: 100%;
}

.homepage-featured-products .slide {
    /* Show next image immediately to avoid blank frame on mobile */
    animation: none;
    opacity: 1;
    transform: scale(1);
}

.featured-slider-controls {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none; /* buttons re-enable pointer-events */
    padding: 0 6px 8px;
}

.featured-prev,
.featured-next {
    pointer-events: auto;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.featured-prev:hover,
.featured-next:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: translateY(-1px);
}

.featured-dots {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    pointer-events: auto;
}

.featured-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.featured-dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* Ensure slideshow images inside product cards match the same size and crop */
.product-card .slideshow {
    height: 260px;
    overflow: hidden;
}
.product-card .slideshow .slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card:hover .product-img img {
    transform: scale(1.1);
}

.slideshow {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Make arrows slightly inset from edges on small screens */
@media (max-width: 768px) {
    #main-slideshow .prev { left: 10px; }
    #main-slideshow .next { right: 10px; }
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    margin-bottom: 10px;
}

.product-info p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.price {
    font-weight: 600;
    color: var(--primary);
    font-size: 18px;
}

/* About Section */
.about {
    background-color: var(--light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-img {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about-img img {
    width: 100%;
    height: auto;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.value-item {
    display: flex;
    align-items: flex-start;
}

.value-icon {
    font-size: 24px;
    color: var(--primary);
    margin-right: 15px;
    margin-top: 5px;
}

/* Sustainability Section */
.sustainability-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.commitments {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.commitment-card {
    padding: 30px 20px;
    background-color: var(--light);
    border-radius: 8px;
    text-align: center;
}

.commitment-icon {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 20px;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    color: white;
    margin-bottom: 20px;
    position: relative;
}

.footer-column h3:after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: var(--accent);
    margin-top: 10px;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a:hover {
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Product Page Styles */
.page-header {
    background-color: var(--light);
    padding: 60px 0;
    text-align: center;
}

.page-header-section {
    background-color: var(--light);
    padding: 60px 0;
}

.header-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.header-card {
    background-color: white;
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
}

.header-card h1 {
    font-size: 28px;
    margin-bottom: 15px;
}

.header-card p {
    color: var(--text-light);
    margin-bottom: 0;
}

.certification-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.certification-card .commitment-icon {
    font-size: 50px;
    color: var(--primary);
    margin-bottom: 15px;
}

.certification-card h3 {
    margin-bottom: 10px;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--text-light);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span {
    margin: 0 10px;
    color: var(--text-light);
}

.filter-section {
    background-color: var(--light);
    padding: 15px 0;
    margin-bottom: 0;
}

.filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-container h3 {
    margin-bottom: 0.5rem;
}

.filter-container p {
    margin-top: 0;
    margin-bottom: 0;
    color: var(--text-light);
}

.filter-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 80px;
}

.main-image {
    height: 420px;
    border-radius: 8px;
    overflow: hidden;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-variants {
    /* legacy variant styles removed for display-only site */
    margin: 0;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
}

.specs-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.specs-table td:first-child {
    font-weight: 600;
    width: 30%;
}

.related-products {
    margin-top: 20px;
}

@media (max-width: 768px) {
    .related-products { margin-top: 40px; }
}

/* "You Might Also Like" Product Card Styles */
.related-products .product-card {
    box-shadow: none;
    border: 1px solid #eee;
}

.related-products .product-card:hover {
    transform: translateY(0);
    box-shadow: none;
    border-color: var(--primary);
}

.related-products .product-info h3 {
    font-size: 18px;
}

.related-products .product-info p {
    font-size: 14px;
    margin-bottom: 0;
}


/* Responsive Styles */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .product-gallery {
        grid-template-columns: 80px 1fr;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr; /* single-column, card list feel */
        gap: 16px;
    }

    .products-carousel-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    #main-slideshow {
        height: 350px;
    }

    .carousel-info-section h3 {
        font-size: 22px;
    }

    .carousel-info-section p {
        font-size: 14px;
    }

    .product-nav-arrows {
        flex-direction: column;
    }

    .product-prev-btn, .product-next-btn {
        width: 100%;
    }

    .header-container {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .logo a {
        /* No change needed, height on img is sufficient */
    }

    .logo p { display: none; }

    .nav-menu {
        position: fixed;
        top: 68px; /* Adjusted to match new header height */
        left: -100%;
        width: 80%;
        height: calc(100vh - 80px);
        background-color: white;
        flex-direction: column;
        padding: 40px 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        transition: var(--transition);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 15px 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 18px;
    }

    .filter-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-gallery {
        grid-template-columns: 1fr;
    }

    .thumbnail-list {
        flex-direction: row;
        order: 2;
    }

    .thumbnail {
        height: 60px;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 80px 0;
    }

    .hero h1 {
        font-size: 26px;
    }

    .section {
        padding: 24px 0;
    }

    .container {
        width: 100%;
        padding: 0 16px;
    }

    .product-card {
        border-radius: 12px;
    }

    .main-image {
        height: 320px;
        border-radius: 12px;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .product-actions {
        flex-direction: column;
    }

    .quantity-selector {
        align-self: flex-start;
    }
}

/* (Cleaned legacy responsive rules for removed main slideshow & thumbnails) */