/* ============================================================
   Czech There – barevná „skleněná“ lišta filtrů (web + portál)
   ============================================================ */
.ctpb-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 8px 10px !important; min-height: 0 !important;
    background: rgba(255,255,255,0.72);
    -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
    border: 1px solid rgba(255,255,255,0.9);
    border-radius: 22px;
    box-shadow: 0 10px 30px -14px rgba(15,23,42,0.22), 0 1px 2px rgba(15,23,42,0.05), inset 0 1px 0 rgba(255,255,255,0.9);
}
.ctpb-bar { flex-wrap: nowrap !important; }
.ctpb-bar > div:first-child { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: nowrap !important; }
.ctpb-bar > div:last-child { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.ctpb-bar .ctpb-scrollwrap { flex: 1 1 auto; min-width: 0; }

/* ── rychlé pilulky ── */
.ctpb-pills { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 3px 2px 6px; margin: -3px 0 -6px; }
.ctpb-pills::-webkit-scrollbar { display: none; }

.ctpb-pill {
    --c1: #0092FF; --c2: #7C3AED;
    display: inline-flex !important; align-items: center; gap: 7px;
    padding: 5px 14px 5px 5px !important;
    border: none !important; border-radius: 999px !important;
    background: color-mix(in srgb, var(--c1) 10%, #fff) !important;
    color: color-mix(in srgb, var(--c1) 78%, #111) !important;
    font-family: var(--ct-font); font-size: 13px !important; font-weight: 600 !important;
    white-space: nowrap; cursor: pointer; outline: none; box-shadow: none !important;
    transition: transform .25s cubic-bezier(.34,1.56,.64,1), background-color .2s ease, box-shadow .25s ease, color .2s ease;
}
.ctpb-ico {
    width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: var(--c1);
    box-shadow: 0 1px 3px color-mix(in srgb, var(--c1) 30%, transparent);
    transition: transform .35s cubic-bezier(.34,1.56,.64,1), background-color .2s ease, color .2s ease;
}
@media (hover: hover) {
    .ctpb-pill:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--c1) 17%, #fff) !important; }
    .ctpb-pill.active:hover { background: linear-gradient(135deg, var(--c1), var(--c2)) !important; }
    .ctpb-pill:hover .ctpb-ico { transform: rotate(-12deg) scale(1.08); }
}
.ctpb-pill.active {
    background: linear-gradient(135deg, var(--c1), var(--c2)) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px -6px color-mix(in srgb, var(--c1) 70%, transparent), inset 0 1px 0 rgba(255,255,255,0.25) !important;
}
.ctpb-pill.active .ctpb-ico { background: rgba(255,255,255,0.24); color: #fff; box-shadow: none; }
.ctpb-pill:focus-visible, .ctpb-cat:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c1, #0092FF) 35%, transparent) !important; }
.ctpb-pop { animation: ctpb-pop .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes ctpb-pop { 0% { transform: scale(.88); } 55% { transform: scale(1.08); } 100% { transform: scale(1); } }

/* ── rozbalovací pole v liště ── */
.ctpb-selects { display: flex; gap: 6px; flex-shrink: 0; }
.ctpb-selects .ct-filter-compact { min-width: 130px !important; max-width: 200px; }
.ctpb-select { position: relative; }
.ctpb-bar .ctpb-select .cts-trigger {
    border-radius: 999px !important; border: none !important;
    background: rgba(15,23,42,0.055) !important; box-shadow: none !important;
    min-height: 34px; font-size: 13px !important; font-weight: 600; color: var(--ct-700);
    transition: background-color .2s ease;
}
.ctpb-bar .ctpb-select .cts-trigger:hover { background: rgba(15,23,42,0.09) !important; }
.ctpb-bar .ctpb-select.ctpb-set .cts-trigger {
    background: linear-gradient(135deg, rgba(0,146,255,0.14), rgba(124,58,237,0.14)) !important;
    color: #1D4ED8; padding-right: 34px !important;
}
.ctpb-select-x {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%) scale(.6); opacity: 0; pointer-events: none;
    width: 22px; height: 22px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: #1D4ED8; box-shadow: 0 1px 3px rgba(15,23,42,0.15);
    transition: transform .25s cubic-bezier(.34,1.56,.64,1), opacity .2s ease; z-index: 2;
}
.ctpb-select.ctpb-set .ctpb-select-x { opacity: 1; transform: translateY(-50%) scale(1); pointer-events: auto; }
.ctpb-select.ctpb-set .cts-arrow, .ctpb-select.ctpb-set .cts-chevron { opacity: 0; }

/* ── počet + vyčistit ── */
.ctpb-count { font-size: 12.5px !important; font-weight: 600 !important; color: var(--ct-500) !important; white-space: nowrap; padding: 0 4px; }
.ctpb-clear {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px !important; border: none !important; border-radius: 999px !important;
    background: rgba(239,68,68,0.1) !important; color: #DC2626 !important;
    font-family: var(--ct-font); font-size: 12.5px !important; font-weight: 600 !important; cursor: pointer;
    animation: ctpb-pop .45s cubic-bezier(.34,1.56,.64,1);
    transition: background-color .2s ease;
}
.ctpb-clear:hover { background: rgba(239,68,68,0.17) !important; }

/* ── řada kategorií ── */
.ctpb-cats { position: relative; margin-top: 10px; }
.ctpb-cats-track {
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    padding: 4px 14px 10px 6px; scroll-snap-type: x proximity;
}
.ctpb-cats-track::-webkit-scrollbar { display: none; }
.ctpb-cat {
    --cc: #0092FF;
    display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; scroll-snap-align: start;
    padding: 7px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap;
    border: 1px solid color-mix(in srgb, var(--cc) 22%, transparent);
    background: color-mix(in srgb, var(--cc) 8%, #fff);
    color: color-mix(in srgb, var(--cc) 70%, #111);
    font-family: var(--ct-font); font-size: 13px; font-weight: 600;
    transition: transform .25s cubic-bezier(.34,1.56,.64,1), background-color .2s ease, box-shadow .25s ease, color .2s ease;
}
@media (hover: hover) { .ctpb-cat:not(.active):hover { transform: translateY(-2px); background: color-mix(in srgb, var(--cc) 15%, #fff); } }
.ctpb-cat-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cc) 18%, transparent); }
.ctpb-cat-n {
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--cc) 14%, #fff); color: color-mix(in srgb, var(--cc) 80%, #111);
}
.ctpb-cat.active {
    background: var(--cc); color: #fff; border-color: transparent;
    box-shadow: 0 8px 18px -6px color-mix(in srgb, var(--cc) 70%, transparent);
}
.ctpb-cat.active .ctpb-cat-dot { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,0.3); }
.ctpb-cat.active .ctpb-cat-n { background: rgba(255,255,255,0.25); color: #fff; }
.ctpb-cat-all { --cc: #475569; }
.ctpb-cat-all.active { background: linear-gradient(135deg, #0092FF, #7C3AED); }

@media (max-width: 1100px) {
    .ctpb-bar { flex-wrap: wrap !important; row-gap: 8px; }
    .ctpb-bar > div:first-child { display: contents; }
    .ctpb-bar .ctpb-scrollwrap { flex: 1 1 100%; }
    .ctpb-bar > div:last-child { margin-left: auto; }
}
@media (max-width: 700px) {
    .ctpb-bar { border-radius: 18px; gap: 8px; }
    .ctpb-bar > div:first-child { width: 100%; }
    .ctpb-bar .ctpb-scrollwrap { flex-basis: 100%; }
    .ctpb-arrow { display: none !important; }
    .ctpb-bar .ctpb-selects { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ctpb-bar .ctpb-selects .ct-filter-compact { min-width: 0 !important; max-width: none; }
    .ctpb-pill { font-size: 12.5px !important; }
}
@media (prefers-reduced-motion: reduce) {
    .ctpb-pill, .ctpb-cat, .ctpb-ico, .ctpb-pop, .ctpb-clear { animation: none !important; transition: none !important; }
}

/* ── vodorovné posouvání: prolínání + šipky ── */
.ctpb-bar { position: relative; z-index: 60; }
.ctpb-cats { position: relative; z-index: 1; }
.ctpb-scrollwrap { position: relative; min-width: 0; }
.ctpb-scrollwrap > .ctpb-pills, .ctpb-scrollwrap .ctpb-cats-track { --fl: 0px; --fr: 0px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%); }
.ctpb-scrollwrap.can-l > .ctpb-pills, .ctpb-scrollwrap.can-l .ctpb-cats-track { --fl: 48px; }
.ctpb-scrollwrap.can-r > .ctpb-pills, .ctpb-scrollwrap.can-r .ctpb-cats-track { --fr: 56px; }
.ctpb-arrow {
    position: absolute; top: 50%; z-index: 3; width: 30px; height: 30px; margin-top: -17px; padding: 0;
    border: none; border-radius: 50%; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: var(--ct-800);
    box-shadow: 0 4px 12px -2px rgba(15,23,42,0.22), 0 0 0 1px rgba(15,23,42,0.06);
    opacity: 0; pointer-events: none; transform: scale(.7);
    transition: opacity .2s ease, transform .3s cubic-bezier(.34,1.56,.64,1), background-color .15s ease;
}
.ctpb-scrollwrap-cats .ctpb-arrow { margin-top: -18px; }
.ctpb-arrow:hover { background: var(--ct-blue); color: #fff; }
.ctpb-arrow-l { left: 0; }
.ctpb-arrow-r { right: 0; }
.ctpb-scrollwrap.can-l > .ctpb-arrow-l, .ctpb-scrollwrap.can-r > .ctpb-arrow-r { opacity: 1; pointer-events: auto; transform: scale(1); }
.ctpb-scrollwrap.can-r > .ctpb-arrow-r { animation: ctpb-nudge 2.4s ease-in-out 1s 2; }
@keyframes ctpb-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3px); } }

/* ── rozbalovací nabídka v liště (Město, Řazení) ── */
.ctpb-bar .cts-dropdown {
    min-width: 100%; width: max-content; max-width: 280px; right: auto; left: 0; padding: 6px;
    background: rgba(255,255,255,0.94);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255,255,255,0.95); border-radius: 18px;
    box-shadow: 0 24px 48px -16px rgba(15,23,42,0.28), 0 4px 12px rgba(15,23,42,0.06), 0 0 0 1px rgba(15,23,42,0.04);
    animation: ctpb-drop .28s cubic-bezier(.34,1.4,.64,1); transform-origin: top left;
}
@keyframes ctpb-drop { from { opacity: 0; transform: translateY(-8px) scale(.94); } to { opacity: 1; transform: none; } }
.ctpb-bar .cts-options { padding: 0; max-height: 300px; overflow-x: hidden !important; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(15,23,42,0.18) transparent; }
.ctpb-bar .cts-options::-webkit-scrollbar { width: 6px; height: 0; }
.ctpb-bar .cts-options::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.18); border-radius: 99px; }
.ctpb-bar .cts-dropdown { overflow: hidden; }
.ctpb-bar .cts-option {
    padding: 10px 12px; border-radius: 12px; margin: 0 0 2px; font-size: 13.5px; font-weight: 500; color: var(--ct-800);
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.ctpb-bar .cts-option { min-width: 190px; white-space: nowrap; gap: 10px; margin: 0 0 2px !important; padding: 10px 12px !important; border-radius: 12px !important; font-size: 13.5px !important; }
.ctpb-bar .cts-option:hover, .ctpb-bar .cts-option.cts-focused { background: rgba(15,23,42,0.05); color: var(--ct-900); }
.ctpb-bar .cts-option.cts-selected.cts-focused { background: linear-gradient(135deg, rgba(0,146,255,0.16), rgba(124,58,237,0.16)); color: #1D4ED8; }
.ctpb-bar .cts-option.cts-selected, .ctpb-bar .cts-option.cts-selected:not(.cts-focused) {
    background: linear-gradient(135deg, rgba(0,146,255,0.12), rgba(124,58,237,0.12)); color: #1D4ED8; font-weight: 600;
}
.ctpb-bar .cts-option.cts-selected::after {
    content: ''; width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; margin-left: auto;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%230092FF'/%3E%3Cstop offset='1' stop-color='%237C3AED'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='12' cy='12' r='12' fill='url(%23g)'/%3E%3Cpath d='M7 12.5l3.2 3L17 9' stroke='%23fff' stroke-width='2.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ctpb-bar .cts-search-wrap { padding: 2px 2px 6px; border: none; }
.ctpb-bar .cts-search { border-radius: 12px; border: none; background: rgba(15,23,42,0.05); padding: 9px 12px; font-size: 13px; }
.ctpb-bar .cts-search:focus { background: #fff; box-shadow: 0 0 0 3px rgba(0,146,255,0.18); }
.ctpb-bar .cts-trigger .cts-arrow { transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
.ctpb-bar .cts-wrap.cts-open .cts-arrow, .ctpb-bar .cts-trigger[aria-expanded="true"] .cts-arrow { transform: rotate(180deg); }

/* jednotný vzhled polí v liště: stejná barva textu, modře jen když je něco vybráno */
.ctpb-bar .ctpb-select .cts-value, .ctpb-bar .ctpb-select .cts-placeholder { font-size: 13px !important; font-weight: 600 !important; color: var(--ct-700) !important; }
.ctpb-bar .ctpb-select.ctpb-set .cts-value { color: #1D4ED8 !important; }
.ctpb-bar .ctpb-select .cts-arrow { color: var(--ct-500); }

/* ── dotykové displeje (iPhone, iPad, Android) ── */
@media (pointer: coarse) {
    .ctpb-arrow { display: none !important; }           /* posouvá se prstem */
    .ctpb-bar .cts-option { padding: 12px 14px !important; }
    .ctpb-bar .cts-search { font-size: 16px !important; } /* iOS jinak přiblíží stránku */
    .ctpb-pill, .ctpb-cat { -webkit-tap-highlight-color: transparent; }
    .ctpb-bar .cts-options { max-height: 50vh; }
}
/* nabídka: plné bílé pozadí (rozmazání uvnitř skleněné lišty prohlížeče nezvládají → prosvítalo) */
.ctpb-bar .cts-dropdown { background: #fff !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
/* vždy pod svým polem – i na mobilu/tabletu (ruší starší „fixed“ pravidla stránky) */
.ctpb-bar .cts-wrap { position: relative !important; }
.ctpb-bar .cts-dropdown { position: absolute !important; top: calc(100% + 6px) !important; bottom: auto !important; left: 0 !important; right: auto !important; max-width: min(280px, calc(100vw - 40px)) !important; }
.ctpb-bar .cts-dropdown.cts-above { top: auto !important; bottom: calc(100% + 6px) !important; }
.ctpb-bar .ctpb-selects > :last-child .cts-dropdown { left: auto !important; right: 0 !important; transform-origin: top right; }

/* Před načtením skriptu: místo pro ikonu, aby pilulky neposkočily (31. 10. 2026) */
.ctpb-pill:not(:has(.ctpb-ico))::before { content: ''; width: 24px; height: 24px; border-radius: 50%; background: #fff; flex-shrink: 0; }
.ctpb-pill.active:not(:has(.ctpb-ico))::before { background: rgba(255,255,255,0.24); }

/* Zástupné pilulky kategorií při načítání – řada drží výšku, nic neposkočí */
.ctpb-cat-skel { display: inline-block; flex-shrink: 0; height: 34px; border-radius: 999px; }
.ctpb-cats-loading { pointer-events: none; }
