/* -------------------------------------------------------------------------- */
/* AGRIFUTURE - MASTER STYLESHEET (ALL VIEWS)                                 */
/* -------------------------------------------------------------------------- */

/* --- General Styling & Variables --- */
:root {
    --primary-color: #388E3C; /* A slightly richer, yet professional green */
    --secondary-color: #81C784; /* A soft, natural accent green */
    --accent-color: #FFC107; /* A vibrant, warm amber/gold */
    --bg-color: #F8FBF8; /* A very light, crisp green-tinted gray */
    --text-dark: #2C3E50; /* Darker, more sophisticated text */
    --text-light: #ECF0F1; /* Light gray for contrast on dark backgrounds */
    --header-height: 80px;
    --border-radius: 12px; /* Slightly refined border-radius */
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07); /* More subtle shadow */
    --transition-speed: 0.3s ease-in-out;
    /* NEW: Variable for consistent side padding on internal content */
    --content-padding-x: 2rem;
}

html, body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* --- Main Header Navigation --- */
/* --- Main Header Navigation --- */
.main-header {
    /* CHANGED: Replaced the translucent white background with a light green shade.
    background: rgba(255, 255, 255, 0.95); */
    background: var(--secondary-color); /* Light green shade */
    
    /* Removed backdrop-filter as it's typically used with translucent backgrounds, 
       but you can keep the shadow for depth. */
    /* backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); */
    
    height: var(--header-height);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05); /* Softer shadow */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    /* FIX: Apply consistent side padding via variable */
    padding: 0.2rem var(--content-padding-x);
    height: 100%;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.6rem; /* Slightly larger brand */
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}
.header-brand:hover { color: var(--secondary-color); }
.header-brand img { height: 120px; } /* Assuming you might add a logo img */

.header-nav { 
    display: flex; 
    gap: 2.5rem; 
}
.header-nav .nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 700;
    position: relative;
    padding: 0.5rem 0;
    transition: color var(--transition-speed);
}
.header-nav .nav-link:hover { color: var(--primary-color); }
.header-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px; /* Moved slightly lower */
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed);
}
.header-nav .nav-link:hover::after, .header-nav .nav-link.active::after { width: 100%; }

.mobile-menu-toggle { display: none; } /* Kept hidden as there's no sidebar */

/* --- General Content & Page Layout --- */
.main-content { 
    padding-top: var(--header-height); 
    min-height: calc(100vh - var(--header-height)); 
}
.content { 
    padding: 0rem 0; /* REMOVED side padding here. Max-width handles centering. */
    max-width: 1400px; 
    margin: 0 auto; 
    padding-bottom: 0; 
}
.container { 
    max-width: 1600px; 
    margin: 0 auto; 
    /* FIX: Ensure all containers use the consistent side padding */
    padding: 0 var(--content-padding-x); 
}
.page-header {
    font-size: clamp(2.4rem, 5vw, 3.2rem); /* Slightly larger */
    font-weight: 700;
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2.5rem; /* Increased margin */
}
.section-title {
    font-size: clamp(2.2rem, 5vw, 2.8rem); /* Slightly larger */
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    text-align: center;
}
.section-subtitle {
    font-size: 1.15rem; /* Slightly larger */
    color: #6C7A89; /* Softer gray */
    margin-bottom: 3.5rem; /* Increased margin */
    max-width: 700px; /* Wider subtitle */
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    line-height: 1.6;
}

