/**
 * Cll Elasticsearch Search - front office styles
 * @author Luca Cavallini
 * @license Proprietary - Commercial license. All rights reserved. See LICENSE.txt
 */

/* =====================================================================
   Design tokens — single source of truth for the whole front-office UI
   (autocomplete dropdown, sidebar facets, modal facets, full-screen search).
   Override any of these on .cll-ess-root or in custom.css to restyle.
   ===================================================================== */
:root {
    --cll-accent: #14213d;
    --cll-accent-contrast: #ffffff;
    --cll-accent-soft: #eef2f8;
    --cll-accent-hover: #26375c;
    --cll-text: #1f2530;
    --cll-muted: #737b88;
    --cll-border: #e7e9ee;
    --cll-border-strong: #d3d7de;
    --cll-bg: #ffffff;
    --cll-bg-alt: #f7f8fa;
    --cll-radius: 12px;
    --cll-radius-sm: 8px;
    --cll-radius-pill: 999px;
    --cll-gap: 16px;
    --cll-modal-width: 920px;
    --cll-modal-height: 82vh;
    --cll-nav-width: 264px;
    --cll-shadow: 0 24px 64px rgba(16, 24, 40, .26);
    --cll-font: inherit;
    --cll-fs: 14px;
}

.cll-essearch-widget { position: relative; max-width: 460px; margin: 0 auto; }
.cll-ess-form { position: relative; display: flex; }
.cll-ess-input { flex: 1 1 auto; padding: 8px 12px; border: 1px solid var(--cll-border-strong); border-radius: 4px 0 0 4px; }
.cll-ess-btn { border: 1px solid var(--cll-border-strong); border-left: 0; background: var(--cll-bg-alt); padding: 0 14px; border-radius: 0 4px 4px 0; cursor: pointer; }
.cll-ess-suggestions {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 1000;
    background: var(--cll-bg); border: 1px solid var(--cll-border); border-top: 0; max-height: 420px; overflow-y: auto;
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.cll-ess-sugg { display: flex; align-items: center; gap: 10px; padding: 8px 12px; text-decoration: none; color: var(--cll-text); border-bottom: 1px solid var(--cll-border); }
.cll-ess-sugg:hover { background: var(--cll-bg-alt); }
.cll-ess-sugg-img { width: 40px; height: 40px; object-fit: contain; flex: 0 0 auto; }
.cll-ess-sugg-name { flex: 1 1 auto; }
.cll-ess-sugg-name strong { color: #000; }
.cll-ess-sugg-price { flex: 0 0 auto; font-weight: 600; white-space: nowrap; }

/* autocomplete: typed suggestions */
.cll-ess-sugg-body { flex: 1 1 auto; display: flex; flex-direction: column; }
.cll-ess-sugg-type { color: var(--cll-muted); font-size: .78em; font-style: italic; }
.cll-ess-sugg-all { justify-content: center; font-weight: 600; color: #2b7; background: #fafafa; }
.cll-ess-sugg-all:hover { background: #f0fff5; }
em.cll-hl { font-style: normal; font-weight: 700; background: #fff6a8; }

/* =====================================================================
   Faceted navigation - modal filter panel SIDEBAR (CLL_ESS_FACET_UI=sidebar)
   Clean, neutral, works on any theme. Themed through the shared --cll-*
   design tokens (see the :root block at the top of this file / custom.css).
   ===================================================================== */
.cll-ess-facets {
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.4;
    color: #2b2f36;
    -webkit-font-smoothing: antialiased;
}
.cll-ess-facets .title_block,
.cll-ess-facets-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .01em;
    margin: 0 0 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--cll-accent);
    text-transform: none;
}

/* active-filter chips (removable pills above the filters) */
.cll-ess-active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.cll-ess-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--cll-accent-soft); color: var(--cll-accent);
    border: 1px solid transparent; border-radius: 999px;
    padding: 4px 10px; font-size: 12.5px; font-weight: 600; line-height: 1;
    cursor: pointer; transition: background .12s, box-shadow .12s;
}
.cll-ess-chip:hover { background: #e3e9f3; }
.cll-ess-chip .cll-ess-chip-x { font-size: 15px; line-height: 1; opacity: .7; }
.cll-ess-chip:hover .cll-ess-chip-x { opacity: 1; }
.cll-ess-chip-clear { background: transparent; color: var(--cll-muted); text-decoration: underline; padding: 4px 6px; }
.cll-ess-chip-clear:hover { color: var(--cll-accent); background: transparent; }

/* one filter section = a divider block */
.cll-ess-facet { padding: 14px 0; border-bottom: 1px solid var(--cll-border); }
.cll-ess-facet:last-of-type { border-bottom: 0; }
.cll-ess-facet-title {
    cursor: pointer; display: flex; align-items: center; justify-content: space-between;
    font-size: 14px; font-weight: 600; margin: 0; padding: 2px 0; user-select: none;
}
.cll-ess-facet-title:hover { color: var(--cll-accent); }
.cll-ess-caret {
    width: 9px; height: 9px; border: 0; border-right: 2px solid #9aa0a6; border-bottom: 2px solid #9aa0a6;
    transform: rotate(45deg); transition: transform .18s ease; margin-left: 8px; margin-top: -3px;
}
.cll-ess-facet.cll-collapsed .cll-ess-caret { transform: rotate(-45deg); margin-top: 2px; }
.cll-ess-facet.cll-collapsed .cll-ess-facet-body { display: none; }
.cll-ess-facet-body { margin-top: 10px; }

/* search-within box */
.cll-ess-facet-search {
    width: 100%; padding: 7px 10px; margin-bottom: 8px; font-size: 13px;
    border: 1px solid var(--cll-border); border-radius: 6px; background: #fafbfc;
}
.cll-ess-facet-search:focus { outline: none; border-color: var(--cll-accent); background: #fff; }

/* option list with a slim custom scrollbar */
/* Value list: the modal PANE scrolls, not the list itself — no inner max-height
   (which also forced overflow-x:auto → a stray horizontal scrollbar). */
.cll-ess-facet-list { list-style: none; padding: 0; margin: 0; }
/* .cll-ess-facet-li and .cll-ess-facet-label are unprefixed and shared with the
   modal block below (defined once there) — no duplicate needed here. */
.cll-ess-facet-item {
    display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 400;
    padding: 6px 8px; margin: 0 -8px; border-radius: 6px; transition: background .1s;
}
.cll-ess-facet-item:hover { background: #f6f7f9; }
.cll-ess-facet-item.active { font-weight: 600; color: var(--cll-accent); }
.cll-ess-facet-count { color: var(--cll-muted); font-size: 12.5px; font-variant-numeric: tabular-nums; flex: 0 0 auto; }

/* custom checkbox / radio */
.cll-ess-facet-item input[type="checkbox"],
.cll-ess-facet-item input[type="radio"] {
    -webkit-appearance: none; appearance: none; margin: 0; flex: 0 0 auto;
    width: 18px; height: 18px; border: 1.5px solid #c4c9d1; background: #fff;
    border-radius: 4px; cursor: pointer; position: relative; transition: border-color .12s, background .12s;
}
.cll-ess-facet-item input[type="radio"] { border-radius: 50%; }
.cll-ess-facet-item input:hover { border-color: var(--cll-accent); }
.cll-ess-facet-item input:checked { background: var(--cll-accent); border-color: var(--cll-accent); }
.cll-ess-facet-item input[type="checkbox"]:checked::after {
    content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
    border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.cll-ess-facet-item input[type="radio"]:checked::after {
    content: ""; position: absolute; left: 5px; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: #fff;
}
.cll-ess-facet-item input:focus-visible { outline: 2px solid var(--cll-accent); outline-offset: 1px; }

/* show more */
.cll-ess-more-hidden { display: none; }
.cll-ess-show-more {
    display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600;
    color: var(--cll-accent); text-decoration: none; cursor: pointer;
}
.cll-ess-show-more:hover { text-decoration: underline; }

/* dropdown facet */
.cll-ess-select {
    width: 100%; padding: 8px 10px; font-size: 13px; border: 1px solid var(--cll-border);
    border-radius: 6px; background: #fff;
}

/* price */
.cll-ess-price { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.cll-ess-price label { display: inline-flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--cll-muted); margin: 0; font-weight: 600; }
.cll-ess-price input {
    width: 92px; padding: 8px 10px; font-size: 14px; border: 1px solid var(--cll-border);
    border-radius: 6px; background: #fff; color: #2b2f36;
}
.cll-ess-price input:focus { outline: none; border-color: var(--cll-accent); }
.cll-ess-price-range { flex-basis: 100%; display: block; margin-top: 2px; font-size: 12px; color: var(--cll-muted); }

/* swatches */
.cll-ess-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.cll-ess-swatch { position: relative; cursor: pointer; margin: 0; }
.cll-ess-swatch input { position: absolute; opacity: 0; width: 0; height: 0; }
.cll-ess-swatch-chip {
    display: block; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12);
    box-shadow: inset 0 0 0 2px #fff; transition: box-shadow .12s, transform .1s;
}
.cll-ess-swatch:hover .cll-ess-swatch-chip { transform: scale(1.08); }
.cll-ess-swatch.active .cll-ess-swatch-chip { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--cll-accent); }

/* actions */
.cll-ess-facet-actions { margin-top: 16px; display: flex; align-items: center; gap: 10px; }
.cll-ess-facet-actions .btn-primary {
    background: var(--cll-accent); border-color: var(--cll-accent); color: #fff;
    padding: 8px 18px; border-radius: 6px; font-weight: 600;
}
.cll-ess-facet-actions .cll-ess-clear { color: var(--cll-muted); font-size: 13px; }
.cll-ess-facet-actions .cll-ess-clear:hover { color: var(--cll-accent); }

/* AJAX loading state (pjax refresh) */
.cll-ess-loading { position: relative; opacity: .55; pointer-events: none; transition: opacity .15s; }
.cll-ess-loading::after {
    content: ""; position: absolute; top: 40px; left: 50%; width: 34px; height: 34px; margin-left: -17px;
    border: 3px solid rgba(0,0,0,.12); border-top-color: var(--cll-accent, #1a2b45);
    border-radius: 50%; animation: cll-ess-spin .7s linear infinite; z-index: 5;
}
#js-product-list.cll-ess-loading::after { position: fixed; top: 45%; }
@keyframes cll-ess-spin { to { transform: rotate(360deg); } }

/* =====================================================================
   Modal filter panel MODAL filter UI
   ---------------------------------------------------------------------
   Everything is themed through a small set of CSS custom properties set
   on .cll-ess-root. Override any of them in custom.css to restyle the
   whole UI in one line (see views/css/custom.css for the full list).
   ===================================================================== */
/* All design tokens live in the :root block at the top of this file.
   Override them here (or in custom.css) to restyle just the modal scope. */
.cll-ess-root {
    -webkit-font-smoothing: antialiased;
    color: var(--cll-text);
    font-family: var(--cll-font);
}
.cll-ess-root *, .cll-ess-root *::before, .cll-ess-root *::after { box-sizing: border-box; }
/* neutralise any inherited theme alignment (some themes set text-align on the
   listing column, which would otherwise right-align our labels) */
.cll-ess-root, .cll-ess-root .cll-ess-nav-item, .cll-ess-root .cll-ess-facet-item,
.cll-ess-root .cll-ess-facet-label, .cll-ess-root .cll-ess-swatch-name,
.cll-ess-root .cll-ess-pane-title, .cll-ess-root .cll-ess-letter { text-align: left; }
/* once JS has relocated the bar + modal, the original wrapper is empty */
#js-cll-ess-facets.cll-ess-moved { display: none; }

/* --- filter bar (relocated above the grid) ----------------------------- */
.cll-ess-bar {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px;
    margin: 0 0 var(--cll-gap); font-size: var(--cll-fs);
}
.cll-ess-open {
    display: inline-flex; align-items: center; gap: 9px;
    background: var(--cll-bg); color: var(--cll-text);
    border: 1px solid var(--cll-border-strong); border-radius: var(--cll-radius-pill);
    padding: 9px 18px; font-size: var(--cll-fs); font-weight: 600; line-height: 1;
    cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s;
}
.cll-ess-open:hover { border-color: var(--cll-accent); box-shadow: 0 1px 0 var(--cll-accent); }
.cll-ess-open:focus-visible { outline: 2px solid var(--cll-accent); outline-offset: 2px; }
.cll-ess-open-ico { display: inline-flex; color: var(--cll-accent); }
.cll-ess-open-badge {
    display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px;
    padding: 0 6px; border-radius: var(--cll-radius-pill); background: var(--cll-accent);
    color: var(--cll-accent-contrast); font-size: 12px; font-weight: 700; line-height: 1;
}
.cll-ess-count { color: var(--cll-muted); font-size: 13px; font-variant-numeric: tabular-nums; }

/* chips */
.cll-ess-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cll-ess-root .cll-ess-chip {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--cll-accent-soft); color: var(--cll-accent);
    border: 1px solid transparent; border-radius: var(--cll-radius-pill);
    padding: 5px 6px 5px 12px; font-size: 12.5px; font-weight: 600; line-height: 1;
    cursor: pointer; transition: background .12s;
}
.cll-ess-root .cll-ess-chip:hover { background: #e2e8f3; }
.cll-ess-chip .cll-ess-chip-x {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; border-radius: 50%; background: rgba(20,33,61,.12);
    font-size: 14px; line-height: 1; opacity: .8;
}
.cll-ess-chip:hover .cll-ess-chip-x { opacity: 1; background: rgba(20,33,61,.2); }
.cll-ess-chip-clear {
    color: var(--cll-muted); font-size: 12.5px; font-weight: 600; text-decoration: underline;
    padding: 5px 4px; cursor: pointer;
}
.cll-ess-chip-clear:hover { color: var(--cll-accent); }

/* --- modal shell ------------------------------------------------------- */
.cll-ess-modal {
    position: fixed; inset: 0; z-index: 10050; display: none;
    align-items: center; justify-content: center; padding: 4vh 16px;
}
html.cll-ess-js .cll-ess-modal.is-open { display: flex; }
.cll-ess-modal-overlay {
    position: absolute; inset: 0; background: rgba(16, 24, 40, .5);
    backdrop-filter: saturate(120%) blur(2px); animation: cll-ess-fade .16s ease;
}
.cll-ess-modal-box {
    position: relative; display: flex; flex-direction: column;
    width: 100%; max-width: var(--cll-modal-width); max-height: var(--cll-modal-height);
    background: var(--cll-bg); border-radius: var(--cll-radius); overflow: hidden;
    box-shadow: var(--cll-shadow); animation: cll-ess-pop .18s cubic-bezier(.2,.8,.3,1);
}
@keyframes cll-ess-fade { from { opacity: 0; } }
@keyframes cll-ess-pop { from { opacity: 0; transform: translateY(12px) scale(.99); } }

.cll-ess-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px; border-bottom: 1px solid var(--cll-border); flex: 0 0 auto;
}
.cll-ess-modal-title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: .01em; }
.cll-ess-modal-x {
    display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
    margin: -8px -8px -8px 0; border: 0; background: transparent; color: var(--cll-muted);
    border-radius: var(--cll-radius-sm); cursor: pointer; transition: background .12s, color .12s;
}
.cll-ess-modal-x:hover { background: var(--cll-bg-alt); color: var(--cll-text); }

.cll-ess-modal-form { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.cll-ess-modal-body { display: flex; min-height: 0; flex: 1 1 auto; }

/* left pane: filter names */
.cll-ess-nav {
    flex: 0 0 var(--cll-nav-width); width: var(--cll-nav-width);
    list-style: none; margin: 0; padding: 10px; overflow-y: auto;
    border-right: 1px solid var(--cll-border); background: var(--cll-bg-alt);
}
.cll-ess-nav-item {
    display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
    padding: 11px 12px; border: 0; background: transparent; color: var(--cll-text);
    border-radius: var(--cll-radius-sm); font-size: var(--cll-fs); font-weight: 500;
    cursor: pointer; transition: background .12s, color .12s;
}
.cll-ess-nav-item:hover { background: rgba(20,33,61,.06); }
.cll-ess-nav-item.is-active { background: var(--cll-bg); color: var(--cll-accent); font-weight: 700; box-shadow: inset 3px 0 0 var(--cll-accent); }
.cll-ess-nav-item:focus-visible { outline: 2px solid var(--cll-accent); outline-offset: -2px; }
.cll-ess-nav-label { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cll-ess-nav-badge {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--cll-radius-pill);
    background: var(--cll-accent); color: var(--cll-accent-contrast); font-size: 11px; font-weight: 700;
}
.cll-ess-nav-caret {
    flex: 0 0 auto; width: 7px; height: 7px; border-right: 2px solid #b6bcc6; border-bottom: 2px solid #b6bcc6;
    transform: rotate(-45deg); display: none;
}

/* right pane: values */
.cll-ess-panes { flex: 1 1 auto; min-width: 0; overflow: hidden; position: relative; }
.cll-ess-pane { display: none; flex-direction: column; height: 100%; }
.cll-ess-pane.is-active { display: flex; }
.cll-ess-pane-head { display: none; align-items: center; gap: 6px; padding: 14px 18px; border-bottom: 1px solid var(--cll-border); flex: 0 0 auto; }
.cll-ess-pane-back {
    display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
    margin-left: -6px; border: 0; background: transparent; color: var(--cll-text); border-radius: var(--cll-radius-sm); cursor: pointer;
}
.cll-ess-pane-back:hover { background: var(--cll-bg-alt); }
.cll-ess-pane-title { font-size: 16px; font-weight: 700; }
.cll-ess-pane-body { padding: 18px 22px; overflow-y: auto; flex: 1 1 auto; }

/* search within a filter */
.cll-ess-facet-search-wrap { position: relative; margin-bottom: 12px; }
.cll-ess-facet-search-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--cll-muted); pointer-events: none; }
.cll-ess-facet-search {
    width: 100%; padding: 10px 12px 10px 34px; font-size: 13px; color: var(--cll-text);
    border: 1px solid var(--cll-border-strong); border-radius: var(--cll-radius-sm); background: var(--cll-bg);
}
.cll-ess-facet-search:focus { outline: none; border-color: var(--cll-accent); box-shadow: 0 0 0 3px var(--cll-accent-soft); }

/* value list */
.cll-ess-root .cll-ess-facet-list { list-style: none; padding: 0; margin: 0; }
.cll-ess-letter {
    position: sticky; top: 0; z-index: 1; background: var(--cll-bg);
    font-size: 12px; font-weight: 700; color: var(--cll-muted); letter-spacing: .06em;
    padding: 8px 2px 4px; margin-top: 6px; border-bottom: 1px solid var(--cll-border);
}
.cll-ess-facet-list-grouped { column-count: 1; }
.cll-ess-facet-li { margin: 0; }
.cll-ess-root .cll-ess-facet-item {
    display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 400;
    padding: 9px 8px; margin: 0 -8px; border-radius: var(--cll-radius-sm); transition: background .1s;
}
.cll-ess-root .cll-ess-facet-item:hover { background: var(--cll-bg-alt); }
.cll-ess-root .cll-ess-facet-item.active { font-weight: 600; color: var(--cll-accent); }
.cll-ess-facet-item input { position: absolute; opacity: 0; width: 0; height: 0; }
.cll-ess-facet-box {
    flex: 0 0 auto; width: 19px; height: 19px; border: 1.5px solid var(--cll-border-strong);
    background: var(--cll-bg); border-radius: 5px; position: relative; transition: border-color .12s, background .12s;
}
.cll-ess-facet-item input[type="radio"] + .cll-ess-facet-box { border-radius: 50%; }
.cll-ess-facet-item:hover .cll-ess-facet-box { border-color: var(--cll-accent); }
.cll-ess-facet-item input:checked + .cll-ess-facet-box { background: var(--cll-accent); border-color: var(--cll-accent); }
.cll-ess-facet-item input[type="checkbox"]:checked + .cll-ess-facet-box::after {
    content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
    border: solid var(--cll-accent-contrast); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.cll-ess-facet-item input[type="radio"]:checked + .cll-ess-facet-box::after {
    content: ""; position: absolute; left: 5.5px; top: 5.5px; width: 6px; height: 6px; border-radius: 50%; background: var(--cll-accent-contrast);
}
.cll-ess-facet-item input:focus-visible + .cll-ess-facet-box { outline: 2px solid var(--cll-accent); outline-offset: 2px; }
.cll-ess-facet-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cll-ess-root .cll-ess-facet-count { flex: 0 0 auto; color: var(--cll-muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cll-ess-facet-empty { padding: 20px 4px; color: var(--cll-muted); font-size: 13px; }

/* swatches with names */
.cll-ess-root .cll-ess-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.cll-ess-root .cll-ess-swatch { display: flex; align-items: center; gap: 10px; cursor: pointer; margin: 0; padding: 6px; border-radius: var(--cll-radius-sm); }
.cll-ess-root .cll-ess-swatch:hover { background: var(--cll-bg-alt); }
.cll-ess-root .cll-ess-swatch input { position: absolute; opacity: 0; width: 0; height: 0; }
.cll-ess-root .cll-ess-swatch-chip {
    flex: 0 0 auto; display: block; width: 26px; height: 26px; border-radius: 50%;
    border: 1px solid rgba(0,0,0,.12); box-shadow: inset 0 0 0 2px var(--cll-bg); transition: box-shadow .12s, transform .1s;
}
.cll-ess-root .cll-ess-swatch:hover .cll-ess-swatch-chip { transform: scale(1.06); }
.cll-ess-root .cll-ess-swatch.active .cll-ess-swatch-chip { box-shadow: inset 0 0 0 2px var(--cll-bg), 0 0 0 2px var(--cll-accent); }
.cll-ess-swatch-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cll-ess-swatch.active .cll-ess-swatch-name { font-weight: 600; color: var(--cll-accent); }

/* dropdown */
.cll-ess-root .cll-ess-select { width: 100%; padding: 10px 12px; font-size: 13px; border: 1px solid var(--cll-border-strong); border-radius: var(--cll-radius-sm); background: var(--cll-bg); }

/* price */
.cll-ess-price-inputs { display: flex; align-items: flex-end; gap: 12px; flex: 0 0 100%; width: 100%; }
.cll-ess-price-field { display: flex; flex-direction: column; gap: 6px; margin: 0; flex: 1 1 auto; }
.cll-ess-price-lab { font-size: 12px; font-weight: 600; color: var(--cll-muted); }
.cll-ess-price-wrap { display: flex; align-items: center; border: 1px solid var(--cll-border-strong); border-radius: var(--cll-radius-sm); background: var(--cll-bg); padding-left: 10px; }
.cll-ess-price-wrap:focus-within { border-color: var(--cll-accent); box-shadow: 0 0 0 3px var(--cll-accent-soft); }
.cll-ess-price-sign { color: var(--cll-muted); font-size: 14px; }
.cll-ess-price-wrap input { width: 100%; padding: 10px 10px 10px 4px; font-size: 14px; border: 0; background: transparent; color: var(--cll-text); }
.cll-ess-price-wrap input:focus { outline: none; }
.cll-ess-price-dash { color: var(--cll-muted); padding-bottom: 12px; }
.cll-ess-price-range { margin-top: 12px; font-size: 12px; color: var(--cll-muted); }

/* dual-thumb slider */
/* Full width (and its own row) even though .cll-ess-price is a flex container: the
   slider's children are all absolutely positioned, so as a plain flex item it would
   collapse to 0 width and stack both thumbs on the left. */
.cll-ess-slider { position: relative; height: 34px; margin: 18px 4px 6px; width: 100%; flex: 0 0 100%; box-sizing: border-box; }
.cll-ess-slider-track { position: absolute; top: 50%; left: 0; right: 0; height: 4px; transform: translateY(-50%); background: var(--cll-border-strong); border-radius: 4px; }
.cll-ess-slider-fill { position: absolute; top: 0; bottom: 0; background: var(--cll-accent); border-radius: 4px; }
.cll-ess-slider input[type="range"] {
    position: absolute; top: 0; left: 0; width: 100%; height: 34px; margin: 0; background: none;
    -webkit-appearance: none; appearance: none; pointer-events: none;
}
.cll-ess-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; pointer-events: auto; width: 18px; height: 18px; border-radius: 50%;
    background: var(--cll-bg); border: 2px solid var(--cll-accent); box-shadow: 0 1px 3px rgba(0,0,0,.2); cursor: pointer;
}
.cll-ess-slider input[type="range"]::-moz-range-thumb {
    pointer-events: auto; width: 18px; height: 18px; border-radius: 50%;
    background: var(--cll-bg); border: 2px solid var(--cll-accent); box-shadow: 0 1px 3px rgba(0,0,0,.2); cursor: pointer;
}
.cll-ess-slider input[type="range"]::-moz-range-track { background: transparent; }

/* footer */
.cll-ess-modal-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 16px 22px; border-top: 1px solid var(--cll-border); flex: 0 0 auto; background: var(--cll-bg);
}
.cll-ess-clear-all { color: var(--cll-muted); font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; }
.cll-ess-clear-all:hover { color: var(--cll-accent); text-decoration: underline; }
.cll-ess-apply {
    background: var(--cll-accent); color: var(--cll-accent-contrast); border: 0;
    padding: 12px 26px; border-radius: var(--cll-radius-pill); font-size: 14px; font-weight: 700; cursor: pointer;
    transition: background .14s; min-width: 180px;
}
.cll-ess-apply:hover { background: var(--cll-accent-hover); }
.cll-ess-apply:focus-visible { outline: 2px solid var(--cll-accent); outline-offset: 2px; }

/* body scroll lock while the modal is open */
html.cll-ess-noscroll, html.cll-ess-noscroll body { overflow: hidden; }

/* --- no-JS fallback: render the form inline in the sidebar ------------- */
html:not(.cll-ess-js) .cll-ess-open,
html:not(.cll-ess-js) .cll-ess-modal-x,
html:not(.cll-ess-js) .cll-ess-pane-back,
html:not(.cll-ess-js) .cll-ess-nav-badge,
html:not(.cll-ess-js) .cll-ess-slider { display: none; }
html:not(.cll-ess-js) .cll-ess-modal { position: static; display: block; padding: 0; }
html:not(.cll-ess-js) .cll-ess-modal-overlay { display: none; }
html:not(.cll-ess-js) .cll-ess-modal-box { max-width: none; max-height: none; box-shadow: none; border: 1px solid var(--cll-border); }
html:not(.cll-ess-js) .cll-ess-modal-body { display: block; }
html:not(.cll-ess-js) .cll-ess-nav { display: none; }
html:not(.cll-ess-js) .cll-ess-pane { display: block; border-bottom: 1px solid var(--cll-border); }
html:not(.cll-ess-js) .cll-ess-pane-head { display: flex; }
html:not(.cll-ess-js) .cll-ess-pane-back { display: none; }

/* --- mobile: full-screen drill-down ------------------------------------ */
@media (max-width: 767px) {
    .cll-ess-root { --cll-modal-height: 100%; }
    html.cll-ess-js .cll-ess-modal { padding: 0; }
    .cll-ess-modal-box { width: 100%; max-width: none; height: 100%; max-height: 100%; border-radius: 0; }
    .cll-ess-modal-body { position: relative; }
    .cll-ess-nav { flex-basis: 100%; width: 100%; border-right: 0; background: var(--cll-bg); }
    .cll-ess-nav-item { padding: 15px 12px; }
    .cll-ess-nav-caret { display: block; }
    .cll-ess-panes {
        position: absolute; inset: 0; background: var(--cll-bg); transform: translateX(100%);
        transition: transform .22s ease; z-index: 2;
    }
    .cll-ess-modal.cll-ess-drill .cll-ess-panes { transform: translateX(0); }
    .cll-ess-pane-head { display: flex; }
    .cll-ess-apply { flex: 1 1 auto; }
    .cll-ess-bar { gap: 8px; }
    .cll-ess-count { width: 100%; order: 3; }
}

/* SEO filter landing pages (Feature 4) --------------------------------------- */
.cll-ess-seo-landing { margin: 0 0 18px; }
.cll-ess-seo-landing .cll-ess-seo-h1 { margin: 0 0 8px; }
.cll-ess-seo-landing .cll-ess-seo-intro { color: var(--cll-text, #333); line-height: 1.55; }
.cll-ess-seo-landing .cll-ess-seo-intro > *:first-child { margin-top: 0; }

/* Personal-price notice (Advanced tab): shown to customers with an individual
   price list when their exact price isn't used for sort/filter. */
.cll-ess-pp-notice {
    margin: 0 0 10px;
    padding: 8px 12px;
    font-size: 0.85em;
    line-height: 1.4;
    color: var(--cll-text, #444);
    background: var(--cll-pp-notice-bg, #f6f6f7);
    border-left: 3px solid var(--cll-accent, #2b6cb0);
    border-radius: 3px;
}

/* ============================ Full-screen search overlay autocomplete ===== */
html.cll-ess-fs-lock { overflow: hidden; }
.cll-ess-fs {
    position: fixed; inset: 0; z-index: 100000;
    background: var(--cll-bg, #fff);
    display: flex; flex-direction: column;
    /* Open/close transition: fade + slight rise. Base = closed state. */
    opacity: 0; transform: translateY(-8px);
    transition: opacity .22s ease, transform .22s ease;
}
.cll-ess-fs.is-open { opacity: 1; transform: none; }
.cll-ess-fs[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
    .cll-ess-fs { transition: none; transform: none; }
}
.cll-ess-fs-bar {
    position: sticky; top: 0; z-index: 2;
    display: flex; align-items: center; gap: 18px;
    background: var(--cll-bg, #fff);
    border-bottom: 1px solid var(--cll-border, #e6e8eb);
    padding: 14px clamp(12px, 4vw, 48px);
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
/* Shop logo on the left — only when there's room (hidden on narrow screens). */
.cll-ess-fs-logo { flex: 0 0 auto; display: none; align-items: center; }
.cll-ess-fs-logo img { max-height: 40px; width: auto; display: block; }
@media (min-width: 720px) { .cll-ess-fs-logo { display: flex; } }
.cll-ess-fs-form { flex: 1 1 auto; display: flex; align-items: center; gap: 12px; max-width: 1100px; margin: 0 auto; }
.cll-ess-fs-input {
    flex: 1 1 auto; font-size: clamp(18px, 3.2vw, 28px); font-weight: 500;
    padding: 12px 8px; border: none; border-bottom: 2px solid var(--cll-accent, #2b6cb0);
    background: transparent; color: var(--cll-text, #1a1a1a); outline: none; border-radius: 0;
}
.cll-ess-fs-close {
    flex: 0 0 auto; cursor: pointer; font-size: 15px; font-weight: 600;
    color: var(--cll-muted, #6b7280); background: transparent; border: 0; padding: 8px 12px;
}
.cll-ess-fs-close:hover { color: var(--cll-accent, #2b6cb0); }
.cll-ess-fs-results { flex: 1 1 auto; overflow-y: auto; padding: 20px clamp(12px, 4vw, 48px) 60px; }
.cll-ess-fs-grid {
    max-width: 1100px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px;
}
.cll-ess-fs-card {
    display: flex; flex-direction: column; gap: 6px; text-decoration: none;
    color: var(--cll-text, #1a1a1a); padding: 10px; border-radius: 8px; transition: background .12s;
}
.cll-ess-fs-card:hover { background: var(--cll-bg-alt, #f6f7f9); }
.cll-ess-fs-card-img { width: 100%; aspect-ratio: 1/1; object-fit: contain; background: #fff; border-radius: 6px; }
.cll-ess-fs-card-name { font-size: 14px; line-height: 1.35; }
.cll-ess-fs-card-name strong { color: var(--cll-accent, #2b6cb0); }
.cll-ess-fs-card-type { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--cll-muted, #6b7280); }
.cll-ess-fs-card-price { font-weight: 700; font-size: 15px; }
.cll-ess-fs-all {
    display: block; width: -moz-fit-content; width: fit-content;
    margin: 30px auto 10px; padding: 12px 26px; border-radius: 999px;
    background: var(--cll-accent, #2b6cb0); color: #fff; font-weight: 600; text-decoration: none;
    text-align: center;
}
.cll-ess-fs-all:hover { filter: brightness(1.08); }
.cll-ess-fs-empty { max-width: 1100px; margin: 40px auto; text-align: center; color: var(--cll-muted, #6b7280); font-size: 16px; }
.cll-ess-fs-loading .cll-ess-fs-results { opacity: .55; transition: opacity .15s; }
@media (max-width: 480px) {
    .cll-ess-fs-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
}
