/* ==========================================
   Products Page V2 - New Design
   Reusing colors & typography from existing
   ========================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*:focus,
*:active,
button:focus,
button:active,
input:focus,
input:active,
select:focus,
select:active {
    outline: none !important;
    box-shadow: none !important;
}

body {
    font-family: 'NaNMetrifyAWide-Reg', Arial, sans-serif;
    background: #fff;
    color: #000;
    line-height: 1.5;
}

.container-fluid.MainDiv.productsPage {
    overflow-y: scroll;
}

.productsPage button.navbar-toggler.collapsed::after{
    content: "";
        display: block;
        width: 34px;
        height: 34px;
        background-image: url(/media/5vuhfsza/menu.svg);
        background-repeat: no-repeat;
        background-size: contain;
        border: none !important;
        margin: 0;
}

@media (min-width: 1025px) {
    .productsPage .collapse:not(.show) {
        display: none !important;
    }
    .productsPage .navbar-expand-lg .navbar-toggler.collapsed{
        background: transparent !important;
        height: auto !important;
    }
    .productsPage .ContentNav .navbar:has(.navbar-toggler.collapsed:hover) a.navbar-brand {
    display: none !important;
    }
    .productsPage .ContentNav .navbar:has(.navbar-toggler.collapsed) a.navbar-brand{
        display: none !important;
    }
    .MainDiv.productsPage .ContentNav{
        margin-top: 15px !important;
        right: 5% !important;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .productsPage button.navbar-toggler.collapsed::after{
        margin-top: -7px !important;
        margin-right: -10px !important;
    }
}
/* ==========================================
   Page container
   ========================================== */
/* Two-column layout: sidebar (fixed width) + scrollable product list */
.products-page {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    min-height: 110vh;
    width: 100%;
    padding-bottom: 50px;
}

/* ---- Left sidebar ---- */
.products-sidebar {
    width: 273px;
    flex: 0 0 273px;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    background: #fff;
    box-sizing: border-box;
}

.products-sidebar::-webkit-scrollbar { display: none; }

/* ALL PRODUCTS title dropdown wrapper */
.sidebar-title-wrap {
    position: relative;
}

.sidebar-title-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    background: #00FFAE;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'NaNMetrifyAWide-ExBld';
    font-size: 12px;
    font-weight: 800;
    color: #000;
    text-transform: uppercase;
    transition: border-radius 0.15s;
}

.sidebar-title-wrap.open .sidebar-title-btn {
    border-radius: 8px 8px 0 0;
}

.sidebar-title-btn:hover { background: #00e89d; }

.sidebar-title-chevron {
    width: 12px;
    height: 8px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.sidebar-title-wrap.open .sidebar-title-chevron {
    transform: rotate(180deg);
}

/* Dropdown panel */
.sidebar-title-dropdown {
    display: none;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.12);
    border-top: none;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.sidebar-title-wrap.open .sidebar-title-dropdown {
    display: flex;
}

/* Each option */
.title-dropdown-option {
    display: block;
    width: 100%;
    padding: 13px 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    cursor: pointer;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    font-weight: 400;
    color: #000;
    text-align: left;
    transition: background 0.15s;
}

.title-dropdown-option:last-child {
    border-bottom: none;
}

.title-dropdown-option:hover {
    background: rgba(0,255,174,0.10);
}

/* Selected / active option */
.title-dropdown-option.active {
    background: #E5FEF6;
    font-weight: 800;
}

/* Advanced Filters + Sort buttons row */
.sidebar-actions-row {
    display: flex;
    flex-direction: row;
    gap: 14px;
    margin-top: 15px;
}

.sidebar-advanced-btn {
    width: 172px;
    flex: 0 0 172px;
}

#sortByWrapper {
    width: 82px;
    flex: 0 0 82px;
    min-width: 0;
}

.sidebar-sort-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.20);
    border-radius: 100px;
    cursor: pointer;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    font-weight: 400;
    color: #000;
    white-space: nowrap;
    transition: all 0.2s;
}

.sidebar-advanced-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.20);
    border-radius: 100px;
    cursor: pointer;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    font-weight: 400;
    color: #000;
    white-space: nowrap;
    transition: all 0.2s;
}

.sidebar-advanced-btn:hover,
.sidebar-advanced-btn.active,
.sidebar-advanced-btn.has-filters {
    background: #E5FEF6;
    border-color: #E5FEF6;
}

.sidebar-advanced-btn .filter-icon img { display: block; width: 8px; height: 7px; }

/* Hidden on desktop/tablet — only appears on mobile */
#clearAllFiltersBtn { display: none; }

/* When a sort is active: wrap to next row, both go full width */
.sidebar-actions-row.has-sort {
    flex-wrap: wrap;
}

.sidebar-actions-row.has-sort .sidebar-advanced-btn,
.sidebar-actions-row.has-sort #sortByWrapper {
    width: 100%;
    flex: 1 1 100%;
}

.sidebar-actions-row.has-sort .sidebar-sort-dropdown,
.sidebar-actions-row.has-sort .sidebar-sort-dropdown .custom-dropdown-trigger {
    width: 100%;
    max-width: 100%;
}

.sidebar-sort-dropdown {
    min-width: 0;
    width: 100%;
    flex: 1 1 auto;
}

.sidebar-sort-dropdown .custom-dropdown-trigger {
    width: 100%;
    padding: 10px 12px;
    border-radius: 100px;
    border: 1px solid rgba(0,0,0,0.20);
    background: #fff;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
}

/* Primary dropdowns — full width, stacked */
.sidebar-dropdowns {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.sidebar-dropdowns .custom-dropdown {
    width: 100%;
    min-width: 0;
}

.sidebar-dropdowns .custom-dropdown-trigger {
    width: 100%;
    border-radius: 8px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.15);
    padding: 12px 14px;
    font-size: 13px;
}

/* ==========================================
   Sidebar Accordion Filters
   ========================================== */
.sidebar-accordion {
    overflow: visible;
    background: #fff;
    border-radius: 10px;
    background: #F7F8F9;
    font-family: 'NaNMetrifyAWide-ExBld';
}

button.sidebar-accordion-trigger {
    font-family: 'NaNMetrifyAWide-ExBld';
}

.sidebar-accordion-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 10px;
    width: 100%;
    padding: 14px 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    font-weight: 400;
    color: #000;
    text-align: left;
    gap: 8px;
}

.sidebar-accordion.has-value .sidebar-accordion-trigger {
    font-weight: 700;
    background: #F7F8F9;
}

.accordion-chevron {
    width: 12px;
    height: 8px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.sidebar-accordion.open .accordion-chevron {
    transform: rotate(180deg);
}

/* Content: hidden by default, expands when .open */
.sidebar-accordion-content {
    display: none !important;
    flex-direction: column;
    gap: 0;
    padding: 4px 14px 14px;
    border-radius: 0 0 8px 8px;
    background: #fff;
}

.sidebar-accordion.open .sidebar-accordion-content {
    display: flex !important;
}

/* Horizontal variant (Adverse) */
.sidebar-accordion--horizontal .sidebar-accordion-content {
    flex-direction: row;
    gap: 8px;
    flex-wrap: wrap;
}

/* Each option row */
.accordion-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    color: #000;
    position: relative;
    border-radius: 6px;
}

.sidebar-accordion.open .sidebar-accordion-trigger {
    font-weight: 800;
    border-radius: 10px 10px 0 0;
}

.sidebar-accordion--horizontal .accordion-option {
    padding: 6px 0;
}

/* Hide native checkbox */
.accordion-check {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Custom checkbox box */
.accordion-check-mark {
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(0,0,0,0.25);
    border-radius: 4px;
    background: #fff;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

/* Checked state: green fill + tick */
.accordion-check:checked + .accordion-check-mark {
    background: #00FFAE;
    border-color: #00FFAE;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5.2 4.3 8.5 11 1.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px 8px;
}

.accordion-check:checked ~ .accordion-option-text {
    font-weight: 800;
}

.accordion-option-text {
    flex: 1;
    line-height: 1.3;
}

/* Info button on option (e.g. Hybrid Properties) */
.accordion-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #00FFAE;
    border: none;
    border-radius: 3px;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 9px;
    font-weight: 700;
    font-style: italic;
    color: #000;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
    margin-left: 4px;
    position: relative;
}

.accordion-info-btn:hover {
    background: #000;
    color: #00FFAE;
}

/* Tooltip shown below on hover */
.accordion-info-btn[data-tooltip] {
    position: relative;
}

.accordion-info-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    transform: none;
    background: #fff;
    color: #000;
    padding: 10px 14px;
    border-radius: 6px;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 11px;
    font-weight: 400;
    font-style: normal;
    line-height: 1.5;
    white-space: normal;
    width: 200px;
    text-align: left;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.10);
    z-index: 9999;
    pointer-events: none;
}

/* Search box in sidebar */
.sidebar-search {
    flex: 0 0 auto;
    width: 100%;
    margin-top: 15px;
}

.sidebar-search input {
    font-size: 13px;
}

/* Chips in sidebar */
.sidebar-chips {
    flex: 0 0 auto;
}

.sidebar-chips .chips-container {
    flex-wrap: wrap;
}

/* ==========================================
   Compare Panel — sidebar (3 states)
   ========================================== */
.products-sidebar .compare-panel {
    position: relative;
    top: auto;
    border: 1px solid rgba(0,0,0,0.12);
    border-top: none;
    border-radius: 0 0 10px 10px;
    margin-top: 0;
    padding: 14px 16px;
    background: transparent !important;
    overflow: visible;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
    /* On desktop (flex column sidebar) keep compare at the bottom */
    order: 99;
}

/* Product guide slot in sidebar title row — desktop hidden, tablet visible */
.product-guide-top-slot { display: none; }

/* 1 product selected → red border all sides including top */
.products-sidebar .compare-panel.needs-more {
    border: 1.5px solid rgba(220, 53, 69, 0.65);
    border-radius: 10px;
}

/* Warning "!" icon positioned top-right */
.products-sidebar .compare-panel.needs-more::after {
    content: '!';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 22px;
    height: 22px;
    border: 1.5px solid rgba(220, 53, 69, 0.75);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    font-weight: 800;
    color: rgba(220, 53, 69, 0.85);
    line-height: 1;
    background: #fff;
}

/* 2-5 products selected → teal solid border all sides including top */
.products-sidebar .compare-panel.ready {
    border: 1.5px solid #00FFAE;
    border-radius: 10px;
}

.products-sidebar .compare-title {
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 14px;
    font-weight: 800;
    color: #000;
    margin: 0 0 8px 0;
    text-align: left;
    background: transparent;
    padding: 0;
    line-height: 1.4;
}

.products-sidebar .compare-subtitle {
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    color: #000;
    margin: 0 0 -3px 0;
    text-align: left;
    line-height: 1.5;
}

/* Warning message (needs-more state) */
.products-sidebar .compare-needs-msg {
    display: none;
    padding: 0;
    gap: 0;
}

.products-sidebar .compare-panel.needs-more .compare-needs-msg {
    display: block;
}

.products-sidebar .compare-needs-msg p {
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    color: #000;
    margin: 0 0 14px 0;
    line-height: 1.5;
}

/* Hide inline SVG warning icon (::after handles it) */
.products-sidebar .needs-warning-icon { display: none; }

/* Selected products list */
.products-sidebar .selected-products-list {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 12px 0;
    padding: 0;
    list-style: none;
}

.products-sidebar .selected-product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    background: #F7F8F9;
    border-radius: 6px;
    gap: 8px;
    border: none;
}

.products-sidebar .selected-product-item .product-code {
    flex: 1;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    font-weight: 400;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.products-sidebar .selected-product-item .remove-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    color: rgba(0,0,0,0.50);
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.products-sidebar .selected-product-item .remove-btn:hover {
    color: #000;
}

/* Action buttons row */
.products-sidebar .compare-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-direction: row;
    padding: 0;
}

.products-sidebar .btn-compare {
    border: 1px solid #00FFAE;
    background: #fff;
    border-radius: 100px;
    padding: 8px 22px;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    font-weight: 400;
    color: rgba(0,0,0,0.45);
    cursor: not-allowed;
    width: auto;
    height: auto;
    transition: all 0.2s;
}

.products-sidebar .compare-panel.ready .btn-compare,
.products-sidebar .compare-panel.needs-more .btn-compare {
    color: #000;
    cursor: pointer;
}

.products-sidebar .compare-panel.ready .btn-compare:hover:not(:disabled) {
    background: #000C91;
    color: #fff;
    border-color: #000C91;
}

.products-sidebar .btn-download {
    background: transparent;
    border: none;
    padding: 0;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    font-weight: 400;
    color: #000;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: auto;
    border-radius: 0;
    flex-direction: row;
}

.products-sidebar .btn-download:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.products-sidebar .btn-download img {
    width: 12px;
    height: 12px;
    display: block;
}

/* ---- Main content (right) ---- */
.products-main {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ==========================================
   Main Chips Bar (active filters display)
   ========================================== */
.main-chips-bar {
    display: none;               /* hidden until filters are active */
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 4px;
}

.main-chips-bar.visible {
    display: flex;
}

/* chips-row-content: takes remaining width, wraps for overflow panel */
.main-chips-bar .chips-row-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    overflow: visible;
    position: relative;
}

/* Main chips row — no wrap so overflow goes to the panel */
.main-chips-bar .chips-container {
    flex-wrap: nowrap;
    overflow: hidden;
    flex: 0 1 auto;
}

/* Each chip */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #F7F8F9;
    border: 1px solid rgba(0,0,0,0.18);
    border-radius: 100px;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    font-weight: 400;
    color: #000;
    white-space: nowrap;
    cursor: default;
}

.filter-chip-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    color: #000;
    display: flex;
    align-items: center;
    opacity: 0.55;
    transition: opacity 0.2s;
}

.filter-chip-remove:hover { opacity: 1; }
.filter-chip-remove img { width: 10px; height: 10px; display: block; }

/* "More..." / "Close" toggle button */
.chips-more-btn {
    display: none;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid rgba(0,0,0,0.18);
    border-radius: 100px;
    background: #fff;
    cursor: pointer;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    font-weight: 600;
    color: #000;
    white-space: nowrap;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    background-image: none !important;
}

.chips-more-btn::before,
.chips-more-btn::after { content: none !important; }

.chips-more-btn.visible { display: flex; }

/* Overflow panel: full-width second row below the chips row */
.chips-overflow-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 10px 14px;
    gap: 8px;
    flex-wrap: wrap;
    box-shadow: 0 6px 18px rgba(0,0,0,0.10);
    z-index: 300;
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
    overflow: visible;
}

.chips-overflow-panel.active { display: flex; }

/* "Clear all ↺" button in chips bar */
.main-chips-clear {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #E5FEF6;
    border: none;
    border-radius: 100px;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    font-weight: 400;
    color: #000;
    cursor: pointer;
    text-decoration: none;
    padding: 6px 14px;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
}

.main-chips-clear:hover { opacity: 0.7; }

/* ==========================================
   Mobile Filters Full-Screen Overlay
   ========================================== */

/* Hidden everywhere by default — only shown on mobile via .active */
.mobile-filters-overlay { display: none; }