/* --- Homepage Specific Styles --- */
.hero-section {
    position: relative;
    height: calc(100vh - var(--header-height));
    min-height: 550px; /* Slightly taller hero */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    overflow: hidden;
    background-image: url('/images/hero-bg-default.jpg'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
}
.video-background { display: none; } /* Hide video */
.hero-overlay { 
    background-color: rgba(0, 0, 0, 0.55); /* Slightly darker overlay for better text contrast */
}
.hero-content {
    /* FIX: Add padding to hero content for mobile/edge spacing */
    padding: 0 var(--content-padding-x); 
    max-width: 1000px;
}
.hero-content h1 { 
    font-size: clamp(2.8rem, 4vw, 4.8rem); 
    font-weight: 700; 
    text-shadow: 2px 2px 10px rgba(56, 179, 61, 0.677); /* Stronger shadow */
    margin-bottom: 1rem;
}
.hero-content p { 
    font-size: clamp(1.2rem, 2vw, 1.6rem); 
    margin-top: 1rem; 
    max-width: 700px; 
    line-height: 1.5;
    margin-left: auto;
    margin-right: auto;
}
.btn-hero { 
    margin-top: 2.5rem; 
    padding: 1.1rem 2.8rem; /* Larger button */
    background-color: var(--accent-color); 
    color: var(--text-dark); 
    border-radius: 50px; 
    font-size: 1.1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.btn-hero:hover { 
    background-color: #FFD54F; /* Lighter accent on hover */
    transform: translateY(-5px); /* More pronounced lift */
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.page-section { padding: 5rem 0; } /* Increased section padding */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2.5rem; } /* Slightly larger min-width, more gap */
/* 

/* --- Homepage Specific Styles --- */
/* (Keep existing .feature-box styles as they are, no changes needed there) */

.feature-box {
    border-radius: var(--border-radius);
    overflow: hidden;
    color: var(--text-light);
    min-height: 380px; /* Taller feature boxes */
    background-size: cover;
    background-position: center;
    box-shadow: var(--box-shadow);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.5s var(--transition-speed); /* Smoother transition */
    display: flex;
    align-items: flex-end; /* Content at bottom */
    position: relative; /* Needed for absolute positioning of blur overlay */
}
.feature-box:hover { transform: translateY(-15px) scale(1.02); box-shadow: 0 25px 50px rgba(0,0,0,0.18); } /* More pronounced hover */

/* NEW: Pseudo-element for the blurred image effect */
.feature-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Inherit the background image from the parent .feature-box */
    background-image: inherit; 
    background-size: cover;
    background-position: center;
    /* Apply the blur filter */
    filter: blur(3px); /* Adjust blur value as needed (e.g., 2px, 5px) */
    z-index: 1; /* Place behind the overlay content */
    border-radius: var(--border-radius); /* Match parent border-radius */
}

.feature-overlay {
    /* Existing overlay gradient, now placed on top of the blurred image */
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 80%); /* Stronger gradient */
    padding: 2.5rem; /* More padding */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start; /* Align text to left */
    width: 100%;
    position: relative; /* Bring content above the blurred pseudo-element */
    z-index: 2; /* Ensure text is on top of both the blur and the base image */
    height: 100%; /* Make overlay fill the box to cover blurred image entirely */
}
/* ... rest of .feature-overlay styles ... */

.feature-overlay h3 { 
    margin-top: 0; 
    margin-bottom: 0.8rem; 
    font-size: 2rem; /* Larger heading */
    color: var(--accent-color); /* Highlight heading */
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
}
.feature-overlay p { 
    margin-bottom: 0; 
    font-size: 1.05rem; /* Slightly larger paragraph */
    line-height: 1.7;
    text-align: left;
}









.stats-section { 
    background-color: #E8F5E9; /* Lighter, fresher background */
    padding: 1rem 0; /* More padding */
    box-shadow: inset 0 5px 20px rgba(0,0,0,0.03); /* Subtle inner shadow */
}
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; text-align: center; }
.stat-item h2 { 
    font-size: clamp(2.8rem, 5vw, 4rem); 
    font-weight: 700; 
    color: var(--primary-color); 
    margin-bottom: 0.5rem;
}
.stat-item p {
    font-size: 1.1rem;
    color: #555;
    font-weight: 500;
}

/* About Us Section (New Home Page Section) */
.about-home-section {
    background-color: white;
    padding: 6rem 0;
}
.about-home-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    /* FIX: Apply padding for edge spacing */
    padding: 0 var(--content-padding-x);
}
.about-home-text {
    flex: 1;
    min-width: 300px;
    padding: 1rem;
}
.about-home-text h2 {
    text-align: left;
    margin-bottom: 1.5rem;
}
.about-home-text p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: #444;
}
.about-home-image {
    flex: 1;
    min-width: 300px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}
