/* ==========================================================================
   1. Global & Layout
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin-inline: auto;
    padding-inline: var(--space-md); /* Add consistent horizontal padding */
    min-width: 0;
}

main {
    /* Offset for fixed header. Adjust if header height changes. */
    padding-top: 90px; 
    flex-grow: 1; /* Allows main to expand and push footer down */
}

header,
main,
section,
footer {
    max-width: 100%;
    min-width: 0;
}

.hidden {
    display: none !important;
}

.body-no-scroll {
    overflow: hidden;
}

.section-padding {
    padding: var(--space-2xl) 0;
}

.bg-surface {
    background: var(--surface-primary);
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-lg);
    line-height: 1.18;
}

/* ==========================================================================
   2. Product Catalog Layout
   ========================================================================== */

.product-catalog-layout {
    display: grid;
    grid-template-columns: 320px 1fr; /* A wider sidebar to prevent reflow on scroll */
    gap: 0; /* Remove gap, border will separate */
}

.filter-sidebar {
    background: var(--surface-secondary);
    padding: var(--space-lg);
    align-self: start; /* Prevents stretching */
    position: sticky;
    top: 90px; /* Header height */
    height: calc(100vh - 90px); /* Full viewport height minus header */
    overflow-y: auto;
    border-right: 1px solid var(--surface-muted);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--surface-muted);
}

.sidebar-header h3 {
    font-size: 1.25rem;
    margin: 0;
}

.sidebar-header .btn-text {
    padding: 0;
    font-size: .875rem;
}

.close-btn {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-secondary);
}

.product-list-content {
    padding: var(--space-xl) 0;
}

#products-grid {
    --product-card-width: 236px;
    grid-template-columns: repeat(auto-fill, var(--product-card-width));
    justify-content: start;
    align-items: stretch;
}

#products-grid .product-card {
    width: var(--product-card-width);
    padding: 1.5rem 1.5rem 5.75rem;
}

@media (min-width: 1500px) {
    #products-grid {
        --product-card-width: 252px;
    }
}

@media (max-width: 1360px) and (min-width: 900px) {
    #products-grid {
        --product-card-width: 220px;
    }
}

.product-list-header {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.search-bar {
    flex-grow: 1;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: .9rem 1.5rem .9rem 3.25rem; /* Increased left padding for icon */
    border: 1px solid var(--agr-gray);
    border-radius: 999px;
    font-size: 1rem;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23757575' viewBox='0 0 16 16'%3e%3cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: 1.25rem center;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--agr-orange);
    box-shadow: 0 0 0 3px rgba(253, 89, 45, 0.2);
}

#open-filters-btn {
    display: none; /* Hidden on desktop */
    /* Style as an icon button for mobile */
    white-space: nowrap;
    padding: 0;
    width: 50px;
    height: 50px;
    font-size: 0; /* Hide text */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='white' viewBox='0 0 16 16'%3e%3cpath d='M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1.5a.5.5 0 0 1-.658-.474V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5v-2z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-color: var(--agr-orange);
    border-color: var(--agr-orange);
}

.no-results {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    background: var(--surface-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--surface-muted);
}

.no-results h3 {
    color: var(--agr-orange);
}

.no-results p {
    max-width: 400px;
    margin-inline: auto;
}

/* ==========================================================================
   2. Page Headers
   ========================================================================== */

.page-header-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 30vh;
    color: white;
    text-align: center;
    background-image: url('../img/banner-produtos.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    padding: var(--space-xl) 0;
    background-color: var(--agr-green); /* Fallback color if image fails */
}

.page-header-banner h1 {
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

/* ==========================================================================
   2. Filter System
   ========================================================================== */

.filter-toolbar {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.filter-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
    flex-wrap: wrap;
    padding-bottom: var(--space-lg);
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid var(--surface-muted);
}

.filter-group h4, .filter-group h5 {
    margin: 0;
    white-space: nowrap;
    color: var(--text-primary);
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

/* Primary Filter Pills */
#primary-filters .btn-secondary {
    border-radius: 999px;
    border: 1px solid var(--agr-gray);
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    box-shadow: none;
}

#primary-filters .btn-secondary.active {
    background: var(--agr-orange);
    color: white;
    border-color: var(--agr-orange);
}

/* Sub-filter Pills (styling labels) */
.sub-filters-wrapper .filter-options label {
    display: inline-block;
    padding: .5rem 1rem;
    border: 1px solid var(--agr-gray);
    border-radius: 999px;
    cursor: pointer;
    font-size: .875rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition-base);
    user-select: none;
}

.sub-filters-wrapper .filter-options label:hover {
    border-color: var(--agr-green);
    color: var(--agr-green);
}

.sub-filters-wrapper .filter-options input {
    display: none; /* Hide the actual radio/checkbox */
}

/* Use :has() to style the label when its child input is checked. Modern & clean. */
.sub-filters-wrapper .filter-options label:has(input:checked) {
    background: var(--agr-green);
    color: white;
    border-color: var(--agr-green);
}

/* ==========================================================================
   2. Cards
   ========================================================================== */

.brand-card {
    background: white;

    border-radius: var(--radius-lg);

    padding: var(--space-lg);

    box-shadow: var(--shadow-card);

    position: relative;

    overflow: hidden;
}

.brand-card-organic {
    /* Premium card treatment */
    background: var(--agr-green);
    color: white;
    
    /* The larger bottom padding keeps content clear of the SVG cutout. */
    padding: 2rem 2rem 6rem 2rem; 
    
    /* Base structure */
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    
    /* Organic mask anchored to the bottom-left without distortion */
    -webkit-mask-image: url("../img/svg/card-shape.svg");
    -webkit-mask-size: cover;
    -webkit-mask-position: bottom left;
    -webkit-mask-repeat: no-repeat;

    mask-image: url("../img/svg/card-shape.svg");
    mask-size: cover;
    mask-position: bottom left;
    mask-repeat: no-repeat;
}

/* Give headings enough contrast inside organic cards. */
.brand-card-organic h2, 
.brand-card-organic h3 {
    color: var(--agr-orange);
    margin-bottom: var(--space-sm);
}

/* Keep descriptive copy readable against the dark background. */
.brand-card-organic p {
    color: #f8f9fa; 
    margin-bottom: var(--space-md);
}

.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}
/* Redesigned Product Card for the catalog */
.product-card {
    background: var(--agr-green);
    color: var(--agr-offwhite);
    padding: var(--space-lg) var(--space-lg) 6rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    min-height: 380px;
    display: flex;
    flex-direction: column;
    position: relative; /* For the link overlay */
    transition: all var(--transition-base);

    /* SVG Masking */
    -webkit-mask-image: url("../img/svg/card-shape.svg");
    -webkit-mask-size: cover;
    -webkit-mask-position: bottom left;
    -webkit-mask-repeat: no-repeat;
    mask-image: url("../img/svg/card-shape.svg");
    mask-size: cover;
    mask-position: bottom left;
    mask-repeat: no-repeat;
}

.card-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Place overlay on top of card content */
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-interactive);
}

.product-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--agr-orange);
    margin-bottom: var(--space-sm);
}

.product-card p {
    color: var(--agr-offwhite);
    flex-grow: 1; /* Pushes badges to the bottom */
    margin-bottom: var(--space-md);
}

/* Card Badges for data points */
.badge {
    display: inline-block;
    padding: .3rem .8rem;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-radius: var(--radius-sm);
    background-color: var(--surface-muted);
    color: var(--text-secondary);
}


.metric-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-card);
}

/* ==========================================================================
   3. Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 1rem 1.75rem;

    border-radius: 999px;

    cursor: pointer;

    text-decoration: none;

    transition:
        transform var(--transition-base),
        box-shadow var(--transition-base);
}

.btn:focus-visible {
    outline: 3px solid var(--agr-orange);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--agr-orange);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-interactive);
}

.btn-secondary {
    background: var(--surface-muted);
    color: var(--text-secondary);
    border: 1px solid var(--agr-gray);
}

.btn-secondary:hover {
    background: var(--agr-gray);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-interactive);
}

.btn-text {
    background: transparent;
    color: var(--agr-orange);
    padding: 1rem; /* Give it some clickable area */
    text-decoration: underline;
    border: none;
    box-shadow: none;
    transform: none; /* Override base .btn hover */
}

.btn-text:hover {
    transform: none;
    box-shadow: none;
    text-decoration: none;
}

/* ==========================================================================
   4. Page Sections
   ========================================================================== */

.header-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--surface-secondary);
    padding: var(--space-sm) 0;
    box-shadow: var(--shadow-interactive);
    z-index: 1000;
    transition: background-color var(--transition-base);
}

.logo a {
    display: block; /* Ensure the link takes up the wrapper's space */
}

/* This wrapper crops the extra vertical space from the SVG */
.logo-wrapper {
    height: 50px; /* Controls the vertical space for the logo */
    width: 250px; /* Sets the desired width for the logotype */
    max-width: 100%;
    overflow: hidden;
    position: relative;
    flex-shrink: 1;
}

.logo-wrapper img {
    width: 100%;
    height: auto;
    position: absolute;
    top: 50%;
    transform: translateY(calc(-50% + 2px)); /* Nudge down by 2px for perfect visual alignment */
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* For absolute positioning of nav-links */
    min-width: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.hamburger-menu {
    display: none; /* Hidden by default, shown on mobile */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px; /* Give a static size */
    height: 21px; /* 3px * 3 lines + 6px * 2 gaps */
    z-index: 1010; /* Above nav menu panel */
    position: relative;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(0.7rem, 1.35vw, var(--space-lg));
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600; /* Poppins 600 was imported */
    position: relative;
    padding-bottom: var(--space-xs);
    white-space: nowrap;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--agr-orange);
    transition: width var(--transition-base);
}

.nav-links a:hover::after {
    width: 100%;
}

/* On wide desktop, we center the nav links using absolute positioning */
@media (min-width: 1180px) {
    .nav-links {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: 50%;
        transform: translate(-50%, -50%);
    }
}

@media (min-width: 769px) and (max-width: 1179px) {
    .nav-menu,
    .nav-links {
        gap: var(--space-sm);
    }

    .nav-links a {
        font-size: 0.92rem;
    }
}

/* Hamburger Icon Lines & Animation */
.hamburger-menu span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--agr-green);
    border-radius: 3px;
    transition: all var(--transition-base);
    position: absolute;
    left: 0;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }

/* Hamburger animation to 'X' when active, based on the nav-menu state */
.nav-menu.is-active + .hamburger-menu span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.nav-menu.is-active + .hamburger-menu span:nth-child(2) {
    opacity: 0;
}

.nav-menu.is-active + .hamburger-menu span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: var(--space-2xl) 0;
    color: white;
    text-align: center;
    background-image: url('../img/banner-home.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: var(--agr-green); /* Fallback color if image fails */
}

