/* Climasconto Search - dropdown live AJAX
   Pensato per il tema Classic ma compatibile con la maggior parte dei temi. */

.cs-search {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    font-family: inherit;
}

.cs-search__form {
    position: relative;
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    overflow: visible;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.cs-search__form:focus-within {
    border-color: #2fb5d2;
    box-shadow: 0 0 0 3px rgba(47, 181, 210, 0.15);
}

.cs-search__inputwrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.cs-search__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9a9a9a;
    padding: 0 8px 0 14px;
}
.cs-search__icon svg { width: 18px; height: 18px; display: block; }

.cs-search__input {
    flex: 1;
    height: 44px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 15px;
    color: #222;
    padding: 0 8px;
    width: 100%;
}

.cs-search__input::placeholder { color: #9a9a9a; }

.cs-search__clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    color: #b5b5b5;
    line-height: 1;
    cursor: pointer;
    padding: 0 12px;
    transition: color .12s ease;
}
.cs-search__clear:hover { color: #444; }
.cs-search__clear svg { width: 14px; height: 14px; display: block; }

/* legacy submit (non più nel template ma manteniamo per non rompere temi che lo usano) */
.cs-search__submit {
    border: 0;
    background: transparent;
    color: #888;
    padding: 0 12px;
    cursor: pointer;
}

/* Dropdown */
.cs-search__dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0,0,0,.12);
    z-index: 2147483640;
    max-height: 70vh;
    overflow: auto;
}

.cs-search__dropdown-inner { padding: 8px 0; }

.cs-search__status {
    padding: 12px 16px;
    color: #777;
    font-size: 14px;
}

.cs-search__group { padding: 6px 0; }
.cs-search__group + .cs-search__group { border-top: 1px solid #f0f0f0; }

.cs-search__group-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #888;
    padding: 8px 16px 4px;
    font-weight: 700;
}

.cs-search__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    color: inherit;
    text-decoration: none;
    transition: background-color .1s ease;
}
.cs-search__item:hover,
.cs-search__item.is-active {
    background: #f5fbfd;
    text-decoration: none;
}

.cs-search__thumb {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 6px;
    background: #f3f3f3 center/cover no-repeat;
    border: 1px solid #ececec;
}

