/* ============================================================
   CATALOG LAYOUT: sidebar + content
   ============================================================ */
.catalog_layout {
    display: grid;
    grid-template-columns: minmax(300px, 305px) 1fr;
    gap: 24px;
    align-items: start;
}

.cf__content {
    min-width: 0;
}

.cf__content-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.cf__content-head .custom_h2 {
    margin-bottom: 0;
    flex: 1;
}

.cf__results-count {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

.catalog_no_results {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    padding: 48px 16px;
    font-size: 16px;
}
.catalog_no_results a { color: #fb8d69; text-decoration: underline; }

/* ============================================================
   SIDEBAR (the <aside class="cf">)
   On desktop: inline, visible always
   On mobile: fixed overlay, opens via FAB
   ============================================================ */
.cf {
    position: sticky;
    top: 20px;
    background: rgba(11, 22, 32, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 40px);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.cf__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}

.cf__head-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}

.cf__mob-close {
    display: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.cf__mob-close:hover { background: #fb8d69; color: #000; }

.cf__form {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
}

.cf__form::-webkit-scrollbar {
    width: 6px;
}

.cf__form::-webkit-scrollbar-track {
    background: transparent;
}

.cf__form::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.cf__form::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Ranges */
.cf__ranges {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 12px;
}

.cf__range {
    border: none;
    padding: 0 0 2px;
    margin: 0;
}

.cf__range-label {
    display: block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 8px;
    padding: 0;
}

.cf__range-values {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.cf__range-input {
    min-width: 0;
    width: 100%;
    height: 32px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.88);
    border-radius: 7px;
    padding: 0 10px;
    font-size: 12px;
    line-height: 32px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    -moz-appearance: textfield;
    box-sizing: border-box;
}
.cf__range-input::-webkit-inner-spin-button,
.cf__range-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.cf__range-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(251, 141, 105, 0.55);
}
.cf__range-input::placeholder { color: rgba(255, 255, 255, 0.25); }
.cf__range-sep {
    color: rgba(255, 255, 255, 0.28);
    font-size: 11px;
}

.cf__range-slider {
    position: relative;
    height: 22px;
    margin: 0 8px;
}

.cf__range-slider::before,
.cf__range-slider::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 3px;
    transform: translateY(-50%);
    border-radius: 999px;
}

.cf__range-slider::before {
    background: rgba(255, 255, 255, 0.1);
}

.cf__range-slider::after {
    left: var(--min-pos);
    right: calc(100% - var(--max-pos));
    background: linear-gradient(90deg, #ffc6b3 0%, #fb8d69 100%);
    box-shadow: 0 0 0 1px rgba(251, 141, 105, 0.08);
}

.cf__range-slider input[type="range"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 22px;
    margin: 0;
    padding: 0;
    background: transparent;
    pointer-events: none;
    appearance: none;
    -webkit-appearance: none;
    z-index: 2;
}

.cf__range-slider input[type="range"]::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
    margin-top: -5.5px;
    border-radius: 50%;
    border: 2px solid #fb8d69;
    background: #142332;
    cursor: pointer;
    pointer-events: auto;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: 0 0 0 3px #09141e, 0 2px 10px rgba(0,0,0,0.35);
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.cf__range-slider input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fb8d69;
    background: #142332;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 0 0 3px #09141e, 0 2px 10px rgba(0,0,0,0.35);
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.cf__range-slider input[type="range"]:hover::-webkit-slider-thumb,
.cf__range-slider input[type="range"]:focus-visible::-webkit-slider-thumb {
    background: #fb8d69;
    transform: scale(1.12);
}

.cf__range-slider input[type="range"]:hover::-moz-range-thumb,
.cf__range-slider input[type="range"]:focus-visible::-moz-range-thumb {
    background: #fb8d69;
    transform: scale(1.12);
}

.cf__range-slider input[type="range"]::-webkit-slider-runnable-track {
    height: 3px;
    background: transparent;
}

.cf__range-slider input[type="range"]::-moz-range-track {
    height: 3px;
    background: transparent;
}

/* Divider */
.cf__divider {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
    margin: 10px 0;
}

/* Incall / Outcall */
.cf__inout {
    width: 100%;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.cf__inout-item {
    flex: 1;
    min-width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    box-sizing: border-box;
}
.cf__inout-item:has(input:checked) {
    background: rgba(251, 141, 105, 0.12);
    border-color: rgba(251, 141, 105, 0.6);
    color: #fb8d69;
}
.cf__inout-item input { accent-color: #fb8d69; cursor: pointer; }

/* Chips (taxonomy dropdowns) */
.cf__chips {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cf__chip {
    position: relative;
    width: 100%;
}

.cf__chip-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 13px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    box-sizing: border-box;
}
.cf__chip-btn:hover {
    border-color: rgba(251, 141, 105, 0.35);
    color: #fff;
}
.cf__chip--active .cf__chip-btn,
.cf__chip.is-open .cf__chip-btn {
    background: rgba(251, 141, 105, 0.08);
    border-color: rgba(251, 141, 105, 0.45);
    color: #fb8d69;
}
.cf__chip-label { flex: 1; }
.cf__chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 16px;
    padding: 0 5px;
    border-radius: 999px;
    background: #fb8d69;
    color: #0b1620;
    font-size: 9px;
    font-weight: 900;
}
.cf__chip-arrow { transition: transform 0.2s ease; opacity: 0.5; flex-shrink: 0; }
.cf__chip.is-open .cf__chip-arrow { transform: rotate(180deg); opacity: 1; }

.cf__chip-pop {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 10;
    padding: 8px;
    border-radius: 12px;
    background: #0d1e2c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.cf__chip-search {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 11px;
    margin-bottom: 5px;
    box-sizing: border-box;
}
.cf__chip-search:focus { outline: none; border-color: #fb8d69; }
.cf__chip-search::placeholder { color: rgba(255,255,255,0.3); }

.cf__chip-list {
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.cf__chip-list::-webkit-scrollbar { width: 3px; }
.cf__chip-list::-webkit-scrollbar-track { background: transparent; }
.cf__chip-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

.cf__chip-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.cf__chip-opt:hover { background: rgba(255,255,255,0.05); }
.cf__chip-opt input { accent-color: #fb8d69; cursor: pointer; flex-shrink: 0; }
.cf__chip-opt-name { flex: 1; font-size: 12px; color: rgba(255,255,255,0.85); }
.cf__chip-opt-cnt {
    font-size: 10px;
    color: rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.04);
    padding: 1px 5px;
    border-radius: 5px;
}

/* Foot */
.cf__foot {
    padding: 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    background: rgba(8, 16, 24, 0.5);
}

.cf__submit {
    width: 100%;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 16px;
    border: none;
    border-radius: 12px;
    color: #0b1620;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    cursor: pointer;
    overflow: hidden;
}

.cf__submit::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #ffc6b3 0%, #fb8d69 100%);
    transition: opacity 0.3s ease-in-out;
}

.cf__submit::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #fb8d69;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.cf__submit:hover::after {
    opacity: 1;
}

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

.cf__reset {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    border-bottom: 1px dashed rgba(255,255,255,0.2);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 1px;
    transition: all 0.2s ease;
}
.cf__reset:hover { color: #fb8d69; border-bottom-color: #fb8d69; }

/* ============================================================
   MOBILE FAB (floating button — JS appends to body)
   ============================================================ */
.cf__fab {
    display: none;
    position: fixed;
    bottom: 32px;
    right: 16px;
    z-index: 997;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: #fb8d69;
    color: #0b1620;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 28px rgba(251,141,105,0.35), 0 3px 12px rgba(0,0,0,0.4);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 0;
}

.cf__fab svg {
    width: 30px;
    height: 30px;
}
.cf__fab:hover {
    background: #ffc6b3;
    transform: scale(1.12) translateY(-4px);
    box-shadow: 0 12px 32px rgba(251,141,105,0.45);
}
.cf__fab:active { transform: scale(0.92); }

.cf__fab-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    background: #0b1620;
    border: 2.5px solid #fb8d69;
    border-radius: 50%;
    animation: cf-pulse 2s ease-in-out infinite;
}
@keyframes cf-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* Backdrop (mobile only) */
.cf__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
    z-index: 998;
    animation: cf-fade-in 0.2s ease;
}
@keyframes cf-fade-in { from { opacity: 0; } to { opacity: 1; } }

html.cf-modal-open,
body.cf-modal-open {
    overflow: hidden;
}

/* ============================================================
   MOBILE BREAKPOINT ≤ 1023px
   ============================================================ */
@media (max-width: 1023px) {
    /* layout: single column, filter hidden */
    .catalog_layout {
        grid-template-columns: 1fr;
    }

    /* FAB visible */
    .cf__fab { display: flex; }

    /* Sidebar becomes fixed overlay */
    .cf {
        position: fixed;
        inset: 0;
        z-index: 999;
        width: 100%;
        max-width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        top: 0;
        left: auto;
        right: 0;
        bottom: 0;
        border-radius: 0;
        border: none;
        border-left: 1px solid rgba(255,255,255,0.1);
        background: rgba(11, 22, 32, 0.98);
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.6);
        transform: translateX(100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        visibility: hidden;
        overflow: hidden;
    }
    .cf.is-open {
        transform: translateX(0);
        visibility: visible;
    }
    .cf__mob-close {
        display: inline-flex;
    }

    /* Improve form scrolling on mobile */
    .cf__form {
        padding: 18px 20px 20px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cf__ranges {
        gap: 16px;
    }

    .cf__range-label {
        margin-bottom: 7px;
    }

    .cf__range-values {
        margin-bottom: 12px;
    }

    /* Better chip layout on mobile */
    .cf__chips {
        gap: 8px;
    }

    .cf__chip-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 32px;
    margin-bottom: 32px;
}

.pagination-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-link:hover {
    border-color: rgba(251, 141, 105, 0.35);
    color: #fff;
}

.pagination-item.current .pagination-link {
    background: #fb8d69;
    border-color: #fb8d69;
    color: #0b1620;
    cursor: default;
}

.pagination-item.disabled .pagination-link {
    color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-ellipsis {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    padding: 0 4px;
}

.home_catalog_section--paginated {
    margin-bottom: 80px;
}
