/* ==========================================================================
   COFIS CZ Elastic Search Client — Strana vysledku (Filtered Search)
   Namespace: .czelc-*
   Hardcoded barvy (PS 1.6 nema CSS custom properties):
     Primary: #018c95 (teal)
     Text: #212529
     Text secondary: #6c757d
     Border: #eee
     Background: #fff
     Hover bg: #f8f9fa
     Shadow: 0 8px 32px rgba(0, 0, 0, 0.12)
     Radius: 12px
     Danger: #dc3545
     Success: #28a745
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. Base / Reset
   -------------------------------------------------------------------------- */

.czelc-filtered-search *,
.czelc-filtered-search *::before,
.czelc-filtered-search *::after {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

.czelc-filtered-search {
    /* !important — některé eshopy mají v custom.css generický content-width cap na
       přímé potomky .page-content (např. inca-shop: #main .page-content > div:not(...)
       { max-width:840px }), který by search stránku zúžil. COFIS search je full-width
       listing (jako kategorie) → nesmí být capnut shop-custom pravidlem. */
    max-width: 100% !important;
    margin: 0 auto;
    padding: 30px 15px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: #212529;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* Warehouse theme custom grid — col-xl-15 (5 sloupců) */
@media (min-width: 1200px) {
    .products-grid .col-xl-15 { -webkit-box-flex: 0; -ms-flex: 0 0 20%; flex: 0 0 20%; max-width: 20%; }
}

/* SSR miniatures — ponecháme NATIVNÍ theme velikost tlačítek (shoda s výpisem
   kategorie). Dřívější font-size/padding shrink ("kompenzace užšího layoutu")
   je po full-width fixu (1.7.75) obsolete a dělal tlačítko menší než nativní.
   Necháme jen overflow pojistku proti zalomení dlouhého labelu. */
#czelc-products .product-miniature .add-to-cart,
#czelc-products .product-miniature .btn-primary {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* SSR miniatures — hover visibility pro functional buttons */
#czelc-products .thumbnail-container:hover .product-functional-buttons,
.cofis-reco-section .thumbnail-container:hover .product-functional-buttons {
    opacity: 1 !important;
    transition: none !important;
}

/* --------------------------------------------------------------------------
   2. Layout — sidebar + results
   -------------------------------------------------------------------------- */

.czelc-layout {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    gap: 24px;
    min-width: 0;
}

.czelc-results {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    min-width: 0;
    padding: 0 0 24px 0;
}


/* --------------------------------------------------------------------------
   3. Hlavicka vysledku
   -------------------------------------------------------------------------- */

.czelc-results__header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.czelc-results__info {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    min-width: 0;
}

.czelc-results__title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #212529;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.czelc-results__count {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
}


/* --------------------------------------------------------------------------
   4. Razeni (custom select)
   -------------------------------------------------------------------------- */

.czelc-results__sort {
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.czelc-results__sort-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 8px 36px 8px 14px;
    font-size: 0.9rem;
    color: #212529;
    cursor: pointer;
    min-width: 180px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    -webkit-transition: border-color 0.2s, box-shadow 0.2s;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.czelc-results__sort-select:focus {
    outline: none;
    border-color: #018c95;
    -webkit-box-shadow: 0 0 0 3px rgba(1, 140, 149, 0.1);
    box-shadow: 0 0 0 3px rgba(1, 140, 149, 0.1);
}


/* --------------------------------------------------------------------------
   5. Aktivni filtry — chipy
   -------------------------------------------------------------------------- */

.czelc-chips {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.czelc-chip {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: none;
    background: rgba(1, 140, 149, 0.1);
    color: #018c95;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    -webkit-transition: background 0.2s, color 0.2s;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
    line-height: 1.4;
}

.czelc-chip:hover {
    background: #018c95;
    color: var(--czelc-btn-text, #fff);
}

.czelc-chip__remove {
    font-size: 1.1rem;
    line-height: 1;
    font-weight: 700;
}

.czelc-chip--clear {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.czelc-chip--clear:hover {
    background: #dc3545;
    color: #fff;
}


/* --------------------------------------------------------------------------
   5b. Dlazdice nalezenych kategorii
   -------------------------------------------------------------------------- */

.czelc-cat-tiles {
    display: -ms-grid;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.czelc-cat-tiles__item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #eee;
    background: #fff;
    cursor: pointer;
    font-size: 0.82rem;
    color: #212529;
    -webkit-transition: border-color 0.2s, background 0.2s, color 0.2s;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
    text-decoration: none;
    text-align: left;
    min-width: 0;
    font-family: inherit;
}

.czelc-cat-tiles__item:hover {
    border-color: #999;
    color: #333;
    background: #f8f9fa;
    text-decoration: none;
}

.czelc-cat-tiles__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    font-weight: 500;
}

.czelc-cat-tiles__count {
    -ms-flex-negative: 0;
    flex-shrink: 0;
    font-size: 0.75rem;
    opacity: 0.7;
}

.czelc-cat-tiles__img {
    -ms-flex-negative: 0;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    -o-object-fit: contain;
    object-fit: contain;
    border-radius: 4px;
}

.czelc-cat-tiles__item--has-img {
    padding: 6px 12px 6px 8px;
}


/* --------------------------------------------------------------------------
   6. Mrizka produktu (CSS grid)
   -------------------------------------------------------------------------- */

.czelc-results__grid {
    display: -ms-grid;
    display: grid;
    /* `--czelc-cols` set z JS dle COFISCZSEARCHCLIENT_UI_PRODUCTS_PER_ROW config (default 4).
       Použito v PS 1.6 grid path; PS 1.7+ path má vlastní col-XL třídy z miniature template. */
    grid-template-columns: repeat(var(--czelc-cols, 4), minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    -webkit-transition: opacity 0.3s;
    transition: opacity 0.3s;
}

/* PS 1.6 SSR markup compat — `.slider-white--item` (theme realgeek slider item)
   se renderuje do filtered grid, ale theme CSS dává intrinsic width 300px (image natural).
   Force shrink-fit per grid column. Nemá vliv na PS 1.7+ path (.js-product-miniature-wrapper). */
.czelc-results__grid > .slider-white--item {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}
.czelc-results__grid > .slider-white--item .product-card,
.czelc-results__grid > .slider-white--item .product-card--image,
.czelc-results__grid > .slider-white--item .product-card--images-wrapper {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}
/* Img sizing — `display: block` jen pro primární obrázek. Alternative image musí zůstat
   na default `display: inline` aby theme rule `.alternative-image { display: none }` mohlo prevail.
   Hover swap (theme `.product-card:hover .has-alternative-image .product.image { display: none }`
   + `.alternative-image { display: inline }`) tím funguje. */
.czelc-results__grid > .slider-white--item img.product:not(.alternative-image) {
    width: 100%;
    height: auto;
    display: block;
}
.czelc-results__grid > .slider-white--item img.alternative-image {
    width: 100%;
    height: auto;
}

/* Custom theme s holým `.product-miniature` (bez col-wrapperu, např. englishteashop)
   se renderuje jako přímý grid item — theme dává intrinsic/float šířku.
   `!important` nutné: theme pravidlo pro `.product-miniature` šířku má stejnou specificitu
   + pozdější pořadí → bez `!important` přebije naše a karta (i obrázek) se scvrkne. */
.czelc-results__grid > .product-miniature {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    float: none;
}


/* --------------------------------------------------------------------------
   7. Karta produktu
   -------------------------------------------------------------------------- */

.czelc-results__card {
    background: #fff;
    -webkit-box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    overflow: hidden;
    -webkit-transition: -webkit-transform 0.25s ease, box-shadow 0.25s ease;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}

.czelc-results__card:hover {
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    -webkit-box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
}

/* Reset podtržení — high specificity kvůli #content a:link:not():not() !important z témat */
#content .czelc-results .czelc-results__card a.czelc-results__card-link,
#content .czelc-results .czelc-results__card a.czelc-results__card-link:link,
#content .czelc-results .czelc-results__card a.czelc-results__card-link:hover,
#content .czelc-results .czelc-results__card a.czelc-results__card-link:focus,
#content .czelc-results .czelc-results__card a.czelc-results__card-link:visited,
.czelc-results__card-link,
.czelc-results__card-link:link,
.czelc-results__card-link:hover,
.czelc-results__card-link:focus,
.czelc-results__card-link:visited {
    text-decoration: none !important;
    color: inherit;
}

.czelc-results__card-link {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    height: 100%;
}

.czelc-results__card-image-wrap {
    position: relative;
    padding-top: 100%; /* 1:1 aspect ratio fallback */
    overflow: hidden;
    background: #f8f9fa;
}

.czelc-results__card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -o-object-fit: contain;
    object-fit: contain;
    -webkit-transition: -webkit-transform 0.3s ease, opacity 0.3s ease;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hover obrazek — druhy obrazek prekryva prvni */
.czelc-results__card-image--hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.czelc-results__card:hover .czelc-results__card-image:not(.czelc-results__card-image--hover) {
    -webkit-transform: scale(1.05);
    transform: scale(1.05);
}

.czelc-results__card:hover .czelc-results__card-image--hover {
    opacity: 1;
    -webkit-transform: scale(1.05);
    transform: scale(1.05);
}

.czelc-results__card-body {
    padding: 14px 16px;
    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    text-align: center;
}

.czelc-results__card-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #212529;
    margin: 0 0 auto 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 2.8em;
}

.czelc-results__card-footer {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    margin-top: 10px;
}

.czelc-results__card-prices {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: baseline;
    -ms-flex-align: baseline;
    align-items: baseline;
    gap: 6px;
}

.czelc-results__card-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: #212529;
}

.czelc-results__card-price--old {
    font-size: 0.85rem;
    color: #6c757d;
    text-decoration: line-through;
}

/* Dostupnost s teckou */
.czelc-results__card-stock {
    font-size: 0.75rem;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 4px;
}

.czelc-results__card-stock::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.czelc-results__card-stock--in {
    color: #28a745;
}

.czelc-results__card-stock--in::before {
    background: #28a745;
}

.czelc-results__card-stock--out {
    color: #dc3545;
}

.czelc-results__card-stock--out::before {
    background: #dc3545;
}

/* Tlacitko kosiku */
.czelc-results__card-cart {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 6px;
    margin: 0 16px 14px;
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    background: var(--czelc-cart-btn, var(--czelc-primary, #2563eb));
    color: var(--czelc-btn-text, #fff);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    -webkit-transition: background 0.2s ease, -webkit-transform 0.15s ease;
    transition: background 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
    line-height: 1;
}

.czelc-results__card-cart:hover {
    background: var(--czelc-cart-btn-hover, var(--czelc-primary-hover, #1d4ed8));
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
}

.czelc-results__card-cart svg {
    -ms-flex-negative: 0;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.czelc-results__card-cart--detail {
    background: #6c757d;
}

.czelc-results__card-cart--detail:hover {
    background: #5a6268;
}

.czelc-results__card-cart--adding {
    opacity: 0.6;
    pointer-events: none;
}

.czelc-results__card-cart--added {
    background: #28a745 !important;
}


/* --------------------------------------------------------------------------
   8. Strankovani
   -------------------------------------------------------------------------- */

.czelc-pagination {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    margin-top: 32px;
}

.czelc-pagination__list {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.czelc-pagination__link {
    min-width: 40px;
    height: 40px;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid #eee;
    background: #fff;
    color: #212529;
    text-decoration: none;
    font-size: 0.9rem;
    -webkit-transition: background 0.2s, color 0.2s, border-color 0.2s;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    cursor: pointer;
    padding: 0 8px;
    font-family: inherit;
}

.czelc-pagination__link:hover {
    background: #f8f9fa;
    border-color: #018c95;
    text-decoration: none;
    color: #212529;
}

.czelc-pagination__link--active,
.czelc-pagination__link--active:hover {
    background: #018c95;
    border-color: #018c95;
    color: var(--czelc-btn-text, #fff);
    font-weight: 600;
}

.czelc-pagination__link--prev,
.czelc-pagination__link--next {
    padding: 0 10px;
}

.czelc-pagination__ellipsis {
    min-width: 40px;
    height: 40px;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #6c757d;
    border: none;
}


/* --------------------------------------------------------------------------
   9. Postrani filtry (sticky sidebar)
   -------------------------------------------------------------------------- */

.czelc-filters {
    position: -webkit-sticky;
    position: sticky;
    top: 20px;
    width: 280px;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    -webkit-box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.czelc-filters__header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding-bottom: 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid #eee;
}

.czelc-filters__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

.czelc-filters__clear-all {
    font-size: 0.8rem;
    color: #dc3545;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    text-decoration: none;
    -webkit-transition: opacity 0.2s;
    transition: opacity 0.2s;
}

.czelc-filters__clear-all:hover {
    opacity: 0.7;
    text-decoration: underline;
}


/* --------------------------------------------------------------------------
   10. Skupina filtru
   -------------------------------------------------------------------------- */

.czelc-filters__group {
    border-bottom: 1px solid #eee;
    padding: 14px 0;
}

.czelc-filters__group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.czelc-filters__group-toggle {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #212529;
    font-family: inherit;
    text-align: left;
}

.czelc-filters__group-toggle:focus {
    outline: 2px solid #018c95;
    outline-offset: 2px;
}

.czelc-filters__chevron {
    -webkit-transition: -webkit-transform 0.25s ease;
    transition: transform 0.25s ease;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    color: #6c757d;
}

.czelc-filters__group-toggle[aria-expanded="false"] .czelc-filters__chevron {
    -webkit-transform: rotate(-90deg);
    transform: rotate(-90deg);
}

.czelc-filters__group-content {
    overflow: visible;
    max-height: 5000px;
    padding-top: 10px;
    -webkit-transition: max-height 0.3s ease, padding-top 0.3s ease;
    transition: max-height 0.3s ease, padding-top 0.3s ease;
}

.czelc-filters__group-toggle[aria-expanded="false"] + .czelc-filters__group-content {
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
}


/* --------------------------------------------------------------------------
   11. Custom checkbox
   -------------------------------------------------------------------------- */

.czelc-filters__checkbox {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 0;
    font-size: 0.9rem;
    color: #212529;
    -webkit-transition: color 0.15s;
    transition: color 0.15s;
    margin: 0;
}

.czelc-filters__checkbox:hover {
    color: #018c95;
}

/* Skryti nativniho checkboxu */
.czelc-filters__checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Vlastni checkmark */
.czelc-filters__checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 3px;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    position: relative;
    -webkit-transition: background 0.2s, border-color 0.2s;
    transition: background 0.2s, border-color 0.2s;
}

.czelc-filters__checkbox input:checked + .czelc-filters__checkmark {
    background: #018c95;
    border-color: #018c95;
}

.czelc-filters__checkbox input:checked + .czelc-filters__checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
}

.czelc-filters__checkbox--disabled {
    opacity: 0.4;
    pointer-events: none;
}

.czelc-filters__checkbox--hidden {
    display: none;
}

.czelc-filters__label {
    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.czelc-filters__count {
    font-size: 0.8rem;
    color: #6c757d;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}


/* --------------------------------------------------------------------------
   12. Show more tlacitko
   -------------------------------------------------------------------------- */

.czelc-filters__show-more {
    display: block;
    width: 100%;
    padding: 6px 0;
    margin-top: 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: #018c95;
    font-family: inherit;
    text-align: left;
    -webkit-transition: opacity 0.2s;
    transition: opacity 0.2s;
}

.czelc-filters__show-more:hover {
    opacity: 0.7;
}


/* --------------------------------------------------------------------------
   13. Cenovy histogram + slider override (jQuery UI)
   -------------------------------------------------------------------------- */

.czelc-filters__histogram {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: end;
    -ms-flex-align: end;
    align-items: flex-end;
    gap: 1px;
    height: 40px;
    margin-bottom: 4px;
    padding: 0 12px;
}

.czelc-filters__histogram-bar {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    min-height: 2px;
    background: #018c95;
    border-radius: 1px 1px 0 0;
    -webkit-transition: opacity 0.15s;
    transition: opacity 0.15s;
    opacity: 0.7;
}

.czelc-filters__histogram-bar--dimmed {
    opacity: 0.15;
}

.czelc-filters__price-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 4px 0 0 0;
}

/* Custom dual-range slider */
.czelc-filters__range-wrap {
    position: relative;
    height: 18px;
    margin: 8px 12px 8px;
}

.czelc-filters__range-track {
    position: absolute;
    top: 7px;
    left: 0;
    right: 0;
    height: 4px;
    background: #eee;
    border-radius: 2px;
    z-index: 1;
}

.czelc-filters__range-fill {
    position: absolute;
    top: 0;
    height: 100%;
    background: #018c95;
    border-radius: 2px;
}

.czelc-filters__range-wrap input[type="range"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 18px;
    margin: 0;
    padding: 0;
    pointer-events: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent;
    outline: none;
}

.czelc-range--min {
    z-index: 3;
}

.czelc-range--max {
    z-index: 4;
}

/* Webkit (Chrome, Safari, Edge) — track */
.czelc-filters__range-wrap input[type="range"]::-webkit-slider-runnable-track {
    background: transparent;
    height: 4px;
}

/* Webkit — thumb: margin-top centers 18px thumb on 4px track → -(18-4)/2 = -7 */
.czelc-filters__range-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin-top: -7px;
    background: #fff;
    border: 2px solid #018c95;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    -webkit-transition: box-shadow 0.2s;
    transition: box-shadow 0.2s;
}

.czelc-filters__range-wrap input[type="range"]::-webkit-slider-thumb:hover {
    -webkit-box-shadow: 0 0 0 4px rgba(1, 140, 149, 0.2);
    box-shadow: 0 0 0 4px rgba(1, 140, 149, 0.2);
}

/* Firefox — track */
.czelc-filters__range-wrap input[type="range"]::-moz-range-track {
    background: transparent;
    border: none;
    height: 4px;
}

/* Firefox — thumb (auto-centruje se na track, nepotřebuje margin) */
.czelc-filters__range-wrap input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #fff;
    border: 2px solid #018c95;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.czelc-filters__range-wrap input[type="range"]::-moz-range-thumb:hover {
    box-shadow: 0 0 0 4px rgba(1, 140, 149, 0.2);
}


/* --------------------------------------------------------------------------
   14. Search input ve filtrech
   -------------------------------------------------------------------------- */

.czelc-filters__search-input {
    width: 100%;
    padding: 6px 10px;
    font-size: 0.85rem;
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 8px;
    color: #212529;
    font-family: inherit;
    -webkit-transition: border-color 0.2s;
    transition: border-color 0.2s;
}

.czelc-filters__search-input:focus {
    outline: none;
    border-color: #018c95;
}


/* --------------------------------------------------------------------------
   15. Skeleton loading + pulse animace
   -------------------------------------------------------------------------- */

.czelc-skeletons {
    display: -ms-grid;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.czelc-skeleton {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    -webkit-box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.czelc-skeleton__image {
    padding-top: 100%;
    background: #eee;
    -webkit-animation: czelcPulse 1.5s ease-in-out infinite;
    animation: czelcPulse 1.5s ease-in-out infinite;
}

.czelc-skeleton__text {
    height: 14px;
    background: #eee;
    border-radius: 4px;
    margin: 14px 16px 0;
    -webkit-animation: czelcPulse 1.5s ease-in-out infinite;
    animation: czelcPulse 1.5s ease-in-out infinite;
}

.czelc-skeleton__text--title {
    width: 80%;
}

.czelc-skeleton__text--price {
    width: 40%;
    margin-bottom: 14px;
    margin-top: 10px;
}

@-webkit-keyframes czelcPulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

@keyframes czelcPulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}


/* --------------------------------------------------------------------------
   16. Prazdny stav
   -------------------------------------------------------------------------- */

.czelc-empty {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.czelc-empty__icon {
    color: #6c757d;
    margin-bottom: 16px;
}

.czelc-empty__title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 12px 0;
}

.czelc-empty__tips {
    list-style: inside disc;
    color: #6c757d;
    font-size: 0.9rem;
    padding: 0;
    margin: 0 0 20px 0;
}

.czelc-empty__tips li {
    padding: 2px 0;
}

.czelc-empty__btn {
    display: inline-block;
    padding: 10px 24px;
    border: 2px solid #018c95;
    border-radius: 12px;
    background: transparent;
    color: #018c95;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    -webkit-transition: background 0.2s, color 0.2s;
    transition: background 0.2s, color 0.2s;
}

.czelc-empty__btn:hover {
    background: #018c95;
    color: var(--czelc-btn-text, #fff);
}

/* Jemny empty state — 0 produktu, ale dlazdice kategorii / obsah se renderuji vedle */
.czelc-empty--soft {
    padding: 24px 20px;
    text-align: left;
}

.czelc-empty__soft-msg {
    margin: 0;
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
}


/* --------------------------------------------------------------------------
   17. Chybova hlaska
   -------------------------------------------------------------------------- */

.czelc-error {
    padding: 30px 20px;
    border-radius: 12px;
    background: rgba(220, 53, 69, 0.08);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
    font-size: 0.9rem;
    margin-bottom: 20px;
    grid-column: 1 / -1;
    text-align: center;
}

.czelc-error p {
    margin: 0 0 8px 0;
}

.czelc-error p:last-child {
    margin-bottom: 0;
}

.czelc-error__link {
    color: #018c95;
    text-decoration: underline;
    font-weight: 600;
}

.czelc-error__link:hover {
    color: #016b72;
}

.czelc-error__redirect {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 4px;
}


/* --------------------------------------------------------------------------
   18. Mobilni tlacitko filtru (fixed bottom)
   -------------------------------------------------------------------------- */

.czelc-mobile-filter-btn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    z-index: 999;
    background: #018c95;
    color: var(--czelc-btn-text, #fff);
    border: none;
    border-radius: 24px;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    display: none;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 8px;
    -webkit-box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    -webkit-transition: -webkit-transform 0.2s, box-shadow 0.2s;
    transition: transform 0.2s, box-shadow 0.2s;
}

.czelc-mobile-filter-btn:hover {
    -webkit-transform: translateX(-50%) translateY(-2px);
    transform: translateX(-50%) translateY(-2px);
    -webkit-box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.czelc-mobile-filter-btn svg {
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.czelc-mobile-filter-btn__count {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 0.75rem;
    font-weight: 700;
}


/* --------------------------------------------------------------------------
   19. Mobilni overlay panel filtru
   -------------------------------------------------------------------------- */

.czelc-mobile-filter-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: #fff;
    -webkit-transform: translateX(-100%);
    transform: translateX(-100%);
    -webkit-transition: -webkit-transform 0.3s ease;
    transition: transform 0.3s ease;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
}

.czelc-mobile-filter-panel--open {
    -webkit-transform: translateX(0);
    transform: translateX(0);
}

.czelc-mobile-filter-panel__header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.czelc-mobile-filter-panel__header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
}

.czelc-mobile-filter-panel__close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 36px;
    height: 36px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    border-radius: 50%;
    -webkit-transition: background 0.2s;
    transition: background 0.2s;
}

.czelc-mobile-filter-panel__close:hover {
    background: #f8f9fa;
}

.czelc-mobile-filter-panel__body {
    overflow-y: auto;
    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
    padding: 16px 20px;
    -webkit-overflow-scrolling: touch;
}

/* Filtry uvnitr mobilniho panelu — reset sticky a shadow */
.czelc-mobile-filter-panel__body .czelc-filters {
    display: block;
    position: static;
    width: auto;
    max-height: none;
    overflow: visible;
    -webkit-box-shadow: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

.czelc-mobile-filter-panel__footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.czelc-mobile-filter-panel__apply {
    width: 100%;
    background: #018c95;
    color: var(--czelc-btn-text, #fff);
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    -webkit-transition: opacity 0.2s;
    transition: opacity 0.2s;
}

.czelc-mobile-filter-panel__apply:hover {
    opacity: 0.9;
}


/* --------------------------------------------------------------------------
   20. Responsive breakpoints
   -------------------------------------------------------------------------- */

/* Tablet — 3 sloupce */
@media (max-width: 1199px) {
    .czelc-results__grid,
    .czelc-skeletons {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .czelc-cat-tiles {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobil — 2 sloupce, skryt desktopove filtry, zobrazit mobilni tlacitko */
@media (max-width: 767px) {
    .czelc-layout {
        display: block;
    }

    .czelc-filters {
        display: none;
    }

    .czelc-results__grid,
    .czelc-skeletons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .czelc-cat-tiles {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .czelc-mobile-filter-btn {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
    }

    .czelc-results__header {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        gap: 12px;
    }

    .czelc-results__sort {
        width: 100%;
    }

    .czelc-results__sort-select {
        width: 100%;
    }

    .czelc-results__title {
        font-size: 1.15rem;
    }

    .czelc-filtered-search {
        padding-top: 20px;
    }
}

/* Male mobily — kompaktni odsazeni */
@media (max-width: 575px) {
    .czelc-results__grid,
    .czelc-skeletons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .czelc-results {
        padding: 0 0 16px 0;
    }

    .czelc-results__card-body {
        padding: 10px 12px;
    }

    .czelc-results__card-name {
        font-size: 0.82rem;
    }

    .czelc-results__card-price {
        font-size: 0.95rem;
    }

    .czelc-chips {
        gap: 6px;
    }

    .czelc-chip {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    .czelc-pagination__link {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .czelc-empty {
        padding: 40px 16px;
    }
}

/* === Content sekce na search stránce — sjednoceno s popup stylem === */
.czelc-content-section { margin-bottom: 16px; }
.czelc-content-title { text-transform: uppercase; font-size: 0.6rem; letter-spacing: 0.1em; color: #9ca3af; font-weight: 700; margin: 0 0 10px 0; }
.czelc-content-cards { display: flex; flex-wrap: wrap; margin: -3px; }
.czelc-content-card {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; margin: 3px; border-radius: 20px; background: #f5f5f7;
    text-decoration: none; color: #1f2937; font-size: 0.78rem; font-weight: 500;
    transition: all 0.15s ease; white-space: nowrap;
}
.czelc-content-card:hover { background: rgba(var(--czelc-primary-rgb, 0, 0, 0), 0.1); color: var(--czelc-primary, inherit); }
.czelc-content-card svg { width: 14px; height: 14px; opacity: 0.5; flex-shrink: 0; }

/* --------------------------------------------------------------------------
   8. Realgeek theme `.product-card` styling — SOBĚSTAČNÝ FALLBACK
   --------------------------------------------------------------------------
   Theme realgeek injectuje tato pravidla scoped pod `#lb-search-element .lb-search`
   POUZE když je aktivní LBX/Luigisbox kontext. Při A/B skupině 'cofis' (ratio=100,
   LBX neaktivní) theme NIC neinjectne → `.product-card` markup naked: chybí
   štítek/název/cena/sleva a `.alternative-image` se neskryje → 2 obrázky přes
   sebe. 1.7.49 wrapper `#lb-search-element .lb-search` reusoval theme pravidla
   BEZ duplikace — ta sázka s A/B testem padá (cofis větev = LBX vypnutý).
   Replikujeme nutná theme pravidla zde (verbatim selektory, identický scope =
   náš wrapper v search16.tpl) → nezávislé na theme injekci; harmless když theme
   přítomné (ratio=0, identické hodnoty, stejná specificita). Extrakce z realgeek
   live DOM 2026-05-18. Detail: ../cofisczsearchserver/docs/gotchas/search.md. */

#lb-search-element .lb-search .product-card { margin-bottom: 3rem; text-align: center; position: relative; }
#lb-search-element .lb-search .product-card .product-card--image img { width: 100%; height: auto; }
#lb-search-element .lb-search .product-card .product-card--image .product-card--images-wrapper .product.alternative-image { display: none; }
#lb-search-element .lb-search .product-card .product-card--title { font-size: 18px; font-weight: 700; text-transform: uppercase; margin-top: 16px; }
#lb-search-element .lb-search .product-card .product-card--variants { height: 27px; margin-top: 16px; display: none; }
#lb-search-element .lb-search .product-card .product-card--variants .product-card--variant { background-color: #6eb540; display: inline-block; padding: 3px 8px; color: #fff; font-weight: 700; font-size: 12px; text-transform: uppercase; border-radius: 2px; margin: 0 2px; }
#lb-search-element .lb-search .product-card .product-card--prices { margin-top: 10px; }
#lb-search-element .lb-search .product-card .product-card--prices .product-card--prices--price { font-size: 24px; font-weight: 700; display: inline; vertical-align: middle; }
#lb-search-element .lb-search .product-card .product-card--prices .product-card--prices--old-price { text-decoration: line-through; font-size: 14px; color: #999; display: inline; vertical-align: middle; margin-right: 8px; }
#lb-search-element .lb-search .product-card .product-card--image .product-card--labels { position: absolute; top: 140px; left: 4px; text-align: left; }
#lb-search-element .lb-search .product-card .product-card--image .product-card--labels--right { position: absolute; top: 140px; right: 4px; text-align: right; }
#lb-search-element .lb-search .product-card .product-card--image .product-card--labels > span,
#lb-search-element .lb-search .product-card .product-card--image .product-card--labels--right > span { display: block; }
#lb-search-element .lb-search .product-card .rg-label.rg-label-sale { background-color: #ff7015; }
#lb-search-element .lb-search .product-card .rg-label.rg-label-new-collection { background-color: #00bdff; }
#lb-search-element .lb-search .product-card .rg-label.rg-label-new,
#lb-search-element .lb-search .product-card .rg-label.rg-label-new-collection,
#lb-search-element .lb-search .product-card .rg-label.rg-label-sale { color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px; text-transform: uppercase; border-radius: 4px; }
#lb-search-element .lb-search .product-card:hover .has-alternative-image .product.image { display: none; }
#lb-search-element .lb-search .product-card:hover .has-alternative-image .product.alternative-image { display: inline; }
#lb-search-element .lb-search .product-card.has-variants:hover .product-card--variants { display: block; }
#lb-search-element .lb-search .product-card.has-variants:hover .product-card--title { display: none; }
