/* assets/css/pages/bikes-in-stock.css */
:root {
    --gtm-filter-border: #342E37;
    --gtm-filter-bg: #FFFFFF;
    --gtm-filter-active: #342E37;
    --gtm-filter-text: #342E37;
    --gtm-filter-active-text: #FFFFFF;
    --gtm-slider-h: 4px;
}

/* --- Container --- */
.gtm-filter-shelf {
    background-color: #E2E2E2;
    padding: 32px;
    border-radius: 16px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: 32px;
    border: none;
}

/* --- Default/Advanced Tabs --- */
.gtm-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid rgba(52, 46, 55, 0.15);
}
.gtm-filter-tab {
    background: transparent;
    border: none;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    color: var(--gtm-filter-text);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s ease, border-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.gtm-filter-tab:hover {
    color: var(--gtm-filter-active);
}
.gtm-filter-tab.is-active {
    color: var(--gtm-filter-active);
    border-bottom-color: var(--gtm-filter-active);
}
.gtm-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 9px;
    background: #FFC424;
    color: #111;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}
.gtm-tab-badge[hidden] {
    display: none;
}
.gtm-filter-pane[hidden] {
    display: none;
}
.gtm-filter-pane:not(.is-active) {
    display: none;
}
.gtm-filter-pane.is-active {
    display: block;
}
.gtm-trans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

/* --- Responsive Grid System --- */
.gtm-filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

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

@media (min-width: 1200px) {
    .gtm-filter-grid {
        /* 60% Left / 40% Right */
        grid-template-columns: 3fr 2fr; 
        gap: 64px;
    }
}

/* --- Columns --- */
.gtm-filter-col-side {
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center sliders */
}

/* --- Headers --- */
.gtm-filter-label {
    font-family: 'Figtree', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 14px;
    margin-bottom: 12px;
    display: block;
    color: var(--gtm-filter-border);
}

/* --- Brand & Type Pills --- */
.gtm-brand-grid,
.gtm-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.gtm-stock-pill {
    cursor: pointer;
    user-select: none;
    margin: 0;
    width: 100%;
    display: block; /* Ensure it behaves as a block container */
}

.gtm-stock-pill input {
    display: none;
}

.gtm-stock-pill span {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 16px;
    border: none; /* No Border */
    border-radius: 96px;
    font-family: 'Figtree', sans-serif;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    color: #666;
    background: #FFF;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08); /* Soft Shadow */
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
}

/* Hover */
.gtm-stock-pill:hover span {
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* Active */
.gtm-stock-pill input:checked + span {
    background: var(--gtm-filter-active);
    color: var(--gtm-filter-active-text);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* --- Condition Toggles --- */
.gtm-cond-group {
    display: flex;
    gap: 10px;
}

/* --- Range Sliders --- */
.gtm-range-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gtm-range-wrapper {
    position: relative;
    /* 1. Remove fixed height and flex centering that squashed things */
    height: auto; 
    display: block;
    /* 2. Reserve space for the slider thumbs at the top */
    padding-top: 24px; 
    margin-bottom: 12px;
}

.gtm-slider-track {
    /* 3. Position track relative to the new padding area */
    position: absolute;
    top: 10px; 
    left: 0;
    width: 100%;
    height: var(--gtm-slider-h);
    background: #D9D9D9;
    border-radius: 4px;
    z-index: 0;
}

.gtm-slider-progress {
    position: absolute;
    height: 100%;
    background: var(--gtm-filter-active);
    border-radius: 4px;
    left: 0;
    right: 0;
    z-index: 1;
}

.gtm-range-input {
    position: absolute;
    width: 100%;
    height: var(--gtm-slider-h);
    /* 4. Align inputs perfectly with the track */
    top: 10px; 
    transform: translateY(-50%);
    pointer-events: none;
    -webkit-appearance: none;
    background: none;
    z-index: 2;
    margin: 0;
    left: 0;
}

/* Thumbs */
.gtm-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #FFF;
    border: 3px solid var(--gtm-filter-active);
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    /* No margin-top needed if transform aligns center, 
       but standard range inputs are tricky. 
       Usually track height is small, thumb is big. */
}

.gtm-range-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #FFF;
    border: 3px solid var(--gtm-filter-active);
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transform: none;
}

/* Labels */
.gtm-range-labels {
    display: flex;
    justify-content: space-between;
    /* 5. Clear spacing from the slider area */
    margin-top: 0; 
}

.gtm-num-display {
    font-family: 'Figtree', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #333;
    background: transparent;
    border: none;
    padding: 0;
}

/* --- Reset Bar --- */
.gtm-filter-actions {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #EAEAEA;
}
.gtm-filter-actions .gtm-result-count {
    justify-self: start;
}
.gtm-filter-actions .gtm-reset-btn {
    justify-self: end;
}
.gtm-active-filters {
    justify-self: center;
    text-align: center;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    max-width: 100%;
}
/* Empty span must stay in the DOM so the middle grid track keeps its slot —
   otherwise the reset button would slide into the centre. Just zero its width. */
.gtm-active-filters:empty {
    min-width: 0;
}
/* Visual separator in front of the filter summary when populated. */
.gtm-active-filters:not(:empty)::before {
    content: '·';
    margin-right: 8px;
    color: #999;
}

.gtm-result-count {
    font-weight: 900;
    font-size: 14px;
    text-transform: uppercase;
    color: #333;
    letter-spacing: 0.05em;
}

.gtm-reset-btn {
    background: none;
    border: none;
    text-decoration: underline;
    font-weight: 700;
    color: #888;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 12px;
    transition: color 0.2s;
}
.gtm-reset-btn:hover {
    color: var(--gtm-filter-active);
}

/* --- CAROUSEL INTEGRATION ---
   Sizing / scrolling / snap / arrows / dots for this scroller are now owned by
   the shared engine (assets/css/components/carousel.css). Only two legacy bits
   remain: suppress the edge-fade pseudo-elements (their .has-overflow toggler no
   longer runs here) and keep the filter shelf styling above. */

/* Kill the legacy gradient edge masks */
#stock-explorer-section .gtm-explore-mask-container::before,
#stock-explorer-section .gtm-explore-mask-container::after {
    display: none !important;
    content: none !important;
}

/* Each stock card fills its carousel column (base .gtm-card-stock-v2 is width:100%). */
#stock-explorer-section .gtm-carousel__item .gtm-card-stock-v2 {
    flex: initial;
    width: 100%;
    max-width: none;
}

/* 3. Pill Navigation — reuse explore-bikes.css pill styling.
   The JS renders page-dots into .gtm-nav-dots (same markup as scroller). */
#stock-explorer-section .gtm-explore-nav-bar {
    margin-top: 32px;
}

/* (Track sizing is owned by carousel.css; the old width/padding reset was removed.) */