.cs-search__body { flex: 1; min-width: 0; }
.cs-search__name {
    font-size: 14px;
    color: #222;
    line-height: 1.3;
    margin: 0 0 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
/* Titolo "intero": rimuove il line-clamp CSS — usato quando in BO è impostato
   "Tronca titolo a 0 caratteri" (ovvero nessuna troncatura). */
.cs-search__name--full {
    display: block !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
}
.cs-search__item--card .cs-search__name--full,
.cs-search__name--full {
    min-height: 0 !important;
}
.cs-search__meta {
    font-size: 12px;
    color: #777;
}
.cs-search__price {
    font-weight: 700;
    color: #2fb5d2;
    white-space: nowrap;
    margin-left: 8px;
    font-size: 14px;
}

.cs-search__chip {
    display: inline-block;
    margin: 4px 6px 4px 16px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f1f5f7;
    color: #2b6c7d;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid #e2eef2;
    transition: background-color .1s ease;
}
.cs-search__chip:hover { background: #e3f1f5; text-decoration: none; }

/* Header collassabile (Categorie / Produttori nel dropdown live) */
.cs-search__group--collapsible .cs-search__group-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    padding: 8px 16px 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #888;
    font-weight: 700;
    font-family: inherit;
    line-height: 1.3;
}
.cs-search__group-toggle-label { flex: 1; }
.cs-search__group-toggle-count {
    font-size: 11px;
    background: #f1f5f7;
    color: #2b6c7d;
    border-radius: 999px;
    padding: 2px 8px;
    margin-left: 8px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.4;
}
.cs-search__group-arrow {
    margin-left: 8px;
    transition: transform .2s ease;
    color: #aaa;
    flex: 0 0 auto;
}
.cs-search__group--collapsible.is-open .cs-search__group-arrow {
    transform: rotate(180deg);
}

/* Desktop: gruppi sempre aperti, badge contatore e freccia nascosti, header non-cliccabile */
@media (min-width: 769px) {
    .cs-search__group--collapsible .cs-search__group-arrow,
    .cs-search__group--collapsible .cs-search__group-toggle-count {
        display: none;
    }
    .cs-search__group--collapsible .cs-search__group-toggle {
        cursor: default;
    }
    .cs-search__group--collapsible .cs-search__group-body {
        display: block;
    }
}

/* Mobile (compresa fullscreen): default chiuso, expanded solo con .is-open */
@media (max-width: 768px) {
    .cs-search__group--collapsible:not(.is-open) .cs-search__group-body {
        display: none !important;
    }
}

.cs-search__viewall {
    display: block;
    text-align: center;
    padding: 12px 16px;
    background: #fafafa;
    color: #2fb5d2;
    font-weight: 600;
    text-decoration: none;
    border-top: 1px solid #f0f0f0;
}
.cs-search__viewall:hover { background: #f0fbfd; text-decoration: none; }

/* Variante "in cima": CTA primario quando il viewAll viene riposizionato in
   alto al dropdown (layout standard) o nella sidebar (layout grid+sidebar).
   Resta sempre visibile mentre scrolli il lazy load.
   `!important` su background e color per neutralizzare eventuali override del tema
   (es. regole su `a { color: ... }`). */
.cs-search__viewall--top,
.cs-search__viewall--top:link,
.cs-search__viewall--top:visited {
    background: #2fb5d2 !important;
    color: #fff !important;
    border-top: 0 !important;
    border-radius: 8px;
    margin: 8px 16px 12px;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(47, 181, 210, .25);
    transition: background-color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.cs-search__viewall--top:hover,
.cs-search__viewall--top:focus {
    background: #229bb5 !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(47, 181, 210, .35);
    text-decoration: none !important;
}
.cs-search__viewall--top:active {
    transform: translateY(0);
    color: #fff !important;
}

/* Quando è nella sidebar grid+sidebar, il margin orizzontale interno è più piccolo */
.cs-search__viewall--in-sidebar {
    margin: 8px 12px 14px !important;
    font-size: 12px !important;
    padding: 10px 12px !important;
    letter-spacing: .01em;
}

.cs-search__hl { background: #fff3a8; color: inherit; padding: 0 1px; border-radius: 2px; }

/* Sostituzione search nativo: nasconde i selettori più comuni dei temi PS 1.7 */
.cs-search--replace-native ~ #search_widget,
body .cs-search--replace-native + #search_widget,
body:has(.cs-search--replace-native) #search_widget,
body:has(.cs-search--replace-native) .header-top #search_widget {
    display: none !important;
}

/* Mobile */
@media (max-width: 640px) {
    .cs-search__submit-text { display: none; }
    .cs-search__submit { padding: 0 14px; }
    .cs-search__dropdown { max-height: 75vh; }
}

/* ================================================================
 * Layout GRIGLIA
 * ================================================================ */
.cs-search__dropdown--wide {
    /* min-width viene impostata via JS in base al numero di colonne */
    width: max-content;
    max-width: 92vw;
}

/* Quando il dropdown è in modalità "fixed" (grid desktop) viene centrato
   sulla viewport e ancorato al bordo inferiore dell'input via JS (top inline). */
.cs-search__dropdown--fixed {
    position: fixed !important;
    top: auto;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    margin: 0;
}

.cs-search__group--products .cs-search__items { display: block; }

.cs-search__group--grid .cs-search__items {
    display: grid;
    grid-template-columns: repeat(var(--cs-grid-cols, 3), minmax(0, 1fr));
    gap: 10px;
    padding: 8px 16px 12px;
}

.cs-search__item--card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #efefef;
    background: #fff;
    text-decoration: none;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.cs-search__item--card:hover,
.cs-search__item--card.is-active {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,.08);
    border-color: #d8edf2;
    background: #fff;
}
.cs-search__item--card .cs-search__thumb {
    width: 100%;
    height: 130px;
    margin-bottom: 8px;
    background-size: contain;
    background-color: #fafafa;
}
.cs-search__item--card .cs-search__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
.cs-search__item--card .cs-search__name {
    font-size: 13px;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    margin-bottom: 6px;
}
.cs-search__item--card .cs-search__meta {
    font-size: 11px;
    margin-bottom: 6px;
}
.cs-search__item--card .cs-search__price {
    margin-left: 0;
    margin-top: auto;
    align-self: flex-start;
    font-size: 14px;
}

@media (max-width: 768px) {
    .cs-search__dropdown--wide {
        width: auto;
        max-width: 100%;
        left: 0;
        right: 0;
        transform: none;
    }
    .cs-search__group--grid .cs-search__items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ================================================================
 * MOBILE FULLSCREEN
 *
 * Il container "cs-fs-host" viene spostato via JS direttamente sotto <body>
 * per evitare che un antenato con `transform` blocchi `position: fixed`.
 * Le regole sono attive su qualsiasi viewport quando la classe è presente,
 * così da poter essere usate anche per testare su desktop.
 * ================================================================ */
.cs-fs-close {
    display: none;
    background: transparent;
    border: 0;
    color: #666;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0 14px;
    align-self: stretch;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.cs-fs-close:hover { color: #222; }

body.cs-fs-active {
    overflow: hidden !important;
}

body.cs-fs-active .cs-fs-host {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 2147483647 !important;
    background: #fff !important;
    margin: 0 !important;
    padding: 10px !important;
    max-width: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    transform: none !important;
    filter: none !important;
}

body.cs-fs-active .cs-fs-host .cs-fs-close { display: inline-flex !important; }
/* Nasconde TUTTI i submit / button decorativi del tema in fullscreen */
body.cs-fs-active .cs-fs-host .cs-search__submit,
body.cs-fs-active .cs-fs-host button[type="submit"],
body.cs-fs-active .cs-fs-host input[type="submit"],
body.cs-fs-active .cs-fs-host .btn-search,
body.cs-fs-active .cs-fs-host .search-btn { display: none !important; }

/* Il form/host può essere il nostro form oppure un form arbitrario del tema:
   forziamo flex-row per la barra superiore. */
body.cs-fs-active .cs-fs-host {
    flex-direction: column !important;
}
body.cs-fs-active .cs-fs-host > form,
body.cs-fs-active .cs-fs-host > .cs-search__form {
    display: flex !important;
    flex-direction: row !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    border: 1px solid #d8d8d8 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #fff !important;
}

/* Se il host è esso stesso il form */
body.cs-fs-active form.cs-fs-host {
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
}

body.cs-fs-active .cs-fs-host .cs-search__dropdown {
    position: static !important;
    flex: 1 1 auto !important;
    max-height: none !important;
    height: auto !important;
    margin-top: 12px !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    width: 100% !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    overflow: auto;
}

body.cs-fs-active .cs-fs-host .cs-search__dropdown--wide,
body.cs-fs-active .cs-fs-host .cs-search__dropdown--fixed {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    transform: none !important;
}

body.cs-fs-active .cs-fs-host .cs-search__group--grid .cs-search__items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Modalità lista in fullscreen: padding ridotto + chip wrap */
body.cs-fs-active .cs-fs-host .cs-search__chips {
    padding: 4px 8px;
}

/* ================================================================
 * Add to cart
 * ================================================================ */
.cs-search__addcart {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 0;
    background: #2fb5d2;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    transition: background-color .15s ease, transform .15s ease;
    z-index: 2;
}
.cs-search__addcart:hover { background: #229bb5; transform: scale(1.08); }
.cs-search__addcart.is-loading { opacity: .7; cursor: wait; }
.cs-search__addcart.is-added   { background: #28a745; }
.cs-search__addcart.is-error   { background: #dc3545; }

.cs-search__item--card { position: relative; }

/* In modalità lista il bottone va a destra del prezzo */
.cs-search__item:not(.cs-search__item--card) .cs-search__addcart {
    position: static;
    margin-left: 10px;
    box-shadow: none;
    width: 30px; height: 30px;
}

/* ================================================================
 * Layout SIDEBAR (categorie/produttori a sinistra, prodotti a destra)
 * ================================================================ */
.cs-search__layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 0;
    align-items: stretch;
}
.cs-search__sidebar {
    border-right: 1px solid #f0f0f0;
    padding: 8px 0 12px;
    background: #fafafa;
    /* niente max-height/overflow: lo scroll lo gestisce SOLO il dropdown esterno
       per evitare nested scroll che blocca il lazy-load (l'inner consuma il wheel
       prima che l'evento arrivi al dropdown). Sticky tiene la sidebar in cima
       mentre la grid prodotti scorre. */
    align-self: start;
    position: sticky;
    top: 0;
}
.cs-search__main {
    padding: 0;
    /* niente overflow/max-height: stesso motivo della sidebar */
}
.cs-search__sidebar .cs-search__group + .cs-search__group {
    border-top: 1px solid #ececec;
    margin-top: 6px;
}
.cs-search__sb-list {
    display: flex;
    flex-direction: column;
    padding: 0 8px;
}
.cs-search__sb-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 8px;
    color: #444;
    text-decoration: none;
    font-size: 13px;
    border-radius: 4px;
    line-height: 1.3;
}
.cs-search__sb-item:hover,
.cs-search__sb-item.is-active {
    background: #fff;
    color: #2fb5d2;
    text-decoration: none;
}
.cs-search__sb-count {
    font-size: 11px;
    color: #999;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 1px 7px;
    min-width: 22px;
    text-align: center;
}
.cs-search__sb-item:hover .cs-search__sb-count { color: #2fb5d2; border-color: #d8edf2; }

/* Sidebar disattiva il padding del main group */
.cs-search__main .cs-search__group--products .cs-search__group-title {
    padding-top: 12px;
}

@media (max-width: 768px) {
    .cs-search__layout {
        grid-template-columns: 1fr;
    }
    .cs-search__sidebar {
        border-right: 0;
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 6px;
        position: static; /* su mobile niente sticky: la sidebar diventa una riga in cima */
    }
    .cs-search__sb-list { flex-direction: row; flex-wrap: wrap; }
    .cs-search__sb-item {
        background: #fff;
        border: 1px solid #e2eef2;
        padding: 5px 10px;
        margin: 2px;
    }
}

/* ================================================================
 * Pagina risultati personalizzata (override search PS)
 * ================================================================ */
.cs-results-page { padding: 24px 0; }
.cs-results__header { margin-bottom: 18px; }
.cs-results__title { font-size: 26px; margin: 0 0 4px; color: #222; }
.cs-results__count { color: #777; margin: 0; font-size: 14px; }

.cs-results__layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}

.cs-results__sidebar {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 16px;
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow: auto;
}

/* Toggle mobile per espandere/comprimere i filtri */
.cs-results__sidebar-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    background: #fff;
    color: #2fb5d2;
    border: 1px solid #d8edf2;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}
.cs-results__sidebar-toggle-label { flex: 1; }
.cs-results__sidebar-toggle-count {
    background: #2fb5d2;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    padding: 4px 9px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
    font-weight: 700;
}
.cs-results__sidebar-toggle-arrow {
    flex: 0 0 auto;
    transition: transform .2s ease;
}
.cs-results__sidebar.is-expanded .cs-results__sidebar-toggle-arrow {
    transform: rotate(180deg);
}
.cs-results__sidebar-body {
    /* default visibile su desktop; sovrascritto su mobile */
}

.cs-results__filters-active {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.cs-results__clear-all {
    color: #d33;
    font-size: 13px;
    text-decoration: none;
}
.cs-results__clear-all:hover { text-decoration: underline; }

.cs-results__facet { margin-bottom: 18px; }
.cs-results__facet:last-child { margin-bottom: 0; }

.cs-results__facet-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #888;
    margin: 0 0 8px;
    font-weight: 700;
}

.cs-results__facet-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cs-results__facet-list li { margin: 0; }

.cs-results__facet-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    cursor: pointer;
    font-size: 14px;
    color: #444;
    line-height: 1.3;
    border-radius: 4px;
    margin: 0;
}
.cs-results__facet-label:hover { background: #f7fbfc; }
.cs-results__facet-label input[type="checkbox"] {
    margin: 0;
    accent-color: #2fb5d2;
    flex: 0 0 auto;
}
.cs-results__facet-name { flex: 1; min-width: 0; word-break: break-word; }
.cs-results__facet-count {
    font-size: 11px;
    color: #999;
    background: #f1f5f7;
    border-radius: 10px;
    padding: 1px 7px;
    min-width: 22px;
    text-align: center;
}

.cs-results__apply {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: #2fb5d2;
    color: #fff;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

/* Grid prodotti */
.cs-results__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.cs-results__card {
    position: relative;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 10px;
    overflow: hidden;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.cs-results__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,.08);
    border-color: #d8edf2;
}
.cs-results__card-link {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    height: 100%;
}
.cs-results__card-link:hover { text-decoration: none; color: inherit; }
.cs-results__card-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #fafafa center/contain no-repeat;
    border-bottom: 1px solid #f0f0f0;
}
.cs-results__card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 4px;
}
.cs-results__card-brand {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #888;
}
.cs-results__card-name {
    font-size: 14px;
    line-height: 1.35;
    margin: 0;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    min-height: calc(1.35em * 3);
}
.cs-results__card-ref {
    font-size: 12px;
    color: #999;
}
.cs-results__card-price {
    margin-top: auto;
    font-size: 16px;
    font-weight: 700;
    color: #2fb5d2;
}
.cs-results__card-atc {
    position: absolute;
    bottom: 10px;
    right: 10px;
}

.cs-results__pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 24px;
    justify-content: center;
}
.cs-results__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    color: #444;
    text-decoration: none;
    font-size: 14px;
}
.cs-results__page:hover { border-color: #2fb5d2; color: #2fb5d2; text-decoration: none; }
.cs-results__page.is-current {
    background: #2fb5d2;
    border-color: #2fb5d2;
    color: #fff;
    pointer-events: none;
}

.cs-results__empty {
    background: #fafafa;
    border: 1px dashed #d8d8d8;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    color: #777;
}

/* Stato caricamento AJAX */
.cs-results__main.is-loading {
    position: relative;
    pointer-events: none;
}
.cs-results__main.is-loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.55);
    z-index: 5;
    border-radius: 8px;
}
.cs-results__main.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid #e0e0e0;
    border-top-color: #2fb5d2;
    border-radius: 50%;
    animation: cs-spin .8s linear infinite;
    z-index: 6;
}
@keyframes cs-spin { to { transform: rotate(360deg); } }

/* Mobile pagina risultati */
@media (max-width: 768px) {
    .cs-results__layout {
        grid-template-columns: 1fr;
    }
    .cs-results__sidebar {
        position: static;
        max-height: none;
        order: 0;
        padding: 8px;
        border-radius: 8px;
    }
    .cs-results__main { order: 1; }
    .cs-results__title { font-size: 20px; }
    .cs-results__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .cs-results__card-name { font-size: 13px; }
    .cs-results__card-price { font-size: 15px; }

    /* Toggle visibile, body collassato di default */
    .cs-results__sidebar-toggle { display: flex; }
    .cs-results__sidebar:not(.is-expanded) .cs-results__sidebar-body {
        display: none;
    }
    .cs-results__sidebar.is-expanded .cs-results__sidebar-body {
        max-height: 70vh;
        overflow: auto;
        margin-top: 12px;
        padding: 4px;
        animation: cs-slide-down .18s ease-out;
    }
    @keyframes cs-slide-down {
        from { opacity: 0; transform: translateY(-6px); }
        to   { opacity: 1; transform: translateY(0); }
    }
}

/* Indicatore lazy load nel dropdown live (mostrato durante il caricamento del batch successivo) */
.cs-search__loading-more {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 16px;
    color: #2fb5d2;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
    border-top: 2px solid #d8edf2;
    background: linear-gradient(90deg, #f8fcfd 0%, #e3f1f5 50%, #f8fcfd 100%);
    background-size: 200% 100%;
    animation: cs-pulse-bg 1.4s ease-in-out infinite;
    z-index: 2;
}
.cs-search__loading-more::before {
    content: '';
    width: 26px;
    height: 26px;
    margin-right: 14px;
    border: 3px solid #d8edf2;
    border-top-color: #2fb5d2;
    border-right-color: #2fb5d2;
    border-radius: 50%;
    animation: cs-spin .65s linear infinite;
    flex: 0 0 auto;
}
@keyframes cs-pulse-bg {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* Body scroll lock quando un dropdown live è aperto (desktop).
   Mobile fullscreen ha già il proprio lock via body.cs-fs-active.
   Manteniamo `position: relative` sul body per evitare salto di layout. */
body.cs-dropdown-open {
    overflow: hidden !important;
}
