/* KORRTO 2026 — страница каталога. Токены и карточка товара — из site.css. */

[hidden] { display: none !important; }
.cat { padding-bottom: 0; }

/* Хлебные крошки */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 22px 0 0; font-size: 13.5px; color: var(--ink-3); }
.crumbs a:hover { color: var(--ink); }
.crumbs svg { width: 14px; height: 14px; color: var(--line-strong); }
.crumbs span { color: var(--ink); }

/* Заголовок раздела */
.cat-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; padding: clamp(28px, 3.4vw, 48px) 0 clamp(24px, 2.6vw, 36px); }
.cat-head__title { margin: 0; font-size: clamp(44px, 6.4vw, 96px); }
.cat-head__meta { display: flex; align-items: center; gap: 10px; margin: 18px 0 0; font-size: 14px; color: var(--ink-2); }
.cat-head__meta .dot { flex: none; }
.cat-head__brand { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 18px 22px; background: var(--mist); min-width: 270px; transition: background-color .25s, color .25s; }
.cat-head__brand .mono { font-size: 12.5px; color: var(--ink-3); transition: color .25s; }
.cat-head__brand span:last-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 17px; }
.cat-head__brand svg { width: 18px; height: 18px; color: var(--red); transition: transform .25s var(--ease), color .25s; }
@media (hover: hover) {
  .cat-head__brand:hover { background: var(--ink); color: #fff; }
  .cat-head__brand:hover .mono { color: #A8A8A8; }
  .cat-head__brand:hover svg { transform: translateX(4px); color: #fff; }
}

/* Роли — вкладки */
.role-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
@media (max-width: 1024px) { .role-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gut) * -1); padding-left: var(--gut); padding-right: var(--gut); } }
.role-tabs::-webkit-scrollbar { display: none; }
.role-tabs button { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 999px; background: var(--mist); border: 1px solid transparent; font-size: 15px; font-weight: 560; transition: background-color .2s, color .2s, border-color .2s; }
.role-tabs button .mono { font-size: 12px; font-weight: 400; color: var(--ink-3); transition: color .2s; }
.role-tabs button svg { width: 16px; height: 16px; stroke-width: 2.4; color: var(--red); margin-left: -4px; }
.role-tabs button:hover { border-color: var(--ink); }
.role-tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.role-tabs button[aria-pressed="true"] .mono { color: #A8A8A8; }
.role-tabs button[aria-pressed="true"] svg { color: #fff; }
.role-tabs button.role-tabs__sale { color: var(--red); }
.role-tabs button.role-tabs__sale[aria-pressed="true"] { background: var(--red); color: #fff; }
.role-tabs button.role-tabs__sale[aria-pressed="true"] .mono { color: #F3C9CD; }
.types { display: flex; gap: 8px; padding: 22px 0 0; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gut) * -1); padding-left: var(--gut); padding-right: var(--gut); }
.types::-webkit-scrollbar { display: none; }
.types button { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 14.5px; font-weight: 500; transition: background-color .2s, color .2s, border-color .2s; }
.types button .mono { font-size: 12px; color: var(--ink-3); transition: color .2s; }
.types button:hover { border-color: var(--ink); }
.types button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.types button[aria-pressed="true"] .mono { color: #A8A8A8; }

/* Панель над сеткой */
.cat-bar { display: flex; align-items: center; gap: 12px; padding: 22px 0 26px; }
.cat-bar__filters { display: none; }
.cat-bar__filters svg { width: 16px; height: 16px; }
.cat-bar__n:not(:empty) { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; padding: 0 5px; }
.cat-active { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 0; }
.cat-active button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 14px; border-radius: 999px; background: var(--mist); font-size: 13.5px; transition: background-color .2s; }
.cat-active button:hover { background: var(--stone); }
.cat-active button svg { width: 14px; height: 14px; color: var(--ink-3); }
.cat-active .cat-active__reset { background: none; padding: 0 6px; color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; }
.sort { position: relative; margin-left: auto; flex: none; }
.sort select { appearance: none; height: 40px; padding: 0 40px 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--paper); font: inherit; font-size: 14.5px; color: var(--ink); cursor: pointer; }
.sort select:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sort svg { position: absolute; right: 14px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); pointer-events: none; }