@media (max-width: 767px) {
    .mobile-filters-overlay.active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        width: 100%; height: 100%;
        background: #fff;
        z-index: 6000;
        overflow: hidden;
    }

    .mobile-filters-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px 20px 16px;
        border-bottom: 1px solid rgba(0,0,0,0.10);
        flex-shrink: 0;
    }

    .mobile-filters-title {
        font-family: 'NaNMetrifyAWide-Reg';
        font-size: 16px;
        font-weight: 800;
        color: #000;
        letter-spacing: 0.03em;
    }

    .mobile-filters-close {
        background: none;
        border: none;
        padding: 6px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
    }

    .mobile-filters-body {
        flex: 1;
        min-height: 0;        /* required: lets flex child shrink below content height */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Override mobile hide rule — visible when inside overlay */
    #mobileFiltersBody #filterDropdowns {
        display: flex !important;
        flex-direction: column;
        gap: 0 !important;   /* override base gap: 8px */
        padding: 0;
        margin: 0;
    }

    /* Sidebar dropdowns wrapper: zero gap so dividers carry the visual separation */
    #mobileFiltersBody .sidebar-dropdowns {
        gap: 0 !important;
        padding: 0;
        margin: 0;
    }

    /* Each accordion row: only a bottom divider, no radius, no side borders */
    #mobileFiltersBody .sidebar-accordion {
        border: none !important;
        border-bottom: 1px solid rgba(0,0,0,0.12) !important;
        border-radius: 0 !important;
        overflow: visible;
        margin: 0;
    }

    /* Trigger: consistent row height, 20px side padding, 14px font */
    #mobileFiltersBody .sidebar-accordion-trigger {
        padding: 16px 20px;
        font-size: 12px;
        font-weight: 400;
        min-height: 52px;
    }

    /* Remove tinted background when a filter has a selected value */
    #mobileFiltersBody .sidebar-accordion.has-value .sidebar-accordion-trigger {
        background: transparent;
    }

    /* Content area: strip the inner top border + radius from base CSS */
    #mobileFiltersBody .sidebar-accordion-content {
        border-top: none !important;
        border-radius: 0 !important;
        padding: 4px 20px 16px;
    }

    /* AFP sections: same divider style as sidebar accordions */
    #mobileFiltersBody .afp-content {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;      /* base has padding: 16px 20px — strips the indent */
        gap: 0 !important;          /* base has gap: 22px — zero so dividers handle separation */
        overflow: visible !important;
        margin: 0;
        flex: none !important;
    }

    #mobileFiltersBody .afp-section {
        border: none !important;
        border-bottom: 1px solid rgba(0,0,0,0.12) !important;
        overflow: visible;
        margin: 0;
        padding-bottom: 0 !important;   /* base has padding-bottom: 22px */
        gap: 0 !important;              /* base has gap: 10px between label + options */
    }

    /* AFP label: identical row style to sidebar trigger */
    #mobileFiltersBody .afp-section-label {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        min-height: 52px;
        cursor: pointer;
        font-family: 'NaNMetrifyAWide-Reg';
        font-size: 12px;
        font-weight: 400;
        color: #000;
        user-select: none;
        width: 100%;
        box-sizing: border-box;
    }

    /* Chevron: matches the accordion-chevron SVG visual — down-pointing caret */
    #mobileFiltersBody .afp-section-label::after {
        content: '';
        display: block;
        width: 9px;
        height: 9px;
        border-right: 1.5px solid #000;
        border-bottom: 1.5px solid #000;
        transform: rotate(45deg) translateY(-2px);
        transition: transform 0.2s;
        flex-shrink: 0;
    }

    #mobileFiltersBody .afp-section.mobile-open .afp-section-label::after {
        transform: rotate(225deg) translateY(2px);
    }

    /* Options expand area */
    #mobileFiltersBody .afp-options {
        display: none;
        flex-wrap: wrap;
        gap: 8px;
        padding: 0 20px 16px;
    }

    #mobileFiltersBody .afp-section.mobile-open .afp-options {
        display: flex;
    }

    .mobile-filters-footer {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 16px 20px;
        border-top: 1px solid rgba(0,0,0,0.10);
        flex-shrink: 0;
        margin-bottom: 15px;
    }

    .mobile-filters-clear-btn {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        background: #F7F8F9;
        border: none;
        border-radius: 100px;
        padding: 10px 20px;
        font-family: 'NaNMetrifyAWide-Reg';
        font-size: 15px;
        font-weight: 400;
        color: rgba(0,0,0,0.30);
        cursor: default;
        text-align: center;
        white-space: nowrap;
    }

    .mobile-filters-clear-btn:not(:disabled) {
        color: #000;
        cursor: pointer;
    }

    .mf-clear-icon { font-size: 15px; }

    .mobile-filters-apply-btn {
        flex: 1;
        background: #00FFAE;
        border: none;
        border-radius: 100px;
        padding: 10px 13px;
        font-family: 'NaNMetrifyAWide-Reg';
        font-size: 15px;
        font-weight: 400;
        color: #000;
        cursor: pointer;
        text-align: center;
    }
}

/* Advanced Filters Panel — left-side drawer overlay */
.advanced-filters-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 354px;
    background: #fff;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    will-change: transform;
    backface-visibility: hidden;
}

.advanced-filters-panel.active {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}

/* Dim backdrop behind the panel */
body.afp-open::after {
    content: '';
    position: fixed;
    top: 0;
    left: 354px;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1100;
    pointer-events: all;
}

/* Panel header */
.afp-header {
    padding: 28px 20px 20px;
    border-bottom: none;
    flex-shrink: 0;
}

.afp-title {
    font-family: 'NaNMetrifyAWide-ExBld';
    font-size: 20px;
    font-weight: 800;
    color: #000;
    margin: 50px 0 0;
    text-transform: uppercase;
}

/* Scrollable content */
.afp-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.20) transparent;
}

.afp-content::-webkit-scrollbar { width: 4px; }
.afp-content::-webkit-scrollbar-track { background: transparent; }
.afp-content::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.20); border-radius: 4px; }

/* Filter section */
.afp-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}


.afp-section-label {
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    font-weight: 400;
    color: #000;
    line-height: normal;
}

/* Checkbox-style options */
.afp-options--checkbox {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.afp-check-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    color: #000;
    position: relative;
}

.afp-check {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.afp-check-mark {
    width: 15px;
    height: 15px;
    border: 1.5px solid rgba(0,0,0,0.25);
    border-radius: 4px;
    background: #fff;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.afp-check:checked + .afp-check-mark,
.afp-check.active + .afp-check-mark {
    background: #00FFAE;
    border-color: #00FFAE;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5.2 4.3 8.5 11 1.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px 8px;
}

.afp-check:checked ~ .afp-option-text,
.afp-check.active ~ .afp-option-text {
    font-weight: 800;
}

.afp-option-text {
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    line-height: 1.3;
}

/* Pill-style options */
.afp-options--pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.afp-pill {
    padding: 8px 16px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 6px;
    background: #fff;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    font-weight: 400;
    color: #000;
    cursor: pointer;
    transition: all 0.15s;
    min-width: 40px;
    text-align: center;
}

.afp-pill.active {
    background: #00FFAE;
    border-color: #00FFAE;
    font-weight: 700;
}

.afp-pill:hover:not(.active) {
    border-color: #00FFAE;
    background: rgba(0,255,174,0.12);
}

/* Fixed 31×31px square pills — Initial Term, Fee, Rooms */
#afpTermOptions .filter-option-btn,
#afpFeeOptions .filter-option-btn,
#afpRoomsOptions .filter-option-btn {
    width: 31px !important;
    height: 31px !important;
    min-width: 0 !important;
    padding: 0 !important;
    font-size: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}

/* Auto-width pills — Extra (accommodates any future label length) */
#afpExtraOptions .filter-option-btn {
    width: auto !important;
    height: 31px !important;
    padding: 0 16px !important;
    font-size: 12px !important;
}

/* Panel footer: Clear all + Apply filters — always visible, never scrolls */
.afp-footer {
    flex-shrink: 0;
    padding: 16px 20px;
    border-top: 1px solid rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff;
}

.afp-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #F7F8F9;
    border: none;
    border-radius: 100px;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 15px;
    font-weight: 400;
    color: #000;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 10px 23px;
    white-space: nowrap;
}

.afp-clear-btn:hover { opacity: 0.7; }

.afp-apply-btn {
    background: #00FFAE;
    border: none;
    border-radius: 100px;
    padding: 12px 28px;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 13px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.afp-apply-btn:hover { background: #00e89d; }

/* ==========================================
   Sort By Panel — left-side drawer (same pattern as AFP)
   ========================================== */
.sort-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 354px;
    background: #fff;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    will-change: transform;
    backface-visibility: hidden;
}

.sort-panel.active {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}

/* Backdrop behind sort panel */
body.sort-open::after {
    content: '';
    position: fixed;
    top: 0;
    left: 354px;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1100;
    pointer-events: all;
}

.sort-panel-header {
    padding: 50px 20px 20px;
    border-bottom: none;
    flex-shrink: 0;
}

.sort-panel-title {
    font-family: 'NaNMetrifyAWide-ExBld';
    font-size: 20px;
    font-weight: 800;
    color: #000;
    margin: 50px 0 0;
    text-transform: uppercase;
}

/* Scrollable options */
.sort-panel-content {
    flex: 1 1 auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scrollbar-width: none;
}

.sort-panel-content::-webkit-scrollbar { display: none; }

/* Each sort option row */
.sort-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    cursor: pointer;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 13px;
    color: #000;
    position: relative;
}


.sort-option:hover { background: rgba(0,255,174,0.06); }

/* Hide native radio */
.sort-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Custom radio mark */
.sort-radio-mark {
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(0,0,0,0.30);
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

/* Selected state: filled dark circle with dot */
.sort-radio:checked + .sort-radio-mark {
    border-color: #000;
    background: #fff;
    background-image: radial-gradient(circle, #000 50%, transparent 42%);
}

.sort-option-text {
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    line-height: normal;
}

.sidebar-title-wrap.open .sidebar-title-btn {
    background: white;
    border: 1px solid #dfdfdf;
}

/* Footer: View Products button */
.sort-panel-footer {
    flex-shrink: 0;
    padding: 16px 20px;
    border-top: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sort-apply-btn {
    background: #00FFAE;
    border: none;
    border-radius: 100px;
    padding: 10px 20px;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 15px;
    font-weight: 400;
    color: #000;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
    margin-top: 15px;
}

.sort-apply-btn:hover { background: #00e89d; }

/* IMPORTANT:
   `.main-content` is a very generic class name and can be overridden by your
   global site CSS (style2/style3) which are loaded AFTER this file.
   Force the products page data section to respect the `.products-page` width.
*/
.products-page .main-content {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

/* Prevent CSS grid/flex children from forcing horizontal overflow */
.products-page .main-content,
.products-page .products-container,
.products-page .products-list {
    min-width: 0;
}

/* Optional: on mid-size desktop widths, slightly inset the whole page so it
   "fits" better visually. Adjust percentages as needed. */
@media (min-width: 1025px) and (max-width: 1199px) {
    .products-page {
        width: 100%;
        max-height: calc(100vh - 170px);
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    }
}

@media (min-width: 1200px) and (max-width: 1249px) {
    .products-page {
        width: 96%;
    }
}

@media (min-width: 1250px) and (max-width: 1349px) {
    .products-page {
        width: 98%;
    }
}

@media (min-width: 1400px) and (max-width: 1499px) {
    .products-page {
        width: 97%;
    }
}
/* ==========================================
   Loading state + No results (ported from original ProductsList)
   Used by productsList-v3.html
   ========================================== */
.loading-state {
    display: none;
    position: relative;
    width: 100%;
    min-height: 320px;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.loading-state.active {
    display: flex;
}

.loading-content {
    text-align: center;
    max-width: 420px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #00FFAE;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
}

.loading-state p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.no-results {
    display: none;
    width: 100%;
    padding: 40px 16px;
}

.no-results-content {
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}

.no-results-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-results-icon img {
    width: 56px;
    height: 56px;
}

.no-results h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 800;
}

.no-results p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.no-results-retry {
    margin-top: 16px;
    border: none;
    border-radius: 999px;
    background: #00FFAE;
    color: #000;
    padding: 12px 22px;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* On small screens show loader and no-results as full-screen overlays (like original) */
@media (max-width: 1024px) {
    .loading-state.active {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        z-index: 1500;
        min-height: 0;
    }

    .no-results {
        padding: 30px 16px;
    }
}

/* Mobile-only UI elements are hidden by default */
.mobile-card-actions,
.carousel-nav {
    display: none;
}

/* Wrapper for mobile filters button + reset; acts as if it isn't there on desktop */
.mobile-filters-actions {
    display: contents;
}

/* ==========================================
   Header
   ========================================== */
.products-header {
    padding: 30px 40px 20px;
    background: #fff;
    /* V3: allow full-width layout (was constrained to 1600px) */
    max-width: none;
    width: 100%;
    margin: 0;
}

.products-title {
    /* Products title (requested) */
    color: #000C91;
    font-family: "NaN Metrify Heroic Gigawide", 'NaNMetrifyAGigawide-BlckIt', Arial, sans-serif;
    font-size: 24px;
    font-style: italic;
    font-weight: 900;
    line-height: normal;
    text-transform: uppercase;
    margin: 0;
}

/* Top slot for tablet Product guide CTA (button is moved here via JS) */
.product-guide-top-slot {
    display: none;
}

.product-guide-bottom-slot {
    display: block;
}

/* ==========================================
   Filter Bar
   ========================================== */
.filter-bar {
    background: #fff;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    position: relative;
}

/* Row 1: wraps so title sits on its own line by default */
.filter-row-1 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 20px;
}

/* Spacing tweaks (desktop):
   - Search -> first dropdown gap should be 28px
   - Advanced filters -> Sort by gap should be 7px
   We keep the global row gap at 12px and adjust with targeted margins. */
#filterRow1 #searchBox {
    /* 12px (row gap) + 16px (this margin) = 28px total */
    margin-right: 16px;
}

/* When search is moved into row-2 (active filter state), remove the extra margin */
#filterRow2 #searchBox {
    margin-right: 0;
}

/* Reduce the effective gap between Advanced filters (inside #filterDropdowns)
   and the Sort by dropdown (#sortByWrapper) from 12px to 7px. */
#filterRow1 #sortByWrapper {
    margin-left: -5px;
}

/* When Sort by is moved into row-2 (active filter state), don't apply negative margin */
#filterRow2 #sortByWrapper {
    margin-left: 0;
}

/* Default: title full-width → search+dropdowns+sort wrap to next line */
.products-title-wrap {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
}

/* Active: title shrinks to 280px → sits inline with dropdowns */
.filter-bar.has-active .products-title-wrap {
    /* Keep in sync with sidebar/search width */
    flex: 0 0 265px;
}

/* Row 2: hidden by default, shown when active */
.filter-row-2 {
    display: none;
    align-items: center;
    gap: 8px;
    padding-bottom: 20px;

    /* Prevent long chip labels from widening the page */
    width: 100%;
    min-width: 0;
    /* Allow the More... overflow popup shadow to render outside the row */
    overflow-x: visible;
    overflow-y: visible;
}

.filter-bar.has-active .filter-row-2 {
    display: flex;
}

/* Dropdowns group (product, property, LTV, advanced) */
.filter-dropdowns {
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 1;
    /* Keep static so the Advanced Filters panel can be positioned relative to .filter-bar
       (full width), rather than being constrained to this row width. */
    position: static;
}

/* Search box width = sidebar width so filter bar aligns with main content grid */
.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    /* 15px vertical | 38px horizontal (icon left, × right) */
    padding: 15px 38px 15px 38px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 100px;
    background: #fff;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 15px;
    transition: border-color 0.2s;
}

/* Clear search (X) button inside input */
.search-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.55);
    font-size: 16px;
    line-height: 1;
}

.search-clear-btn img {
    width: 10px;
    height: 10px;
    display: block;
}

.search-clear-btn:hover {
    color: rgba(0, 0, 0, 0.85);
}

/* Show × when there's a value OR the input is focused */
.search-box.has-value .search-clear-btn,
.search-box:focus-within .search-clear-btn {
    display: flex;
}

.search-box input::placeholder {
    color: rgba(0, 0, 0, 0.45);
}

/* Focus state: teal border */
.search-box input:focus {
    border-color: #00FFAE;
    outline: none;
}

/* Error state: red border */
.search-box.has-error input {
    border-color: rgba(220, 53, 69, 0.80);
}