.hero-section h1 {
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.hero-subtitle {
    max-width: 760px;
    margin: var(--space-md) auto 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.7;
    text-shadow: 0 2px 8px rgba(0,0,0,0.45);
}

.hero-section .btn-primary {
    margin-top: var(--space-md);
}

footer {
    background: var(--agr-green);
    color: white;
    padding: var(--space-lg) 0;
    text-align: center;
}

footer p {
    color: var(--agr-gray);
    font-size: .875rem;
}

/* ==========================================================================
   5. Grid Systems
   ========================================================================== */

.grid-2 {
    display: grid;
    gap: var(--space-lg);
    /* Make grid responsive by default: creates columns of at least 320px */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    /* Make grid responsive: creates columns with a target of 320px, but allows shrinking on smaller screens */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.grid-2 > *,
.grid-3 > *,
.grid-4 > *,
.auto-grid > * {
    min-width: 0;
}

.grid-3 {
    display: grid;
    grid-template-columns:
        repeat(3,1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns:
        repeat(4,1fr);
    gap: 2rem;
}

.auto-grid {
    display: grid;
    gap: var(--space-lg);
    /* Use a fixed width for columns to prevent stretching */
    grid-template-columns: repeat(auto-fit, 280px);
    /* Use a flexible width for columns, with a target of 280px, but allows shrinking */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    /* Center the grid items if there's extra space on the row */
    justify-content: start;
}

/* ==========================================================================
   6. Pop-up Modal
   ========================================================================== */

.popup-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(1rem, 4vh, 2rem) var(--space-md);
    background: rgba(5, 48, 39, 0.9); /* --agr-green with transparency */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow-y: auto;
    overscroll-behavior: contain;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.popup-content {
    background: var(--surface-secondary);
    padding: var(--space-xl);
    border-radius: var(--radius-md);
    max-width: 600px;
    width: 90%;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-card);
    text-align: center;
}

.popup-content h2 {
    color: var(--agr-orange);
    margin-bottom: var(--space-sm);
}

.popup-content p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.divider {
    border-top: 1px solid var(--agr-gray);
    margin: var(--space-md) 0;
}

.popup-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

@media (max-width: 520px), (max-height: 620px) {
    .popup-overlay {
        align-items: flex-start;
        padding: max(0.85rem, env(safe-area-inset-top)) 0.85rem max(0.85rem, env(safe-area-inset-bottom));
    }

    .popup-content {
        width: min(100%, 520px);
        max-height: calc(100vh - 1.7rem);
        max-height: calc(100dvh - 1.7rem);
        padding: clamp(1rem, 5vw, 1.35rem);
        border-radius: 18px;
    }

    .popup-content h2 {
        font-size: 1.35rem;
    }

    .popup-content h3 {
        font-size: 1rem;
    }

    .popup-content p {
        font-size: 0.92rem;
        line-height: 1.55;
    }

    .popup-actions {
        display: grid;
        grid-template-columns: 1fr;
        margin-top: var(--space-md);
    }

    .popup-actions .btn {
        width: 100%;
        min-height: 46px;
        padding: 0.85rem 1rem;
    }
}

/* ==========================================================================
   7. Mobile Responsiveness (max-width: 768px)
   ========================================================================== */

@media (max-width: 899px) {

    /* Collapse grid layouts into a single column */
    .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    .auto-grid {
        /* On mobile, allow auto-fit to work, but center the content.
           This creates multiple columns if space allows, or a single centered column. */
        justify-content: center;
    }

    /* Reduce vertical padding on sections for smaller screens */
    .section-padding {
        padding: var(--space-xl) 0;
    }

    /* Adjust header for smaller screens */
    .header-nav {
        padding: var(--space-xs) 0;
    }
    main {
        padding-top: 70px; /* New smaller header height */
    }
    .nav-container {
        /* Reduce horizontal padding to bring logo/menu closer to edges */
        padding-inline: var(--space-sm);
        gap: var(--space-sm);
    }
    .logo-wrapper {
        /* Further increase logo size on mobile */
        height: 50px;
        width: 45vw;      /* Use a viewport-relative width to shrink on tiny screens */
        max-width: 180px; /* But don't let it get too big */
    }
    .logo-wrapper img {
        /*
         * "Zooms in" on the SVG by making the image larger than its wrapper,
         * effectively cropping the empty canvas space.
        */
        width: 180%;
        left: 45%;
        transform: translate(-50%, calc(-50% + 8px)); /* Nudge down for better visual centering */
    }

    /* Adjust product cards for mobile */
    .product-card,
    .brand-card-organic {
        min-height: 320px;
        padding: var(--space-lg) var(--space-lg) 4rem;
        /* Remove fixed width to allow cards to fill their responsive grid cell */
    }

    /* Reset nav-links positioning for mobile layout */
    .nav-links {
        position: static;
        transform: none;
        flex-direction: column;
        align-items: center;
        gap: var(--space-xl);
    }
    /* Show hamburger and prepare mobile menu */
    .hamburger-menu {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: 0; /* Slide in from the right */
        left: auto;
        width: min(70vw, 280px); /* A slimmer sidebar, around 2/3 of the screen */
        height: 100vh;
        background: var(--surface-secondary); /* Match header color */
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1); /* Add depth */
        
        /* Layout for vertical menu items */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--space-2xl);

        /* Hide it off-screen to the right */
        transform: translateX(100%);
        transition: transform var(--transition-base);
        
        z-index: 999;
    }

    .nav-menu.is-active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.5rem; /* Bigger tap targets */
    }

    /* Adjust hero section height for mobile */
    .hero-section {
        min-height: 50vh;
    }

    .page-header-banner {
        min-height: 25vh;
    }

    /* Product Catalog Mobile Layout */
    .product-catalog-layout {
        grid-template-columns: 1fr;
    }

    #open-filters-btn {
        display: inline-flex;
    }

    .filter-sidebar {
        position: fixed;
        top: 0;
        left: 0; 
        width: min(70vw, 320px); /* Use a 2/3 screen width for the sidebar */
        height: 100%;
        border-radius: 0;
        z-index: 1010;
        top: 0; /* Override sticky position for mobile overlay */
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        border: none;
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    }

    .filter-sidebar.is-active {
        transform: translateX(0);
    }

    .close-btn {
        display: block;
    }

    .sidebar-header .btn-text {
        display: none; /* Hide clear button in header on mobile, can be placed elsewhere if needed */
    }
}

/* ==========================================================================
   8. Product Detail Page
   ========================================================================== */

.product-detail-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: var(--space-2xl);
    align-items: start;
}

/* --- Image Gallery --- */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    position: sticky;
    top: 120px; /* Header height + some space */
}

.main-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--surface-muted);
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: var(--space-sm);
}

.gallery-thumbnails img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--transition-base);
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.gallery-thumbnails img:hover {
    border-color: var(--agr-gray);
}

.gallery-thumbnails img.active {
    border-color: var(--agr-orange);
}

/* --- Product Info --- */
.product-info h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: var(--space-sm);
}

.product-info .card-badges {
    margin-bottom: var(--space-lg);
}

.product-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

.product-documents {
    margin-bottom: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: flex-start;
}

.product-documents h3 {
    margin-bottom: var(--space-md);
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm);
    border: 1px solid var(--agr-gray);
    border-radius: var(--radius-md);
    text-decoration: none;
    background-color: var(--surface-secondary);
    transition: all var(--transition-base);
    width: 100%; /* Make it full width of its container */
    max-width: 400px; /* But not too wide */
}

.btn-download:hover {
    border-color: var(--agr-orange);
    background-color: var(--surface-muted);
    box-shadow: var(--shadow-interactive);
    transform: translateY(-2px);
}

.btn-download-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background-color: var(--agr-orange);
    border-radius: var(--radius-sm);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='white' viewBox='0 0 16 16'%3e%3cpath d='M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5z'/%3e%3cpath d='M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
}

.btn-download-info {
    /* The parent .btn-download is a flex container with align-items: center,
       so the text will be vertically centered by default. */
    text-align: left;
}

.btn-download-info .main-text {
    font-weight: 600;
    color: var(--text-primary);
}

@media (max-width: 899px) {
    .product-gallery {
        position: static; /* Remove sticky positioning on mobile */
    }
}

.product-not-found {
    grid-column: 1 / -1; /* Span all columns in the grid */
    text-align: center;
    padding: var(--space-2xl) 0;
}

.product-not-found p {
    max-width: 500px;
    margin: var(--space-md) auto var(--space-lg);
    color: var(--text-secondary);
}

/* --- Product Availability Pills --- */
.product-availability {
    margin-bottom: var(--space-xl);
}

.product-availability h3 {
    margin-bottom: var(--space-md);
}

.availability-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.availability-options .pill {
    padding: var(--space-xs) var(--space-sm);
    background-color: var(--surface-muted);
    border: 1px solid var(--agr-gray);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* --- Product Accordions --- */
.product-accordions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.accordion {
    border: 1px solid var(--agr-gray);
    border-radius: var(--radius-md);
    background-color: var(--surface-secondary);
    transition: background-color var(--transition-base);
}

.accordion[open] {
    background-color: white;
}

.accordion summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none; /* Remove default arrow */
}

.accordion summary::-webkit-details-marker {
    display: none; /* Remove default arrow for Safari */
}

.accordion summary::after {
    content: '';
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3e%3cpath stroke='%23053027' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform var(--transition-base);
}

.accordion[open] > summary::after {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0 var(--space-md) var(--space-md);
}

/* --- Table Styles (for accordions) --- */
.table-wrapper {
    overflow-x: auto; /* For responsive tables */
}

.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table-wrapper th,
.table-wrapper td {
    padding: var(--space-sm);
    text-align: left;
    border-bottom: 1px solid var(--surface-muted);
}

.table-wrapper th {
    font-weight: 600;
    color: var(--text-secondary);
    background-color: var(--surface-muted);
}

.table-wrapper tbody tr:last-child td {
    border-bottom: none;
}

/* --- Related Products Carousel --- */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding-block: var(--space-md); /* Add padding so shadows aren't cut off */
    padding-inline: var(--space-md); /* CRITICAL: Creates stable visual padding */
    scroll-padding-left: var(--space-md); /* Ensures snapping has padding on the left */
    margin-inline: 45px; /* Make space for buttons within the wrapper */
    min-width: 0;
    max-width: 100%;
    /* Hide scrollbar */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.carousel-track::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.carousel-track .related-product-card {
    flex: 0 0 300px; /* Fixed width for each card */
    scroll-snap-align: start; /* Snap to the start of the card */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-md);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}

.carousel-track .related-product-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-interactive);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--agr-orange);
    color: white;
    border: 2px solid var(--surface-primary);
    cursor: pointer;
    display: flex;
    background-repeat: no-repeat;
    background-position: center;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: var(--shadow-interactive);
    transition: all var(--transition-base);
}

.carousel-btn:hover {
    transform: translateY(-50%) scale(1.1);
}

#btn-prev {
    left: -10px;
    left: 0;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 18l-6-6 6-6'/%3e%3c/svg%3e");
}
#btn-next {
    right: -10px;
    right: 0;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 18l6-6-6-6'/%3e%3c/svg%3e");
}

.related-product-img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: var(--space-md);
}

.related-product-card h3 {
    color: var(--agr-green);
    margin-top: var(--space-md);
    font-size: 1.25rem;
}

.related-product-card p {
    flex-grow: 1; /* Pushes the button to the bottom */
    margin-block: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
}

/* --- NEWS & EXTERNAL MODAL --- */

.news-card {
    padding: 0; /* Override brand-card padding */
    display: flex;
    flex-direction: column;
    background: var(--surface-secondary); /* Use a lighter background */
    flex: 0 0 300px; /* Set fixed width for carousel */
    scroll-snap-align: start; /* Align to start of carousel track */
    transition: all var(--transition-base);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-interactive);
}

.news-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

.news-card-content {
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.news-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    flex-grow: 1; /* Pushes the button to the bottom */
}

.news-card .btn-text {
    align-self: flex-start; /* Align button to the left */
    padding-left: 0;
}

/* Overrides for News Carousel Buttons to be text-only */
#news-btn-prev,
#news-btn-next {
    /* Reset the "ball" style from .carousel-btn */
    background: transparent;
    border: none;
    border-radius: 0;
    width: auto;
    height: auto;
    box-shadow: none;
    background-image: none; /* Remove any inherited SVG icon */

    /* Style the text symbols */
    color: var(--agr-orange);
    font-size: 3rem;
    font-weight: 300; /* A lighter weight looks better for < > symbols */
}

#news-btn-prev:hover,
#news-btn-next:hover {
    transform: translateY(-50%); /* Keep vertical alignment but remove scaling */
}

/* Position the news buttons */
#news-btn-prev { left: -15px; }
#news-btn-next { right: -15px; }
#news-btn-prev { left: 0; }
#news-btn-next { right: 0; }

/* --- LOCATOR SECTION --- */

.bg-light {
    background: var(--surface-muted);
}

.locator-grid {
    align-items: start;
}

.locator-panel {
    background: var(--surface-secondary);
    border: 1px solid rgba(5, 48, 39, 0.08);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: var(--space-lg);
    min-width: 0;
}

.locator-panel h3 {
    color: var(--agr-green);
    margin-bottom: var(--space-md);
}

.locator-form-row {
    display: flex;
    gap: var(--space-sm);
    align-items: stretch;
}

.locator-input,
.locator-select {
    width: 100%;
    min-height: 54px;
    padding: 0.95rem 1.1rem;
    border: 1px solid var(--agr-gray);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text-primary);
    font: inherit;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.locator-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' viewBox='0 0 24 24'%3e%3cpath stroke='%23053027' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.locator-input:focus,
.locator-select:focus {
    outline: none;
    border-color: var(--agr-orange);
    box-shadow: 0 0 0 3px rgba(253, 89, 45, 0.18);
}

.locator-results {
    display: grid;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    min-width: 0;
    width: 100%;
    align-items: start;
}

#rc-results {
    grid-template-columns: minmax(0, 1fr);
}

.locator-scroll-list {
    display: grid;
    gap: var(--space-sm);
    max-height: 300px;
    overflow-y: auto;
    padding-right: var(--space-xs);
    scrollbar-color: var(--agr-orange) var(--surface-muted);
    scrollbar-width: thin;
}

.locator-scroll-list::-webkit-scrollbar {
    width: 8px;
}

.locator-scroll-list::-webkit-scrollbar-track {
    background: var(--surface-muted);
    border-radius: 999px;
}

.locator-scroll-list::-webkit-scrollbar-thumb {
    background: var(--agr-orange);
    border-radius: 999px;
}