/* Сетка и фильтры */
.cat-layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: clamp(28px, 3vw, 48px); align-items: start; }
.filters { position: sticky; top: 96px; }
.filters__head, .filters__foot { display: none; }
.fgroup { border: 0; margin: 0; padding: 0 0 24px; min-width: 0; }
.fgroup + .fgroup { border-top: 1px solid var(--line); padding-top: 22px; }
.fgroup legend { float: left; width: 100%; padding: 0; margin-bottom: 14px; font-weight: 600; font-size: 15px; }
.fgroup legend + * { clear: both; }
.fcolors__more { margin-top: 6px; font-size: 14px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; align-self: flex-start; }
.fcolors:not(.is-all) .fcolor:nth-child(n+9) { display: none; }
.fcolors.is-all .fcolors__more { display: none; }
.cat-found { flex: none; font-size: 14px; color: var(--ink-3); }
.fsizes { display: flex; flex-wrap: wrap; gap: 6px; }
.fsizes .size { height: 34px; min-width: 44px; }
.fcolors { display: flex; flex-direction: column; gap: 2px; }
.fcolor { display: flex; align-items: center; gap: 12px; padding: 7px 8px; margin: 0 -8px; border-radius: 8px; font-size: 14.5px; text-align: left; transition: background-color .15s; }
.fcolor:hover { background: var(--mist); }
.fcolor .swatch { flex: none; width: 20px; height: 20px; }
.fcolor[aria-pressed="true"] { font-weight: 600; }
.fcolor[aria-pressed="true"] .swatch::after { border-color: var(--ink); }
.fprice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fprice label { position: relative; }
.fprice span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--ink-3); pointer-events: none; }
.fprice input { width: 100%; height: 40px; padding: 0 10px 0 34px; border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; font-size: 14.5px; background: var(--paper); -moz-appearance: textfield; }
.fprice input::-webkit-outer-spin-button, .fprice input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fprice input:focus { outline: none; border-color: var(--ink); }
.fprice__quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fprice__quick button { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; transition: border-color .15s, background-color .15s, color .15s; }
.fprice__quick button:hover { border-color: var(--ink); }
.fprice__quick button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 22px; }
.cat-grid .card { min-width: 0; }
.cat-grid .card__name a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Плитка «под ваш бренд» внутри сетки */
.cat-promo { display: flex; flex-direction: column; gap: 14px; padding: 28px 26px; background: var(--night); color: #fff; min-height: 100%; }
.cat-promo .mono { font-size: 12.5px; color: #A8A8A8; }
.cat-promo .display { font-size: clamp(30px, 2.6vw, 40px); }
.cat-promo__text { color: #BDBDBD; font-size: 15px; line-height: 1.5; }
.cat-promo .btn { margin-top: auto; align-self: flex-start; }

/* Пусто и «Показать ещё» */
.cat-empty { padding: 56px 40px; background: var(--mist); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.cat-empty .display { font-size: clamp(32px, 3.4vw, 48px); }
.cat-empty p { margin: 0; max-width: 52ch; color: var(--ink-2); line-height: 1.5; }
.cat-empty__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.cat-more { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 56px 0 0; }
.cat-more[hidden], .cat-empty[hidden], .cat-more [hidden] { display: none; }
.cat-more p { margin: 0; font-size: 13.5px; color: var(--ink-3); }
.cat-more__bar { width: 220px; height: 2px; background: var(--line); }
.cat-more__bar i { display: block; height: 100%; background: var(--ink); transition: width .4s var(--ease); }
.cat-more .btn { margin-top: 8px; min-width: 220px; justify-content: center; }

/* Под заказ */
.cat-order { margin-top: clamp(72px, 7vw, 104px); padding-top: clamp(40px, 4vw, 56px); border-top: 2px solid var(--ink); }
.cat-order__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 32px; }
.cat-order__head h2 { margin: 0; font-size: clamp(36px, 4vw, 60px); display: flex; align-items: flex-start; gap: 10px; }
.cat-order__head h2 .mono { font-size: 15px; font-weight: 500; color: var(--ink-3); text-transform: none; margin-top: 6px; }
.cat-order__head p { margin: 12px 0 0; max-width: 56ch; color: var(--ink-2); line-height: 1.5; }
.cat-order__head .btn { flex: none; }
.cat-order__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 18px; }
.ocard { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ocard__media { position: relative; aspect-ratio: 3 / 4; background: var(--stone); overflow: hidden; margin-bottom: 6px; }
.ocard__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); transition: transform .8s var(--ease); }
.ocard:hover .ocard__media img { transform: scale(1.035); }
.ocard__tag { position: absolute; left: 10px; bottom: 10px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11.5px; display: inline-flex; align-items: center; }
.ocard__name { font-size: 14.5px; line-height: 1.35; font-weight: 520; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ocard__art { font-size: 11.5px; color: var(--ink-3); }
.ocard__cta { margin-top: 2px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--red); }
.ocard__cta svg { width: 15px; height: 15px; transition: transform .25s var(--ease); }
.ocard:hover .ocard__cta svg { transform: translateX(3px); }
.cat-order__more { display: flex; justify-content: center; margin-top: 40px; }

/* Подсказки покупателю */
.cat-help { margin-top: clamp(72px, 8vw, 112px); border-top: 1px solid var(--line); }
.cat-help .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cat-help__item { display: flex; gap: 18px; padding: 40px 32px 44px 0; }
.cat-help__item + .cat-help__item { padding-left: 32px; border-left: 1px solid var(--line); }
.cat-help__item > svg { flex: none; width: 26px; height: 26px; color: var(--red); stroke-width: 1.5; }
.cat-help h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.cat-help p { margin: 0 0 16px; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.cat-help .link-arrow { font-size: 14.5px; }
.cat-help .link-arrow svg { width: 16px; height: 16px; }

.filters-scrim { display: none; }

/* Раздел без остатков: только «под заказ» */
.cat--order .cat-layout { grid-template-columns: minmax(0, 1fr); }
.cat--order .filters, .cat--order .cat-bar, .cat--order [data-more] { display: none; }
.cat--order .cat-order { margin-top: 48px; }

@media (max-width: 1180px) {
  .cat-order__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .cat-layout { grid-template-columns: minmax(0, 1fr); }
  .cat-bar__filters { display: inline-flex; }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Фильтры — выезжающая панель */
  .filters { position: fixed; top: 0; bottom: 0; left: 0; z-index: 95; width: min(380px, 88vw); background: var(--paper); display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .35s var(--ease); visibility: hidden; }
  .filters-open .filters { transform: none; visibility: visible; }
  .filters__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 14px 22px; border-bottom: 1px solid var(--line); }
  .filters__head .display { font-size: 28px; }
  .filters__body { flex: 1; overflow-y: auto; padding: 22px; }
  .filters__foot { display: grid; grid-template-columns: auto 1fr; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--line); }
  .filters__foot .btn { justify-content: center; }
  .filters-scrim { display: block; position: fixed; inset: 0; z-index: 94; background: rgba(15,15,15,.4); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
  .filters-open .filters-scrim { opacity: 1; visibility: visible; transition: opacity .3s; }
  .filters-open { overflow: hidden; }
  .cat-help .wrap { grid-template-columns: 1fr; }
  .cat-help__item, .cat-help__item + .cat-help__item { padding: 28px 0; border-left: 0; }
  .cat-help__item + .cat-help__item { border-top: 1px solid var(--line); }
}

@media (max-width: 767px) {
  .cat-order__head { flex-direction: column; align-items: stretch; gap: 20px; }
  .cat-order__head .btn { justify-content: center; }
  .cat-order__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  .ocard__name { font-size: 13.5px; }
  .cat-found { display: none; }
  .cat-head { flex-direction: column; align-items: stretch; gap: 22px; }
  .cat-head__brand { min-width: 0; }
  .cat-bar { flex-wrap: wrap; }
  .cat-active { order: 3; flex-basis: 100%; }
  .cat-active:empty { display: none; }
  .sort select { padding-left: 14px; font-size: 14px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 12px; }
  .cat-grid .card__meta { display: none; }
  .cat-grid .card__name { font-size: 14px; }
  .cat-grid .card__foot { flex-direction: column; align-items: stretch; gap: 10px; }
  .cat-grid .card__foot .btn { justify-content: center; }
  .cat-grid .price { font-size: 19px; }
  .cat-grid .card__stock { font-size: 11px; height: 24px; padding: 0 8px; }
  .cat-grid .sizes .size { min-width: 34px; height: 28px; font-size: 11.5px; padding: 0 6px; line-height: 26px; }
  .cat-promo { grid-column: 1 / -1; padding: 24px 20px; }
  .cat-empty { padding: 36px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .filters, .filters-scrim, .cat-more__bar i { transition: none; }
}
.cat--order .cat-head__meta .dot { display: none; }