.search-box.has-error input:focus {
    border-color: rgba(220, 53, 69, 0.80);
}

/* Error message below input */
.search-error-msg {
    display: none;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    padding-left: 4px;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    color: rgba(220, 53, 69, 0.90);
    line-height: 1.4;
}

.search-box.has-error .search-error-msg {
    display: flex;
}

/* Error icon ⓘ */
.search-error-msg::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 1.5px solid rgba(220, 53, 69, 0.85);
    border-radius: 50%;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ctext x='7' y='11' text-anchor='middle' font-size='10' font-family='Arial' fill='%23dc3545'%3E!%3C/text%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
}

.search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* Use SVG asset for the search icon (ProductsList V3) */
.search-box .search-icon img {
    display: block;
}

/* Download icons (Compare panel + Product guide) */
.btn-download img,
.btn-product-guide .download-icon img {
    display: block;
}

.filter-group {
    display: flex;
    gap: 12px;
    flex: 1;
    align-items: center;
}

.filter-select,
.sort-select {
    display: none;
}

/* ==========================================
   Custom Dropdown
   ========================================== */
.custom-dropdown {
    position: relative;
    min-width: 150px;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    user-select: none;
}

.custom-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 15px;
    border: none;
    border-radius: 0;
    background: #F2F2F2;
    color: #000;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    min-width: 0; /* allow inner label to ellipsis */
}

/* Ellipsis for long selected labels so width doesn't grow */
.custom-dropdown-trigger .dropdown-label {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-dropdown-trigger:hover {
    background: #E8E8E8;
}

.custom-dropdown.open .custom-dropdown-trigger {
    background: #F2F2F2;
}

.custom-dropdown-trigger .chevron {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.custom-dropdown.open .chevron {
    transform: rotate(180deg);
}

.custom-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: none;
    border-radius: 0;
    z-index: 200;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0,0,0,0.10);
}

.custom-dropdown.open .custom-dropdown-menu {
    display: block;
}

.custom-dropdown-option {
    padding: 11px 15px;
    cursor: pointer;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    color: #000;
    transition: background 0.15s;
    font-weight: 400;
}

/* Placeholder/disabled option (the first option which mirrors the dropdown label)
   Should not be selectable. */
.custom-dropdown-option.disabled,
.custom-dropdown-option[aria-disabled="true"] {
    color: rgba(0, 0, 0, 0.45);
    cursor: not-allowed;
    background: transparent;
}

.custom-dropdown-option.disabled:hover,
.custom-dropdown-option[aria-disabled="true"]:hover {
    background: transparent;
}

.custom-dropdown-option:hover {
    background: rgba(0, 255, 174, 0.18);
}

.custom-dropdown-option.selected {
    background: rgba(0, 255, 174, 0.18);
    font-weight: 700;
}

/* Dropdown with selected value */
.custom-dropdown.has-value .custom-dropdown-trigger {
    background: #f5fef6;
    font-weight: 700;
}

/* Sort by dropdown — always transparent background */
#sortByDropdown .custom-dropdown-trigger,
#sortByDropdown.has-value .custom-dropdown-trigger,
#sortByDropdown.open .custom-dropdown-trigger {
    background: transparent;
}

#sortByDropdown .custom-dropdown-trigger:hover {
    background: rgba(0,0,0,0.05);
}

.advanced-filters-btn {
    padding: 10px 20px;
    border: 1px solid #00FFAE;
    border-radius: 8px;
    background: transparent;
    color: #000;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.advanced-filters-btn .filter-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.advanced-filters-btn .filter-icon img {
    display: block;
}

/* Button labels: default to desktop copy */
.filters-label-mobile {
    display: none;
}

.advanced-filters-btn:hover {
    background: #00FFAE;
}

.advanced-filters-btn.active {
    background: #00FFAE;
}

/* ==========================================
   Active Filters Bar
   ========================================== */
.active-filters-bar {
    display: none;
    padding: 10px 40px;
    background: #fff;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    /* V3: allow full-width layout (was constrained to 1600px) */
    max-width: none;
    width: 100%;
    margin: 0;
}

.active-filters-bar.visible {
    display: flex;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11.4px 12px;
    background: #F7F8F9;
    border: 0px solid rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    font-weight: 400;
    color: #000;
    cursor: default;
    white-space: nowrap;
    min-height: 42px;
}

.filter-chip-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    color: #000;
    display: flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.filter-chip-remove img {
    width: 12px;
    height: 12px;
    display: block;
}

.filter-chip-remove:hover {
    opacity: 1;
}

.filter-chips-more {
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 11px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 100px;
    border: 1px solid rgba(0,0,0,0.2);
    background: transparent;
    transition: all 0.2s;
}

.filter-chips-more:hover {
    background: #f5f5f5;
}

/* Reset filters: hidden by default, shown via JS class */
.reset-filters-btn {
    margin-left: auto;
    display: none;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 11px;
    font-weight: 600;
    color: #000;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.reset-filters-btn img {
    display: block;
}

.filter-bar.has-active .reset-filters-btn {
    display: flex;
}

.reset-filters-btn:hover {
    background: #f5f5f5;
}

/* Chips container — content-sized (not flex:1) so More… appears right after last chip */
.chips-container {
    display: flex;
    gap: 8px;
    flex: 0 1 auto;   /* shrinks if needed but does NOT grow to fill space */
    align-items: center;
    flex-wrap: nowrap;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

/* chips-row-content: flex:1 area containing chips + more btn.
   Position relative so overflow panel anchors to its full width. */
.chips-row-content {
    position: relative;
    flex: 1;
    display: flex;
    gap: 8px;
    align-items: center;
    min-width: 0;
    /* Allow the overflow popup + its shadow to render outside this container */
    max-width: 100%;
    overflow: visible;
}

.chips-more-btn {
    display: none;
    align-items: center;
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    background: #f7f8f9;
    cursor: pointer;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 11px;
    font-weight: 600;
    color: #000;
    white-space: nowrap;
    flex-shrink: 0;

    /* Neutralise any global button “arrow” styling */
    appearance: none;
    -webkit-appearance: none;

    background-image: none !important;
}

.chips-more-btn::before,
.chips-more-btn::after {
    content: none !important;
}

.chips-more-btn.visible {
    display: block;
    min-height: 42px;
    width: 89px;
}

/* Overflow chips panel — sits flush below the chips row (attached feel),
   light shadow on sides + bottom only, no gap, no border */
.chips-overflow-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    /* Full-width overlay aligned to the start of the chip row (like screenshot) */
    left: 0;
    right: 0;
    background: #fff;
    /* Light border on left/right/bottom only (design) */
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 12px 14px;
    gap: 8px;
    flex-wrap: wrap;
    /* very light shadow — chips row sits above so top shadow is naturally hidden */
    box-shadow: 0 10px 22px rgba(0,0,0,0.10);
    z-index: 300;

    /* Full-width sizing */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;

    /* Hard override: ensure no scrollbars / arrows appear */
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.chips-overflow-panel.active {
    display: flex;
}

/* Advanced Filters Panel — legacy block removed; drawer rules are at line 811 */

.advanced-filters-content {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Body: main sections + sidebar in a side-by-side grid */
.advanced-filters-body {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: stretch;
}

/* Left area: all filter sections stacked */
.advanced-filters-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* Row 1: LOAN + SECURITY + EXTRA side by side */
.advanced-filters-row1 {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 16px;
    align-items: start;
}

/* LOAN section no longer needs full-width override */
.filter-section-container.loan-section {
    width: auto;
}

/* PRODUCT section spans full width of the main area */
.filter-section-container.product-section {
    width: 100%;
}

/* Right sidebar: fills full height of the body grid row */
.advanced-filters-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    min-width: 160px;
    background: #F7F8F9;
    border-radius: 12px;
    padding: 20px 16px;
    align-self: stretch;
    justify-content: flex-start;
}

/* Legacy row2 selector kept in case referenced elsewhere */
.advanced-filters-row2 {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 16px;
}

.filter-section-container {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px 24px;
}

.section-title {
    font-family: 'NaNMetrifyAWide-ExBld', Arial, sans-serif;
    font-size: 13px;
    font-weight: 800;
    font-style: italic;
    letter-spacing: 1px;
    margin: 0 0 16px 0;
    color: #000;
    text-transform: uppercase;
}

/* LOAN section - subsections side by side */
.loan-section .filter-subsections {
    display: flex;
    flex-direction: row;
    gap: 0;
}

.loan-section .filter-subsection {
    flex: 1;
    padding: 0 24px;
    border-right: 1px solid #E5E7EB;
}

.loan-section .filter-subsection:first-child {
    padding-left: 0;
}

.loan-section .filter-subsection:last-child {
    border-right: none;
}

.filter-subsections {
    display: flex;
    flex-direction: row;
    gap: 0;
}

.filter-subsection {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    padding: 0 20px;
    border-right: 1px solid #E5E7EB;
}

.filter-subsection:first-child {
    padding-left: 0;
}

.filter-subsection:last-child {
    border-right: none;
    padding-right: 0;
}

.subsection-label {
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 11px;
    color: #000;
    font-weight: 600;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-option-btn {
    padding: 7px 14px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    background: #fff;
    color: #000;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 44px;
    text-align: center;
}

.filter-option-btn:hover {
    background: #00FFAE;
    border-color: #00FFAE;
}

.filter-option-btn.active {
    background: #00FFAE;
    border-color: #00FFAE;
    font-weight: 800;
}

/* Apply filters CTA — now inside .advanced-filters-sidebar */
.advanced-filters-actions {
    display: none; /* legacy wrapper no longer used */
}

.apply-filters-btn {
    border: 1px solid rgba(0, 0, 0, 0.35);
    background: #fff;
    color: #000;
    border-radius: 999px;
    padding: 12px 24px;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    white-space: nowrap;
}

.apply-filters-btn:hover {
    background: rgba(0, 255, 174, 0.18);
    border-color: #00FFAE;
}

/* Reset filters button inside the panel sidebar */
.reset-filters-panel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: #000;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    padding: 4px 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s;
    width: 100%;
    white-space: nowrap;
}

.reset-filters-panel-btn:hover {
    opacity: 0.7;
}

.filter-bar {
    position: relative;
}

.sort-select {
    margin-left: auto;
    min-width: 180px;
}

/* ==========================================
   Main Content Layout (legacy — replaced by .products-main)
   ========================================== */
.main-content {
    display: contents; /* dissolves so children flow into .products-page flex */
}

.left-sidebar {
    display: none; /* replaced by .products-sidebar */
}

/* Desktop sizing for primary dropdowns + Advanced filters
   Requirement:
   - Big screens: fixed 200px and all equal widths
   - Smaller desktop screens: shrink equally (still equal), but never exceed 200px
*/
@media (min-width: 1500px) {
    /* Sort by: auto width but capped at 149px */
    #filterRow1 #sortByWrapper,
    #filterRow1 #sortByDropdown {
        width: auto;
        min-width: 0;
        max-width: 149px;
    }

    /* Override base `.custom-dropdown { min-width: 150px; }` for Sort by */
    #filterRow1 #sortByDropdown {
        min-width: 0;
    }
}

@media (min-width: 1200px) and (max-width: 1499px) {
    /* Sort by: auto width but capped at 149px */
    #filterRow1 #sortByWrapper,
    #filterRow1 #sortByDropdown {
        width: auto;
        min-width: 0;
        max-width: 149px;
    }

    /* Override base `.custom-dropdown { min-width: 150px; }` for Sort by */
    #filterRow1 #sortByDropdown {
        min-width: 0;
    }
}

/* Left sidebar: search + compare panel stacked */
.left-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: sticky;
    top: 20px;
    height: fit-content;
}

/* ==========================================
   Compare Panel (Left Sidebar)
   ========================================== */

/* Sidebar wrapper holds search + compare panel */
.sidebar-search {
    position: relative;
    margin-bottom: 16px;
}

.sidebar-search input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 100px;
    background: #fff;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    transition: border-color 0.2s;
}

.sidebar-search input::placeholder {
    color: rgba(0, 0, 0, 0.45);
}

.sidebar-search input:focus {
    border-color: #00FFAE;
}

.sidebar-search .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(0, 0, 0, 0.4);
    pointer-events: none;
    font-size: 14px;
}

.compare-panel {
    background: #F4F4F4;       /* entire panel grey by default */
    border: none;
    border-radius: 16px;
    padding: 0;
    height: fit-content;
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;          /* clips sections to border-radius */
}

/* Grey header block for the title only */
.compare-title {
    margin: 0;
    text-align: center;
    line-height: 1.3;
    background: #F4F4F4;
    padding: 24px 24px 20px;   /* same padding as the old panel */
}

/* Compare panel title typography ("COMPARE" + "PRODUCTS" different styles) */
.compare-title .compare-word {
    color: #000;
    text-align: center;
    font-family: "NaNMetrifyHeroic-GigaBkIt";
    font-size: 16px;
    font-style: italic;
    font-weight: 900;
    line-height: 20px; /* 125% */
    letter-spacing: -0.32px;
}

.compare-title .compare-break {
    color: #000;
    font-family: "NaNMetrifyAWide-Reg";
    font-size: 15px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: -0.3px;
    text-transform: uppercase;
}

/* Force the second word onto a new line by default (desktop),
   then on tablet we’ll make it inline (see media query). */
.compare-title .compare-break {
    display: block;
}

/* Body below title: grey by default, turns white when needs-more */
.compare-panel-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: transparent;
}

.compare-panel.needs-more .compare-panel-body {
    background: transparent;
}

.compare-subtitle {
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 15px;
    color: #000;
    margin-top: 40px;
    margin-bottom: 40px;
    line-height: 1.7;
    text-align: center;
}

.selected-products-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selected-product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #F3F4F6;
    border-radius: 8px;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 11px;
    color: #000;
}

.selected-product-item .product-code {
    font-family: 'NaNMetrifyAWide-ExBld';
    font-weight: 800;
}

.selected-product-item .remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.2s;
}

.selected-product-item .remove-btn:hover {
    color: #000;
}

/* 1 product selected — red border */
.compare-panel.needs-more {
    border: 1.5px solid rgba(220, 53, 69, 0.55);
}

/* 2+ products selected — green border + white body */
.compare-panel.ready {
    border: 1.5px solid #00FFAE;
}

.compare-panel.ready .compare-panel-body {
    background: #fff;
}

.compare-needs-msg {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 20px 0;
}

.compare-panel.needs-more .compare-needs-msg {
    display: flex;
}

.needs-warning-icon {
    /* The SVG provided already contains the red circle, so we don't add one here */
    width: auto;
    height: auto;
    border-radius: 0;
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.needs-warning-icon img {
    width: 28px;
    height: 28px;
    display: block;
}

.compare-needs-msg p {
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 15px;
    line-height: 1.7;
    color: #000;
}

.compare-needs-msg strong {
    font-family: 'NaNMetrifyAWide-ExBld';
    font-weight: 800;
}

.compare-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-compare,
.btn-download {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 100px;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-compare {
    background: #00FFAE;
    color: #000;
    /* Requested: Compare CTA text weight should be 400 */
    font-weight: 400;
}

.btn-compare:hover:not(:disabled) {
    background: #000C91;
    color: #fff;
    /* Keep weight consistent on hover */
    font-weight: 400;
}

.btn-compare:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-download {
    background: transparent;
    color: #000;
    border: none;
    padding: 8px 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: 15px;
    /* Requested: default weight 400 */
    font-weight: 400;
    width: auto;
    border-radius: 0;

    /* Ensure: label on the left, icon on the right (left compare box CTA) */
    flex-direction: row;
}

.btn-download:hover:not(:disabled) {
    /* Requested: hover weight 600 + keep color solid black */
    font-weight: 600;
    color: #000;
    background: transparent;
    opacity: 1;
}

/* Extra safety: prevent global <button> / <a> hover styles from tinting the Download CTA */
.btn-download:hover:not(:disabled) span,
.btn-download:hover:not(:disabled) img {
    opacity: 1;
}

.btn-download:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: none;
}

/* Download row: count beside download button */
.download-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.download-row .product-count {
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    color: #000;
    white-space: nowrap;
    flex-shrink: 0;
}

.download-row .product-count strong {
    font-family: 'NaNMetrifyAWide-ExBld';
    font-weight: 800;
}

/* ==========================================
   Products Container
   ========================================== */
.products-container {
    display: flex;
    flex-direction: column;
    /* Gap between sections (list, bottom actions/Product guide CTA, etc.) */
    gap: 12px;
}

.products-list {
    display: flex;
    flex-direction: column;
    /* Gap between each product row */
    gap: 10px;
}

/* Each product item wrapper */
.product-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.product-item.pagination-hidden {
    display: none !important;
}

/* ==========================================
   Product Card
   ========================================== */
.product-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.20);
    border-radius: 10px;
    height: auto;
    padding: 0;
    transition: background 0.2s;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch;
    gap: 0;
    flex-wrap: nowrap !important;
    overflow: hidden;
}

