/*
 * Shoptet Sorting + Price Filter UI
 */


.filter-sections {
    background-color: transparent !important;
}

.ui-slider .ui-slider-range,
.ui-slider-handle,
.ui-slider-handle:hover,
.ui-slider-horizontal .ui-slider-handle:first-of-type::after {
    background-color: var(--primary-gold) !important;
}


/* ── wrapper ──────────────────────────────────────────────────── */

#customSortingWrapper {
    display: inline-flex;
    align-items: center;
}

.csr-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 6px 0px 6px 14px;
}


/* ── label "Řadit podle" ─────────────────────────────────────── */

.csr-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #444;
    white-space: nowrap;
    user-select: none;
}

.csr-label svg {
    flex-shrink: 0;
    color: #444;
}


/* ── dropdown wrappers ───────────────────────────────────────── */

.csr-dropwrap {
    position: relative;
}


/* ── shared trigger button ───────────────────────────────────── */

.csr-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #222;
    line-height: 1.5;
    transition: border-color 0.15s ease, color 0.15s ease;
    outline: none;
}

.csr-trigger:focus-visible {
    outline: 2px solid #222;
    outline-offset: 2px;
    border-radius: 2px;
}


/* Sort trigger: underline style (no border box) */

.csr-trigger:not(.csr-trigger--pill) {
    padding: 0 2px 0 0;
    border: none;
    border-bottom: 1.5px solid #222;
    border-radius: 0;
}

.csr-trigger:not(.csr-trigger--pill):hover {
    color: #555;
    border-bottom-color: #888;
}


/* Price trigger: pill/outline style */

.csr-trigger--pill {
    padding: 6px 12px 6px 14px;
    border: 1px solid #ccc;
    border-radius: 20px;
}

.csr-trigger--pill:hover {
    border-color: #999;
    color: #333;
}

.csr-trigger--pill.csr-trigger--open {
    border-color: #222;
}

.csr-trigger-text {
    white-space: nowrap;
}

.csr-chevron {
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.csr-trigger--open .csr-chevron {
    transform: rotate(180deg);
}


/* ── shared panel base ───────────────────────────────────────── */

.csr-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 999;
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10);
    animation: csrFadeIn 0.13s ease;
}

@keyframes csrFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.csr-panel[hidden] {
    display: none;
}


/* ── sort list panel ─────────────────────────────────────────── */

ul.csr-panel {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    min-width: 180px;
}


/* ── option buttons ──────────────────────────────────────────── */

.csr-option {
    display: block;
    width: 100%;
    padding: 9px 18px;
    background: transparent;
    border: none;
    border-radius: 0;
    text-align: left;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.1s ease;
}

.csr-option:hover {
    background: #f5f5f5;
}

.csr-option--active {
    font-weight: 600;
    color: #111;
}


/* ── price panel ─────────────────────────────────────────────── */

.csr-panel--price {
    padding: 20px 20px 16px;
    min-width: 280px;
    max-width: 320px;
    left: auto;
    right: 0;
}

.csr-panel--price .slider-wrapper {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

.csr-panel--price .slider-header {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    margin-bottom: 12px;
}

.csr-panel--price .slider-content {
    padding: 0 4px;
}


/* noUiSlider track */

.csr-panel--price .noUi-target {
    margin: 8px 0 14px;
}


/* price labels */

.csr-panel--price .slider-values,
.csr-panel--price .price-range-inputs {
    font-size: 13px;
    color: #555;
}


/* ── responsive ──────────────────────────────────────────────── */

@media (max-width: 400px) {
    .csr-inner {
        flex-wrap: wrap;
    }
    .csr-panel--price {
        right: auto;
        left: 0;
        min-width: 260px;
    }
}


/*
@media (min-width: 768px) {
    .category-header-total-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 20px;
        margin-bottom: 15px;
    }
    .category-header-total-row #category-header,
    .category-header-total-row .listItemsTotal {
        width: 50%;
    }
    .category-header-total-row #category-header {
        display: flex;
        align-items: center;
    }
    .category-header-total-row .listItemsTotal {
        display: flex !important;
        justify-content: flex-end;
        align-items: center;
        text-align: right;
        padding: 0;
    }
}

*/

.category-header-total-row {
    display: flex;
    align-items: end;
    /* justify-content: space-between; */
    width: 100%;
    gap: 0px;
    margin-bottom: 15px;
    flex-direction: column;
}

.category-header-total-row .category-header {
    margin-bottom: 0px !important;
}

.category-header-total-row .listItemsTotal {
    padding: 0 !important;
}