.locator-result-card {
    position: relative;
    width: 100%;
    min-width: 0;
    background: white;
    border-left: 4px solid var(--agr-orange);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
    padding: var(--space-md);
    overflow-wrap: anywhere;
}

.locator-distance {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-xs);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(253, 89, 45, 0.12);
    color: var(--agr-orange);
    font-size: 0.8rem;
    font-weight: 700;
}

.locator-result-card h4 {
    color: var(--agr-green);
    margin-bottom: var(--space-xs);
    overflow-wrap: anywhere;
}

.locator-result-card p {
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    overflow-wrap: anywhere;
}

.locator-result-card p:last-child {
    margin-bottom: 0;
}

.locator-result-card a {
    color: var(--agr-orange);
    font-weight: 600;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.locator-result-card--muted {
    border-left-color: var(--agr-green-light);
    background: var(--surface-primary);
}

.locator-map {
    height: 300px;
    width: 100%;
    max-width: 100%;
    margin-top: var(--space-sm);
    border: 1px solid rgba(5, 48, 39, 0.08);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    z-index: 1;
}

.locator-map .leaflet-popup-content-wrapper {
    border-radius: var(--radius-sm);
}

.locator-map .leaflet-popup-content {
    color: var(--text-secondary);
    font-family: var(--font-brand);
}

/* --- HOME STORYTELLING --- */

#manifesto,
#inovacao,
#produtos,
#onde-encontrar,
#carreiras {
    scroll-margin-top: 110px;
}

.manifesto-section {
    max-width: 920px;
    margin-inline: auto;
    text-align: center;
}

.manifesto-kicker {
    color: var(--agr-orange);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
}

.manifesto-section h2 {
    color: var(--agr-green);
    margin-bottom: var(--space-md);
}

.manifesto-section p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-inline: auto;
    max-width: 820px;
}

.home-innovation-grid {
    align-items: center;
}

.innovation-text p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.innovation-text .btn {
    margin-top: var(--space-sm);
}

/* --- PHASE 3: INSTITUTIONAL & COMPLIANCE --- */

.bg-dark-green {
    background: var(--agr-green);
}

.bg-dark-green h1,
.bg-dark-green h2,
.bg-dark-green h3,
.bg-dark-green p {
    color: white;
}

.institutional-grid {
    align-items: center;
}

.institutional-copy p {
    max-width: 650px;
}

#institucional-texto {
    scroll-margin-top: 120px;
}

.radius-md {
    border-radius: var(--radius-md);
}

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

.highlight-card {
    background: white;
    color: var(--text-primary);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
    transform: translateY(-8px);
}

.highlight-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: var(--surface-primary);
}

.highlight-card h3 {
    color: var(--agr-green);
    margin-bottom: var(--space-sm);
}

.highlight-card p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.doc-card-grid {
    justify-content: center;
    align-items: stretch;
}

.doc-card {
    position: relative;
    display: block;
    height: auto;
    background: transparent;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.08));
    transition: transform var(--transition-base), filter var(--transition-base);
}

.doc-card-surface {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 0;
    height: auto;
    padding: var(--space-lg) var(--space-lg) 7rem;
    text-align: center;
    background-image: url("data:image/svg+xml,%3csvg viewBox='303 -1389 3733 3634' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M3868.67 2245 L658.41 2245 C565.999 2245 506.241 2172.73 508.888 2073.37 C505.043 2041.91 522.819 1918.8 428.801 1874.62 C290.279 1817.06 303.328 1677.89 303.328 1677.89 L303.328 -1200 C303.328 -1304.5 378.246 -1389 470.657 -1389 L3868.67 -1389 C3961.08 -1389 4036 -1304.5 4036 -1200 L4036 2056.27 C4036 2160.5 3961.08 2245 3868.67 2245 Z' fill='white' fill-rule='evenodd'/%3e%3c/svg%3e");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.doc-card:hover {
    transform: translateY(-5px);
    filter: drop-shadow(0 12px 24px rgba(5, 48, 39, 0.14));
}

.doc-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-md);
    border-radius: 50%;
    background: rgba(253, 89, 45, 0.12);
}

.doc-card-icon svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: var(--agr-orange);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.doc-card h3 {
    color: var(--agr-green);
    margin-bottom: var(--space-sm);
    max-width: 100%;
    overflow-wrap: anywhere;
}

.doc-card p {
    color: var(--text-secondary);
    flex-grow: 0;
    margin-bottom: var(--space-sm);
    max-width: 100%;
    overflow-wrap: anywhere;
}

.doc-card-surface .btn-text {
    margin-top: var(--space-sm);
    padding-bottom: 0;
}

@media (min-width: 769px) {
    .doc-card {
        height: 100%;
    }

    .doc-card-surface {
        min-height: 370px;
        height: 100%;
        padding-bottom: 5.75rem;
    }
}

/* --- BRANDBOOK ORGANIC CARD SHAPE --- */

:is(
    .brand-card,
    .brand-card-organic,
    .product-card,
    .metric-card,
    .news-card,
    .locator-result-card,
    .highlight-card
),
.carousel-track .related-product-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.08));
    -webkit-mask-image: url("../img/svg/card-shape.svg");
    -webkit-mask-size: cover;
    -webkit-mask-position: bottom left;
    -webkit-mask-repeat: no-repeat;
    mask-image: url("../img/svg/card-shape.svg");
    mask-size: cover;
    mask-position: bottom left;
    mask-repeat: no-repeat;
}

:is(
    .brand-card:not(.news-card),
    .metric-card,
    .locator-result-card,
    .highlight-card
),
.carousel-track .related-product-card {
    padding-bottom: calc(var(--space-lg) + 2rem);
}

.news-card-content {
    padding-bottom: calc(var(--space-md) + 2.5rem);
}

.locator-result-card {
    border-left: none;
}

.locator-result-card--muted {
    border-left: none;
}

@media (max-width: 899px) {
    .locator-form-row {
        flex-direction: column;
    }

    .locator-form-row .btn {
        width: 100%;
    }

    .highlight-card {
        transform: none;
    }
}

@media (max-width: 360px) {
    .container {
        padding-inline: var(--space-sm);
    }

    .section-padding {
        padding: var(--space-lg) 0;
    }

    .logo-wrapper {
        width: 150px;
    }

    .carousel-track {
        margin-inline: 32px;
        padding-inline: var(--space-sm);
        scroll-padding-left: var(--space-sm);
    }

    .carousel-track .related-product-card,
    .news-card {
        flex-basis: min(260px, 100%);
    }

    .locator-panel,
    .highlight-card,
    .metric-card {
        padding: var(--space-md);
    }

    .hero-section h1 {
        font-size: 2.55rem;
    }
}

/* --- CAREERS & FOOTER --- */

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

.section-subtitle {
    max-width: 680px;
    margin: 0 auto var(--space-xl);
    color: var(--text-secondary);
    line-height: 1.75;
}

.careers-actions {
    display: flex;
    justify-content: center;
    margin-top: var(--space-xl);
}

.job-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 280px;
    padding: var(--space-lg);
    border: 1px solid var(--agr-gray);
    border-radius: var(--radius-md);
    background: white;
    text-align: left;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.job-card:hover {
    transform: translateY(-5px);
    border-color: var(--agr-orange);
    box-shadow: var(--shadow-interactive);
}

.job-card h3 {
    color: var(--agr-green);
    margin-bottom: var(--space-sm);
}

.job-card p {
    color: var(--text-secondary);
    flex-grow: 1;
    margin-bottom: var(--space-md);
}

.job-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.job-card-tags span {
    display: inline-flex;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: rgba(253, 89, 45, 0.12);
    color: var(--agr-orange);
    font-size: 0.8rem;
    font-weight: 700;
}

.job-card--loading {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.main-footer {
    background: var(--agr-green);
    color: white;
    padding: var(--space-2xl) 0 var(--space-lg);
    text-align: left;
}

.main-footer > .container > p {
    display: none;
}

.footer-grid {
    gap: var(--space-xl);
}

.footer-logo {
    display: block;
    width: min(220px, 100%);
    margin-bottom: var(--space-md);
}

.main-footer h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: var(--space-md);
}

.main-footer p,
.main-footer li {
    color: rgba(255, 255, 255, 0.78);
}

.footer-column ul {
    display: grid;
    gap: var(--space-xs);
    list-style: none;
}

.main-footer a {
    color: white;
    text-decoration: none;
    transition: color var(--transition-base);
}

.main-footer a:hover {
    color: var(--agr-orange);
}

.footer-muted {
    color: rgba(255, 255, 255, 0.58);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.06);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 20px 20px;
    transition: background-color var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
}

.social-link:hover {
    border-color: var(--agr-orange);
    background-color: var(--agr-orange);
    transform: translateY(-2px);
}

.social-link--linkedin {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M20.45 20.45h-3.56v-5.58c0-1.33-.02-3.04-1.85-3.04-1.86 0-2.14 1.45-2.14 2.95v5.67H9.34V9h3.42v1.56h.05c.48-.9 1.64-1.85 3.37-1.85 3.6 0 4.27 2.37 4.27 5.46v6.28ZM5.32 7.43a2.06 2.06 0 1 1 0-4.12 2.06 2.06 0 0 1 0 4.12Zm1.78 13.02H3.54V9H7.1v11.45Z'/%3e%3c/svg%3e");
}

.social-link--instagram {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3crect x='3' y='3' width='18' height='18' rx='5'/%3e%3ccircle cx='12' cy='12' r='4'/%3e%3ccircle cx='17.5' cy='6.5' r='1.1' fill='white' stroke='none'/%3e%3c/svg%3e");
}

.social-link--facebook {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M14 8.2V6.8c0-.68.45-.84.77-.84h1.96V3.02L14.03 3C11.03 3 10.35 5.24 10.35 6.67V8.2H8v3.3h2.35V21H14v-9.5h2.47l.33-3.3H14Z'/%3e%3c/svg%3e");
}

.social-link--youtube {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M21.58 7.19a2.72 2.72 0 0 0-1.92-1.93C17.97 4.8 12 4.8 12 4.8s-5.97 0-7.66.46a2.72 2.72 0 0 0-1.92 1.93C1.96 8.89 1.96 12.45 1.96 12.45s0 3.56.46 5.26a2.72 2.72 0 0 0 1.92 1.93c1.69.46 7.66.46 7.66.46s5.97 0 7.66-.46a2.72 2.72 0 0 0 1.92-1.93c.46-1.7.46-5.26.46-5.26s0-3.56-.46-5.26ZM10 15.65v-6.4l5.2 3.2-5.2 3.2Z'/%3e%3c/svg%3e");
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
    align-items: center;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.68);
    font-size: inherit;
}

.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-legal-placeholder {
    color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 899px) {
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* --- ARTICLE PAGE --- */

.article-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
    width: 100%;
}

.article-wrapper > .btn-text {
    display: inline-flex;
    margin-bottom: var(--space-lg);
    padding-left: 0;
}

.text-sm {
    font-size: 0.875rem;
}

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

.article-title {
    font-size: 2.5rem;
    color: var(--agr-green);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.article-hero-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: var(--space-xl);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-content p {
    margin-bottom: var(--space-md);
}

.article-content blockquote {
    margin: var(--space-xl) 0;
    padding: var(--space-md) var(--space-lg);
    border-left: 4px solid var(--agr-orange);
    background: var(--surface-muted);
    color: var(--agr-green);
    font-size: 1.25rem;
    line-height: 1.6;
}

@media (max-width: 899px) {
    .article-title {
        font-size: 2rem;
    }

    .article-hero-img {
        height: 280px;
    }
}

/* --- INNOVATION PAGE & ANIMATIONS --- */

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

.radius-lg {
    border-radius: var(--radius-lg);
}

.innovation-hero {
    min-height: 58vh;
    background-image: none;
}

.innovation-hero-subtitle {
    max-width: 760px;
    margin: var(--space-md) auto 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.2rem;
}

.tech-card {
    min-height: 320px;
    padding: var(--space-lg);
    border-top: 4px solid var(--agr-green);
    border-radius: var(--radius-md);
    background: #1e1e1e;
    color: white;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.tech-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--agr-orange);
    box-shadow: 0 18px 38px rgba(253, 89, 45, 0.22);
}

.tech-card h3 {
    color: var(--agr-orange);
    margin-bottom: var(--space-sm);
}

.tech-card p {
    color: rgba(255, 255, 255, 0.78);
}

.tech-card .btn-text {
    margin-top: var(--space-md);
    color: var(--agr-lime);
}

.innovation-validation {
    align-items: center;
}

.innovation-lab-img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: var(--surface-secondary);
    box-shadow: var(--shadow-card);
}

.innovation-validation-copy p {
    color: var(--text-secondary);
    margin-top: var(--space-md);
}

