/* 
   Project: Agrolor Export SL
   Module: Shared CSS - Variables & Reset
*/

:root {
    /* Brand Palette - Agrolor Green */
    --color-primary: #2F8F2F;
    --color-primary-hover: #5FBF5F;

    /* Functional Colors */
    --color-logistics: #0277BD;
    --color-text: #212121;
    --color-text-light: #757575;
    --color-bg: #FFFFFF;
    --color-bg-alt: #f4f8f5;
    --color-border: #E0E0E0;

    /* Spacing Scale (8pt grid) */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 32px;
    --space-xl: 64px;
    --space-xxl: 128px;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
}

/* RTL Support for Arabic */
[dir="rtl"] {
    --font-heading: 'Tajawal', sans-serif;
    --font-body: 'Tajawal', sans-serif;
}

/* Reset & Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility Classes */
.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    /* Logical property for LTR/RTL support */
    padding-inline: var(--space-md);
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--color-primary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    font-weight: 600;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background-color: var(--color-primary);
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: transparent;
}


/* Header Styles */
.site-header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    padding-block: var(--space-md);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.logo-footer-img {
    height: 30px;
    width: auto;
    display: block;
    margin-bottom: var(--space-xs);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: var(--space-lg);
}

.main-nav a {
    font-weight: 500;
    color: var(--color-text);
}

.main-nav a:hover {
    color: var(--color-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Simple Language Switcher */
.lang-switcher {
    position: relative;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    /* alignment */
    align-items: center;
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--color-border);
    list-style: none;
    padding: var(--space-sm);
    min-width: 80px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    /* Ensure dropdown is above other content */
}

.lang-switcher:hover .lang-dropdown {
    display: block;
}

.lang-dropdown a {
    display: block;
    padding: var(--space-xs) var(--space-sm);
    color: var(--color-text);
}

.lang-dropdown a:hover {
    color: var(--color-primary);
    background-color: var(--color-bg-alt);
}

/* Hero Styles */
.hero {
    position: relative;
    padding-block: var(--space-xxl);
    min-height: 80vh;
    /* Occupy significant viewport height */
    display: flex;
    align-items: center;
    /* Placeholder background until image is added */
    background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), #f0f0f0;
    background-size: cover;
    background-position: center;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
    /* Content above overlay */
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text);
    margin-bottom: var(--space-lg);
    max-width: 60ch;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* Sections Common */
.section-padding {
    padding-block: var(--space-xxl);
}

.bg-light {
    background-color: var(--color-bg-alt);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.section-title {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-light);
    max-width: 700px;
    margin-inline: auto;
}

/* Stats Grid */
.stats-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
    margin-top: var(--space-xl);
}

.stat-card {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-top: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-divider {
    width: 1px;
    height: 60px;
    background-color: var(--color-border);
    display: none;
    /* Hidden on mobile */
}

@media (min-width: 768px) {
    .stat-divider {
        display: block;
    }
}

/* Produce Grid */
.produce-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.produce-card {
    background: white;
    padding: var(--space-lg);
    border-radius: 8px;
    /* Slightly rounded */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--color-primary);
    transition: transform var(--transition-fast);
}

.produce-card:hover {
    transform: translateY(-5px);
}

.card-header {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.card-header h3 {
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.origin-tag {
    font-size: 0.8rem;
    color: var(--color-primary);
    font-weight: 600;
    background: rgba(47, 143, 47, 0.1);
    /* Primary color low opacity */
    padding: 2px 6px;
    border-radius: 4px;
}

.product-list {
    list-style: none;
}

.product-list li {
    padding-block: 4px;
    color: var(--color-text-light);
    border-bottom: 1px dashed var(--color-border);
}

.product-list li:last-child {
    border-bottom: none;
}

/* Quality Split Layout */
.split-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: center;
}

@media (min-width: 992px) {
    .split-layout {
        grid-template-columns: 1fr 1fr;
    }
}

.quality-list {
    list-style: none;
}

.quality-list li {
    margin-bottom: var(--space-lg);
    border-left: 3px solid var(--color-logistics);
    /* Logistics Blue */
    padding-left: var(--space-md);
}

.quality-list strong {
    display: block;
    color: var(--color-logistics);
    font-size: 1.125rem;
    margin-bottom: 4px;
}

.img-placeholder {
    width: 100%;
    height: 400px;
    background-color: #E1F5FE;
    /* Light Blue BG */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-logistics);
    font-weight: 700;
    border-radius: 8px;
}