.about-home-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Call to Action Section (New Home Page Section) */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    padding: 6rem var(--content-padding-x); /* FIX: Use variable for side padding */
    text-align: center;
    margin-top: 0; /* No margin-top if placed after about-home */
}
.cta-section h2 {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}
.cta-section p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.6;
}
.btn-cta {
    display: inline-block;
    padding: 1.2rem 3rem;
    background-color: var(--accent-color);
    color: var(--text-dark);
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    font-size: 1.15rem;
    transition: all var(--transition-speed);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.btn-cta:hover {
    background-color: #FFD740; /* Slightly lighter accent */
    transform: translateY(-7px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}


/* --- Product Page Styles (Summary View with Button) --- */
/* --- Product Page Styles (Summary View with Button) --- */
.product-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 2.5rem; 
    /* FIX: Apply padding directly to grid to handle side spacing */
    padding: 0 var(--content-padding-x); 
}
.product-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed);
    background: white;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 70px; /* Space for button at bottom */
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(46, 125, 50, 0.1); }

/* ****************************************************** */
/* --- FIX 1: Product Summary Card Image (Most Important) --- */
/* ****************************************************** */
.product-image { 
    height: 250px; /* Slightly taller for better product display */
    /* FIX: Change from 'cover' to 'contain' to ensure the whole product is visible. */
    background-size: contain; 
    background-repeat: no-repeat; /* Ensure it doesn't tile */
    background-position: center;
    transition: transform var(--transition-speed);
    padding: 10px; /* Add slight internal padding to prevent product touching edges */
    box-sizing: border-box; /* Include padding in the height/width */
}
.product-card:hover .product-image { transform: scale(1.05); }

.product-info-summary { 
    padding: 1.5rem; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    align-items: center; /* Center text */
    text-align: center;
}
.product-info-summary h3 { 
    margin: 0 0 0.8rem 0; 
    color: var(--primary-color); 
    font-size: 1.6rem; 
}
.product-info-summary p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
    height: 3em; 
    overflow: hidden; 
}
/* ... (btn-view-details styles unchanged) ... */


/* --- Product Detail Page Styles (New) --- */
.product-detail-container {
    max-width: 1200px; 
    margin: 0 auto 4rem auto; 
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: flex-start;
    width: auto; 
}

/* ****************************************************** */
/* --- FIX 2: Product Detail Page Main Image --- */
/* ****************************************************** */
.product-detail-image {
    flex: 1 1 400px; 
    min-width: 300px;
    height: 400px; 
    /* FIX: Change from 'cover' to 'contain' */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    padding: 20px; /* Added padding for better containment */
    box-sizing: border-box;
}
.product-detail-info {
    flex: 1 1 400px;
    min-width: 300px;
}
/* ... (rest of .product-detail-info styles unchanged) ... */

/* --- NEW Styles for Full Details View within the Card --- */

.product-info-full {
    padding: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden; 
}
/* ... (detail-header styles unchanged) ... */

.product-detail-scroll {
    flex-grow: 1;
    overflow-y: auto; 
    padding: 1rem 0.5rem;
}

/* ****************************************************** */
/* --- FIX 3: Product Card's Internal Detail Image --- */
/* ****************************************************** */
.detail-image {
    width: 100%;
    height: 150px; 
    /* FIX: Change from 'cover' to 'contain' */
    background-size: contain; 
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 1.5rem;
}

/* ... (rest of the CSS unchanged) ... */


@media (max-width: 992px) {
    /* ... (other media query styles unchanged) ... */
    
    /* Product Details Container (General tablet view) */
    .product-detail-container { 
        flex-direction: column; 
        align-items: center; 
        text-align: center;
        padding: 2rem;
        gap: 2rem;
        max-width: 90%; 
        margin: 0 auto 4rem auto; 
    }
    .product-detail-image {
        width: 80%; 
        height: 350px; 
        /* Ensure the fix applies in media query */
        background-size: contain; 
    }
    /* ... (rest of 992px media query unchanged) ... */
}

@media (max-width: 768px) {
    /* ... (other media query styles unchanged) ... */

    /* Product Detail Page (Full Mobile View) */
    .product-detail-container {
        padding: 1rem;
    }
    .product-detail-image {
        width: 100%; 
        height: 250px; 
        /* Ensure the fix applies in media query */
        background-size: contain;
    }
    /* ... (rest of 768px media query unchanged) ... */
}
/* ... (rest of media queries unchanged) ... */