.product-card.pagination-hidden {
    display: none !important;
}

/* Hover — drop shadow (no background change) */
.product-card:hover {
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25));
}

/* Compare selected — mint border on the full card */
.product-card.compare-selected {
    border: 1px solid #00FFAE;
}

/* No extra hover shadow when already expanded */
.product-card.expanded:hover {
    filter: none;
}

/* Expanded: header row gets mint tint; whole item gets same shadow */
.product-card.expanded .product-row-header {
    background: #E5FEF6;
}

/* Expanded (Criteria open) — no border, no radius; bg stays white */
.product-card.expanded {
    background: #fff;
    border: none;
    border-radius: 0;
}

.product-card-top {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    width: 100%;
    flex: 1 1 auto;             /* fill the card column */
    cursor: pointer;
}

/* Expanded state: match screenshot header (mint) and divider */
.product-item.is-expanded {
    border: none;
    border-radius: 10px;
    overflow: visible;
    background: #fff;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25));
}

.product-item.is-expanded .product-card {
    border: 1px solid rgba(0, 0, 0, 0.20);
    border-bottom: none;        /* expanded section picks up from here */
    border-radius: 10px 10px 0 0;
    background: #fff;
}

.product-item.is-expanded .product-card-top {
    /* No divider line on the main (top) row when expanded */
    border-bottom: none;
    padding-bottom: 0;
}

/* Expanded Details Section */
.product-expanded {
    display: none;
    background: #fff;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-top: 0;
    width: 100%;
}

/* Expanded Details Section styling: left/right/bottom border matching the closed-state card border.
   No overflow:hidden here — tooltip inside must not be clipped. */
.product-item.is-expanded .product-expanded {
    border: 1px solid rgba(0, 0, 0, 0.20);
    border-top: 0.5px solid rgba(0, 0, 0, 0.10);
    border-radius: 0 0 10px 10px;
    overflow: visible;
}

.product-expanded.visible {
    display: flex;
    flex-direction: column;
}

/* ── Row 1: 6 equal data columns ── */
.expanded-data-row {
    display: flex;
    align-items: stretch;
    padding: 16px 20px;
}

.expanded-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    gap: 12px;
}

.expanded-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.expanded-ctas {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.expanded-data-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    padding: 0 16px;
    position: relative;
    min-width: 0;
}

.expanded-data-cell:first-child {
    padding-left: 0;
}

.expanded-data-cell:last-child {
    padding-right: 0;
}

.expanded-data-cell:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 0.5px;
    background: rgba(0, 0, 0, 0.12);
}

.expanded-label {
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    color: rgba(0, 0, 0, 0.50);
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
}

.expanded-value {
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    color: #000;
    font-weight: 800;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    flex-wrap: wrap;
}

/* Green info icon (e.g. next to CCJs) */
.expanded-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #00FFAE;
    border: none;
    border-radius: 3px;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 9px;
    font-weight: 700;
    font-style: italic;
    color: #000;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.expanded-info-btn:hover {
    background: #000;
    color: #00FFAE;
}

/* CCJ note: hidden on desktop/tablet; shown only on mobile */
.expanded-cell-note {
    display: none;
}

/* Tooltip shown on hover via data-tooltip attribute */
.expanded-info-btn[data-tooltip] {
    position: relative;
}

.expanded-info-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 8px);
    left: 0;                            /* anchor to left of button — never overflows left edge */
    transform: none;
    background: #fff;
    color: #000;
    padding: 10px 14px;
    border-radius: 6px;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 11px;
    font-weight: 400;
    font-style: normal;
    line-height: 1.5;
    white-space: normal;
    width: 220px;
    text-align: left;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.10);
    z-index: 9999;                      /* overlay above all card content */
    pointer-events: none;
}

/* ── Row 2: feature tags (left) + CTA buttons (right) ── */
.expanded-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    gap: 16px;
    background: #F7F8F9;
    border-radius: 0 0 10px 10px;  /* round corners directly — no need for overflow:hidden on parent */
}

.expanded-features {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    flex: 0 0 auto;
    background: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
}

.feature-tag {
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    color: #000;
    font-weight: 400;
    white-space: nowrap;
    position: relative;
    padding-right: 16px;
}

/* Pipe separator between tags */
.feature-tag:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 12px;
    width: 0.5px;
    background: rgba(0, 0, 0, 0.30);
}

.expanded-ctas {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Calculate first, Start a AIP second */
.expanded-ctas .btn-calculate { order: 1; }
.expanded-ctas .btn-start-dip { order: 2; }

/* Underline the Calculate CTA text */
.expanded-ctas .btn-calculate {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Legacy column/row selectors kept for mobile/tablet overrides that reference them */
.expanded-col { display: none; }
.expanded-row  { display: none; }
.expanded-actions { display: none; }

.btn-calculate {
    /* Calculate – spec */
    display: flex;
    width: 115px;
    height: 25px;
    padding: 10px 20px;
    justify-content: center;
    align-items: center;
    gap: 10px;

    border-radius: 100px;
    border: 0.5px solid #000;
    background: #FFF;

    color: #000;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-calculate:hover {
    /* Hover spec: only change border to mint */
    border-color: #00FFAE;
    background: #fff;
}

/* If Calculate renders as <a>, keep hover consistent */
a.btn-calculate:hover,
a.btn-calculate:active,
a.btn-calculate:focus {
    border-color: #00FFAE;
}

.btn-start-dip {
    /* Start an AIP – spec */
    display: flex;
    width: 115px;
    height: 25px;
    padding: 10px 20px;
    justify-content: center;
    align-items: center;
    gap: 10px;

    border-radius: 100px;
    border: none;
    background: #00FFAE;

    color: #000;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 10px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-start-dip:hover {
    background: #00e89d;
}

/* When CMS links are rendered as <a> tags, make them look like the designed buttons */
a.btn-calculate,
a.btn-start-dip {
    text-decoration: none;
}

a.btn-calculate:visited,
a.btn-start-dip:visited {
    color: #000;
}


/* Close button replaces Criteria when expanded */
.btn-close,
.btn-card-close {
    /* Close – spec */
    display: flex;
    width: 115px;
    height: 25px;
    padding: 10px 20px;
    /* Text centered with X at far right */
    justify-content: space-between;
    align-items: center;
    gap: 6px;

    border-radius: 100px;
    border: 0.5px solid rgba(0, 0, 0, 0.20);
    background: rgba(255, 255, 255, 0.70);

    color: #000;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-close .btn-close-text,
.btn-card-close .btn-close-text {
    flex: 1;
    text-align: center;
}

.btn-close .btn-close-x,
.btn-card-close .btn-close-x {
    width: 10px;
    height: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
}

.btn-close .btn-close-x img,
.btn-card-close .btn-close-x img {
    width: 10px;
    height: 10px;
    display: block;
}

.selected-product-item .remove-btn img {
    width: 7px;
    height: 7px;
    display: block;
}

.btn-close:hover,
.btn-card-close:hover {
    /* Requested: Close CTA hover background */
    background: #00FFAE;
    color: #000;
}

.product-row {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    align-self: stretch;
}

/* ── Row header: title (left) + meta controls (right) ── */
.product-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px 4px;
    gap: 16px;
}

.product-row-title {
    flex: 1;
    font-family: 'NaNMetrifyAWide-ExBld';
    font-size: 14px;
    font-weight: 800;
    color: #000;
    line-height: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.product-row-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

/* Product code cell in data row — tablet only (hidden everywhere else) */
.product-code-cell { display: none !important; }

.product-code-display {
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    color: #000;
    white-space: nowrap;
    background: #F7F8F9;
    padding: 4px 10px;
    border-radius: 4px;
}

.product-card.expanded .product-code-display {
 width: 203px;
    height: 25px;
    background: #fff !important;
    text-align: center;
}

.criteria-chevron {
    width: 10px;
    height: 7px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.product-card.expanded .criteria-chevron {
    transform: rotate(180deg);
}

/* ── Feature tags row (closed state) ── */
.product-row-features {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 20px 6px;
    flex-wrap: wrap;
}

.product-row-feature-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: #E5FEF6;
    border-radius: 100px;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    font-weight: 400;
    color: #000;
    white-space: nowrap;
    line-height: normal;
}

/* ── Data row: horizontal cells with vertical dividers ── */
.product-row-data {
    display: flex;
    align-items: stretch;
    padding: 10px 20px 12px;
    flex: 1;
    min-width: 0;
}

.product-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 20px;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    flex: 1 1 0;
}

.product-cell:first-child {
    padding-left: 0;
    padding-right: 0px;
}

.product-cell:last-child {
    border-right: none;
    padding-right: 0;
}

.cell-label {
    /* Titles (top line in each column) */
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    font-style: normal;
    line-height: normal;
    color: rgba(0, 0, 0, 0.50);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.cell-value {
    /* Text below titles (second line in each column) */
    font-family: 'NaNMetrifyAWide-ExBld';
    font-size: 12px;
    font-style: normal;
    line-height: normal;
    color: #000;
    font-weight: 800;
    white-space: nowrap;
}

/* Right column: compare checkbox (and close button when expanded), vertically centred */
.product-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    flex-shrink: 0;
    align-self: stretch;        /* stretch to full card height so justify-content: center works */
    padding: 0 10px;
    border-left: 0.5px solid rgba(0, 0, 0, 0.10);
}

/* Compare checkbox — stacked: small checkbox above "Compare" label */
.compare-checkbox {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    position: relative;
}

.compare-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    border: 0.5px solid rgba(0, 0, 0, 0.50);
    border-radius: 3px;
    background: #fff;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.compare-checkbox input[type="checkbox"]:hover {
    border-color: #00FFAE;
}

.compare-checkbox input[type="checkbox"]:checked {
    background: #00FFAE;
    border-color: #00FFAE;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5.2 4.3 8.5 11 1.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 9px 7px;
}

.compare-checkbox input[type="checkbox"]:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Plain text label — no pill styling */
.compare-checkbox span {
    display: block;
    width: auto;
    height: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 10px;
    font-weight: 400;
    color: #000;
    line-height: normal;
    cursor: pointer;
    white-space: nowrap;
    transition: none;
}

.compare-checkbox span::before {
    display: none !important;
    content: none !important;
}

/* Criteria — "Show Criteria ▾" text button with chevron (no border/fill) */
.btn-criteria {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    font-weight: 400;
    color: #000;
    white-space: nowrap;
    width: auto;
    height: auto;
    border-radius: 0;
    justify-content: flex-start;
    transition: opacity 0.2s;
}

.btn-criteria .criteria-label {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.btn-criteria:hover {
    opacity: 0.7;
    background: transparent;
    border-color: transparent;
    color: #000;
}

/* Design: Close styling is defined above */

/* ==========================================
   Bottom Actions
   ========================================== */
.bottom-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Vertical spacing above bottom-actions is controlled by `.products-container { gap: 20px; }` */
    padding: 0 0 20px;
    gap: 20px;
}

.bottom-actions .pagination {
    margin-left: auto;
}

/* Product guide CTA button (restored) */
.btn-product-guide {
    padding: 10.5px 21px;
    border: none;
    border-radius: 100px;
    background: #00FFAE;
    color: #000;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    /* V3: Product guide is now an <a>. Remove the default link underline/line. */
    text-decoration: none;
    transition: all 0.2s;
}

/* Extra safety: ensure anchor states never show underline */
a.btn-product-guide,
a.btn-product-guide:visited,
a.btn-product-guide:hover,
a.btn-product-guide:active,
a.btn-product-guide:focus {
    text-decoration: none !important;
}

/* Product guide hover: emphasize label/icon only (no color change requested) */
.btn-product-guide:hover {
    font-weight: 600;
}

/* Optional: give the download icon a subtle emphasis on hover */
.btn-product-guide .download-icon img {
    transition: transform 0.2s;
}

.btn-product-guide:hover .download-icon img {
    transform: scale(1.06);
}

/* Start a dip / AIP hover */
.btn-start-dip:hover {
    background: #000C91;
    color: #fff !important;
}


.product-count {
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 12px;
    color: #000;
}

.product-count strong {
    font-family: 'NaNMetrifyAWide-ExBld';
    font-weight: 800;
}

/* ==========================================
   Pagination
   ========================================== */
.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-btn {
    min-width: 24px;
    height: 24px;
    border: 1px solid #E5E7EB;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #000;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 10px;
}

.page-btn .page-icon {
    width: 12px;
    height: 12px;
    display: block;
}

.page-btn .page-icon-rot {
    transform: rotate(180deg);
}

.page-btn:hover:not(.active) {
    background: #00FFAE;
    border-color: #00FFAE;
    color: #000;
    font-family: 'NaNMetrifyAWide-ExBld';
    font-weight: 800;
}

.page-btn.active {
    background: #00FFAE;
    border-color: #00FFAE;
    color: #000;
    font-family: 'NaNMetrifyAWide-ExBld';
    font-weight: 800;
}

.page-dots {
    color: #94A3B8;
    padding: 0 4px;
}

/* ==========================================
   Dim only the product rows when any dropdown / panel is open
   ========================================== */
.products-list {
    transition: none;
}


/* ==========================================
   Compare Modal (ported from legacy productlist.css)
   Used by productslist-v3.js compare popup
   ========================================== */
/* ==========================================
   Compare Modal — updated design
   ========================================== */
.compare-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 24px;
}

.compare-modal-content {
    background: #fff;
    border-radius: 0;
    max-width: 1100px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    overflow: hidden;
}

/* Header: title left + actions right */
.compare-modal-header {
    padding: 28px 32px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #F7F8F9;
    border-bottom: none;
    flex-shrink: 0;
}

/* "COMPARING THREE PRODUCTS" — italic bold uppercase */
.compare-modal-header h2 {
    margin: 0;
    font-family: 'NaNMetrifyHeroic-GigaBkIt', 'NaNMetrifyAWide-Reg', Arial, sans-serif;
    font-size: 22px;
    font-weight: 900;
    font-style: italic;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0;
}

.compare-modal-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.compare-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.18);
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.compare-modal-close:hover {
    background: #f5f5f5;
    border-color: rgba(0,0,0,0.35);
}

/* "Download comparison" — outlined pill */
.compare-download-btn {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.30);
    color: #000;
    padding: 10px 20px;
    border-radius: 100px;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.compare-download-btn:hover {
    border-color: #000;
    font-weight: 600;
}


/* Scrollable table area */
.compare-modal-body {
    flex: 1;
    overflow: auto;
    padding: 16px 0 0;
    background: #fff;
}

/* ---- Table ---- */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.compare-table th,
.compare-table td {
    padding: 14px 20px;
    text-align: left;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 13px;
    color: #000;
    border: none;
    vertical-align: top;
    word-break: break-word;
}