.fade-in-scroll {
    opacity: 1;
    filter: none;
    transform: none;
    transition: opacity 0.9s ease-out, transform 0.9s ease-out, filter 0.9s ease-out;
    will-change: opacity, transform, filter;
}

.fade-in-scroll.visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .fade-in-scroll {
        opacity: 1;
        filter: none;
        transform: none;
        transition: none;
    }
}

/* --- FINAL MOBILE REFINEMENT --- */

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .section-padding {
        padding: 3rem 1rem;
    }

    h1 {
        font-size: 2rem;
        line-height: 1.1;
    }

    h2 {
        font-size: 1.75rem;
        line-height: 1.22;
    }

    h3 {
        font-size: 1.35rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.55;
    }

    .article-title {
        font-size: 2rem;
        overflow-wrap: anywhere;
    }

    .section-title {
        line-height: 1.22;
        margin-bottom: var(--space-md);
    }

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

    .header-nav {
        overflow: visible;
    }

    .nav-container {
        position: relative;
    }

    .mobile-menu-toggle,
    .hamburger-menu {
        display: block;
        flex-shrink: 0;
    }

    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        box-shadow: none;
        transform: none;
        transition: none;
        z-index: auto;
    }

    .nav-menu > .btn {
        display: none;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + var(--space-sm));
        left: var(--space-sm);
        right: var(--space-sm);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: auto;
        padding: var(--space-sm);
        border: 1px solid var(--surface-muted);
        border-radius: var(--radius-sm);
        background: white;
        box-shadow: var(--shadow-interactive);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
    }

    .nav-links.active,
    .nav-menu.is-active .nav-links {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-links a {
        padding: var(--space-sm);
        color: var(--text-primary);
        font-size: 1rem;
        text-align: left;
    }

    .nav-links a::after {
        display: none;
    }

    .carousel-btn {
        display: none !important;
    }

    .carousel-track {
        margin-inline: 0;
        padding-inline: var(--space-sm);
    }

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

    .footer-brand,
    .footer-column {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-column ul,
    .social-links,
    .footer-legal-links {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .doc-card-grid {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .doc-card {
        width: 100%;
        min-height: 0;
        height: auto;
    }

    .doc-card-surface {
        min-height: 0;
        height: auto;
        padding: var(--space-md) var(--space-md) 6.5rem;
        background-position: bottom left;
        background-size: cover;
    }

    .doc-card-icon {
        flex-basis: 52px;
        width: 52px;
        height: 52px;
        margin-bottom: var(--space-sm);
    }

    .doc-card-icon svg {
        width: 26px;
        height: 26px;
    }

    .doc-card h3 {
        font-size: 1.15rem;
        line-height: 1.25;
    }

    .doc-card p {
        font-size: 0.95rem;
        line-height: 1.55;
    }

    #map,
    #distributor-list,
    .locator-map,
    .locator-scroll-list {
        max-width: 100%;
        width: 100%;
        min-width: 0;
    }

    .locator-panel {
        max-width: 100%;
        overflow: hidden;
    }
}

/* --- VISUAL ART DIRECTION: CORPORATE AGTECH 2026 --- */

:root {
    --agr-green-deep: #021f19;
    --agr-green-soft: #e5ead8;
    --agr-paper: #fbfaf2;
    --agr-earth: #b8661a;
    --shadow-card: 0 18px 45px rgba(5, 48, 39, 0.1);
    --shadow-interactive: 0 20px 55px rgba(5, 48, 39, 0.16);
}

body {
    background: var(--agr-paper);
}

.header-nav {
    border-bottom: 1px solid rgba(5, 48, 39, 0.08);
    background: rgba(251, 250, 242, 0.92);
    box-shadow: 0 12px 30px rgba(5, 48, 39, 0.06);
    backdrop-filter: blur(16px);
}

.nav-links a {
    color: rgba(5, 48, 39, 0.82);
    font-size: clamp(0.84rem, 0.74vw, 0.94rem);
}

.nav-links a:hover {
    color: var(--agr-green);
}

.section-padding {
    padding: 5.5rem 0;
}

.section-title {
    color: var(--agr-green);
    font-weight: 600;
    line-height: 1.18;
}

.badge,
.manifesto-kicker,
.hero-eyebrow {
    letter-spacing: 0;
}

.section-subtitle {
    color: var(--text-secondary);
}

.hero-section {
    min-height: calc(100vh - 90px);
    justify-content: flex-start;
    text-align: left;
    background-image:
        linear-gradient(90deg, rgba(2, 31, 25, 0.9) 0%, rgba(5, 48, 39, 0.72) 42%, rgba(5, 48, 39, 0.22) 100%),
        url('../img/banner-home.jpg');
}

.hero-section .container {
    max-width: 1180px;
}

.hero-reveal > * {
    opacity: 0;
    filter: blur(10px);
    transform: translate3d(0, 34px, 0);
    animation: heroFadeIn 1.15s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-reveal > *:nth-child(1) {
    animation-delay: 0.12s;
}

.hero-reveal > *:nth-child(2) {
    animation-delay: 0.26s;
}

.hero-reveal > *:nth-child(3) {
    animation-delay: 0.42s;
}

.hero-reveal > *:nth-child(4) {
    animation-delay: 0.58s;
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        filter: blur(0);
        transform: translate3d(0, 0, 0);
    }
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
    color: var(--agr-orange);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-eyebrow::before {
    content: "";
    width: 42px;
    height: 2px;
    border-radius: 999px;
    background: var(--agr-orange);
}

.hero-section h1 {
    max-width: 780px;
    color: white;
    font-weight: 700;
}

.hero-subtitle {
    max-width: 720px;
    margin-inline: 0;
}

.btn-primary {
    box-shadow: 0 10px 26px rgba(253, 89, 45, 0.22);
}

.btn-primary:hover {
    box-shadow: 0 16px 34px rgba(253, 89, 45, 0.28);
}

#manifesto {
    border-bottom: 1px solid rgba(5, 48, 39, 0.08);
    background:
        linear-gradient(90deg, rgba(120, 133, 60, 0.16), transparent 48%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.48), transparent),
        var(--agr-paper);
}

.manifesto-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.82fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}

.manifesto-section {
    position: relative;
    display: grid;
    gap: var(--space-md);
    max-width: none;
    padding-left: clamp(1rem, 4vw, 4rem);
    text-align: left;
}

.manifesto-section::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.4rem;
    width: 4px;
    height: 118px;
    border-radius: 999px;
    background: var(--agr-orange);
}

.manifesto-kicker {
    letter-spacing: 0;
}

.manifesto-section h2 {
    max-width: 840px;
    font-weight: 700;
    text-wrap: balance;
}

.manifesto-section p {
    margin-inline: 0;
}

.manifesto-visual {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: 0 28px 70px rgba(5, 48, 39, 0.18);
    isolation: isolate;
}

.manifesto-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(2, 31, 25, 0.04), rgba(2, 31, 25, 0.72)),
        linear-gradient(45deg, rgba(253, 89, 45, 0.28), transparent 38%);
}

.manifesto-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.manifesto-signature {
    position: absolute;
    left: var(--space-md);
    right: var(--space-md);
    bottom: var(--space-md);
    z-index: 2;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.32);
    color: white;
}

.manifesto-signature strong,
.manifesto-signature span {
    display: block;
}

.manifesto-signature strong {
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 1;
}

.manifesto-signature span {
    max-width: 320px;
    margin-top: var(--space-xs);
    color: rgba(255, 255, 255, 0.82);
}

.impact-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
    padding: var(--space-md);
    border: 1px solid rgba(5, 48, 39, 0.12);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.52);
}

.impact-strip div {
    display: grid;
    gap: 0.25rem;
    padding-left: var(--space-sm);
    border-left: 3px solid rgba(253, 89, 45, 0.65);
}

.impact-strip strong {
    color: var(--agr-green);
    font-size: 1.05rem;
}

.impact-strip span {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

#inovacao {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(253, 89, 45, 0.12), transparent 38%),
        linear-gradient(90deg, var(--agr-green-deep), var(--agr-green));
}

#inovacao::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.14;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
    background-size: 72px 72px;
    pointer-events: none;
}

#inovacao .container {
    position: relative;
    z-index: 1;
}

#inovacao h2,
#inovacao .metric-card h3 {
    color: white;
    font-weight: 700;
}

#inovacao .innovation-text p {
    color: rgba(255, 255, 255, 0.78);
}

#inovacao .metric-card {
    min-height: 340px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.22);
}

#inovacao .metric-card p {
    color: rgba(255, 255, 255, 0.78);
}

#inovacao .btn-secondary {
    border-color: rgba(255, 255, 255, 0.28);
    background: white;
    color: var(--agr-green);
}

#produtos {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(229, 234, 216, 0.38)),
        var(--surface-primary);
}

#produtos .grid-2 {
    align-items: stretch;
}

.brand-card-organic {
    position: relative;
    isolation: isolate;
    justify-content: flex-end;
    min-height: 430px;
    padding: var(--space-lg) var(--space-lg) 6.5rem;
    overflow: hidden;
    background: var(--agr-green);
}

.brand-card-organic::before,
.brand-card-organic::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
}

.brand-card-organic::before {
    background-position: center;
    background-size: cover;
    transform: scale(1.02);
    transition: transform var(--transition-base);
}

.brand-card-organic::after {
    z-index: -1;
    background: linear-gradient(180deg, rgba(2, 31, 25, 0.12), rgba(2, 31, 25, 0.88));
}

.brand-card-organic:nth-child(1)::before {
    background-image: url('../img/products/raizer_campo_01.jpg');
}

.brand-card-organic:nth-child(2)::before {
    background-image: url('../img/products/twixx-a_campo_01.jpg');
}

.brand-card-organic:hover::before {
    transform: scale(1.08);
}

.brand-card-organic h3 {
    color: white;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.brand-card-organic h3::after {
    content: "";
    display: block;
    width: 52px;
    height: 3px;
    margin-top: var(--space-xs);
    border-radius: 999px;
    background: var(--agr-orange);
}

.brand-card-organic p {
    max-width: 560px;
    color: rgba(255, 255, 255, 0.88);
}

.brand-card-organic > * {
    position: relative;
    z-index: 1;
}

.news-card,
.job-card,
.locator-panel {
    border: 1px solid rgba(5, 48, 39, 0.08);
    box-shadow: var(--shadow-card);
}

.news-card {
    background: white;
}

.news-card-img {
    height: 210px;
}

.news-card-title,
.job-card h3,
.locator-panel h3 {
    font-weight: 700;
}

.locator-panel {
    background:
        linear-gradient(180deg, rgba(229, 234, 216, 0.35), rgba(255, 255, 255, 0)),
        white;
}

.locator-map {
    min-height: 340px;
    border-radius: var(--radius-md);
}

.bg-dark-green {
    background:
        linear-gradient(135deg, rgba(253, 89, 45, 0.12), transparent 34%),
        var(--agr-green);
}

#institucional {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(253, 89, 45, 0.16), transparent 30%),
        linear-gradient(180deg, var(--agr-green), var(--agr-green-deep));
}

#institucional::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
    background-size: 88px 88px;
    pointer-events: none;
}

#institucional .container {
    position: relative;
    z-index: 1;
}

.highlight-card {
    border: 1px solid rgba(5, 48, 39, 0.08);
}

.main-footer {
    background:
        linear-gradient(135deg, rgba(253, 89, 45, 0.12), transparent 32%),
        var(--agr-green-deep);
}

/* --- FINAL POLISH: SECTION DEPTH & NAV CLARITY --- */

.section-heading {
    max-width: 820px;
    margin: 0 auto var(--space-xl);
    text-align: center;
}

.section-heading .section-title {
    margin-bottom: var(--space-md);
}

.section-heading .section-subtitle {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.75;
}

#news {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(229, 234, 216, 0.35)),
        var(--agr-paper);
}

#news .carousel-wrapper {
    padding: var(--space-md);
    border: 1px solid rgba(5, 48, 39, 0.08);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.62);
    box-shadow: 0 20px 55px rgba(5, 48, 39, 0.08);
}

.news-card {
    border-radius: var(--radius-md);
}

.news-card-img {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

#onde-encontrar {
    background:
        linear-gradient(135deg, rgba(5, 48, 39, 0.08), rgba(253, 89, 45, 0.06) 42%, transparent),
        var(--agr-green-soft);
}

.locator-panel {
    position: relative;
    overflow: hidden;
}

.locator-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: var(--agr-orange);
}

.locator-panel-copy {
    color: var(--text-secondary);
    margin: -0.35rem 0 var(--space-md);
    line-height: 1.65;
}

.institutional-copy .manifesto-kicker {
    color: rgba(255, 255, 255, 0.72);
}

