/* Storefront theme "default": pieces shared by the product grid pages that are not the product list module
   (search results, brand page): category facet of the page (?cat=), chip rows (related categories / brands / stores,
   brand categories), search term chips. Uses the variables of theme.css. */

/* category facet in the filter sidebar (links to ?cat=id of the same page) */
.ec-catfacet ul { list-style: none; margin: 0; padding: 0; font-size: 13px; max-height: 300px; overflow: auto; scrollbar-width: thin; }
.ec-catfacet li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; line-height: 1.8; }
.ec-catfacet a { color: var(--ec-text-2) !important; }
.ec-catfacet a:hover { color: var(--ec-primary) !important; }
.ec-catfacet li.ec-on > span { color: var(--ec-primary); font-weight: 700; }
.ec-catfacet li.ec-on::before { content: ""; width: 4px; height: 18px; border-radius: 4px; background: var(--ec-primary); flex: 0 0 auto; order: -1; margin-inline-end: -2px; }
.ec-catfacet li.ec-on { justify-content: flex-start; }
.ec-catfacet small { color: var(--ec-muted); font-size: 11px; background: var(--ec-page); border-radius: 999px; padding: 0 8px; line-height: 20px; }

/* chip rows (a title, then a scrolling row of round chips with a small logo) */
.ec-sp-related { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; }
.ec-sp-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ec-sp-row > b { flex: 0 0 auto; font-size: 12px; color: var(--ec-muted); font-weight: 400; min-width: 92px; }
.ec-sp-row .ec-rail-wrap { flex: 1 1 auto; min-width: 0; }
.ec-sp-row .ec-rail-btn { width: 32px; height: 32px; }
.ec-sp-chips { gap: 8px; padding: 2px; }
.ec-sp-chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 14px; border: 1px solid var(--ec-border); border-radius: 999px; background: #fff; font-size: 13px; color: var(--ec-text-2) !important; white-space: nowrap; transition: border-color .15s, color .15s; }
.ec-sp-chip img { width: 26px; height: 26px; object-fit: contain; border-radius: 50%; }
.ec-sp-chip i { color: var(--ec-muted); }
.ec-sp-chip small { color: var(--ec-muted); font-size: 11px; }
.ec-sp-chip:hover { border-color: var(--ec-primary); color: var(--ec-primary) !important; }
.ec-sp-chip.ec-on { border-color: var(--ec-primary); background: var(--ec-primary-soft); color: var(--ec-primary) !important; font-weight: 700; }

/* search term chips (popular / related searches) */
.ec-sp-terms { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 20px; }
.ec-sp-terms > b { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ec-text); }
.ec-sp-terms > b i { color: var(--ec-primary); }
.ec-sp-terms > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ec-sp-term-chip { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--ec-page); font-size: 12px; color: var(--ec-text-2) !important; }
.ec-sp-term-chip:hover { background: var(--ec-primary-soft); color: var(--ec-primary) !important; }

@media (max-width: 991px) {
    .ec-sp-row { flex-direction: column; align-items: stretch; gap: 6px; }
    .ec-sp-row > b { min-width: 0; }
    .ec-sp-row .ec-rail-btn { display: none; }
}