/* Label column (first child of every row): bold */
.compare-table th:first-child,
.compare-table td:first-child {
    font-weight: 800;
    color: #000;
    min-width: 160px;
    max-width: 180px;
    background: #fff;
    padding-left: 32px;
}

/* Product column header row (thead tr) */
.compare-table thead tr th:not(:first-child) {
    font-weight: 800;
    font-size: 14px;
    color: #000;
}

/* Product data cells */
.compare-table tbody td:not(:first-child) {
    font-weight: 400;
}

/* Alternating column backgrounds: label col white, then alt #F7F8F9/white */
.compare-table tr > *:nth-child(1) { background: #fff; }
.compare-table tr > *:nth-child(even) { background: #F7F8F9; }
.compare-table tr > *:nth-child(odd) { background: #fff; }

/* Thead padding */
.compare-table thead tr th {
    padding-top: 20px;
    padding-bottom: 16px;
}

/* ==========================================
   Segment Carousel Section
   ========================================== */

.segment-section {
    background: #000;
    padding: 60px 0px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    margin-bottom: 80px;
}

/* Carousel row: prev arrow + slides + next arrow */
.segment-carousel {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
    max-width: 1300px;
}

/* Arrow buttons */
.segment-arrow {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.segment-arrow img { display: block; }
.segment-arrow--next img { transform: rotate(180deg); }

.segment-arrow:hover { opacity: 1; }

/* Icon sizing — all CTA icons use natural SVG size, no forced dimensions */
.sidebar-advanced-btn .filter-icon img,
.sidebar-sort-btn img,
.clear-icon,
.main-chips-clear img,
.afp-clear-btn img,
.mobile-filters-clear-btn img { display: block; }

/* Slides wrapper — viewport for the sliding filmstrip */
.segment-slides-wrapper {
    flex: 1;
    overflow: hidden;
    display: block;
    position: relative;
}

/* Slides track — positioning context; each card is placed by JS (circular) */
.segment-slides-track {
    position: relative;
    width: 100%;
    padding: 36px 0;
}

/* Individual slide — equal layout width; side cards shrink, centre stays natural.
   The centred card is NEVER upscaled (no >100% transform), so its image is never
   re-rasterised larger-than-natural — which was causing the Medium card to blink
   when it snapped into the centre via the loop teleport. */
/* 3 fixed cards, each absolutely placed by JS (translateX + scale). No clones. */
.segment-slide {
    position: absolute;
    top: 50%;
    left: 0;
    display: flex;
    flex-direction: column;
    width: 280px;
    opacity: 0.55;
    transform: translate(0, -50%) scale(0.82);
    transition: transform 0.5s ease, opacity 0.5s ease;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Centered (active) card — natural size & full opacity (transform set by JS) */
.segment-slide.active {
    opacity: 1;
    z-index: 2;
}

/* Image only for 3-slide view */
.segment-slide-image {
    flex: 1;
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    background: #1a1a1a;
    min-height: 320px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.segment-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.segment-img-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    padding: 32px 24px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.4) 50%, #000 100%);
    gap: 12px;
}

.segment-img-label {
    font-family: 'NaNMetrifyHeroic-GigaBkIt', 'NaNMetrifyAWide-Reg', Arial, sans-serif;
    font-size: 21.98px;
    font-weight: 900;
    font-style: italic;
    color: #fff;
    text-transform: uppercase;
    line-height: normal;
    margin: 0;
}

.segment-img-sub {
    font-family: 'NaNMetrifyAWide-Reg', Arial, sans-serif;
    font-size: 14px;
    color: #ffffff;
    margin: 0;
}

/* Find out more link - visible only on active slide */
.segment-find-out-more {
    display: none;
    color: #ffffff;
    text-decoration: underline;
    font-family: 'NaNMetrifyAWide-Reg', Arial, sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 8px;
}

.segment-find-out-more:hover {
    opacity: 0.8;
}

.segment-slide.active .segment-find-out-more {
    display: block;
}

/* ===================== FIND-OUT-MORE DETAIL MODAL ===================== */
.segment-modal { display: none; }

/* When modal open, hide the carousel + its footer, show the modal */
.segment-section.modal-open .segment-carousel,
.segment-section.modal-open > .segment-footer {
    display: none;
}
.segment-section.modal-open .segment-modal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
}

/* Row: arrow | card | arrow */
.segment-modal-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 100%;
    max-width: 1000px;
}

/* The white detail card (image left, text right) */
.segment-modal-card {
    display: flex;
    flex: 1;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    min-height: 360px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
}

/* Left image half */
.segment-modal-image {
    position: relative;
    flex: 0 0 42%;
    min-height: 360px;
    background: #1a1a1a;
}
.segment-modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Heading overlay inside the modal image — centred, identical to the clicked card */
.segment-modal-image .segment-img-overlay {
    align-items: center;
    text-align: center;
    padding: 28px;
    gap: 6px;
}

/* Right detail panel */
.segment-modal-detail {
    flex: 1;
    position: relative;
    padding: 44px 48px;
    overflow-y: auto;
}
.segment-modal-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 26px;
    line-height: 1;
    color: #000;
    cursor: pointer;
}
.segment-modal-close:hover { opacity: 0.6; }

.segment-modal-desc h3 {
    font-family: 'NaNMetrifyAWide-ExBld', Arial, sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #000;
    margin: 22px 0 4px;
}
.segment-modal-desc h3:first-child { margin-top: 0; }
.segment-modal-desc p {
    font-family: 'NaNMetrifyAWide-Reg', Arial, sans-serif;
    font-size: 15px;
    color: #000;
    margin: 0 0 4px;
}
.segment-modal-desc p a { font-weight: 800; color: #000; }

/* Bottom: content card for 3-item view */
.segment-slide-card {
    display: none;
}

.segment-slide-card > h3 {
    font-family: 'NaNMetrifyAWide-ExBld';
    font-size: 16px;
    font-weight: 800;
    color: #000;
    margin: 30px 0 4px;
}

.segment-slide-card p a {
    font-weight: 800;
    color: #000;
}

.segment-slide-card > h3:first-child {
    margin-top: 0;
}

.segment-slide-card > p {
    font-family: 'NaNMetrifyAWide-Reg', Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #000;
    margin: 0;
    line-height: normal;
}

/* Footer: dots + CTAs */
.segment-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.segment-dots {
    display: flex;
    gap: 10px;
    align-items: center;
}

.segment-dot {
    width: 13.5px;
    height: 13.5px;
    border-radius: 50%;
    border: 1px solid #fff;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

.segment-dot.active {
    width: 17.5px;
    height: 17.5px;
    background: #00FFAE;
    border-color: #00FFAE;
}

.segment-ctas {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.segment-cta {
    padding: 9px 23px;
    border-radius: 100px;
    font-family: 'NaNMetrifyAWide-Reg', Arial, sans-serif;
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.segment-cta--outline {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
}

.segment-cta--outline:hover {
    background: rgba(255,255,255,0.1);
}

.segment-cta--filled {
    background: #00FFAE;
    border: 1px solid #00FFAE;
    color: #000;
}

.segment-cta--filled:hover {
    background: #00e89d;
    border-color: #00e89d;
}

/* ==========================================
   Responsive Design
   ========================================== */

/* Tablet (768px–1024px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .main-content {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    /* ---- Products page: stack sidebar above main content ---- */
    .products-page {
        flex-direction: column;
        gap: 0;
        padding: 0 20px 80px;
        box-sizing: border-box;
    }

    /* Sidebar becomes a full-width 3-column top-bar */
    .products-sidebar {
        width: 100%;
        flex: 0 0 auto;
        height: auto;
        max-height: none;
        position: static;
        top: auto;
        overflow: visible;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding: 16px 0 12px;
    }

    /* Row 1: ALL PRODUCTS title + Product Guide on right — flex row */
    .sidebar-title-wrap {
        grid-row: 1;
        grid-column: 1 / -1;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    /* ALL PRODUCTS button: fixed 273px width as per design */
    .sidebar-title-btn {
        width: 273px;
        flex-shrink: 0;
    }

    /* Dropdown panel: pop out of flex flow so it appears below the button, not alongside it */
    .sidebar-title-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        width: 273px;
        z-index: 300;
    }

    /* Product guide slot: visible on tablet in the title row */
    .product-guide-top-slot {
        display: flex;
        flex-shrink: 0;
    }

    /* Row 2: Compare panel spans all 3 columns
       compare-panel is 2nd in DOM → no z-index stacking over the rows below.
       Reset the order:99 set for desktop. */
    .compare-panel,
    .products-sidebar > aside {
        grid-row: 2;
        grid-column: 1 / -1;
        order: 0;
    }

    /* Row 3: All 4 filter dropdowns as a flex row spanning all 3 columns.
       Using display:flex (not display:contents) so Adverse is included. */
    #filterDropdowns {
        grid-row: 3;
        grid-column: 1 / -1;
        display: flex !important;
        flex-direction: row;
        align-items: stretch;
        gap: 12px;
    }
    #filterDropdowns .sidebar-accordion {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        position: relative;
    }
    /* Prevent long labels wrapping and stretching the row height */
    #filterDropdowns .sidebar-accordion-trigger {
        flex: 1;
        align-items: center;
        white-space: nowrap;
        overflow: hidden;
    }
    #filterDropdowns .sidebar-accordion-trigger .accordion-label {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    #adverseDropdown { display: flex; }

    /* Filter dropdown panels float as overlays — don't push layout down */
    #filterDropdowns .sidebar-accordion-content {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 220px;
        z-index: 400;
        margin-top: -1px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.15), 0 2px 6px rgba(0,0,0,0.08);
        border-top: none;
        border-radius: 0 0 8px 8px;
    }

    /* Row 4: equalise heights
       Root cause: .sidebar-search has margin-bottom:16px globally which inflates the grid
       row track, making buttons stretch beyond the search input's visual height.
       Fix: zero the margin so #searchBox's track = input's border-box height (~40px),
       then let align-self:stretch pull the buttons up to that same height. */
    #searchBox {
        margin-bottom: 0;
    }
    #advancedFiltersBtn {
        align-self: stretch;
    }
    #sortByWrapper {
        display: flex;
        align-items: stretch;
        align-self: stretch;
    }
    #sortByWrapper .sidebar-sort-btn {
        flex: 1;
    }

    /* Row 4: Actions — sidebar-actions-row is display:contents so
       #advancedFiltersBtn and #sortByWrapper become direct grid items */
    .sidebar-actions-row { display: contents; }

    /* Row 4: Advanced Filters (col 1) | Sort (col 2) | Search (col 3) */
    #advancedFiltersBtn { grid-row: 4; grid-column: 1; }
    #sortByWrapper      { grid-row: 4; grid-column: 2; }
    #searchBox          { grid-row: 4; grid-column: 3; }

    /* Reset desktop margin-tops — grid gap already handles row spacing */
    .sidebar-dropdowns { margin-top: 0; }
    .sidebar-search { margin-top: 0; }

    /* Advanced/sort panels: keep as fixed overlay, out of grid flow */
    .advanced-filters-panel,
    .sort-panel {
        position: fixed;
        background: #fff;
        z-index: 1200;
    }

    /* Products main: full width below the sidebar top-bar */
    .products-main {
        width: 100%;
        padding: 0;
    }

    /* Tablet compare panel becomes a horizontal bar above the list */
    .left-sidebar {
        position: static;
        top: auto;
    }

    /* Tablet compare panel layout (matches design):
       Row 1: COMPARE PRODUCTS (left) | Compare + Download (right)
       Row 2: subtitle (left)
    */
    .compare-panel {
        position: static;
        top: auto;
        border-radius: 16px;
        padding: 18px 20px;
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto auto;
        align-items: center;
        column-gap: 18px;
        row-gap: 10px;
        margin: 0 0 18px 0;
        background: #F4F4F4;
        overflow: hidden;
    }

    /* When 1+ products are selected the panel becomes a bordered, white container */
    .compare-panel.needs-more,
    .compare-panel.ready {
        background: #fff;
    }

    /* Let children inside compare-panel-body participate in the grid */
    .compare-panel-body {
        background: transparent;
        padding: 0;
        display: contents;
    }

    .compare-title {
        grid-column: 1;
        grid-row: 1;
        background: transparent;
        padding: 0;
        margin: 0;
        text-align: left;
        line-height: normal;
        white-space: nowrap;
    }

    /* Remove the forced line-break on tablet so it becomes one line */
    .compare-title .compare-break {
        display: inline;
    }

    .compare-actions {
        grid-column: 2;
        grid-row: 1;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 16px;
        margin: 0;
    }

    /* SVG warning icon lives inside .compare-actions (before Compare button in DOM).
       Hidden by default; base CSS (.products-sidebar .needs-warning-icon) handles that.
       Shown only in needs-more state on tablet. */
    .products-sidebar .compare-panel.needs-more .compare-actions .needs-warning-icon {
        display: flex;
        align-items: center;
    }

    /* Hide ::after "!" pseudo-element on tablet — SVG icon handles it here */
    .products-sidebar .compare-panel.needs-more::after {
        display: none;
    }

    .compare-subtitle {
        grid-column: 1 / -1;
        grid-row: 2;
        margin: 0;
        text-align: left;
        min-width: 0;
    }

    /* Selected products chips: wrap into rows of 3.
       Must match base specificity (.products-sidebar .selected-products-list)
       and use !important to beat its flex-direction: column !important. */
    .products-sidebar .selected-products-list {
        grid-column: 1 / -1;
        grid-row: 3;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center;
        gap: 12px;
        margin: 8px 0 0 0;
        overflow: visible !important;
    }

    .selected-product-item {
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        flex: 0 0 calc(33.333% - 8px);
        min-width: 0;
        background: #F4F4F4;
        border: 1px solid rgba(0, 0, 0, 0.18);
        border-radius: 8px;
        padding: 8px 12px;
        font-size: 12px;
        gap: 10px;
        white-space: nowrap;
        overflow: hidden;
    }

    .selected-product-item .product-code {
        font-family: 'NaNMetrifyAWide-Reg';
        font-weight: 600;
    }

    .selected-product-item .remove-btn {
        width: auto;
        height: auto;
        border: none;
        background: transparent;
        color: #000;
        font-size: 14px;
        line-height: 1;
        padding: 0;
    }

    .btn-compare {
        width: auto;
        min-width: 140px;
        padding: 10px 18px;
    }

    .btn-download {
        width: auto;
        padding: 0;
    }

    /* Selected list is visible on tablet when products are selected (design) */

    .filter-bar {
        padding: 15px 20px;
    }

    /* Tablet filter layout: 2-row grid like the design */
    .filter-row-1 {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
        align-items: center;
        padding: 16px 20px 12px;
    }

    .products-title-wrap {
        grid-column: 1 / 3;
        justify-content: flex-start;
    }

    /* Product guide aligns to Products title on the right */
    .product-guide-top-slot {
        display: flex;
        grid-column: 3 / 4;
        justify-content: flex-end;
        align-items: center;
    }

    .product-guide-top-slot .btn-product-guide {
        width: auto;
        padding: 10px 22px;
        font-size: 12px;
    }

    /* Hide the bottom product guide slot on tablet — the top-slot version is used instead */
    .product-guide-bottom-slot,
    #productGuideBottomSlot {
        display: none !important;
    }

    /* Product guide button in the sidebar title row: outlined style (white bg, border) */
    .product-guide-top-slot .btn-product-guide {
        background: #fff;
        border: 1.5px solid rgba(0, 0, 0, 0.15);
        color: #000;
        padding: 9px 18px;
        font-size: 13px;
    }
    .product-guide-top-slot .btn-product-guide:hover {
        background: #f5f5f5;
    }

    /* Product code pill on tablet: show the full "Product Code: " label */
    .pcode-prefix { display: inline; }

    /* Full-width items in each grid cell */
    .search-box,
    .custom-dropdown,
    #advancedFiltersBtn,
    #sortByWrapper {
        width: 100%;
        min-width: 0;
    }

    #advancedFiltersBtn {
        justify-content: center;
    }

    /* ==========================================
       Tablet: Advanced filters open state layout
       Overlay panel (same behavior as desktop)
       ========================================== */
    /* Tablet: no "Close filters" CTA (only needed on mobile sheet) */
    #advancedFiltersPanel .mobile-filters-header {
        display: none !important;
    }

    /* Restore left-side fixed drawer (old rule had position:absolute dropdown style) */
    #advancedFiltersPanel {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: auto !important;
        bottom: 0 !important;
        width: 354px !important;
        background: #fff !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        z-index: 1200 !important;
        display: flex !important;
    }

    #advancedFiltersPanel.active {
        display: flex !important;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15) !important;
    }

    #advancedFiltersPanel .advanced-filters-content {
        padding: 18px 18px 20px;
        gap: 14px;
    }

    #advancedFiltersPanel .advanced-filters-body {
        grid-template-columns: 1fr;   /* stack main + sidebar vertically on tablet */
    }

    #advancedFiltersPanel .advanced-filters-row1 {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    #advancedFiltersPanel .advanced-filters-row1 .loan-section {
        grid-column: 1 / -1;
    }

    #advancedFiltersPanel .advanced-filters-sidebar {
        flex-direction: row;
        justify-content: center;
        gap: 16px;
        min-width: 0;
    }

    #advancedFiltersPanel .filter-section-container {
        border-radius: 14px;
        padding: 18px 18px;
    }

    /* LOAN panel: 2 columns on top, properties row full width below */
    #advancedFiltersPanel .loan-section .filter-subsections {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }

    #advancedFiltersPanel .loan-section .filter-subsection {
        padding: 0 18px;
        border-right: 1px solid #E5E7EB;
    }

    #advancedFiltersPanel .loan-section .filter-subsection:first-child {
        padding-left: 0;
    }

    #advancedFiltersPanel .loan-section .filter-subsection:nth-child(2) {
        padding-right: 0;
        border-right: none;
    }

    #advancedFiltersPanel .loan-section .filter-subsection:nth-child(3) {
        grid-column: 1 / -1;
        border-right: none;
        padding: 16px 0 0;
        margin-top: 14px;
        border-top: 1px solid #E5E7EB;
    }

    /* Labels inside advanced filters match design (stronger) */
    #advancedFiltersPanel .subsection-label {
        font-size: 13px;
        font-weight: 800;
    }

    /* PRODUCT/SECURITY/EXTRA layout on tablet:
       PRODUCT full-width, SECURITY + EXTRA side-by-side */
    #advancedFiltersPanel .advanced-filters-row2 {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    #advancedFiltersPanel .advanced-filters-row2 > .filter-section-container:first-child {
        grid-column: 1 / -1;
    }

    #advancedFiltersPanel .advanced-filters-row2 > .filter-section-container:nth-child(2) {
        grid-column: 1;
    }

    #advancedFiltersPanel .advanced-filters-row2 > .filter-section-container:nth-child(3) {
        grid-column: 2;
    }

    .filter-group {
        flex-wrap: wrap;
    }

    /* ==========================================
       Tablet: Active chips row + Reset alignment
       ========================================== */
    .filter-bar.has-active .filter-row-2 {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 10px 20px 14px;
    }

    /* Chips + overflow handling should use the available width */
    .filter-bar.has-active .chips-row-content {
        flex: 1;
        min-width: 0;
    }

    /* Reset button appears on the right of the chips row (moved there via JS on tablet) */
    .filter-bar.has-active .filter-row-2 .reset-filters-btn {
        display: flex;
        margin-left: 12px;
    }

    /* Tablet chip styling per design */
    .filter-chip {
        border-radius: 8px;
        padding: 10px 14px;
        font-size: 12px;
        line-height: 1;
        gap: 10px;
    }

    .filter-chip-remove {
        font-size: 14px;
        line-height: 1;
        opacity: 0.9;
    }

    /* Tablet product cards: header row + 2-row data grid */
    .product-card {
        height: auto;
        padding: 0;
        align-items: stretch;
    }

    .product-card-top {
        align-items: stretch;
    }

    /* product-row stays flex-column (same as desktop) */
    .product-row {
        display: flex;
        flex-direction: column;
    }

    .product-row-header {
        padding: 10px 16px 4px;
    }

    /* Data cells: 4-column grid with a divider between row-1 and row-2 */
    .product-row-data {
        display: grid;
        grid-template-columns: 1fr 1fr 1.2fr 2fr;
        grid-template-rows: auto 1px auto;
        row-gap: 12px;
        align-items: start;
        position: relative;
        padding: 10px 16px 12px;
    }

    /* Horizontal divider between data rows */
    .product-row-data::after {
        content: '';
        grid-column: 1 / -1;
        grid-row: 2;
        height: 1px;
        background: rgba(0, 0, 0, 0.10);
        align-self: stretch;
    }

    .product-cell {
        padding: 0 14px;
        border-right: 1px solid rgba(0, 0, 0, 0.08);
        min-width: 0;
    }

    .product-cell:first-child {
        padding-left: 0;
    }

    /* Row 1: LTV(1), Product(2), Rate(3), ProductCode(4) */
    /* Rate — no right border before ProductCode pill */
    .product-cell:nth-child(3) { border-right: none; }

    /* ProductCode pill cell — row 1, col 4 */
    .product-code-cell {
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        grid-row: 1;
        grid-column: 4;
        border-right: none;
        padding: 0 8px;
    }

    .product-code-pill {
        display: inline-flex;
        align-items: center;
        background: #F4F4F4;
        border-radius: 100px;
        padding: 6px 14px;
        font-size: 12px;
        color: #333;
        white-space: nowrap;
    }

    /* Hide product code from header on tablet — shown as data-row pill instead */
    .product-row-header .product-code-display { display: none; }

    /* Row 2: Fee(5→row3,col1), Adverse(6→row3,col2), LoanSize(7→row3,col3), Type(8→row3,col4) */
    .product-cell:nth-child(5) { grid-row: 3; grid-column: 1; padding-left: 0; border-right: 1px solid rgba(0, 0, 0, 0.08); }
    .product-cell:nth-child(6) { grid-row: 3; grid-column: 2; border-right: 1px solid rgba(0, 0, 0, 0.08); }
    .product-cell:nth-child(7) { grid-row: 3; grid-column: 3; border-right: 1px solid rgba(0, 0, 0, 0.08); }
    .product-cell:nth-child(8) { grid-row: 3; grid-column: 4; border-right: none; }

    /* product-actions: right column on tablet, same as desktop */
    .product-actions {
        display: flex;
        padding: 0 16px;
    }

    /* ==========================================
       Tablet: Expanded (Criteria) card design
       ========================================== */
    .product-item.is-expanded {
        /* No border on the main row container when expanded */
        border: none;
        border-radius: 10px;
        /* Allow the expanded section shadow to render */
        overflow: visible;
        background: #fff;
    }

    .product-item.is-expanded .product-card {
        border: 1px solid rgba(0, 0, 0, 0.20);
        border-bottom: none;
        border-radius: 10px 10px 0 0;
        background: #fff;
    }

    /* Divider between header and expanded details */
    .product-item.is-expanded .product-card-top {
        /* No divider line on the main (top) row when expanded */
        border-bottom: none;
        padding-bottom: 0;
    }

    /* Expanded details area */
    .product-item.is-expanded .product-expanded {
        border: 1px solid rgba(0, 0, 0, 0.20);
        border-top: 0.5px solid rgba(0, 0, 0, 0.10);
        border-radius: 0 0 10px 10px;
        overflow: visible;
        padding: 0;
    }

    .product-item.is-expanded .product-expanded.visible {
        display: flex;
        flex-direction: column;
        background: #fff;
    }

    /* Tablet expanded data: cells 1-4 = 4 columns, cells 5-6 = 2 columns */
    .product-item.is-expanded .expanded-data-row {
        flex-wrap: wrap;
        padding: 0;
        gap: 0;
    }

    .product-item.is-expanded .expanded-data-cell {
        flex: 0 0 25%;
        box-sizing: border-box;
        padding: 14px 16px;
        position: relative;
    }

    .product-item.is-expanded .expanded-data-cell:first-child {
        padding-left: 16px;
    }

    /* Cells 5-6 (Min/Max loan): same 25% width — sit side-by-side on the left */
    .product-item.is-expanded .expanded-data-cell:nth-child(n+5) {
        flex: 0 0 25%;
    }

    /* Full-width horizontal separator between row 1 and row 2.
       Cell 5 is 25% wide, so width: 400% = full container width. */
    .product-item.is-expanded .expanded-data-cell:nth-child(5)::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 400%;
        height: 0.5px;
        background: rgba(0, 0, 0, 0.12);
    }

    /* Re-enable right-side vertical dividers with top/bottom gaps to match product row style */
    .product-item.is-expanded .expanded-data-cell::after {
        display: block;
        top: 10px;
        bottom: 10px;
    }

    /* No divider after last cell in each row */
    .product-item.is-expanded .expanded-data-cell:nth-child(4)::after,
    .product-item.is-expanded .expanded-data-cell:nth-child(6)::after {
        display: none;
    }

    .product-item.is-expanded .expanded-actions-row {
        padding: 12px 16px 16px;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
        justify-content: space-between;
    }

    .product-item.is-expanded .expanded-features {
        flex-wrap: wrap;
        gap: 8px;
    }

    .product-item.is-expanded .expanded-ctas {
        gap: 10px;
        margin-left: auto;
    }

    /* Keep button sizing consistent with global spec (115x25) */

    /* Close button in header (replaces Criteria) */
    .product-item.is-expanded .btn-close,
    .product-item.is-expanded .btn-card-close {
        border: 0.5px solid rgba(0, 0, 0, 0.20);
        background: rgba(255, 255, 255, 0.70);
    }

    /* Bottom actions stay in one row on tablet (count left, pagination right) */
    .bottom-actions {
        flex-direction: row;
        align-items: center;
    }

    /* ===================== SEGMENT CAROUSEL — TABLET ===================== */
    /* Big centre card with side-card peeks; arrows move down beside the dots.
       Uses display:contents so the existing desktop markup reflows — no separate HTML. */
    .segment-section {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 14px;
    }

    /* Dissolve the carousel + footer boxes so their children become section items */
    .segment-carousel,
    .segment-footer {
        display: contents;
    }

    /* Row 1: the filmstrip viewport, full width */
    .segment-slides-wrapper {
        order: 1;
        flex: 0 0 100%;
        width: 100%;
    }

    .segment-slides-track {
        gap: 16px;
        padding: 28px 0;
    }

    /* Larger portrait centre card; side cards peek at the edges */
    .segment-slide {
        flex: 0 0 clamp(300px, 48vw, 440px);
        width: clamp(300px, 48vw, 440px);
    }
    .segment-slide-image {
        min-height: 430px;
    }

    /* Row 2: ‹  • • •  › — arrows flank the dots */
    .segment-arrow--prev { order: 2; display: flex; }
    .segment-dots        { order: 3; }
    .segment-arrow--next { order: 4; display: flex; }

    /* Row 3: full-width centred CTAs */
    .segment-ctas {
        order: 5;
        flex: 0 0 100%;
        justify-content: center;
    }

    /* ===== Find-out-more modal — TABLET (stacked: image top, text below) ===== */
    .segment-section.modal-open .segment-modal {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 16px;
        width: 92%;
        max-width: 80%;
        margin: 0 auto;
    }

    /* Dissolve the modal row so arrows can drop down beside the dots */
    .segment-modal-row { display: contents; }

    /* The card stacks vertically and fills the (constrained) modal width */
    .segment-modal-card {
        order: 1;
        flex: 0 0 100%;
        flex-direction: column;
        position: relative;
        min-height: 0;
    }

    /* Image becomes a top band; heading centred */
    .segment-modal-image {
        flex: 0 0 auto;
        width: 100%;
        min-height: 200px;
        height: 200px;
    }
    .segment-modal-image .segment-img-overlay {
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 24px;
    }

    /* Detail panel below the image; close button floats over the image */
    .segment-modal-detail {
        position: static;
        flex: 0 0 auto;
        padding: 28px 28px 32px;
    }
    .segment-modal-close {
        top: 14px;
        right: 14px;
        color: #fff;
        z-index: 3;
    }

    /* Row 2: ‹  • • •  › — arrows flank the modal dots */
    .segment-modal-prev { order: 2; display: flex; }
    .segment-modal-dots { order: 3; }
    .segment-modal-next { order: 4; display: flex; }
}