.institutional-copy h2 {
    font-weight: 700;
    margin-bottom: var(--space-md);
    text-wrap: balance;
}

.institutional-copy p {
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.8;
}

#institucional .institutional-grid {
    gap: clamp(2rem, 5vw, 5rem);
}

.essence-signature {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    color: white !important;
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    font-weight: 700;
    line-height: 1.25;
}

.highlight-card {
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 250, 242, 0.96));
    border-color: rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.24);
    transform: translateY(-4px);
}

.highlight-card img {
    margin: calc(var(--space-lg) * -1) calc(var(--space-lg) * -1) var(--space-md);
    width: calc(100% + var(--space-lg) * 2);
    max-width: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    object-fit: cover;
    aspect-ratio: 16 / 10;
}

.highlight-eyebrow {
    color: var(--agr-orange);
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
}

.highlight-card h3 {
    font-weight: 700;
}

.highlight-card p:not(.highlight-eyebrow) {
    line-height: 1.75;
}

.doc-card-icon {
    box-shadow: inset 0 0 0 1px rgba(253, 89, 45, 0.16);
}

.doc-link-disabled {
    display: inline-flex;
    color: var(--text-muted);
    cursor: default;
}

.doc-link-disabled::after {
    display: none;
}

#carreiras {
    background:
        linear-gradient(135deg, rgba(253, 89, 45, 0.1), transparent 38%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(229, 234, 216, 0.54)),
        var(--agr-green-soft);
}

.careers-section {
    max-width: 1180px;
}

.job-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 250, 242, 0.96));
    border-radius: var(--radius-md);
}

.job-card .btn-text {
    margin-top: auto;
}

/* --- INTERNAL PAGES: SAME VISUAL SYSTEM --- */

.page-header-banner {
    min-height: 44vh;
    position: relative;
    overflow: hidden;
    background-image:
        linear-gradient(90deg, rgba(2, 31, 25, 0.92), rgba(5, 48, 39, 0.58), rgba(5, 48, 39, 0.24)),
        url('../img/banner-produtos.jpg');
    text-align: left;
}

.page-header-banner::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 38%;
    background: linear-gradient(180deg, transparent, rgba(2, 31, 25, 0.32));
    pointer-events: none;
}

.page-header-banner .container {
    position: relative;
    z-index: 1;
}

.page-kicker {
    color: var(--agr-orange);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
}

.page-header-banner h1 {
    max-width: 820px;
    color: white;
    font-weight: 700;
}

.page-header-subtitle {
    max-width: 720px;
    margin-top: var(--space-md);
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.12rem;
    line-height: 1.75;
}

.product-catalog-layout {
    background:
        linear-gradient(135deg, rgba(253, 89, 45, 0.08), transparent 32%),
        var(--agr-paper);
}

.filter-sidebar {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 250, 242, 0.96));
    border-right-color: rgba(5, 48, 39, 0.1);
}

.product-list-content {
    padding-inline: var(--space-lg);
}

.product-list-header {
    align-items: center;
}

.search-bar input,
.filter-options label,
#primary-filters .btn-secondary {
    background-color: rgba(255, 255, 255, 0.88);
}

.product-card {
    box-shadow: 0 20px 48px rgba(5, 48, 39, 0.14);
}

.product-card h3 {
    color: white;
}

.product-card h3::after {
    content: "";
    display: block;
    width: 46px;
    height: 3px;
    margin-top: var(--space-xs);
    border-radius: 999px;
    background: var(--agr-orange);
}

.product-card .badge {
    background: rgba(255, 255, 255, 0.14);
    color: white;
}

body:has(.product-detail-layout) main {
    background:
        linear-gradient(135deg, rgba(253, 89, 45, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(229, 234, 216, 0.38), transparent),
        var(--agr-paper);
}

.product-detail-layout {
    padding: var(--space-lg);
    border: 1px solid rgba(5, 48, 39, 0.08);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 26px 70px rgba(5, 48, 39, 0.1);
}

.main-image img {
    border: 1px solid rgba(5, 48, 39, 0.08);
    background: white;
    box-shadow: 0 20px 55px rgba(5, 48, 39, 0.12);
}

.gallery-thumbnails img {
    background: white;
    box-shadow: 0 10px 22px rgba(5, 48, 39, 0.08);
}

.product-info h1 {
    color: var(--agr-green);
    font-weight: 700;
}

.product-description {
    max-width: 720px;
    line-height: 1.8;
}

.accordion,
.btn-download {
    border-color: rgba(5, 48, 39, 0.1);
    box-shadow: 0 12px 28px rgba(5, 48, 39, 0.06);
}

.article-wrapper {
    max-width: 920px;
    padding-top: var(--space-2xl);
}

.article-wrapper::before {
    content: "";
    display: block;
    width: 72px;
    height: 4px;
    margin-bottom: var(--space-lg);
    border-radius: 999px;
    background: var(--agr-orange);
}

.article-title {
    max-width: 860px;
    font-weight: 700;
    text-wrap: balance;
}

.article-hero-img {
    border-radius: var(--radius-lg);
    box-shadow: 0 26px 70px rgba(5, 48, 39, 0.14);
}

.article-content {
    max-width: 780px;
}

.article-content blockquote {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    background:
        linear-gradient(90deg, rgba(253, 89, 45, 0.1), rgba(229, 234, 216, 0.36));
}

.innovation-hero {
    min-height: calc(78vh - 90px);
    justify-content: center;
    text-align: center;
    background-image:
        linear-gradient(180deg, rgba(2, 31, 25, 0.82), rgba(2, 31, 25, 0.74)),
        url('../img/products/profix_campo_01.jpg');
}

.innovation-hero .container {
    max-width: 980px;
}

.innovation-hero h1 {
    font-weight: 700;
}

.tech-card {
    position: relative;
    overflow: hidden;
    border-top: 0;
    border-left: 4px solid var(--agr-orange);
    background:
        linear-gradient(135deg, rgba(253, 89, 45, 0.16), transparent 38%),
        linear-gradient(180deg, #17382f, var(--agr-green-deep));
}

.tech-card::after {
    content: "";
    position: absolute;
    inset: auto var(--space-lg) var(--space-lg);
    height: 1px;
    background: rgba(255, 255, 255, 0.16);
}

.innovation-validation {
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 26px 70px rgba(5, 48, 39, 0.1);
}

.innovation-lab-img {
    object-fit: cover;
}

.locator-radius-control {
    display: grid;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
}

.locator-radius-control span {
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
}

.locator-result-card--notice {
    border-left-color: var(--agr-green);
}

@media (max-width: 768px) {
    .section-padding {
        padding: 3.5rem 1rem;
    }

    .hero-section {
        min-height: 72vh;
        text-align: center;
        background-image:
            linear-gradient(180deg, rgba(2, 31, 25, 0.88), rgba(5, 48, 39, 0.54)),
            url('../img/banner-home.jpg');
    }

    .hero-eyebrow {
        justify-content: center;
        font-size: 0.82rem;
    }

    .hero-eyebrow::before {
        display: none;
    }

    .hero-section h1 {
        font-size: 2.6rem;
    }

    .hero-subtitle {
        margin-inline: auto;
    }

    .manifesto-layout {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .manifesto-section {
        padding-left: var(--space-md);
    }

    .manifesto-section::before {
        height: 82px;
    }

    .manifesto-visual {
        min-height: 340px;
        border-radius: var(--radius-md);
    }

    .manifesto-signature {
        left: var(--space-sm);
        right: var(--space-sm);
        bottom: var(--space-sm);
    }

    .impact-strip {
        grid-template-columns: 1fr;
        gap: var(--space-md);
        padding: var(--space-sm);
    }

    #inovacao .metric-card {
        min-height: 260px;
    }

    .brand-card-organic {
        min-height: 360px;
        padding: var(--space-md) var(--space-md) 6rem;
    }

    .news-card-img {
        height: 180px;
    }

    #news .carousel-wrapper {
        padding: var(--space-sm) 0;
        border-radius: var(--radius-md);
    }

    .highlight-card {
        padding: var(--space-md);
        transform: none;
    }

    .highlight-card img {
        margin: calc(var(--space-md) * -1) calc(var(--space-md) * -1) var(--space-md);
        width: calc(100% + var(--space-md) * 2);
    }

    .page-header-banner {
        min-height: 36vh;
        text-align: center;
    }

    .page-header-subtitle {
        font-size: 1rem;
    }

    .product-list-content {
        padding-inline: var(--space-sm);
    }

    #products-grid {
        --product-card-width: min(100%, 320px);
        justify-content: center;
    }

    .product-detail-layout,
    .innovation-validation {
        padding: var(--space-md);
        border-radius: var(--radius-md);
    }

    .article-wrapper {
        padding-top: var(--space-xl);
    }

    .innovation-hero {
        min-height: 62vh;
    }
}

/* --- SCROLL REVEAL OVERRIDE --- */

.scroll-animations-ready .fade-in-scroll {
    opacity: 0;
    filter: blur(12px);
    transform: translate3d(0, 72px, 0) scale(0.985);
    transition:
        opacity 1.25s cubic-bezier(0.22, 1, 0.36, 1),
        transform 1.25s cubic-bezier(0.22, 1, 0.36, 1),
        filter 1.25s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--fade-delay, 0ms);
    will-change: opacity, transform, filter;
}

.scroll-animations-ready .fade-in-scroll:not(.visible) {
    opacity: 0;
    filter: blur(12px);
    transform: translate3d(0, 72px, 0) scale(0.985);
}

.scroll-animations-ready .fade-in-scroll.visible {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
}

/* --- FINAL BRAND BALANCE & PRODUCT PACKSHOT CARDS --- */

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: clamp(176px, 14vw, 205px);
    height: 50px;
    overflow: visible;
}

.logo-wrapper img {
    position: static;
    width: auto;
    height: 46px;
    max-width: 100%;
    transform: none;
}

.hero-brand-logo {
    display: block;
    width: clamp(300px, 36vw, 560px);
    height: auto;
    margin-bottom: var(--space-lg);
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.28));
}

.hero-reveal > *:nth-child(5) {
    animation-delay: 0.74s;
}

:is(
    .brand-card-organic,
    #inovacao .metric-card,
    .locator-result-card,
    .carousel-track .related-product-card
) {
    padding-left: calc(var(--space-lg) + 0.55rem);
    padding-bottom: calc(var(--space-lg) + 3rem);
}

#inovacao .metric-card {
    padding-right: var(--space-lg);
}

.highlight-card {
    --highlight-pad-y: var(--space-lg);
    --highlight-pad-right: var(--space-lg);
    --highlight-pad-left: calc(var(--space-lg) + 0.55rem);
    padding: var(--highlight-pad-y) var(--highlight-pad-right) calc(var(--highlight-pad-y) + 3rem) var(--highlight-pad-left);
}

.highlight-card img {
    width: calc(100% + var(--highlight-pad-left) + var(--highlight-pad-right));
    margin: calc(var(--highlight-pad-y) * -1) calc(var(--highlight-pad-right) * -1) var(--space-md) calc(var(--highlight-pad-left) * -1);
    border-radius: 0;
    object-fit: cover;
    transform: scale(1.025);
    transform-origin: center;
}

.locator-range-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-sm);
    align-items: center;
}

.locator-radius-control > label:first-child {
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 700;
}

.locator-range {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 22px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.locator-range:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.locator-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    margin-top: -7px;
    border: 3px solid white;
    border-radius: 50%;
    background: var(--agr-orange);
    box-shadow: 0 4px 14px rgba(5, 48, 39, 0.2);
}

.locator-range::-webkit-slider-runnable-track {
    height: 8px;
    border: 1px solid rgba(5, 48, 39, 0.1);
    border-radius: 999px;
    background:
        linear-gradient(
            90deg,
            var(--agr-orange) 0%,
            var(--agr-orange) var(--locator-range-progress, 33%),
            white calc(var(--locator-range-progress, 33%) + 0.01%),
            white 100%
        );
}

.locator-range::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: white;
    border: 1px solid rgba(5, 48, 39, 0.1);
}

.locator-range::-moz-range-progress {
    height: 8px;
    border-radius: 999px;
    background: var(--agr-orange);
}

.locator-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 3px solid white;
    border-radius: 50%;
    background: var(--agr-orange);
    box-shadow: 0 4px 14px rgba(5, 48, 39, 0.2);
}

.locator-radius-output,
#distributor-radius-output {
    min-width: 96px;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(253, 89, 45, 0.1);
    color: var(--agr-orange);
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
}

.locator-radius-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    width: fit-content;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.locator-radius-toggle input {
    accent-color: var(--agr-orange);
}