/* Global Map */
.map-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin-inline: auto;
    aspect-ratio: 16/9;
    background-color: #FAFAFA;
    border-radius: 8px;
    overflow: hidden;
}

.abstract-map {
    position: relative;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(#E0E0E0 1px, transparent 1px);
    background-size: 20px 20px;
}

.map-hub {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.hub-origin {
    background-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(47, 143, 47, 0.2);
}

.hub-dest {
    background-color: var(--color-logistics);
    box-shadow: 0 0 0 4px rgba(2, 119, 189, 0.2);
}

.map-arcs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.arc-line {
    stroke-dasharray: 4;
    animation: dash 30s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: -100;
    }
}

/* Footer */
.site-footer {
    background-color: #FAFAFA;
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-xl);
    padding-bottom: var(--space-lg);
}

.footer-top {
    display: grid;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

@media (min-width: 768px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

.footer-title {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.footer-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.info-block h4 {
    font-size: 1.125rem;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.info-block p,
.info-block a {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.info-block a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
    justify-content: center;
}

/* Contact Form */
.contact-form {
    max-width: 800px;
    margin-inline: auto;
    background: white;
    padding: var(--space-lg);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-field--full {
    grid-column: 1 / -1;
}

.form-field label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
}

.form-field input,
.form-field textarea {
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(47, 143, 47, 0.1);
}

.recaptcha-placeholder {
    background-color: #f9f9f9;
    border: 1px dashed var(--color-border);
    padding: var(--space-md);
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.muted {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* Mobile Navigation */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: var(--space-sm);
    z-index: 1002;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-primary);
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: white;
        padding-top: 80px;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        z-index: 1001;
        /* Below toggle but above content */
        display: flex;
        justify-content: center;
    }

    .main-nav.is-open {
        transform: translateX(0);
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: var(--space-xl);
    }

    .main-nav a {
        font-size: 1.5rem;
        font-weight: 700;
    }

    .d-none-mobile {
        display: none !important;
    }

    body.no-scroll {
        overflow: hidden;
    }

    /* Responsive Adjustments */
    .hero h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .stats-grid {
        gap: var(--space-lg);
    }
}

/* --- Navigation Improvements --- */

/* Mobile Only Defaults */
.mobile-only { display: none; }

/* Flag Icon */
.lang-flag { margin-right: 6px; font-size: 1.1em; }

/* Desktop Lang Switcher Polish */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    transition: background 0.2s;
}
.lang-switcher:hover {
    background-color: var(--color-bg-alt);
}
.current-lang {
    display: flex;
    align-items: center;
}
.lang-dropdown li.active a {
    font-weight: 700;
    color: var(--color-primary);
    background-color: #f0f9f0;
}

/* Mobile Layout */
@media (max-width: 768px) {
    .header-inner {
        justify-content: flex-start; /* Left align */
        gap: 15px;
    }
    
    .mobile-toggle {
        order: -1; /* First element */
        margin-right: 0;
    }
    
    .logo {
        margin-right: auto; /* Push hidden nav to right? No, nav is fixed */
    }
    
    /* Hide desktop actions */
    .d-none-mobile { display: none !important; }
    
    /* Reveal Mobile Items */
    .mobile-only { display: block; width: 100%; text-align: center; }
    
    .main-nav ul {
        width: 100%;
        padding-inline: 20px;
        gap: 20px;
    }
    
    /* Mobile Menu Links */
    .main-nav a {
        display: block;
        padding: 10px;
        border-radius: 8px;
    }
    .main-nav a:hover {
        background-color: var(--color-bg-alt);
    }
    
    /* Mobile Separator */
    .mobile-nav-sep {
        height: 1px;
        background-color: var(--color-border);
        margin: 10px auto;
        width: 60%;
    }
    
    /* Mobile Lang Switcher */
    .mobile-lang-container {
        margin-bottom: 30px;
    }
    .mobile-lang-wrapper {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .mobile-lang-btn {
        background: none;
        border: 1px solid var(--color-border);
        padding: 10px 20px;
        border-radius: 20px;
        font-size: 1rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        width: auto;
    }
    .mobile-lang-list {
        display: none; /* JS toggle */
        list-style: none;
        margin-top: 10px;
        background: #fff;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        width: 100%;
        max-width: 200px;
        padding: 0;
        overflow: hidden;
    }
    .mobile-lang-list li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
    .mobile-lang-list li:last-child { border: none; }
    .mobile-lang-list a {
        display: block;
        padding: 10px;
        text-align: center;
        font-size: 1rem;
    }
    .mobile-lang-list.show {
        display: block;
    }
}


/* --- Mobile UX Fixes --- */

/* 1. Header Alignment (Logo Left, Toggle Right) */
/* We swapped HTML order, now ensure Flexbox justifies them */
@media (max-width: 768px) {
    .header-inner {
        justify-content: space-between !important;
    }
    
    /* Ensure Logo is nice on left */
    .logo {
        margin-right: 0; /* Reset previous push */
    }
    
    /* Ensure Toggle is nice on right */
    .mobile-toggle {
        margin-left: 0; 
        order: 2; /* Just in case */
    }
    .logo {
        order: 1;
    }

    /* 2. Mobile Menu Scrolling */
    .main-nav {
        /* Enable scrolling */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        
        /* Layout for scrolling content */
        justify-content: flex-start; /* Start from top */
        align-items: center; /* Center horizontally */
        
        /* Padding to avoid overlap with fixed header/toggle */
        padding-top: 90px;
        padding-bottom: 40px; 
    }
    
    .main-nav ul {
        /* Ensure ul takes height if needed but allows scroll */
        flex-shrink: 0;
    }

    /* 3. Language Dropdown Scroll */
    .mobile-lang-list {
        /* Max height and scroll */
        max-height: 220px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        
        /* Transition for smooth toggle (optional, but display:none breaks transition) */
        /* We use display none/block via JS 'show' class */
    }
}


/* --- Mobile Language Dropdown Robust Fix --- */
@media (max-width: 768px) {
    /* Default state: HIDDEN */
    .mobile-lang-list {
        display: none !important;
        max-height: 220px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        
        background: #fff;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        width: 100%;
        max-width: 200px;
        padding: 0;
        margin-top: 10px;
    }
    
    /* Expanded state: SHOWN via adjacent sibling combinator */
    .mobile-lang-btn[aria-expanded="true"] + .mobile-lang-list {
        display: block !important;
    }
}


/* --- Hero Redesign (Phase 2) --- */
/* Overriding previous hero styles to use requested image and centering */

.hero {
    /* Background Image + Overlay */
    background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.65)), url('/assets/img/hero_agrolor.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    /* Layout */
    min-height: 80vh; /* Maintain tall hero */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-content {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px; /* Safety padding */
    text-align: center; /* Center text */
    z-index: 10;
}

.hero h1 {
    color: #ffffff;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3); /* Ensure readability */
    margin-bottom: var(--space-md);
}

.hero-subtitle {
    color: #f0f0f0;
    text-align: center;
    margin: 0 auto var(--space-lg) auto;
    max-width: 70ch;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.hero-actions {
    justify-content: center;
    gap: var(--space-md);
}

/* Ensure buttons stand out on dark background */
.hero-actions .btn-outline {
    color: #fff;
    border-color: #fff;
}
.hero-actions .btn-outline:hover {
    background: #fff;
    color: var(--color-primary);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .hero {
        min-height: 70vh; /* slightly shorter on mobile? Keep reasonable */
    }
    .hero h1 {
        font-size: 2.25rem; /* Adjust if needed */
    }
    .hero-content {
        padding: 0 16px;
    }
}


/* --- Visual Identity Refinement (Phase 3) --- */
/* "Who We Are" Special Highlight */
#essence {
    background-color: #eef5ef !important;
}

/* Ensure global light green applies to contact/quality via .bg-light (updated var) */
/* .bg-light uses var(--color-bg-alt) which is now #f4f8f5 */


/* --- Product Catalog Grid (Phase 4) --- */
.produce-grid-catalog {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.product-item {
    text-align: center;
    /* Clean look, no borders */
}

.product-img {
    width: 100%;
    max-width: 160px; /* Small and compact as requested */
    height: 140px; /* Fixed height for consistency */
    object-fit: contain;
    margin-bottom: var(--space-sm);
    /* Subtle hover effect */
    transition: transform 0.2s ease;
}

.product-item:hover .product-img {
    transform: scale(1.05);
}

.product-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    margin: 0;
}

.catalog-footer {
    text-align: center;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.catalog-note {
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
    font-style: italic;
}

/* Responsive */
@media (max-width: 1024px) {
    .produce-grid-catalog {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .produce-grid-catalog {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
    .product-img {
        max-width: 120px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .produce-grid-catalog {
        grid-template-columns: 1fr;
    }
    .product-item {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px; 
        flex-direction: row;
        text-align: left;
        padding: 10px;
        border-bottom: 1px solid #f0f0f0;
    }
    .product-img {
        margin-bottom: 0;
        width: 60px;
        height: 60px;
    }
}


/* RTL Support for Mobile Catalog */
@media (max-width: 480px) {
    [dir="rtl"] .product-item {
        text-align: right;
    }
}


/* --- Product Catalog Alignment Fix (Phase 4b) --- */

/* Desktop/Global: Ensure true centering */
.product-item {
    display: flex;
    flex-direction: column;
    align-items: center; /* Horizontally center content in column layout */
    justify-content: flex-start;
    text-align: center;
    height: 100%;
}

.product-img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    /* Margin bottom already set by previous rule but ensuring correct spacing */
    margin-bottom: var(--space-sm);
}

/* Mobile: Compact List View Centering */
@media (max-width: 480px) {
    .produce-grid-catalog {
        /* Ensure the grid column (which contains the items) allows items to be centered */
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px; /* Clean gap */
    }

    .product-item {
        flex-direction: row; /* Horizontal layout */
        align-items: center; /* Vertical center of image vs text */
        justify-content: flex-start; /* Content starts from left (or right in RTL) */
        
        text-align: left;
        width: 100%;
        max-width: 380px; /* Constrain width for "List Card" look */
        margin: 0 auto;   /* Center the item in the viewport */
        padding: 10px 0;  /* Spacing */
    }

    .product-img {
        flex: 0 0 70px;   /* Fixed container for image */
        width: 70px;
        height: 70px; /* Fixed height for consistency */
        margin-bottom: 0;
        margin-right: 15px; /* Gap between image and text */
        margin-left: 0;     /* Reset auto margins */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .product-name {
         flex: 1; /* Take remaining space */
         text-align: left; /* Ensure text matches flex start */
         margin: 0;
    }
}

/* RTL Override for Mobile */
@media (max-width: 480px) {
    [dir="rtl"] .product-item {
        text-align: right;
        direction: rtl;
        justify-content: flex-start;
    }
    [dir="rtl"] .product-img {
        margin-right: 0; /* Clear LTR margin */
        margin-left: 15px; /* Add RTL margin */
    }
    [dir="rtl"] .product-name {
        text-align: right;
    }
}


/* --- Quality Section Refinement (Phase 5) --- */

/* Color Override: Replace Blue with Dark Green */
.quality-list li {
    border-left-color: #2f6b3f !important;
}
.quality-list strong {
    color: #2f6b3f !important;
}

/* Image Responsiveness */
.quality-img {
    display: block;
    width: 100%;
    height: auto; /* Maintain aspect ratio */
    max-height: 400px; /* Optional constraint to match previous placeholder height if needed, but 'auto' is safer for responsiveness */
    object-fit: contain; /* Ensure full image is visible, no cropping */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Container adjust if needed */
.split-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* RTL Support for Quality List */
[dir="rtl"] .quality-list li {
    border-left: none !important;
    border-right: 3px solid #2f6b3f !important;
    padding-left: 0 !important;
    padding-right: var(--space-md) !important;
}


/* --- Export Map Visuals (Phase 6) --- */

.export-map-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    /* Clean look */
}

/* Update container to fit image naturally */
.map-container {
    aspect-ratio: auto !important; /* Let image define height */
    height: auto !important;
    background-color: transparent !important; /* Remove grey bg */
    box-shadow: none !important; /* Cleaner look as requested "Lightweight" */
    border-radius: 0 !important;
    max-width: 900px; /* Allow slightly wider map */
}

/* Hide old abstract map elements if any remain */
.abstract-map {
    display: none;
}


/* --- Footer Redesign (Phase 7) --- */
.site-footer {
    background-color: #2f6b3f !important; /* Brand Green */
    color: #ffffff !important;
    padding-block: var(--space-xl);
    border-top: none; /* Clean start */
    text-align: center;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.footer-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
    color: #ffffff !important;
}

.footer-slogan {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto var(--space-md) auto;
    color: #e0e0e0 !important;
}

.footer-certs {
    margin-bottom: var(--space-md);
}

.cert-logos {
    height: 40px; /* Subtle size */
    width: auto;
    opacity: 0.9; /* Slightly clean look */
    /* If the image has a background, we might want to blend it?
       The generated image might be solid. Check result.
       If solid green bg match, it's fine. If white text on transparent, perfect.
    */
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
}

.footer-nav a {
    color: #ffffff !important;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

.separator {
    opacity: 0.5;
    color: #fff;
}

.copyright {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-top: var(--space-sm);
    color: #fff !important;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .footer-nav {
        flex-direction: column;
        gap: 8px;
    }
    .separator {
        display: none;
    }
}


/* --- Final Footer Redesign (Phase 7b) --- */
.site-footer {
    background-color: #2f6b3f !important; /* Brand Dark Green */
    color: #ffffff !important;
    padding-block: var(--space-xl);
    text-align: center;
    border-top: none; 
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.footer-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: #ffffff !important;
    margin-bottom: var(--space-xs);
    font-weight: 700;
}

.footer-slogan {
    font-size: 1rem;
    color: #e0e0e0 !important;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

.footer-certs {
    margin-block: var(--space-md);
}

.cert-logos {
    height: 40px; /* Discreet size */
    width: auto;
    object-fit: contain;
    opacity: 0.95;
    /* Ensure no visual overflow */
    max-width: 100%;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
    font-size: 0.95rem;
    margin-bottom: var(--space-sm);
}

.footer-nav a {
    color: #ffffff !important;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.footer-nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

.separator {
    color: rgba(255,255,255,0.4);
}

.copyright {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6) !important;
    margin-top: var(--space-xs);
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .site-footer {
        padding-block: var(--space-lg);
    }
    .footer-nav {
        flex-direction: column;
        gap: 8px;
    }
    .separator {
        display: none;
    }
    .footer-brand {
        font-size: 1.25rem;
    }
    .footer-slogan {
        font-size: 0.95rem;
        padding-inline: 16px; 
    }
}


/* --- Final Footer Structure (Centered) --- */

.site-footer, .site-footer-final {
    background-color: #ffffff !important;
    border-top: 2px solid #2f6b3f !important;
    padding: 0 !important;
    color: var(--color-text) !important;
    text-align: center !important;
}

/* Zone 1: Main */
.footer-main {
    padding-block: 40px;
    background-color: #ffffff;
}

.footer-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Center vertically */
    gap: 30px;
}

/* Wrapper for Logo + Links */
.footer-col-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.footer-logo-brand {
    height: 45px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.footer-legal-nav {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.footer-legal-nav a {
    color: #2f6b3f !important;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-legal-nav a:hover {
    color: #1a4d28 !important;
    text-decoration: underline;
}

/* Remove Right Column (Certs) */
.footer-col-right, .cert-logo-item {
    display: none !important;
}

/* Zone 2: Copyright */
.footer-copyright-bar {
    background-color: #2f6b3f !important;
    color: #ffffff !important;
    padding-block: 15px;
    text-align: center;
    font-size: 0.85rem;
    margin-top: 0;
}

.footer-copyright-bar p {
    margin: 0;
    opacity: 0.9;
    color: #ffffff !important;
}

/* Responsive (Mobile matches Desktop now because it's already centered) */
@media (max-width: 768px) {
    .footer-grid {
        gap: 20px;
    }
    .footer-col-left {
        gap: 15px;
    }
    .footer-legal-nav {
        flex-direction: column;
        gap: 10px;
    }
}

/* RTL Support for Arabic (Auto-centered, but ensure flex direction for nav) */
[dir="rtl"] .footer-legal-nav {
    flex-direction: row-reverse; /* Keep logic: Legal | Privacy | Cookies */
}
@media (max-width: 768px) {
    [dir="rtl"] .footer-legal-nav {
        flex-direction: column;
    }
}