/* Hidden on all viewports by default — only shown inside mobile media query */
.mobile-chips-bar { display: none !important; }

/* Mobile (≤767px) */
@media (max-width: 767px) {
    /* Stack sidebar above content, inset from edges */
    .products-page {
        flex-direction: column;
        gap: 0;
        padding: 0 16px 80px;
        box-sizing: border-box;
    }

    /* ===== Mobile sidebar ===== */

    /* Full-width, not sticky, not scrollable */
    .products-sidebar {
        width: 100%;
        flex: 0 0 auto;
        height: auto;
        position: static;
        overflow: visible;
        padding: 0;
        gap: 0;
    }

    /* Hide compare panel — not shown on mobile */
    .compare-panel {
        display: none !important;
    }

    /* Hide accordion filter dropdowns — they live inside the Filters overlay panel */
    #filterDropdowns {
        display: none;
    }

    /* Row 1: Filters pill (auto) + Clear all (fills rest); Row 2: Sort (full width) */
    .sidebar-actions-row {
        display: flex !important;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        column-gap: 15px;
        row-gap: 15px;
        margin-top: 0;
    }

    .sidebar-dropdowns { margin-top: 0; }
    .sidebar-search { margin-top: 0; }

    /* Hides "Advanced " so button reads "Filters" on mobile */
    .filters-label-desktop { display: none; }

    #advancedFiltersBtn {
        flex: 1 !important;
        width: auto !important;
        min-width: 0 !important;
    }

    /* Clear all: equal 50% width alongside Filters */
    #clearAllFiltersBtn {
        display: flex;
        flex: 1;
        margin-left: 0;
        align-items: center;
        justify-content: center;
        gap: 6px;
        background: transparent;
        border: 1px solid transparent;
        border-radius: 100px;
        padding: 10px 12px;
        font-family: 'NaNMetrifyAWide-Reg';
        font-size: 12px;
        font-weight: 400;
        color: rgba(0, 0, 0, 0.30);
        cursor: default;
        white-space: nowrap;
        transition: all 0.2s;
    }

    #clearAllFiltersBtn:not(:disabled) {
        background: #E5FEF6;
        border-color: #E5FEF6;
        color: #000;
        cursor: pointer;
    }

    #clearAllFiltersBtn .clear-icon {
        display: block !important;
        position: static !important;
        transform: none !important;
        opacity: 0.3;
        width: 14px;
        height: 14px;
    }
    #clearAllFiltersBtn:not(:disabled) .clear-icon { opacity: 1; }

    /* Sort: wraps to its own full-width row */
    #sortByWrapper {
        flex: 0 0 100% !important;
        width: 100% !important;
    }

    .products-header {
        padding: 20px;
    }

    /* Keep requested Products title styling on mobile as well */
    .products-title {
        color: #000C91;
        font-family: "NaN Metrify Heroic Gigawide", 'NaNMetrifyAGigawide-BlckIt', Arial, sans-serif;
        font-size: 20px;
        font-style: italic;
        font-weight: 900;
        line-height: normal;
        text-transform: uppercase;
        margin-bottom: 8px;
    }

    /* ===== Filter area (mobile design) ===== */

    .filter-row-1 {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .products-title-wrap {
        flex: 0 0 auto !important;
    }

    /* ALL PRODUCTS dropdown: overlay so it doesn't push content down */
    .sidebar-title-dropdown {
        position: absolute;
        top: 39%;
        left: 0;
        right: 0;
        z-index: 300;
    }

    /* 20px gap between ALL PRODUCTS button and Product guide */
    .sidebar-title-btn {
        margin-bottom: 20px;
    }

    /* 15px gap between Product guide and Search */
    .sidebar-title-wrap {
        margin-bottom: 15px;
    }

    .product-guide-top-slot {
        display: flex;
        order: 1;
    }

    /* White outlined style on mobile (base is #00FFAE green) */
    .product-guide-top-slot .btn-product-guide {
        width: 100%;
        justify-content: center;
        background: #fff;
        border: 1.5px solid rgba(0,0,0,0.15);
        color: #000;
    }

    /* Search comes after Product guide, before Filters+Sort — 15px gap below */
    .search-box {
        flex: 0 0 auto;
        width: 100%;
        order: 2;
        margin-bottom: 15px;
    }

    /* Filters + Clear all + Sort row comes after Search */
    .sidebar-actions-row {
        order: 3;
    }

    /* Hide desktop chips bar on mobile — replaced by .mobile-chips-bar */
    .main-chips-bar {
        display: none !important;
    }

    /* Mobile active-filter chips: horizontally scrollable row */
    .mobile-chips-bar {
        order: 4;
        display: none;
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 8px;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(0,0,0,0.25) rgba(0,0,0,0.08);
    }
    .mobile-chips-bar.has-chips {
        display: flex !important;
        margin-top: 15px;
    }
    .mobile-chips-bar::-webkit-scrollbar { height: 3px; }
    .mobile-chips-bar::-webkit-scrollbar-track { background: rgba(0,0,0,0.08); border-radius: 3px; }
    .mobile-chips-bar::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.25); border-radius: 3px; }
    .mobile-chips-bar .filter-chip { flex-shrink: 0; }

    /* 20px gap between Sort row (or chips bar when visible) and product list */
    .products-main {
        margin-top: 20px;
    }

    /* 20px gap between each product card */
    .products-list {
        gap: 20px;
    }

    /* Button labels: show “Filters” on mobile */
    .filters-label-desktop {
        display: none;
    }
    .filters-label-mobile {
        display: inline;
        font-size: 15px;
    }

    /* Hide the 3 primary dropdowns ONLY in the top bar (they appear inside the filters panel on mobile) */
    #filterRow1 #productTypeDropdown,
    #filterRow1 #propertyTypeDropdown,
    #filterRow1 #maxLtvDropdown {
        display: none;
    }

    /* Filters + Reset row */
    .mobile-filters-actions {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .mobile-filters-actions .advanced-filters-btn {
        flex: 1;
        justify-content: center;
        border-radius: 6px;
    }

    .mobile-filters-actions .reset-filters-btn {
        display: none; /* shown only when filters are active */
        margin-left: 0;
        white-space: nowrap;
        padding: 10px 0;
        border-radius: 0;
        text-decoration: underline;
        text-underline-offset: 3px;
        font-size: 12px;
        font-weight: 400;
    }

    .filter-bar.has-active .mobile-filters-actions .reset-filters-btn {
        display: inline-flex;
    }

    /* Sort is full width */
    #sortByWrapper {
        width: 100%;
    }

    #sortByDropdown {
        width: 100%;
        font-size: -15px;
    }

    /* Chips row (mobile): wrap, no “More…” */
    

    .chips-container {
        flex-wrap: wrap;
        overflow: visible;
    }

    .chips-more-btn,
    .chips-overflow-panel {
        display: none !important;
    }

    .filter-chip {
        border-radius: 6px;
        padding: 10px 12px;
        font-size: 12px;
    }

    /* ===== Filters overlay panel ===== */
    /* Mobile filters overlay should start below the Products title (design).
       JS sets --mobile-filters-top to the bottom of the title area. */
    #advancedFiltersPanel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: var(--mobile-filters-top, 0px);
        height: calc(90vh - var(--mobile-filters-top, 0px));
        margin: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
        z-index: 1200;
        background: #fff;
    }

    /* Mobile overlay should behave like a sheet: header fixed, content scrolls */
    #advancedFiltersPanel.active {
        display: flex;
        flex-direction: column;
    }

    #advancedFiltersPanel .mobile-filters-header {
        flex: 0 0 auto;
    }

    #advancedFiltersPanel .advanced-filters-content {
        flex: 1 1 auto;
        /* Outer border around the whole filters section (mobile design) */
        margin: 0 16px 20px;
        padding: 0px 16px;
        border: 1px solid rgba(0, 0, 0, 0.20);
        border-radius: 12px;
        background: #fff;
        gap: 18px;
        overflow: auto;
        max-height: none;
    }

    /* Mobile: stack advanced filter sections vertically */
    #advancedFiltersPanel .loan-section .filter-subsections {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    #advancedFiltersPanel .loan-section .filter-subsection {
        padding: 0;
        border-right: none;
        border-bottom: 1px solid #E5E7EB;
        padding-bottom: 16px;
    }

    #advancedFiltersPanel .loan-section .filter-subsection:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    #advancedFiltersPanel .advanced-filters-row2 {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    #advancedFiltersPanel .filter-section-container {
        /* Mobile: remove “card” look (border + radius).
           Use simple dividers between sections instead (per screenshot). */
        border: none;
        border-radius: 0;
        background: transparent;
        padding: 16px 0;
        margin: 0;
        box-shadow: none;
    }

    /* Divider line between sections */
    #advancedFiltersPanel .filter-section-container {
        border-bottom: 1px solid #E5E7EB;
    }
    #advancedFiltersPanel .advanced-filters-actions {
        /* No divider directly above Apply CTA */
        border-top: none;
    }
    #advancedFiltersPanel .advanced-filters-row2 > .filter-section-container:last-child {
        border-bottom: none;
    }

    /* Mobile primary filters (FILTERS section at top) should match the same divider style */
    #advancedFiltersPanel .mobile-primary-filters .primary-filters-section {
        border: none;
        border-radius: 0;
        background: transparent;
        padding: 16px 0;
        margin: 0;
        box-shadow: none;
        border-bottom: 1px solid #E5E7EB;
    }

    #advancedFiltersPanel .subsection-label {
        font-size: 12px;
        font-weight: 500;
    }
    .section-title{
        font-size: 12px;
        font-weight: 900;
        font-family: 'NaNMetrifyHeroic-GigaBkIt';
    }
    #advancedFiltersPanel .filter-option-btn {
        padding: 10px 14px;
        border-radius: 8px;
        font-size: 12px;
        min-width: 54px;
    }

    /* Keep Apply CTA visible at bottom of the scrollable sheet */
    #advancedFiltersPanel .advanced-filters-actions {
        position: sticky;
        bottom: 0;
        background: #fff;
        padding: 16px 0 10px;
        margin-top: 6px;
    }

    #advancedFiltersPanel .apply-filters-btn {
        width: 100%;
        max-width: 320px;
    }

    .mobile-filters-header {
        position: sticky;
        top: 0;
        background: transparent;
        padding: 16px 16px 12px;
        z-index: 1;

        /* Prevent any inherited borders/shadows showing as thin coloured lines */
        border: 0 !important;
        box-shadow: none !important;
    }

    .mobile-close-filters-btn {
        width: 100%;
        border: none;
        border-radius: 10px;
        background: #00FFAE;
        background-image: none !important;
        padding: 12px 16px;
        font-family: 'NaNMetrifyAWide-Reg';
        font-size: 15px;
        font-weight: 800;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        color: #000;
        /* Prevent default button appearance/shadows (mobile browsers) */
        appearance: none;
        -webkit-appearance: none;
        box-shadow: none !important;
        outline: none !important;
        -webkit-tap-highlight-color: transparent;
        background-clip: padding-box;
    }

    /* Mobile filters close CTA icon */
    .mobile-close-filters-btn::after {
        content: "";
        width: 10px;
        height: 10px;
        background: url(/media/ejof04wu/group-255483532.svg) no-repeat center;
        background-size: contain;
        display: inline-block;
        flex: 0 0 auto;
    }

    /* Hide the legacy HTML "×" so only the SVG icon shows */
    .mobile-close-filters-btn span[aria-hidden="true"] {
        display: none;
    }

    /* Primary filters at top of panel */
    .mobile-primary-filters {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 8px;
    }

    /* Mobile: primary filters are rendered as button groups (not dropdowns)
       Match the divider-based styling (no inner card border/radius). */
    .mobile-primary-filters .primary-filters-section {
        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        padding: 16px 0;
        margin: 0;
    }

    .mobile-primary-filters .primary-filters-section .filter-subsections {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .mobile-primary-filters .primary-filters-section .filter-subsection {
        padding: 0;
        border-right: none;
        border-bottom: 1px solid #E5E7EB;
        padding-bottom: 16px;
    }

    .mobile-primary-filters .primary-filters-section .filter-subsection:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    /* Mobile: all filter subsections (e.g. Initial term + Fee) should stack vertically */
    #advancedFiltersPanel .filter-subsections {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    #advancedFiltersPanel .filter-subsection {
        padding: 0;
        border-right: none;
        border-bottom: 1px solid #E5E7EB;
        padding-bottom: 16px;
    }

    #advancedFiltersPanel .filter-subsection:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .mobile-primary-filters .custom-dropdown {
        width: 100%;
        min-width: 0;
    }

    .mobile-primary-filters .custom-dropdown-trigger {
        background: #fff;
        border: 1px solid rgba(0, 0, 0, 0.18);
        border-radius: 8px;
    }

    /* ===== Product cards (mobile) ===== */
    .main-content {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 50px;
    }

    #filterRow1 #searchBox{
        margin-right: 0px;
    }

    .left-sidebar {
        display: none; /* mobile designs provided don’t include compare panel */
    }

    /* One unified card container (matches design) */
    .product-item {
        border: 1px solid rgba(0, 0, 0, 0.20) !important;
        border-radius: 16px !important;
        overflow: hidden !important;
        background: #fff !important;
        /* Use the list `gap` for consistent row spacing */
        margin-bottom: 0 !important;
    }

    .product-card {
        height: auto;
        padding: 0;
        border-radius: 0;
        border: none;
        background: #fff;
    }

    /* When expanded on mobile, the container remains white with no border */
    .product-card.expanded {
        background: #fff !important;
        border: none !important;
    }

    .product-card-top {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    /* Show title-only header on mobile; hide meta controls (criteria btn lives in mobile-card-actions) */
    .product-row-header {
        display: block;
        padding: 16px 20px 0;
    }

    .product-row-meta {
        display: none;
    }

    .product-row-title {
        font-size: 14px;
        font-weight: 800;
        color: #000;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.4;
    }

    /* product-row: flex-column with controlled ordering */
    .product-row {
        display: flex;
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        width: 100%;
    }

    /* Ordering: header → data → feature chips */
    .product-row-header { order: 0; }
    .product-row-data   { order: 1; }
    .product-row-features { order: 2; padding: 0 20px 6px; margin-top: 15px; }

    /* Data row: switch to flex-column so each cell stacks */
    .product-row-data {
        display: flex;
        flex-direction: column;
        padding: 12px 20px 0;
    }

    /* Product code cell: show as first data row on mobile */
    .product-code-cell {
        display: flex !important;
        order: -1;
        justify-content: space-between;
        align-items: center;
    }

    .product-code-pill {
        display: contents;
    }

    .pcode-prefix {
        font-family: 'NaNMetrifyAWide-Reg';
        font-size: 12px;
        font-weight: 400;
        color: rgba(0,0,0,0.50);
    }

    .product-code-pill strong {
        font-size: 12px;
        font-weight: 800;
        color: #000;
    }

    .product-cell {
        flex: 0 0 auto;
        padding: 10px 0;
        border-right: none;
        border-bottom: 1px solid rgba(0,0,0,0.10);
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        width: 100%;
    }

    .product-cell:last-child {
        /* Design request: keep separators for all rows */
        border-bottom: 1px solid rgba(0,0,0,0.10);
    }

    /* Mobile: no tinted hover background */
    .product-card:hover,
    .product-card.compare-selected {
        background: #fff;
    }

    /* Base CSS already has the correct values (grey/regular label, black/bold value).
       Override the earlier wrong mobile overrides that had them swapped. */
    .cell-label {
        font-weight: 400;
        color: rgba(0,0,0,0.50);
        font-size: 12px;
    }

    .cell-value {
        font-weight: 800;
        font-size: 12px;
        color: #000;
        text-align: right;
        white-space: nowrap;
    }

    .product-actions {
        display: none; /* mobile uses the .mobile-card-actions CTA stack */
    }

    .compare-checkbox {
        display: none;
    }

    /* Mobile criteria button — simple underlined text button, no green */
    .mobile-card-actions .btn-criteria {
        width: 100%;
        padding: 5px 18px;
        font-size: 10px;
        font-weight: 400;
        border-radius: 100px;
        border: none;
        background: #F9F9F9;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        text-decoration: underline;
        text-underline-offset: 2px;
        color: #000;
        cursor: pointer;
    }

    /* No chevron on mobile criteria button */
    .mobile-card-actions .btn-criteria .criteria-chevron,
    .mobile-card-actions .btn-criteria::after {
        display: none;
        content: none;
    }

    /* Expanded: criteria button keeps the same grey style */
    .product-item.is-expanded .mobile-card-actions .btn-criteria {
        background: #F4F4F4;
        border: none;
    }

    /* Expanded card: keep default grey border (no green highlight on mobile) */

    /* Expanded: mint background on the title header */
    .product-item.is-expanded .product-row-header {
        background: #E5FEF6;
        padding-bottom: 16px;
    }

    /* Expanded: hide the default data rows and feature chips */
    .product-item.is-expanded .product-row-data {
        display: none !important;
    }

    .product-item.is-expanded .product-row-features {
        display: none !important;
    }

    /* Mobile CTA stack lives inside the unified card */
    .mobile-card-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 12px 20px 20px;
        background: #fff;
    }

    /* Slot for the expanded criteria content (inserts under Criteria CTA) */
    .mobile-expanded-slot {
        display: block;
    }

    /* Calculate + Start AIP: hidden by default, shown when expanded */
    .mobile-card-actions .btn-calculate,
    .mobile-card-actions .btn-start-dip {
        display: none;
    }

    /* When expanded: show calc/dip side by side */
    .product-item.is-expanded .mobile-card-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .product-item.is-expanded .mobile-card-actions .mobile-criteria,
    .product-item.is-expanded .mobile-card-actions .mobile-expanded-slot {
        flex: 0 0 100%;
    }

    .product-item.is-expanded .mobile-card-actions .btn-calculate,
    .product-item.is-expanded .mobile-card-actions .btn-start-dip {
        display: flex;
        flex: 1;
        width: auto;
        padding: 0 12px;
        font-size: 10px;
        font-weight: 400;
        height: 25px;
        align-items: center;
        justify-content: center;
    }

    /* Calculate: first (left), underlined, keeps its border */
    .product-item.is-expanded .mobile-card-actions .btn-calculate {
        order: 1;
        background: transparent;
        text-decoration: underline;
        text-underline-offset: 2px;
        color: #000;
    }

    /* Start AIP: second (right) */
    .product-item.is-expanded .mobile-card-actions .btn-start-dip {
        order: 2;
    }

    /* Expanded details (Criteria open): show as a single list */
    .product-expanded {
        box-shadow: none;
        padding: 0;
        background: #fff;
    }

    .product-expanded.visible {
        display: flex;
        flex-direction: column;
        gap: 16px;
        border: none !important;
        border-radius: unset !important;
        box-shadow: none !important;
    }

    /* Mobile: stack data cells vertically (label left, value right) */
    .expanded-data-row {
        flex-direction: column;
        padding: 0;
        border-bottom: none;
    }

    .expanded-data-cell {
        flex: 0 0 auto;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border-bottom: 1px solid rgba(0,0,0,0.10);
        gap: 6px 12px;
    }

    .expanded-data-cell::after {
        display: none;
    }

    .expanded-label {
        font-weight: 400;
        color: rgba(0,0,0,0.50);
        white-space: normal;
        font-size: 12px;
    }

    .expanded-value {
        font-weight: 800;
        color: #000;
        font-size: 12px;
        justify-content: flex-end;
    }

    /* CCJ note: shown inline as a grey box on mobile — sits on its own row (flex: 0 0 100%) */
    .expanded-cell-note {
        display: block;
        flex: 0 0 100%;
        width: 100%;
        margin-top: 2px;
        padding: 10px 12px;
        background: #F4F4F4;
        border-radius: 8px;
        font-family: 'NaNMetrifyAWide-Reg';
        font-size: 12px;
        font-weight: 400;
        color: #000;
        line-height: 1.5;
    }

    /* Hide the (i) info button on mobile — note is shown inline */
    .expanded-info-btn {
        display: none !important;
    }

    /* CTAs (Calculate + Start AIP) are in mobile-card-actions — hide the expanded row by default */
    .expanded-actions-row {
        display: none;
    }

    /* Inside the mobile slot: show only the feature tags, not the CTA buttons */
    .mobile-expanded-slot .expanded-actions-row {
        display: flex !important;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        padding: 0;
        gap: 8px;
    }

    .mobile-expanded-slot .expanded-ctas {
        display: none !important;
    }

    .mobile-expanded-slot .expanded-features {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 0;
    }

    /* Feature tag pill: 5px radius, mint background */
    .mobile-expanded-slot .feature-tag {
        display: inline-flex;
        align-items: center;
        padding: 4px 10px;
        background: #E5FEF6;
        border-radius: 5px;
        font-family: 'NaNMetrifyAWide-Reg';
        font-size: 12px;
        font-weight: 400;
        color: #000;
        white-space: normal;
    }

    /* Remove pipe-separator pseudo-element used on desktop */
    .mobile-expanded-slot .feature-tag::after {
        display: none;
    }

    .expanded-actions {
        display: none; /* mobile uses .mobile-card-actions instead */
    }

    /* Active/expanded: mint tint on header */
    .product-card.expanded .product-row-header {
        background: #E5FEF6;
    }

    /* Bottom actions */
    .bottom-actions {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 0;
    }

    /* Hide carousel nav — load-more replaces it on mobile */
    .carousel-nav {
        display: none !important;
    }

    /* Mobile load-more */
    .mobile-load-more {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
        width: 100%;
        margin-top: 4px;
    }

    .mobile-load-more-count {
        font-family: 'NaNMetrifyAWide-Reg';
        font-size: 14px;
        font-weight: 700;
        color: #000;
        text-align: center;
        margin: 0;
    }

    .btn-load-more {
        width: 100%;
        padding: 16px;
        background: #F4F4F4;
        border: none;
        border-radius: 100px;
        font-family: 'NaNMetrifyAWide-Reg';
        font-size: 15px;
        font-weight: 400;
        color: #000;
        cursor: pointer;
        text-align: center;
        transition: background 0.15s;
    }

    .btn-load-more:hover { background: #E8E8E8; }

    .product-count {
        display: none; /* replaced by mobile-load-more-count on mobile */
    }

    .product-guide-bottom-slot {
        display: none;
    }

    .pagination {
        display: none !important;
    }

    .carousel-arrow {
        width: 32px;
        height: 32px;
        border: none;
        background: transparent;
        /* Hide the fallback text arrow while keeping it accessible */
        text-indent: -9999px;
        overflow: hidden;
        white-space: nowrap;
        position: relative;
        cursor: pointer;
        color: #111;
    }

    /* Mobile carousel arrows: use SVG icon (next) + rotate for prev */
    .carousel-arrow::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 16px;
        height: 10px;
        background: url(/media/rm2o1te2/vector-26.svg) no-repeat center;
        background-size: contain;
    }

    #carouselPrev::before {
        transform: translate(-50%, -50%) rotate(180deg);
    }

    .carousel-arrow:disabled {
        opacity: 0.35;
        cursor: not-allowed;
    }

    .carousel-dots {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .carousel-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: transparent;
        border: 1px solid #000;
    }

    .carousel-dot.active {
        background: #00FFAE;
        border: none;
        width: 16px;
        height: 16px;
    }
    .custom-dropdown-trigger {
    border-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.20);
}