#products-grid .product-card {
    min-height: 392px;
    justify-content: flex-end;
    padding: 1.5rem 1.35rem 6.25rem 1.8rem;
    background:
        linear-gradient(180deg, rgba(2, 31, 25, 0.06) 0%, rgba(2, 31, 25, 0.2) 42%, rgba(2, 31, 25, 0.92) 100%),
        radial-gradient(circle at 76% 18%, rgba(253, 89, 45, 0.38), transparent 34%),
        var(--product-packshot, url("../img/products/profix_embalagem_01.jpg")),
        linear-gradient(135deg, var(--agr-green), var(--agr-green-deep));
    background-repeat: no-repeat;
    background-position: center, center, center top, center;
    background-size: cover, cover, cover, cover;
    isolation: isolate;
}

#products-grid .product-card > :not(.card-link-overlay) {
    position: relative;
    z-index: 2;
}

#products-grid .card-link-overlay {
    z-index: 3;
}

#products-grid .product-card h3 {
    color: white;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.45);
}

#products-grid .product-card p {
    flex-grow: 0;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
}

#products-grid .product-card .card-badges {
    display: none;
}

@media (max-width: 899px) {
    .logo-wrapper {
        width: clamp(140px, 42vw, 168px);
        height: 46px;
    }

    .logo-wrapper img {
        width: auto;
        height: 40px;
        max-width: 100%;
        transform: none;
    }

    .hero-brand-logo {
        width: clamp(230px, 78vw, 380px);
        margin-inline: auto;
    }

    :is(
        .brand-card-organic,
        #inovacao .metric-card,
        .locator-result-card,
        .carousel-track .related-product-card
    ) {
        padding-left: calc(var(--space-md) + 0.45rem);
        padding-bottom: calc(var(--space-md) + 3.35rem);
    }

    .highlight-card {
        --highlight-pad-y: var(--space-md);
        --highlight-pad-right: var(--space-md);
        --highlight-pad-left: calc(var(--space-md) + 0.45rem);
    }

    .locator-range-row {
        grid-template-columns: 1fr;
    }

    #distributor-radius-output {
        width: fit-content;
    }

    #products-grid .product-card {
        min-height: 370px;
        padding: 1.35rem 1.15rem 6rem 1.55rem;
    }
}

/* --- RESPONSIVE NAVIGATION STABILIZATION --- */

@media (max-width: 899px) {
    .header-nav {
        overflow: visible;
        z-index: 1200;
    }

    .nav-container {
        position: relative;
    }

    .mobile-menu-toggle,
    .hamburger-menu {
        display: block;
        flex-shrink: 0;
    }

    .nav-menu {
        position: absolute;
        top: calc(100% + 0.65rem);
        left: var(--space-sm);
        right: var(--space-sm);
        width: auto;
        height: auto;
        max-height: calc(100vh - 96px);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: var(--space-xs);
        padding: var(--space-sm);
        border: 1px solid rgba(5, 48, 39, 0.1);
        border-radius: var(--radius-md);
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 22px 50px rgba(5, 48, 39, 0.16);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        overflow-y: auto;
        transform: translateY(-10px);
        transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
        z-index: 1190;
    }

    .nav-menu.is-active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-links,
    .nav-menu .nav-links {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }

    .nav-links.active,
    .nav-menu.is-active .nav-links {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }

    .nav-links a,
    .nav-menu .nav-links a {
        display: block;
        padding: 0.85rem 0.95rem;
        border-radius: var(--radius-sm);
        color: var(--text-primary);
        font-size: 1rem;
        line-height: 1.3;
        text-align: left;
    }

    .nav-links a:hover,
    .nav-menu .nav-links a:hover {
        background: rgba(236, 111, 28, 0.09);
        color: var(--agr-orange);
    }

    .nav-links a::after,
    .nav-menu .nav-links a::after {
        display: none;
    }

    .nav-menu > .btn {
        display: inline-flex;
        width: 100%;
        margin-top: var(--space-xs);
        justify-content: center;
    }
}

/* --- GLOBAL NAV, CONTACT & CULTURE PAGE --- */

:root {
    --header-offset: 82px;
}

main {
    padding-top: var(--header-offset);
}

#news,
#institucional-texto,
#fornecedores-compliance,
#fale-conosco {
    scroll-margin-top: calc(var(--header-offset) + 24px);
}

#institucional-texto {
    scroll-margin-top: calc(var(--header-offset) + 136px);
}

@media (min-width: 1101px) {
    .nav-container {
        gap: var(--space-lg);
        justify-content: center;
    }

    .nav-menu {
        position: absolute;
        top: 50%;
        left: 50%;
        z-index: 1;
        width: max-content;
        margin-left: 0;
        min-width: 0;
        transform: translate(-50%, -50%);
    }

    .nav-links {
        position: static;
        justify-content: center;
        transform: none;
        gap: clamp(0.45rem, 0.82vw, 1rem);
    }

    .logo {
        position: relative;
        z-index: 2;
        margin-right: auto;
    }

    .nav-links a,
    .nav-dropdown-toggle {
        font-size: clamp(0.86rem, 0.78vw, 1rem);
    }

    .logo-wrapper {
        width: clamp(150px, 12vw, 188px);
    }
}

.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-links a,
.nav-dropdown-toggle {
    font-size: clamp(0.84rem, 0.74vw, 0.94rem);
    line-height: 1.3;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0 var(--space-xs);
    border: 0;
    background: transparent;
    color: rgba(5, 48, 39, 0.82);
    font-family: inherit;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: color var(--transition-base);
}

@media (min-width: 1101px) {
    .nav-links a,
    .nav-dropdown-toggle {
        font-size: clamp(0.86rem, 0.78vw, 1rem);
    }

    .nav-dropdown::after {
        content: "";
        position: absolute;
        top: 100%;
        left: -1rem;
        right: -1rem;
        height: 0.9rem;
    }
}

.nav-dropdown-toggle::after {
    content: "";
    width: 0.42rem;
    height: 0.42rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform var(--transition-base);
}

.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown:focus-within .nav-dropdown-toggle,
.nav-dropdown.is-open .nav-dropdown-toggle {
    color: var(--agr-green);
}

.nav-dropdown:hover .nav-dropdown-toggle::after,
.nav-dropdown:focus-within .nav-dropdown-toggle::after,
.nav-dropdown.is-open .nav-dropdown-toggle::after {
    transform: translateY(1px) rotate(225deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.7rem);
    left: 50%;
    z-index: 1205;
    display: grid;
    min-width: 190px;
    padding: 0.45rem;
    border: 1px solid rgba(5, 48, 39, 0.1);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 44px rgba(5, 48, 39, 0.14);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -8px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.88rem;
}

.nav-dropdown-menu a:hover {
    background: rgba(253, 89, 45, 0.09);
    color: var(--agr-orange);
}

.nav-dropdown-menu a::after {
    display: none;
}

@media (max-width: 1100px) {
    .header-nav {
        overflow: visible;
        z-index: 1200;
    }

    .nav-container {
        position: relative;
    }

    .mobile-menu-toggle,
    .hamburger-menu {
        display: block;
        flex-shrink: 0;
    }

    .nav-menu {
        position: absolute;
        top: calc(100% + 0.65rem);
        left: var(--space-sm);
        right: var(--space-sm);
        width: auto;
        height: auto;
        max-height: calc(100vh - 96px);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: var(--space-xs);
        padding: var(--space-sm);
        border: 1px solid rgba(5, 48, 39, 0.1);
        border-radius: var(--radius-md);
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 22px 50px rgba(5, 48, 39, 0.16);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        overflow-y: auto;
        transform: translateY(-10px);
        transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
        z-index: 1190;
    }

    .nav-menu.is-active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-links,
    .nav-menu .nav-links {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }

    .nav-links a,
    .nav-menu .nav-links a,
    .nav-dropdown-toggle {
        display: block;
        width: 100%;
        padding: 0.85rem 0.95rem;
        border-radius: var(--radius-sm);
        color: var(--text-primary);
        font-size: 1rem;
        line-height: 1.3;
        text-align: left;
    }

    .nav-dropdown {
        display: grid;
        width: 100%;
    }

    .nav-dropdown-toggle {
        display: flex;
        justify-content: space-between;
        padding-bottom: 0.85rem;
    }

    .nav-dropdown-menu {
        position: static;
        min-width: 0;
        max-height: 16rem;
        display: grid;
        gap: 0.1rem;
        margin: 0 0 0.45rem;
        padding: 0.35rem;
        border: 0;
        border-radius: var(--radius-sm);
        background: rgba(5, 48, 39, 0.045);
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        overflow: hidden;
        transition: max-height 220ms ease, opacity 180ms ease, padding 220ms ease, margin 220ms ease, background-color 220ms ease;
    }

    .nav-dropdown:not(.is-open) .nav-dropdown-menu {
        max-height: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
        background: transparent;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .nav-dropdown:not(.is-open) .nav-dropdown-toggle::after {
        transform: translateY(-2px) rotate(45deg);
    }

    .nav-dropdown-menu a {
        display: block;
        width: 100%;
        padding: 0.72rem 0.8rem;
        color: var(--text-secondary);
        font-size: 0.95rem;
        text-align: left;
    }

    .nav-links a:hover,
    .nav-menu .nav-links a:hover,
    .nav-dropdown-toggle:hover,
    .nav-dropdown-menu a:hover {
        background: rgba(236, 111, 28, 0.09);
        color: var(--agr-orange);
    }
}

@media (max-width: 899px) {
    :root {
        --header-offset: 62px;
    }
}

.contact-section {
    background:
        linear-gradient(135deg, rgba(253, 89, 45, 0.1), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(229, 234, 216, 0.48)),
        var(--agr-paper);
}

.contact-grid {
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
}

.contact-copy h2 {
    color: var(--agr-green);
    margin-bottom: var(--space-md);
}

.contact-copy p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

.contact-info-list {
    display: grid;
    gap: var(--space-xs);
    margin-top: var(--space-lg);
}

.contact-info-list a {
    color: var(--agr-green);
    font-weight: 700;
    text-decoration: none;
}

.contact-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-md);
    padding: var(--space-lg);
    border: 1px solid rgba(5, 48, 39, 0.08);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 24px 70px rgba(5, 48, 39, 0.12);
}

.form-field {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

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

.form-field label {
    color: var(--agr-green);
    font-size: 0.88rem;
    font-weight: 700;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    min-height: 50px;
    padding: 0.85rem 1rem;
    border: 1px solid var(--agr-gray);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text-primary);
    font: inherit;
    resize: vertical;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--agr-orange);
    box-shadow: 0 0 0 3px rgba(253, 89, 45, 0.16);
}

.contact-form-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
}

.contact-status {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.culture-hero {
    display: flex;
    align-items: center;
    min-height: calc(72vh - var(--header-offset));
    color: white;
    background-image:
        linear-gradient(90deg, rgba(2, 31, 25, 0.92), rgba(5, 48, 39, 0.64), rgba(5, 48, 39, 0.2)),
        url('../img/products/profix_campo_01.jpg');
    background-position: center;
    background-size: cover;
}

.culture-hero h1 {
    color: white;
    font-size: clamp(3rem, 7vw, 6rem);
    line-height: 1.06;
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.culture-hero p:not(.page-kicker) {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.75;
}

.culture-story,
.culture-content-grid {
    align-items: center;
}

.culture-story-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    box-shadow: 0 26px 70px rgba(5, 48, 39, 0.16);
}

.culture-story-copy h2,
.culture-content-copy h2 {
    color: var(--agr-green);
    margin-bottom: var(--space-md);
}

.culture-story-copy p,
.culture-content-copy p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.culture-pillars-section {
    background:
        linear-gradient(135deg, rgba(253, 89, 45, 0.16), transparent 36%),
        linear-gradient(180deg, var(--agr-green), var(--agr-green-deep));
}

.culture-pillars-section .section-title,
.culture-pillars-section .section-subtitle {
    color: white;
}

.culture-pillars {
    align-items: stretch;
}

.culture-card {
    min-height: 280px;
    padding: var(--space-lg);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-left: 4px solid var(--agr-orange);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.culture-card span {
    display: inline-flex;
    margin-bottom: var(--space-md);
    color: var(--agr-orange);
    font-size: 0.86rem;
    font-weight: 700;
}

.culture-card h3 {
    color: white;
    margin-bottom: var(--space-sm);
}

.culture-card p {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.7;
}

.culture-content-list {
    display: grid;
    gap: var(--space-md);
}

.culture-content-list article {
    padding: var(--space-md);
    border: 1px solid rgba(5, 48, 39, 0.08);
    border-left: 4px solid var(--agr-orange);
    border-radius: var(--radius-md);
    background: white;
    box-shadow: var(--shadow-card);
}

.culture-content-list h3 {
    color: var(--agr-green);
    margin-bottom: var(--space-xs);
}

.culture-content-list p {
    color: var(--text-secondary);
    margin: 0;
}

@media (max-width: 768px) {
    .contact-form {
        grid-template-columns: 1fr;
        padding: var(--space-md);
    }

    .contact-form-actions .btn {
        width: 100%;
    }

    .culture-hero {
        min-height: 62vh;
        text-align: center;
        background-image:
            linear-gradient(180deg, rgba(2, 31, 25, 0.88), rgba(5, 48, 39, 0.56)),
            url('../img/products/profix_campo_01.jpg');
    }
}

/* --- NEWS CAROUSEL TOUCH & AUTOPLAY SUPPORT --- */

#news .carousel-track {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    overflow-x: scroll;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
}

#news .carousel-track.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
    scroll-snap-type: none;
}

