/* Catalog: heading, subsections, new arrivals banner, filter panel, grid */
.catalog-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 28px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.catalog-head .h1 { margin-bottom: 18px; }
.catalog-head .lead { margin-top: -6px; }
.catalog-head--home { padding-top: clamp(56px, 8vw, 120px); }
.filters-toggle { display: none; }
.filters-toggle__count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 10px; letter-spacing: 0; }

.subcats { display: flex; gap: 6px 28px; flex-wrap: wrap; margin: 6px 0 36px; }
.subcat { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 12px 0; text-decoration: none; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); transition: color .3s; }
.subcat::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.subcat:hover { color: var(--ink); }
.subcat:hover::after, .subcat.is-active::after { transform: scaleX(1); }
.subcat.is-active { color: var(--ink); }
.subcat .icon { color: var(--gold); }

/* New arrivals in a section: text on the left, three small pieces on the right. Static. */
.novelty { display: grid; grid-template-columns: minmax(240px, 1fr) 2.2fr; gap: 40px; align-items: center;
  padding: 40px 0; margin-bottom: 48px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.novelty__title { margin: 0 0 22px; font: 400 clamp(26px, 2.6vw, 38px)/1.1 var(--serif); }
.novelty__cards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 20px; }
.mini { display: grid; gap: 6px; text-decoration: none; color: var(--ink); }
.mini__media { display: block; aspect-ratio: 1; background: var(--surface-2); overflow: hidden; margin-bottom: 8px; }
.mini__media img { width: 100%; height: 100%; object-fit: contain; padding: 8%; transition: transform 1.2s var(--ease); }
.mini:hover .mini__media img { transform: scale(1.06); }
.mini__cat { font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.mini__title { font: 400 18px/1.2 var(--serif); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini__price { font-size: 13px; }

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

.filters { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.filters__form { padding: 0 6px 16px 0; }
.filters__head { display: none; }
.facet { border: 0; border-bottom: 1px solid var(--line); margin: 0; padding: 18px 0; min-width: 0; }
.facet:last-of-type { border-bottom: 0; }
.facet__title { display: flex; justify-content: space-between; align-items: center; font-size: 10.5px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; cursor: pointer; list-style: none; padding: 0; margin-bottom: 10px; }
.facet__title::-webkit-details-marker { display: none; }
details.facet:not([open]) .facet__title { margin-bottom: 0; }
details.facet[open] .facet__title .icon { transform: rotate(180deg); }
.facet__title .icon { color: var(--muted); transition: transform .5s var(--ease); width: 14px; }
.facet--price legend { width: 100%; }
.facet__list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; scrollbar-width: thin; }
.facet__search { margin: 4px 0 8px; }
.price-range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-bottom: 10px; color: var(--muted); }
.price-range .input::-webkit-outer-spin-button, .price-range .input::-webkit-inner-spin-button { -webkit-appearance: none; }
.filters__actions { position: sticky; bottom: 0; padding-top: 14px; background: linear-gradient(transparent, var(--bg) 30%); }
html.js .filters__actions { display: none; }
.filters-backdrop { display: none; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 28px; }
.toolbar__count { margin: 0; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.toolbar__count .mono { color: var(--ink); }
/* A collection without the filter panel: count on the left, price range and sorting on the right. */
.toolbar--collection { flex-wrap: wrap; gap: 16px 28px; }
/* --- the filter area of a collection ------------------------------------------------------- */
/* line 1: two segmented switches (movement type, discount) and the count */
.catalog-switches { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; margin: 0 0 26px; }
.catalog-switches__count { margin: 0 0 0 auto; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.catalog-switches__count .mono { color: var(--ink); }
.type-switch, .discount-switch { display: flex; border: 1px solid var(--line-2); width: max-content; max-width: 100%; }
.type-switch__tab, .discount-switch__tab { padding: 12px 20px 11px; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-2); white-space: nowrap; transition: background .3s, color .3s; }
.type-switch__tab + .type-switch__tab, .discount-switch__tab + .discount-switch__tab { border-left: 1px solid var(--line-2); }
.type-switch__tab:hover, .discount-switch__tab:hover { color: var(--ink); background: rgba(28, 28, 26, .03); }
.type-switch__tab.is-active, .discount-switch__tab.is-active { background: var(--ink); color: var(--bg); }
.discount-switch--panel, .toolbar__toggle, .toolbar--collection .toolbar__count { display: none; }
/* the grid view toggle: two small icons next to the count */
.view-toggle { display: flex; gap: 2px; }
.view-toggle--phone { display: none; }
.view-toggle__btn { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid transparent;
  background: none; color: var(--muted); cursor: pointer; transition: color .3s, border-color .3s; }
.view-toggle__btn svg { width: 20px; height: 20px; fill: currentColor; }
.view-toggle__btn:hover { color: var(--ink); }
.view-toggle__btn[aria-pressed="true"] { color: var(--ink); border-color: var(--line-2); }
/* the dense grid: five in a row, smaller type, no spec line */
#results[data-grid="5"] .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 40px 18px; }
#results[data-grid="5"] .tile__body { padding-top: 14px; gap: 4px; }
#results[data-grid="5"] .tile__title { font-size: 18px; }
#results[data-grid="5"] .tile__specs, #results[data-grid="5"] .tile__flags .flag + .flag { display: none; }
#results[data-grid="5"] .tile__meta { font-size: 9px; letter-spacing: .16em; }
#results[data-grid="5"] .tile__type { left: 10px; bottom: 9px; padding: 4px 6px 3px; font-size: 8px; }
#results[data-grid="5"] .tile__flags { left: 10px; top: 10px; }
#results[data-grid="5"] .price__now { font-size: 15px; }
#results[data-grid="5"] .tile__add .btn__text { display: none; }
/* line 2: one even bar — brand · for whom · price · sorting */
.toolbar--collection { display: block; margin-bottom: 30px; }
.fbar { display: grid; grid-template-columns: 1fr 1fr 1.35fr 1fr; align-items: stretch;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fbar__cell { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; margin: 0;
  padding: 14px 24px; border: 0; border-left: 1px solid var(--line); }
.fbar__cell:first-child { padding-left: 0; border-left: 0; }
.fbar__label { padding: 0; font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); transition: color .3s; }
.fbar .fbar__select { width: 100%; min-height: 34px; padding: 4px 26px 4px 0; border: 0; background-color: transparent;
  font: 400 15px/1.2 var(--font); color: var(--ink); cursor: pointer; }
.fbar__range { display: flex; align-items: center; gap: 10px; }
.fbar__input { width: 100%; min-width: 0; min-height: 34px; padding: 4px 0; border: 0; border-bottom: 1px solid transparent;
  background: transparent; font-size: 15px; color: var(--ink); transition: border-color .3s; }
.fbar__input::placeholder { color: var(--muted); }
.fbar__input:focus { outline: none; border-bottom-color: var(--gold); }
.fbar__input::-webkit-outer-spin-button, .fbar__input::-webkit-inner-spin-button { -webkit-appearance: none; }
.fbar__dash { color: var(--muted); }
.fbar__cell:hover .fbar__label { color: var(--gold); }
@media (max-width: 1180px) {
  #results[data-grid="5"] .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .catalog { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results--wide .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .catalog { grid-template-columns: 1fr; }
  .results--wide .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters-toggle { display: inline-flex; }
  html.js .filters { position: fixed; inset: 0 auto 0 0; width: min(380px, 90vw); max-height: none; top: 0; background: var(--bg); padding: 0 22px; z-index: 70; transform: translateX(-105%); transition: transform .6s var(--ease); }
  html.js .filters__head { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 1; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; }
  html.js .filters__actions { display: block; }
  html.js body.filters-open .filters { transform: none; }
  html.js body.filters-open .filters-backdrop { display: block; position: fixed; inset: 0; background: rgba(20, 39, 31, .45); z-index: 60; animation: page-in .4s; }
  html.no-js .filters { position: static; max-height: none; }
  .novelty { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 620px) {
  .catalog-head { flex-direction: column; align-items: stretch; gap: 0; padding-top: 16px; }
  .catalog-head .h1 { margin-bottom: 14px; }
  .filters-toggle { width: 100%; min-height: 46px; margin-bottom: 16px; }
  .novelty { display: none; }          /* on a phone the grid itself is the showcase */
  .subcats { margin-bottom: 20px; }
  .novelty__cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .novelty__cards::-webkit-scrollbar { display: none; }
  .mini { flex: 0 0 44%; scroll-snap-align: start; }
  .toolbar { flex-wrap: wrap; }
  .sort__label { display: none; }
  .toolbar__controls { width: 100%; justify-content: space-between; gap: 12px; }
  .price-filter .input { width: 92px; }
  /* phone: the type switch, then the count and one "Filters" button; the bar opens below it */
  .catalog-switches { margin-bottom: 14px; }
  .catalog-switches .type-switch { width: 100%; }
  .type-switch__tab { flex: 1; padding: 12px 6px 11px; text-align: center; font-size: 9.5px; letter-spacing: .14em; }
  .discount-switch--top, .catalog-switches__count, .catalog-switches .view-toggle { display: none; }
  .toolbar--collection .toolbar__count { margin-right: auto; }
  .view-toggle--phone { display: flex; margin-right: 14px; }
  .view-toggle--phone .view-toggle__btn { width: 34px; height: 34px; }
  .view-toggle--phone .view-toggle__btn svg { width: 18px; height: 18px; }
  /* four in a row on a phone: the photo, the name and the price — nothing else fits */
  #results[data-grid="5"] .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 8px; }
  #results[data-grid="5"] .tile__media { aspect-ratio: 3 / 4; }
  #results[data-grid="5"] .tile__img { padding: 4%; }
  #results[data-grid="5"] .tile__meta, #results[data-grid="5"] .tile__body > .stock, #results[data-grid="5"] .tile__type,
  #results[data-grid="5"] .tile__fav, #results[data-grid="5"] .tile__flags .flag:not(.flag--sale), #results[data-grid="5"] .tile__add { display: none; }
  #results[data-grid="5"] .tile__flags { left: 4px; top: 4px; }
  #results[data-grid="5"] .flag { padding: 3px 4px 2px; font-size: 7.5px; letter-spacing: .08em; }
  #results[data-grid="5"] .tile__body { padding-top: 8px; gap: 2px; }
  #results[data-grid="5"] .tile__title { font-size: 12.5px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; }
  #results[data-grid="5"] .tile__buy { margin-top: 4px; padding-top: 6px; }
  #results[data-grid="5"] .price { display: flex; flex-direction: column; gap: 0; }
  #results[data-grid="5"] .price__old { font-size: 9.5px; }
  #results[data-grid="5"] .price__now { font-size: 12.5px; }
  .toolbar--collection { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-bottom: 20px; }
  .toolbar--collection .toolbar__count { display: block; }
  .toolbar__toggle { display: inline-flex; align-items: center; gap: 8px; padding: 9px 0; border: 0; background: none; color: var(--ink);
    font: 500 10.5px/1 var(--font); letter-spacing: .2em; text-transform: uppercase; cursor: pointer; }
  .toolbar__toggle[aria-expanded="true"] { color: var(--gold); }
  .fbar { width: 100%; }
  html.js .toolbar--collection .toolbar__controls { display: none; }
  html.js .toolbar--collection .toolbar__controls.is-open { display: flex; flex-direction: column; margin-top: 14px; border-bottom: 0; }
  .fbar__cell, .fbar__cell:first-child { padding: 12px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .discount-switch--panel { display: flex; width: 100%; margin: 14px 0 2px; }
  .discount-switch__tab { flex: 1; text-align: center; padding: 11px 4px 10px; font-size: 9.5px; letter-spacing: .12em; }
  .chips { margin-bottom: 18px; }
  /* "All" and the collections as equal tabs that fit the screen: icon on top, the name below — no sideways scrolling */
  .subcats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; margin: 0 0 18px;
    border: 1px solid var(--line); }
  .subcat { flex-direction: column; justify-content: center; gap: 6px; min-height: 72px; padding: 12px 6px;
    text-align: center; white-space: normal; font-size: 9.5px; line-height: 1.35; letter-spacing: .14em; }
  .subcat + .subcat { border-left: 1px solid var(--line); }
  .subcat::after { display: none; }
  .subcat.is-active { background: rgba(168, 134, 79, .08); color: var(--ink); box-shadow: inset 0 -2px 0 var(--gold); }
}

/* Filter dropdowns styled like the rest of the shop where the browser allows it
   (customizable <select>: Chrome / Edge 135+); elsewhere the native list stays. */
@supports (appearance: base-select) {
  .fbar .fbar__select, .fbar .fbar__select::picker(select) { appearance: base-select; }
  .fbar .fbar__select { display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 4px 0; background: none; outline: none; }
  .fbar .fbar__select::picker-icon { content: ""; width: 7px; height: 7px; border-right: 1.2px solid var(--muted);
    border-bottom: 1.2px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform .3s var(--ease); }
  .fbar .fbar__select:open::picker-icon { transform: translateY(2px) rotate(-135deg); border-color: var(--gold); }
  .fbar .fbar__select::picker(select) { min-width: anchor-size(width); margin-top: 8px; padding: 8px 0;
    border: 1px solid var(--line-2); background: var(--bg); color: var(--ink);
    box-shadow: 0 24px 48px -18px rgba(20, 39, 31, .28); opacity: 0; transform: translateY(-6px);
    transition: opacity .25s, transform .3s var(--ease), overlay .3s allow-discrete, display .3s allow-discrete; }
  .fbar .fbar__select:open::picker(select) { opacity: 1; transform: none; }
  @starting-style { .fbar .fbar__select:open::picker(select) { opacity: 0; transform: translateY(-6px); } }
  .fbar .fbar__select option { display: flex; align-items: center; gap: 10px; padding: 11px 20px 10px;
    font: 400 15px/1.2 var(--font); color: var(--ink-2); cursor: pointer; transition: background .2s, color .2s; }
  .fbar .fbar__select option::checkmark { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); order: -1; }
  .fbar .fbar__select option:not(:checked)::checkmark { visibility: hidden; }
  .fbar .fbar__select option:hover, .fbar .fbar__select option:focus-visible { background: rgba(168, 134, 79, .1); color: var(--ink); outline: none; }
  .fbar .fbar__select option:checked { color: var(--ink); font-weight: 500; }
  .fbar .fbar__select option[disabled] { display: none; }
}

/* --- the end of a list: "Show more", progress, page numbers ------------------------------------- */
.more { display: grid; justify-items: center; gap: 14px; margin: 56px auto 0; max-width: 420px; text-align: center; }
.more__btn { min-width: 260px; justify-content: center; gap: 12px; }
.more__btn.is-loading { opacity: .55; pointer-events: none; }
.more__btn.is-loading .icon { animation: more-spin 1s linear infinite; }
@keyframes more-spin { to { transform: rotate(360deg); } }
.more__info { margin: 4px 0 0; font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.more__bar { display: block; width: 180px; height: 2px; background: var(--line); }
.more__bar i { display: block; height: 100%; background: var(--gold); transition: width .6s var(--ease); }
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 18px; }
.pager__link { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 8px; border: 1px solid var(--line-2);
  font-size: 13px; color: var(--ink-2); text-decoration: none; transition: background .3s, color .3s, border-color .3s; }
.pager__link:hover { border-color: var(--ink); color: var(--ink); }
.pager__link.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pager__link--arrow .icon { width: 14px; height: 14px; }
.pager__gap { min-width: 18px; color: var(--muted); }
@media (max-width: 620px) {
  .more { margin-top: 40px; }
  .more__btn { width: 100%; min-width: 0; }
  .pager__link { min-width: 34px; height: 34px; font-size: 12px; }
}