#filterRow1 #sortByWrapper {
    margin-left: 0px;
    margin-top: -15px;
}

/* ===== Segment carousel (mobile ≤767px) — single large portrait card ===== */
.segment-section {
    padding: 32px 0 40px;
    gap: 22px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

/* Reflow carousel + footer so the arrows sit beside the dots */
.segment-carousel,
.segment-footer {
    display: contents;
}

/* Row 1: filmstrip viewport, full width */
.segment-slides-wrapper {
    order: 1;
    flex: 0 0 100%;
    width: 100%;
}
.segment-slides-track {
    gap: 16px;
    padding: 0;
}

/* One large portrait card centred; neighbours clipped off-screen */
.segment-slide {
    flex: 0 0 90vw;
    width: 90vw;
    opacity: 1;
    transform: none;
}
.segment-slide.active {
    opacity: 1;
    transform: none;
}
.segment-slide-image {
    flex: 0 0 auto;
    width: 100%;
    height: 125vw;
    max-height: 580px;
    border-radius: 24px;
}
.segment-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Heading overlay: bottom, centred, larger */
.segment-img-overlay {
    align-items: center;
    text-align: center;
    padding: 28px 26px 32px;
    gap: 8px;
}
.segment-img-label { font-size: 30px; }
.segment-find-out-more { font-size: 15px; }

/* Row 2: ‹  • • •  › — arrows visible, flanking the dots */
.segment-arrow { display: flex; }
.segment-arrow--prev { order: 2; }
.segment-dots        { order: 3; }
.segment-arrow--next { order: 4; }

/* Row 3: full-width CTA(s) */
.segment-ctas {
    order: 5;
    flex: 0 0 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 0 24px;
    box-sizing: border-box;
}
.segment-cta { text-align: center; }

/* Per design: single green "View all products" pill with a chevron;
   hide the secondary segment-filter CTA on mobile. Scoped to the footer
   button (.js-scroll-to-products) so the modal's outline button is unaffected. */
.segment-ctas .js-segment-filter-cta { display: none; }
.segment-cta--outline.js-scroll-to-products {
    background: #00FFAE;
    color: #000;
    border-color: #00FFAE;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.segment-cta--outline.js-scroll-to-products::after {
    content: "";
    margin-left: 10px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #000;
}
}