#news .news-card {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

#news .news-card,
#news .news-card * {
    -webkit-user-drag: none;
}

#news .news-card a,
#news .news-card button {
    touch-action: pan-y;
}

@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
    #news .carousel-track {
        cursor: default;
        user-select: auto;
        touch-action: auto;
    }

    #news .news-card a,
    #news .news-card button {
        touch-action: auto;
    }
}

@media (max-width: 768px) {
    #news .carousel-wrapper {
        overflow: hidden;
        padding: var(--space-sm) 0;
    }

    #news .carousel-track {
        margin-inline: 0;
        gap: var(--space-sm);
        padding-inline: var(--space-sm);
        scroll-padding-left: var(--space-sm);
    }

    #news .news-card {
        flex: 0 0 min(78vw, 310px);
        max-width: min(78vw, 310px);
    }

    #news #news-btn-prev,
    #news #news-btn-next {
        display: flex !important;
        z-index: 5;
        width: 44px;
        height: 44px;
        border-radius: 999px;
        background: var(--agr-green);
        color: white;
        font-size: 1.85rem;
        font-weight: 500;
        line-height: 1;
        box-shadow: 0 14px 34px rgba(5, 48, 39, 0.22);
        align-items: center;
        justify-content: center;
        padding-bottom: 0.15rem;
    }

    #news #news-btn-prev.hidden,
    #news #news-btn-next.hidden {
        display: none !important;
    }

    #news #news-btn-prev {
        left: 0.35rem;
    }

    #news #news-btn-next {
        right: 0.35rem;
    }
}

/* --- FINAL MOBILE NAV & NEWS INTERACTION FIX --- */

@media (max-width: 1100px) {
    .nav-menu .nav-dropdown,
    .nav-menu .nav-dropdown.is-open {
        display: block;
        width: 100%;
        transform: none;
    }

    .nav-menu .nav-dropdown:hover .nav-dropdown-menu,
    .nav-menu .nav-dropdown:focus-within .nav-dropdown-menu,
    .nav-menu .nav-dropdown.is-open .nav-dropdown-menu {
        position: static;
        inset: auto;
        left: auto;
        top: auto;
        width: 100%;
        min-width: 0;
        max-height: 18rem;
        margin: 0 0 0.45rem;
        padding: 0.35rem;
        border: 0;
        border-radius: var(--radius-sm);
        background: rgba(5, 48, 39, 0.045);
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }

    .nav-menu .nav-dropdown:not(.is-open) .nav-dropdown-menu,
    .nav-menu .nav-dropdown:not(.is-open):hover .nav-dropdown-menu,
    .nav-menu .nav-dropdown:not(.is-open):focus-within .nav-dropdown-menu {
        max-height: 0;
        margin: 0;
        padding-top: 0;
        padding-bottom: 0;
        background: transparent;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: none;
    }

    .nav-menu .nav-dropdown:not(.is-open) .nav-dropdown-toggle::after,
    .nav-menu .nav-dropdown:not(.is-open):hover .nav-dropdown-toggle::after,
    .nav-menu .nav-dropdown:not(.is-open):focus-within .nav-dropdown-toggle::after {
        transform: translateY(-2px) rotate(45deg);
    }

    .nav-menu .nav-dropdown-menu a {
        display: block;
        width: 100%;
        padding: 0.72rem 0.85rem;
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: left;
        transform: none;
    }
}

@media (max-width: 768px) {
    #news .carousel-wrapper {
        overflow: hidden;
        padding-inline: 0.25rem;
    }

    #news .carousel-track {
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        touch-action: pan-y;
    }

    #news .carousel-track.is-dragging {
        scroll-behavior: auto;
        scroll-snap-type: none;
    }

    #news .news-card {
        flex-basis: min(76vw, 300px);
        max-width: min(76vw, 300px);
    }

    #news #news-btn-prev,
    #news #news-btn-next {
        top: 50%;
        width: 48px;
        height: 48px;
        transform: translateY(-50%);
    }

    #news #news-btn-prev:hover,
    #news #news-btn-next:hover {
        transform: translateY(-50%);
    }
}

/* --- GLOBAL SEARCH --- */

.site-search-toggle {
    position: relative;
    z-index: 1011;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    margin-left: var(--space-sm);
    padding: 0.62rem 0.9rem;
    border: 1px solid rgba(5, 48, 39, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--agr-green);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(5, 48, 39, 0.08);
    transition:
        background-color var(--transition-base),
        border-color var(--transition-base),
        color var(--transition-base),
        transform var(--transition-base),
        box-shadow var(--transition-base);
}

.site-search-toggle:hover,
.site-search-toggle:focus-visible {
    border-color: var(--agr-orange);
    background: white;
    color: var(--agr-orange);
    box-shadow: 0 16px 34px rgba(5, 48, 39, 0.13);
    transform: translateY(-1px);
}

.site-search-toggle:focus-visible {
    outline: 3px solid rgba(253, 89, 45, 0.24);
    outline-offset: 3px;
}

.site-search-icon {
    position: relative;
    display: inline-block;
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.site-search-icon::before {
    content: "";
    position: absolute;
    width: 0.62rem;
    height: 0.62rem;
    border: 2px solid currentColor;
    border-radius: 50%;
    left: 0.05rem;
    top: 0.05rem;
}

.site-search-icon::after {
    content: "";
    position: absolute;
    width: 0.42rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    right: 0.04rem;
    bottom: 0.12rem;
    transform: rotate(45deg);
    transform-origin: center;
}

.global-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: grid;
    align-items: start;
    justify-items: center;
    padding: clamp(1rem, 6vh, 4rem) var(--space-md) var(--space-md);
    background: rgba(2, 31, 25, 0.62);
    backdrop-filter: blur(10px);
    overflow-y: auto;
}

.global-search-dialog {
    width: min(760px, 100%);
    max-height: calc(100dvh - 2rem);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(253, 89, 45, 0.1), rgba(229, 234, 216, 0.16) 42%, transparent),
        white;
    box-shadow: 0 34px 90px rgba(2, 31, 25, 0.34);
}

.global-search-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-lg) var(--space-sm);
}

.global-search-kicker {
    margin-bottom: 0.35rem;
    color: var(--agr-orange);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.global-search-header h2 {
    margin: 0;
    color: var(--agr-green);
    font-size: 1.55rem;
    line-height: 1.25;
}

.global-search-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 1px solid rgba(5, 48, 39, 0.1);
    border-radius: 50%;
    background: white;
    color: var(--text-primary);
    font-size: 1.65rem;
    line-height: 1;
    cursor: pointer;
    transition:
        background-color var(--transition-base),
        color var(--transition-base),
        transform var(--transition-base);
}

.global-search-close:hover,
.global-search-close:focus-visible {
    background: var(--agr-orange);
    color: white;
    transform: rotate(4deg);
}

.global-search-form {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: 0 var(--space-lg) var(--space-md);
    padding: 0.9rem 1rem;
    border: 1px solid rgba(5, 48, 39, 0.12);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.92);
    color: var(--agr-green);
    box-shadow: 0 14px 34px rgba(5, 48, 39, 0.08);
}

.global-search-form input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 1rem;
}

.global-search-results {
    display: grid;
    gap: 0.65rem;
    max-height: min(52vh, 440px);
    overflow-y: auto;
    padding: 0 var(--space-lg) var(--space-lg);
}

.global-search-results::-webkit-scrollbar {
    width: 10px;
}

.global-search-results::-webkit-scrollbar-track {
    background: rgba(5, 48, 39, 0.06);
    border-radius: 999px;
}

.global-search-results::-webkit-scrollbar-thumb {
    background: rgba(5, 48, 39, 0.22);
    border-radius: 999px;
}

.global-search-result {
    display: grid;
    gap: 0.25rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(5, 48, 39, 0.08);
    border-radius: var(--radius-md);
    background: white;
    color: inherit;
    text-decoration: none;
    transition:
        border-color var(--transition-base),
        box-shadow var(--transition-base),
        transform var(--transition-base);
}

.global-search-result:hover,
.global-search-result:focus-visible {
    border-color: rgba(253, 89, 45, 0.42);
    box-shadow: 0 16px 36px rgba(5, 48, 39, 0.1);
    transform: translateY(-2px);
}

.global-search-result-type {
    width: fit-content;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: rgba(253, 89, 45, 0.1);
    color: var(--agr-orange);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.global-search-result-title {
    color: var(--agr-green);
    font-size: 1rem;
    font-weight: 700;
}

.global-search-result-desc,
.global-search-empty span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.55;
}

.global-search-empty {
    display: grid;
    gap: 0.25rem;
    padding: var(--space-md);
    border: 1px dashed rgba(5, 48, 39, 0.18);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.7);
}

.global-search-empty strong {
    color: var(--agr-green);
}

@media (max-width: 1100px) {
    .hamburger-menu {
        margin-left: auto;
    }

    .site-search-toggle {
        width: 42px;
        min-height: 42px;
        margin-left: var(--space-xs);
        padding: 0;
    }

    .site-search-label {
        display: none;
    }
}

@media (max-width: 520px) {
    .global-search-overlay {
        padding: 0.75rem;
    }

    .global-search-dialog {
        max-height: calc(100dvh - 1.5rem);
        border-radius: var(--radius-md);
    }

    .global-search-header,
    .global-search-results {
        padding-inline: var(--space-md);
    }

    .global-search-form {
        margin-inline: var(--space-md);
    }
}

/* --- COMPATIBILITY CTA --- */

.compatibility-cta {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    margin-top: var(--space-xl);
    padding: clamp(1.35rem, 3vw, 2.25rem);
    overflow: hidden;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 88% 18%, rgba(253, 89, 45, 0.42), transparent 30%),
        linear-gradient(135deg, var(--agr-green), #08382f);
    color: white;
    box-shadow: 0 24px 64px rgba(5, 48, 39, 0.2);
}

.compatibility-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0.14), transparent 34%),
        linear-gradient(90deg, rgba(151, 215, 0, 0.14), transparent 64%);
}

.compatibility-cta > * {
    position: relative;
    z-index: 1;
}

.compatibility-cta h3 {
    max-width: 760px;
    margin-bottom: var(--space-xs);
    color: white;
    font-size: clamp(1.45rem, 3vw, 2.15rem);
}

.compatibility-cta p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
}

.compatibility-cta .manifesto-kicker {
    margin-bottom: var(--space-xs);
    color: var(--agr-lime);
}

.compatibility-cta .btn {
    flex: 0 0 auto;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

@media (max-width: 768px) {
    .compatibility-cta {
        align-items: flex-start;
        flex-direction: column;
    }

    .compatibility-cta .btn {
        width: 100%;
    }
}

/* --- COMPATIBILITY PAGE --- */

.biocompat-hero {
    min-height: calc(76vh - var(--header-offset));
    display: flex;
    align-items: center;
    color: white;
    background:
        radial-gradient(circle at 86% 22%, rgba(253, 89, 45, 0.36), transparent 28%),
        linear-gradient(120deg, rgba(2, 31, 25, 0.94), rgba(5, 48, 39, 0.78)),
        url("../img/products/profix_campo_01.jpg");
    background-position: center;
    background-size: cover;
}

.biocompat-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: clamp(var(--space-lg), 5vw, calc(var(--space-xl) * 1.35));
    align-items: center;
}

.biocompat-hero-grid > * {
    min-width: 0;
}

.biocompat-hero h1 {
    max-width: 680px;
    color: white;
    font-size: clamp(2.8rem, 5.4vw, 5.5rem);
    line-height: 1.04;
    margin-bottom: var(--space-md);
    text-wrap: balance;
}

.biocompat-hero-copy {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1.05rem, 2vw, 1.28rem);
    line-height: 1.75;
}

.biocompat-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.biocompat-hero-panel {
    position: relative;
    padding: var(--space-lg);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 28px 80px rgba(2, 31, 25, 0.32);
    backdrop-filter: blur(14px);
}