.product-detail-info {
    flex: 1 1 400px;
    min-width: 300px;
}
.product-detail-info h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
}
.product-detail-info .description {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 2rem;
}
.product-detail-info h4 {
    margin-top: 2rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    color: var(--text-dark);
    font-size: 1.3rem;
}
.product-detail-info ul {
    list-style-type: '🌿 '; /* Custom bullet point */
    padding-left: 1.8rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}
.product-detail-info li {
    margin-bottom: 0.7rem;
    font-size: 1rem;
    line-height: 1.4;
    color: #333;
}
.product-detail-info p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #333;
}
.back-to-products {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.8rem 2rem;
    background-color: #6C7A89; /* A neutral color for back button */
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: background-color var(--transition-speed);
}
.back-to-products:hover {
    background-color: #4A586A;
}

/* --- Product Page Styles (Summary View with Button) --- */
/* (This section was mostly a duplicate of .product-info-summary, cleaned up below) */

/* Button position remains the same as previous step */
.btn-view-details {
    position: absolute; 
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-speed);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}
.btn-view-details:hover { 
    background: var(--accent-color); 
    color: var(--text-dark); 
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}


/* --- NEW Styles for Full Details View within the Card --- */

.product-info-full {
    padding: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Contains scrollable content */
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.5rem 1rem 0.5rem;
    border-bottom: 1px solid var(--bg-color);
}
.detail-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.4rem;
}
.btn-hide-details {
    background: var(--accent-color);
    color: var(--text-dark);
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color var(--transition-speed);
}
.btn-hide-details:hover {
    background: #ffaa33;
}

.product-detail-scroll {
    flex-grow: 1;
    overflow-y: auto; /* Make the details section scrollable */
    padding: 1rem 0.5rem;
}

.detail-image {
    width: 100%;
    height: 150px; /* Smaller detail image at the top of the details view */
    background-size: contain; /* Show entire product image */
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 1.5rem;
}

.product-info-full h4 {
    margin-top: 1rem;
    border-bottom: 1px solid var(--secondary-color);
    padding-bottom: 0.25rem;
    font-size: 1.1rem;
}

.product-info-full ul {
    list-style-type: '🌿 ';
    padding-left: 1.2rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}
.product-info-full li, .product-info-full p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #444;
}

/* --- Contact Page Styles --- */
.contact-grid { 
    display: grid; 
    grid-template-columns: 1fr 1 fr; 
    gap: 2.5rem;  
    /* FIX: ADD THIS LINE BACK to give the grid its own side padding */
    /* padding: 0 var(--content-padding-x);  */
}
.contact-form-container { 
    background: white; 
    padding: 3rem; 
    border-radius: var(--border-radius); 
    box-shadow: var(--box-shadow); 
     max-width: 600px; 
    width: 100%;
    margin: 0 auto;
}
.whatsapp-form { background: #E8F5E9; } /* Kept as is */
.whatsapp-btn { background-color: #25D366 !important; } 
.whatsapp-btn:hover { background-color: #1DA851 !important; } /* Slightly darker on hover */
.form-group { margin-bottom: 1.8rem; } /* More space between form groups */
.form-group label { display: block; margin-bottom: 0.6rem; font-weight: 600; font-size: 1.05rem; } /* Slightly larger label */
.form-control { 
    width: 100%; 
    padding: 0.9rem 1.2rem; 
    border: 1px solid #D5DBDE; /* Softer border */
    border-radius: 8px; 
    box-sizing: border-box; 
    font-size: 1rem;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(56, 142, 60, 0.2);
    outline: none;
}
.btn-submit { 
    display: block; 
    width: 100%; 
    padding: 1.1rem; 
    color: white; 
    border: none; 
    border-radius: 8px; 
    font-size: 1.15rem; 
    font-weight: bold; 
    cursor: pointer; 
    background-color: var(--secondary-color); 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.btn-submit:hover { 
    background-color: var(--primary-color); 
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}


/* --- Footer Styling --- */
.site-footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 2.5rem 1rem; /* More padding */
    text-align: center;
    border-top: 6px solid var(--accent-color); /* Thicker border */
}
.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem; /* More space */
    /* FIX: Apply padding for edge spacing */
    padding: 0 var(--content-padding-x);
}
.footer-content p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}
.social-links {
    display: flex;
    gap: 1.8rem; /* More space between links */
    margin-top: 0.8rem;
}
.social-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-speed);
    border: 2px solid var(--text-light);
    border-radius: 50%;
    width: 35px; /* Larger social icons */
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}
.social-links a:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: scale(1.1) rotate(5deg);
}