/* Desktop: no need for the Close filters CTA in the advanced filters popup.
   Keep the Apply filters CTA on desktop (per design screenshot), even though
   filters are applied immediately on click. */
@media (min-width: 1200px) {
    #advancedFiltersPanel .mobile-filters-header {
        display: none !important;
    }

    /* Ensure Apply filters CTA is visible on desktop */
    #advancedFiltersPanel .advanced-filters-actions {
        display: flex;
    }
}

/* ===== Segment carousel — DESKTOP (≥1200px): Figma card sizing =====
   Centre/active hero card 381×439 (wide/tall), side cards 360×405 (shorter),
   bottom-aligned. The size difference can't be done with scale(), so cards use
   real width/height inside a fixed 360×439 slot — the strip never reflows, so
   the JS centring maths (which reads a constant slot offsetWidth) stays exact. */
@media (min-width: 1200px) {
    /* Remove the top padding above the carousel (desktop only) */
    .segment-section {
        padding: 0px 0px 48px;
    }

    /* Card-to-card gap (desktop only; tablet/mobile keep their own gaps) */
    .segment-slides-track {
        gap: 30px;
        margin-bottom: -4px;
    }

    /* Strip viewport sized to fit exactly three cards (3×360 + 2×30 = 1140px)
       so the side cards sit flush at the edges instead of being clipped.
       flex-grow:0 stops it peeking the next clones; flex-shrink:1 lets it give
       way gracefully on the 1200–1300px range where the arrows need the room. */
    .segment-slides-wrapper {
        flex: 0 1 1140px;
    }

    /* Uniform slot: side-card footprint + tallest height. No scale. */
    .segment-slide {
        flex: 0 0 360px;
        width: 360px;
        height: 439px;
        align-items: center;       /* centre image horizontally; wider active card overflows evenly into the gap */
        justify-content: flex-end; /* bottom-align: short side cards share a common bottom edge with the tall hero */
        opacity: 0.55;
        transform: none;
    }
    .segment-slide.active {
        opacity: 1;
        transform: none;
        z-index: 2;
    }

    /* Side (inactive) cards: 360 × 405 — slightly shorter than the hero, bottom-aligned */
    .segment-slide-image {
        flex: 0 0 auto;
        width: 360px;
        height: 405px;
        min-height: 0;
        transition: width 0.5s ease, height 0.5s ease;
    }
    /* Centre (active) hero card: 381 × 439 — wider & taller than the sides */
    .segment-slide.active .segment-slide-image {
        width: 359px;
        height: auto;
    }
}

.productsPage .contentMainss {
    display: block;
}

@media (min-width: 1200px) and (max-width: 1399px){
  .products-page {
    max-height: calc(100vh - 140px); 
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
}

@media (min-width: 1200px) and (max-width: 1399px) {
.product-cell {
      padding: 0px 20px;
        flex: 0 0 auto;
}

.product-cell:first-child {
        padding-left: 0;
        padding-right: 20px;
}

.product-row-header {
    padding: 11px 15px 10px;
}

.product-row-data {
    padding: 9px 15px 10px;
}

.main-content {
    gap: 25px;
}

.btn-close, .btn-card-close {
    width: 100px;
}

.btn-start-dip {
    width: 108px;
}

.btn-calculate {
    width: 100px;
}
.expanded-col {
    padding: 0px 15px;
}

.expanded-data-row {
    padding: 14px 15px;
}

.expanded-actions-row {
    padding: 10px 15px 14px;
}
}

@media (max-width: 369px){
    .productsPage .contentMainss {
    padding: 0px !important;
}
}

@media (min-width: 768px) and (max-width: 1024px) {
    .ContentNav {
        position: absolute !important;
    }
    .ContentNav.topbar-exists {
        top: 30px !important;
    }
}

@media (min-width: 500px) and (max-width: 767px){
    /* Slightly larger card on bigger phones; portrait kept via the base mobile rule */
    .segment-slide {
        flex: 0 0 82vw;
        width: 82vw;
    }
    .segment-slide-image {
        height: 112vw;
    }
}

@media (max-width: 767px){
    .segment-slide-card > p{
        font-size: 14px;
    }
}

/* ===== Find-out-more modal — MOBILE (stacked card, CTAs stacked) ===== */
@media (max-width: 767px) {
    .segment-section.modal-open .segment-modal {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 14px;
        width: 92%;
        max-width: 460px;
        margin: 0 auto;
    }

    /* Dissolve the modal row so arrows drop down beside the dots */
    .segment-modal-row { display: contents; }

    /* Card stacks: image band on top, description below */
    .segment-modal-card {
        order: 1;
        flex: 0 0 100%;
        flex-direction: column;
        position: relative;
        min-height: 0;
    }
    .segment-modal-image {
        flex: 0 0 auto;
        width: 100%;
        min-height: 170px;
        height: 170px;
    }
    .segment-modal-image .segment-img-overlay {
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 22px;
    }
    .segment-modal-detail {
        position: static;
        flex: 0 0 auto;
        padding: 24px 22px 28px;
    }
    .segment-modal-close {
        top: 12px;
        right: 12px;
        color: #fff;
        z-index: 3;
    }

    /* Row 2: ‹  • • •  › — arrows flank the modal dots */
    .segment-modal-prev { order: 2; display: flex; }
    .segment-modal-dots { order: 3; }
    .segment-modal-next { order: 4; display: flex; }

    /* Row 3: CTAs stacked full-width — Rates (green) on top, View all (outline) below */
    .segment-modal .segment-ctas {
        order: 5;
        flex: 0 0 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 4px 8px 0;
    }
    .segment-modal-rates   { order: 1; }
    .segment-modal-viewall { order: 2; }
}

p.segment-img-sub {
    max-width: 235px;
}

p.segment-img-label {
    font-size: 16px;
}

.segment-slide.active p.segment-img-label {
    font-size: 21px;
}

button.segment-cta.segment-cta--outline.js-scroll-to-products {
    border-radius: 100px;
    background: #00FFAE;
    color: #000;
    text-align: right;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    border: none;
}

button.segment-cta.segment-cta--outline.js-scroll-to-products:hover {
    font-family: 'NaNMetrifyAWide-ExBld';
}

button.segment-cta.segment-cta--outline.js-scroll-to-products:hover .sidebar-title-chevron {
    font-family: 'NaNMetrifyAWide-ExBld';
    width: 15px;
    height: 12px;
}

.segment-slide.active {
    position: relative;
    overflow: hidden;
    border-radius: 24px; /* adjust as needed */
}

.segment-slide.active::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.55) 25%,
        rgba(0, 0, 0, 0.15) 55%,
        rgba(0, 0, 0, 0) 100%
    );
    z-index: 1;
}

/* Keep your content above the overlay */
.segment-slide.active .content,
.segment-slide.active .segment-content,
.segment-slide.active .slide-content {
    position: relative;
    z-index: 2;
}

.segment-slide.active .segment-slide-image {
    position: relative;
}

.segment-slide.active .segment-img-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 40px;
    color: #fff;
    text-align: center;
}

.segment-slide.active .segment-slide-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.85) 0%,
        rgba(0,0,0,.55) 35%,
        rgba(0,0,0,0) 70%
    );
    z-index: 2;
    pointer-events: none;
}

.segment-slide.active .segment-img {
    display: block;
    width: 100%;
}

.segment-slide.active .segment-img-overlay * {
    position: relative;
    z-index: 4;
}

div#segment-track {
    position: relative;
    right: -12px;
}

button.segment-cta.segment-cta--filled.segment-modal-rates:hover, a#productGuideBtn:hover {
    font-family: 'NaNMetrifyAWide-ExBld';
}

h2.compare-title {
    font-family: 'NaNMetrifyAWide-ExBld' !important;
}

button#resetFiltersBtn {
    width: 116px;
    height: 42px;
    padding: 1px 0 0 25px;
}

button#compareBtn:hover {
    border-radius: 100px;
    color: #000;
    text-align: right;
    font-family: 'NaNMetrifyAWide-ExBld';
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    border-radius: 100px;
    border: 1px solid #00FFAE;
    background: #00FFAE;
}

button#downloadBtn:hover {
    font-family: 'NaNMetrifyAWide-ExBld';
}

button.expanded-info-btn {
    color: #000;
    font-family: 'NaNMetrifyAWide-ExBld';
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    line-height: 10px; /* 100% */
}

svg.criteria-chevron {
    width: 12px;
    height: 7.41px;
    flex-shrink: 0;
}

div#segment-track {
    left: 0;
    right: 0;
}

.segment-dots {
    position: relative;
    left: -6px;
}

button.segment-cta.segment-cta--outline.js-scroll-to-products.segment-modal-viewall {
    border-radius: 100px;
    border: 1px solid #FFF;
    background: #000;
    color: #FFF;
    text-align: right;
    font-family: 'NaNMetrifyAWide-Reg';
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    height: 42px;
}

button.segment-cta.segment-cta--outline.js-scroll-to-products.segment-modal-viewall:HOVER {
    font-family: 'NaNMetrifyAWide-ExBld';
}

@media (min-width:1200px) and (max-width: 1260px) {
.segment-footer {
    left: 0%;
}
}

@media (min-width:1261px) and (max-width: 1270px) {
.segment-footer {
    left: -1%;
}
}

@media (min-width:1271px) and (max-width: 40000px) {
.segment-footer {
            left: -1.3% !important;
        position: relative;
}
}
