/* Tema · partea „liste”: categorie, magazin, reduceri, căutare (filtre, ordonare, paginare) */

.list-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }

.filters { background: var(--white); border: 1px solid var(--line); border-radius: 14px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain; }
.filters summary { padding: 14px 16px; font-weight: 750; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.filters summary::-webkit-details-marker { display: none; }
.filters summary::after { content: "+"; font-weight: 400; }
.filters[open] summary::after { content: "−"; }
.filters-form { padding: 0 16px 16px; }
.filters fieldset { border: 0; margin: 0; padding: 12px 0; border-top: 1px solid var(--line); }
.filters legend { font-weight: 700; font-size: 14px; padding: 0; margin-bottom: 6px; }
.opt { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; font-size: 15px; cursor: pointer; }
.opt input { accent-color: var(--ink); margin: 0; transform: translateY(1px); }
.opt .count { margin-left: auto; }
/* Cursorul de preț: două mânere pe aceeași linie. Căsuțele de sub el arată (și primesc) aceleași valori. */
.range { position: relative; height: 30px; margin: 2px 2px 10px; }
.range-track { position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; background: var(--line-strong); border-radius: 2px; }
.range-fill { position: absolute; top: 0; bottom: 0; left: 0; right: 0; background: var(--ink); border-radius: 2px; }
.range input[type="range"] {
  position: absolute; left: -2px; right: -2px; top: 0; width: calc(100% + 4px); height: 30px; margin: 0; padding: 0;
  background: none; pointer-events: none; -webkit-appearance: none; appearance: none;
}
.range input[type="range"]::-webkit-slider-runnable-track { background: none; height: 30px; }
.range input[type="range"]::-moz-range-track { background: none; height: 30px; }
.range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto; width: 24px; height: 24px; margin-top: 3px;
  background: var(--tag); border: 2px solid var(--ink); border-radius: 50%; cursor: grab; box-shadow: 0 1px 4px var(--shadow);
}
.range input[type="range"]::-moz-range-thumb {
  pointer-events: auto; width: 20px; height: 20px;
  background: var(--tag); border: 2px solid var(--ink); border-radius: 50%; cursor: grab; box-shadow: 0 1px 4px var(--shadow);
}
.range input[type="range"]:focus-visible { outline: none; }
.range input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--focus); outline-offset: 2px; }
.range input[type="range"]:focus-visible::-moz-range-thumb { outline: 3px solid var(--focus); outline-offset: 2px; }
.range-hint { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.sub-list a { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; font-size: 15px; text-decoration: none; }
.sub-list a span:first-child { overflow-wrap: anywhere; }
.sub-list a:hover span:first-child { text-decoration: underline; }
.sub-list a[aria-current="page"] { font-weight: 750; }
.sub-list .count { margin-left: auto; }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.price-range input { width: 100%; height: 40px; padding: 0 10px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: var(--white); }
.filters select { width: 100%; height: 40px; padding: 0 10px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: var(--white); }
.filters legend label { font-weight: 700; }
.opt span:first-of-type { overflow-wrap: anywhere; }
.more { margin-top: 2px; }
.filters .more summary { padding: 4px 0; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; display: block; }
.filters .more summary::after { content: none; }
.filters .more[open] summary { display: none; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.active-filters a { display: inline-flex; gap: 8px; align-items: center; padding: 5px 12px; background: var(--ink); color: var(--white); border-radius: 999px; font-size: 14px; text-decoration: none; }
.active-filters a:hover { background: var(--ink-2); }
.sort-info { font-size: 14px; color: var(--muted); white-space: nowrap; }
.list-end { padding-top: 12px; text-align: center; }
.filters-actions { display: flex; align-items: center; gap: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.filters-actions .btn { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.filters-actions a { font-size: 14px; }

.list-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-bottom: 14px; }
.list-main { min-width: 0; }
.sort-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 15px; max-width: 100%; }
.sort-form select { max-width: 100%; }
.sort-form select { height: 40px; padding: 0 34px 0 12px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: var(--white); }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 28px 0 8px; }
.pagination a, .pagination span {
  min-width: 42px; height: 42px; padding: 0 12px; display: inline-grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--white);
  text-decoration: none; font-weight: 600;
}
.pagination a:hover { border-color: var(--ink); }
.pagination [aria-current="page"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.pagination .gap { border: 0; background: none; min-width: 20px; }

/* Pe ecrane mari subcategoriile stau în filtre; pe telefon rămân și ca etichete sub titlu, ca să fie la vedere. */
@media (min-width: 961px) { .chips-sub { display: none; } }
@media (max-width: 960px) {
  .list-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .filters { position: static; max-height: none; overflow: visible; }
  .f-subs { display: none; }
}

/* Textul de introducere al categoriei sau al magazinului (din admin); pe telefon, scurtat la 3 rânduri. */
.list-intro { max-width: 78ch; margin: 8px 0 4px; color: var(--ink-2, inherit); line-height: 1.55; }
@media (max-width: 640px) {
  .list-intro:not(.is-open) { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
  .list-intro-more { background: none; border: 0; padding: 0; color: var(--link, inherit); text-decoration: underline; font: inherit; cursor: pointer; }
}
@media (min-width: 641px) { .list-intro-more { display: none; } }
.list-intro-static { max-width: 78ch; margin: 8px 0 4px; line-height: 1.55; }