/* --- Quote Section --- */
.quote-section {
    background-color: #f1f5f9; /* A light, clean background */
}

.agrifuture-quote {
    font-size: 1.7rem;
    font-style: italic;
    font-weight: 500;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    color: var(--sidebar-bg);
    border-left: 5px solid var(--primary-color);
    padding-left: 2rem;
    text-align: left;
}

@media (max-width: 768px) {
    .agrifuture-quote {
        font-size: 1.3rem;
    }
}
/* --- RESPONSIVE MEDIA QUERIES --- */

/* Laptops & Small Desktops */
@media (max-width: 1200px) {
    /* Set a smaller default padding for side margins */
    :root { --content-padding-x: 1.5rem; } 
    /* These classes already use the variable now, so only adjust if needed */
    /* .header-container, .content { padding: 0 1.5rem; } */
    .product-detail-container { 
        padding: 2rem; 
        /* Remove the separate margins that were compensating for the lack of auto margins */
        margin-left: auto;
        margin-right: auto;
    }
}

/* Tablets */
@media (max-width: 992px) {
    /* Even smaller padding */
    :root { --content-padding-x: 1rem; } 

    .header-container { 
        flex-direction: column; 
        justify-content: center; 
        gap: 0.5rem; 
        height: auto; 
        padding-top: 0.8rem; 
        padding-bottom: 0.8rem; 
    }
    .main-header { height: auto; }
    :root { 
        --header-height: 125px; /* Adjust content padding */
    } 
    .header-nav {
        gap: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    .contact-grid { grid-template-columns: 1fr; }
    .about-home-content { flex-direction: column; text-align: center; }
    .about-home-text h2 { text-align: center; }
    
    /* Product Details Container (General tablet view) */
    .product-detail-container { 
        flex-direction: column; 
        align-items: center; 
        text-align: center;
        padding: 2rem;
        gap: 2rem;
        max-width: 90%; 
        margin: 0 auto 4rem auto; /* Reset margins to auto and center */
    }
    .product-detail-image {
        width: 80%; 
        height: 350px; 
    }
    .product-detail-info h2 { 
        text-align: center; 
        font-size: 2rem;
    }
    .product-detail-info ul { 
        list-style-position: inside; 
        padding-left: 0; 
    }
}

/* Mobile Phones */
@media (max-width: 768px) {
    /* Final smallest padding */
    :root { --content-padding-x: 0.8rem; }
    
    /* General content/header now use the variable */
    .content { padding-top: 2rem; }
    
    .hero-content h1 { font-size: 2.rem; }
    .hero-content p { font-size: 1.1rem; }
    .page-section { padding: 3rem 0; }
    .feature-box { min-height: 300px; }
    .feature-overlay h3 { font-size: 1.6rem; }
    .feature-overlay p { font-size: 0.95rem; }
    .stats-section { padding: 4rem 0; }
    .cta-section { padding: 4rem var(--content-padding-x); } /* Already uses variable */
    .btn-cta { padding: 1rem 2.5rem; font-size: 1.05rem; }

    /* Product Grid */
    .product-grid { 
        grid-template-columns: 1fr; 
        gap: 1.5rem; 
    }
    .product-card {
        padding-bottom: 50px; /* Less space needed at bottom */
    }

    /* Product Detail Page (Full Mobile View) */
    .product-detail-container {
        padding: 1rem;
    }
    .product-detail-image {
        width: 100%; 
        height: 250px; 
    }
    .product-detail-info h2 { 
        font-size: 1.8rem; 
        margin-bottom: 0.5rem;
    }
    .product-detail-info .description { 
        font-size: 1rem; 
    }
    .product-detail-info h4 { 
        font-size: 1.1rem; 
    }
    .product-detail-info li, .product-detail-info p { 
        font-size: 0.95rem; 
    }
    
    .back-to-products {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .header-brand { font-size: 1.4rem; }
    .header-nav .nav-link { font-size: 0.9rem; padding: 0.3rem 0; }
    :root { 
        --header-height: 110px; /* Further adjust for smaller screens */
        --content-padding-x: 0.5rem; /* Smallest side padding */
    } 
    
    .hero-content p { font-size: 0.95rem; }
    .btn-hero { padding: 0.8rem 2rem; font-size: 1rem; }
    .features-grid { gap: 1.5rem; }
    .stats-grid { grid-template-columns: 1fr; }
    
    .product-card {
        margin: 0 0.5rem; 
    }
    
    .product-detail-image {
        height: 200px; /* Smallest image height */
    }
}
/* --- RESPONSIVE MEDIA QUERIES --- (CLEANUP OF REDUNDANT MEDIA QUERIES) */

/* Basic styling for the new section */
.location-section {
    margin-top: 40px; /* Space above the location info */
    /* FIX: Ensure location section uses the container padding for alignment */
    padding: 0 var(--content-padding-x); 
}

/* Ensure the map takes the full width of its parent */
.map-container {
    width: 100%;
    overflow: hidden; /* To handle any overflow */
    margin-top: 20px;
}


/* --- RESPONSIVE MEDIA QUERIES --- */

/* Laptops & Small Desktops (Adjust content padding variable) */
@media (max-width: 1200px) {
    :root { 
        --content-padding-x: 1.5rem; 
    } 
    /* ... (rest of 1200px media query styles unchanged) ... */
}

/* Tablets (992px) - Main adjustment for contact-grid and spacing */
@media (max-width: 992px) {
    /* Even smaller padding */
    :root { 
        --content-padding-x: 1rem; 
    } 

    /* Header adjustments remain unchanged */
    /* ... (rest of header/nav 992px styles unchanged) ... */
    
    /* Contact Page FIX: Force stack and adjust padding for both containers */
    .contact-grid { 
        /* Override the desktop 1fr 1fr to single column stack */
        grid-template-columns: 1fr; 
        gap: 2rem; 
    }

    /* Target the form container to remove desktop max-width constraints */
    .contact-form-container { 
        max-width: 100%; /* Allow it to fill the full grid column width */
        margin: 0; /* Remove auto margins to ensure it uses full width of the container */
        padding: 2.5rem; /* Slightly reduced padding for tablet view */
    }

    /* Target the location section to ensure it fills the width */
    .location-section {
        padding: 2.5rem; /* Match form padding */
    }

    /* ... (rest of 992px media query styles unchanged) ... */
}

/* Mobile Phones (768px and below) */
@media (max-width: 768px) {
    /* Final smallest padding */
    :root { 
        --content-padding-x: 0.8rem; 
    }
    
    /* Contact Form & Location Styling Adjustments */
    .contact-form-container { 
        padding: 1.5rem; /* Reduced internal padding */
    }
    .location-section {
        padding: 1.5rem; /* Reduced internal padding */
    }
    
    /* Reduce map height on smaller screens */
    .map-container iframe {
        height: 300px; 
    }
    
    /* Form input/label scaling */
    .form-group { 
        margin-bottom: 1.5rem; /* Slight reduction in space between fields */
    } 
    .form-group label { 
        font-size: 1rem; /* Maintain readable size for labels */
    } 
    .form-control { 
        padding: 0.8rem 1rem; /* Reduce padding inside inputs */
        font-size: 0.95rem; /* Slightly smaller text inside inputs */
    }
    .btn-submit { 
        padding: 1rem; /* Slightly smaller button height */
        font-size: 1.05rem; 
    }
    
    /* ... (rest of 768px media query styles unchanged) ... */
}

@media (max-width: 480px) {
    :root { 
        --content-padding-x: 0.5rem; /* Smallest side padding */
    } 

    .contact-form-container, .location-section {
        /* Even tighter padding on the smallest phones */
        padding: 1rem; 
    }

    /* ... (rest of 480px media query styles unchanged) ... */
}