.biocompat-hero-panel strong {
    display: block;
    margin-bottom: var(--space-xs);
    color: white;
    font-size: 1.25rem;
}

.biocompat-hero-panel p {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.7;
}

.biocompat-live-dot {
    display: inline-flex;
    width: 0.72rem;
    height: 0.72rem;
    margin-bottom: var(--space-sm);
    border-radius: 50%;
    background: var(--agr-lime);
    box-shadow: 0 0 0 8px rgba(151, 215, 0, 0.16);
}

.biocompat-status-stack {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-md);
}

.biocompat-tool-section {
    background:
        linear-gradient(135deg, rgba(5, 48, 39, 0.06), rgba(253, 89, 45, 0.05) 48%, transparent),
        var(--surface-secondary);
}

.biocompat-tool-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
    gap: var(--space-lg);
    align-items: start;
}

.biocompat-form,
.biocompat-output {
    min-width: 0;
}

.biocompat-form {
    position: sticky;
    top: calc(var(--header-offset) + var(--space-md));
    display: grid;
    gap: var(--space-md);
    padding: var(--space-lg);
    border: 1px solid rgba(5, 48, 39, 0.08);
    border-radius: var(--radius-lg);
    background: white;
    box-shadow: var(--shadow-card);
}

.biocompat-field {
    display: grid;
    gap: 0.45rem;
}

.biocompat-field label {
    color: var(--agr-green);
    font-size: 0.86rem;
    font-weight: 700;
}

.biocompat-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.biocompat-form-note {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

.biocompat-quick-results {
    display: grid;
    gap: var(--space-sm);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(5, 48, 39, 0.08);
}

.biocompat-quick-results h3 {
    margin: 0;
    color: var(--agr-green);
    font-size: 1.05rem;
}

#biocompat-all-results {
    display: grid;
    gap: 0.65rem;
}

.biocompat-result-row {
    display: flex;
    justify-content: space-between;
    gap: var(--space-sm);
    align-items: center;
    width: 100%;
    padding: 0.82rem;
    border: 1px solid rgba(5, 48, 39, 0.08);
    border-radius: var(--radius-sm);
    background: rgba(229, 234, 216, 0.28);
    color: var(--text-primary);
    font-family: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition:
        border-color var(--transition-base),
        background-color var(--transition-base),
        transform var(--transition-base);
}

.biocompat-result-row:hover,
.biocompat-result-row:focus-visible {
    border-color: rgba(253, 89, 45, 0.42);
    background: white;
    transform: translateY(-2px);
}

.biocompat-result-row strong,
.biocompat-result-row small {
    display: block;
}

.biocompat-result-row small {
    margin-top: 0.15rem;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.biocompat-mini-empty {
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    background: rgba(5, 48, 39, 0.04);
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.55;
}

.biocompat-output {
    display: grid;
}

.biocompat-empty-state,
.biocompat-result-panel {
    min-height: 520px;
    padding: var(--space-xl);
    scroll-margin-top: calc(var(--header-offset, 90px) + var(--space-md));
    border-radius: var(--radius-lg);
    background: white;
    box-shadow: var(--shadow-card);
}

.biocompat-empty-state {
    display: grid;
    place-content: center;
    justify-items: center;
    text-align: center;
    border: 1px dashed rgba(5, 48, 39, 0.16);
}

.biocompat-empty-state[hidden],
.biocompat-result-panel[hidden] {
    display: none;
}

.biocompat-empty-state h2,
.biocompat-result-panel h2 {
    color: var(--agr-green);
}

.biocompat-empty-state p {
    max-width: 520px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.biocompat-empty-icon {
    width: 72px;
    height: 72px;
    margin-bottom: var(--space-md);
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, white 0 28%, transparent 29%),
        conic-gradient(var(--agr-orange), var(--agr-lime), var(--agr-green), var(--agr-orange));
    box-shadow: 0 16px 36px rgba(5, 48, 39, 0.12);
}

.biocompat-empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.biocompat-result-panel {
    border: 1px solid rgba(5, 48, 39, 0.08);
}

.biocompat-result-panel.is-compatible {
    background:
        linear-gradient(135deg, rgba(151, 215, 0, 0.13), transparent 42%),
        white;
}

.biocompat-result-panel.is-moderate {
    background:
        linear-gradient(135deg, rgba(255, 184, 77, 0.2), transparent 42%),
        white;
}

.biocompat-result-panel.is-incompatible {
    background:
        linear-gradient(135deg, rgba(253, 89, 45, 0.16), transparent 42%),
        white;
}

.biocompat-result-topline {
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
    align-items: center;
    margin-bottom: var(--space-md);
}

.biocompat-status-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    padding: 0.34rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
}

.biocompat-status-pill.is-compatible {
    background: rgba(151, 215, 0, 0.18);
    color: #315800;
}

.biocompat-status-pill.is-moderate {
    background: rgba(255, 184, 77, 0.24);
    color: #7a4600;
}

.biocompat-status-pill.is-incompatible {
    background: rgba(253, 89, 45, 0.15);
    color: #a92e10;
}

.biocompat-result-panel > p {
    max-width: 680px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.biocompat-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-sm);
    margin: 0 0 var(--space-lg);
}

.biocompat-details-grid div {
    padding: var(--space-sm);
    border: 1px solid rgba(5, 48, 39, 0.08);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.72);
}

.biocompat-details-grid .biocompat-detail-action {
    border-color: rgba(253, 89, 45, 0.2);
    background:
        linear-gradient(135deg, rgba(253, 89, 45, 0.1), rgba(151, 215, 0, 0.08)),
        white;
}

.biocompat-details-grid dt {
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
}

.biocompat-details-grid dd {
    margin: 0.25rem 0 0;
    color: var(--text-primary);
    font-weight: 700;
}

.biocompat-detail-action a {
    color: var(--agr-orange);
    text-decoration: none;
}

.biocompat-detail-action a:hover,
.biocompat-detail-action a:focus-visible {
    color: var(--agr-green);
    text-decoration: underline;
}

.biocompat-recommendation {
    padding: var(--space-md);
    border-left: 4px solid var(--agr-orange);
    border-radius: var(--radius-sm);
    background: white;
    box-shadow: 0 12px 30px rgba(5, 48, 39, 0.08);
}

.biocompat-recommendation strong {
    color: var(--agr-green);
}

.biocompat-recommendation p {
    margin: var(--space-xs) 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

.biocompat-recommendation small {
    color: var(--text-secondary);
}

.biocompat-method-section {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(229, 234, 216, 0.46)),
        white;
}

.biocompat-method-card {
    min-height: 260px;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    background: var(--agr-green);
    color: white;
    box-shadow: var(--shadow-card);
}

.biocompat-method-card span {
    display: inline-flex;
    margin-bottom: var(--space-md);
    color: var(--agr-orange);
    font-weight: 800;
}

.biocompat-method-card h3 {
    color: white;
    margin-bottom: var(--space-sm);
}

.biocompat-method-card p {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.7;
}

@media (max-width: 899px) {
    .biocompat-hero {
        min-height: auto;
        text-align: center;
    }

    .biocompat-hero-grid,
    .biocompat-tool-grid,
    .biocompat-details-grid {
        grid-template-columns: 1fr;
    }

    .biocompat-hero-actions,
    .biocompat-status-stack,
    .biocompat-form-actions {
        justify-content: center;
    }

    .biocompat-form {
        position: static;
    }

    .biocompat-empty-state,
    .biocompat-result-panel {
        min-height: auto;
        padding: var(--space-lg);
    }
}

@media (max-width: 520px) {
    .biocompat-hero {
        align-items: flex-start;
        padding-block: 2.5rem;
    }

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

    .biocompat-hero h1 {
        max-width: 100%;
        font-size: clamp(1.95rem, 9.2vw, 2.65rem);
        line-height: 1.08;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }

    .biocompat-hero-copy {
        font-size: 0.98rem;
        line-height: 1.62;
    }

    .biocompat-hero-actions .btn {
        width: 100%;
        padding-inline: 1rem;
    }

    .biocompat-hero-panel,
    .biocompat-form,
    .biocompat-empty-state,
    .biocompat-result-panel,
    .biocompat-method-card {
        border-radius: var(--radius-md);
    }

    .biocompat-hero-panel {
        width: 100%;
        padding: var(--space-md);
        text-align: left;
    }

    .biocompat-status-stack {
        justify-content: flex-start;
    }

    .biocompat-tool-section .section-heading {
        margin-bottom: var(--space-md);
    }

    .biocompat-form {
        gap: var(--space-sm);
        padding: var(--space-md);
    }

    .biocompat-form-actions {
        gap: 0.7rem;
    }

    .biocompat-form-actions .btn {
        width: 100%;
        min-height: 48px;
        padding: 0.85rem 1rem;
    }

    .biocompat-result-row {
        align-items: flex-start;
        flex-direction: column;
        padding: 0.9rem;
    }

    .biocompat-result-row span:first-child {
        min-width: 0;
        width: 100%;
    }

    .biocompat-result-row strong,
    .biocompat-result-row small {
        overflow-wrap: anywhere;
    }

    .biocompat-result-row .biocompat-status-pill {
        align-self: flex-start;
    }

    .biocompat-empty-state,
    .biocompat-result-panel {
        padding: var(--space-md);
    }

    .biocompat-empty-icon {
        width: 58px;
        height: 58px;
    }

    .biocompat-result-topline {
        align-items: flex-start;
        flex-direction: column;
        gap: var(--space-xs);
    }

    .biocompat-status-pill {
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: left;
    }

    .biocompat-result-panel h2 {
        font-size: clamp(1.45rem, 8vw, 1.9rem);
        line-height: 1.16;
        overflow-wrap: anywhere;
    }

    .biocompat-details-grid {
        gap: 0.7rem;
    }

    .biocompat-details-grid div,
    .biocompat-recommendation {
        padding: 0.9rem;
    }

    .biocompat-details-grid dd,
    .biocompat-recommendation p,
    .biocompat-recommendation small {
        overflow-wrap: anywhere;
    }

    .biocompat-empty-actions {
        width: 100%;
    }

    .biocompat-empty-actions .btn {
        width: 100%;
    }

    .biocompat-method-card {
        min-height: auto;
        padding: var(--space-md);
    }
}

@media (max-width: 360px) {
    .biocompat-hero {
        padding-block: 2rem;
    }

    .biocompat-hero h1 {
        font-size: clamp(1.9rem, 9vw, 2.2rem);
    }

    .biocompat-hero-copy,
    .biocompat-form-note,
    .biocompat-mini-empty,
    .biocompat-result-panel > p,
    .biocompat-recommendation p,
    .biocompat-recommendation small,
    .biocompat-method-card p {
        font-size: 0.92rem;
        line-height: 1.58;
    }

    .biocompat-hero-panel,
    .biocompat-form,
    .biocompat-empty-state,
    .biocompat-result-panel,
    .biocompat-method-card {
        padding: 0.95rem;
    }

    .biocompat-status-pill {
        padding: 0.32rem 0.58rem;
        font-size: 0.68rem;
    }

    .biocompat-details-grid dt {
        font-size: 0.7rem;
    }

    .biocompat-details-grid dd {
        font-size: 0.93rem;
    }
}

/* --- CLICK TARGET HARDENING --- */

#products-grid .product-card {
    cursor: default;
}

#products-grid .card-link-overlay {
    position: relative;
    top: auto;
    left: auto;
    order: 10;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    width: fit-content;
    max-width: 100%;
    height: auto;
    margin-top: var(--space-sm);
    padding: 0.68rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--agr-green);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(2, 31, 25, 0.18);
    transition:
        background-color var(--transition-base),
        color var(--transition-base),
        box-shadow var(--transition-base),
        transform var(--transition-base);
}

#products-grid .card-link-overlay::after {
    content: "Ver produto";
}

#products-grid .card-link-overlay:hover,
#products-grid .card-link-overlay:focus-visible {
    background: var(--agr-orange);
    color: white;
    box-shadow: 0 14px 30px rgba(253, 89, 45, 0.26);
    transform: translateY(-2px);
}

#products-grid .card-link-overlay:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.92);
    outline-offset: 3px;
}

@media (max-width: 1100px) {
    .nav-menu:not(.is-active),
    .nav-menu:not(.is-active) .nav-links,
    .nav-menu:not(.is-active) .nav-links *,
    .nav-menu:not(.is-active) .nav-dropdown-menu,
    .nav-menu:not(.is-active) .nav-dropdown-menu * {
        pointer-events: none !important;
    }

    .nav-menu.is-active .nav-dropdown:not(.is-open) .nav-dropdown-menu,
    .nav-menu.is-active .nav-dropdown:not(.is-open) .nav-dropdown-menu * {
        pointer-events: none !important;
    }
}
