/* ===== Catalog: layout & spacing ===== */
.catalog-page { padding-bottom: 100px; background: var(--theme-page-bg); }
.catalog-title { width: 100%; }
.catalog-section { padding-top: 32px; }
.catalog-section__inner { display: flex; flex-direction: column; gap: 32px; }

.catalog-toolbar { display: flex; flex-direction: column; gap: 16px; }
.catalog-toolbar__top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.catalog-toolbar__button { display: inline-flex; align-items: center; gap: 8px; min-width: 32px; min-height: 32px; color: var(--theme-text-main); text-transform: uppercase; -webkit-tap-highlight-color: transparent; background: none; border: none; cursor: pointer; }
.catalog-toolbar__button-icon, .catalog-toolbar__sort-icon { position: relative; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; }
.catalog-toolbar__count { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; font-size: 13px; font-weight: 700; line-height: 1.2; letter-spacing: 0.39px; color: var(--theme-text-main); background: var(--theme-accent); border-radius: 50%; }
.catalog-toolbar__count[hidden] { display: none !important; }
.catalog-toolbar__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; min-height: 0; }

.catalog-chip { display: inline-flex; align-items: center; gap: 4px; color: var(--theme-text-main); font-family: 'Alumni Sans', sans-serif; }
.catalog-chip__remove { position: relative; flex: 0 0 24px; width: 24px; height: 24px; background: none; border: none; cursor: pointer; }
.catalog-chip__remove::before, .catalog-chip__remove::after { content: ""; position: absolute; top: 50%; left: 50%; width: 12px; height: 1px; background: rgba(255,255,255,0.6); }
.catalog-chip__remove::before { transform: translate(-50%,-50%) rotate(45deg); }
.catalog-chip__remove::after { transform: translate(-50%,-50%) rotate(-45deg); }

.catalog-results { display: flex; flex-direction: column; gap: 32px; min-width: 0; }

.catalog-desktop-sort { display: none; }
.catalog-layout { display: block; }
.catalog-filter { display: none; }
.catalog-products { display: flex; flex-direction: column; }
.catalog-products__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; margin: 0; padding: 0; list-style: none; }

.catalog-product { width: 100%; min-width: 0; }
.catalog-product__link { display: block; width: 100%; color: inherit; text-decoration: none; }
.catalog-product__media { width: 100%; position: relative; overflow: hidden; }
.catalog-product__image { width: 100%; height: 100%; display: block; object-fit: cover; }
.catalog-product__content { padding-top: 5px; }
.product-card__content { padding-top: 5px; }
.catalog-product__name { color: var(--theme-text-main); font-family: 'Alumni Sans', sans-serif; text-transform: uppercase; font-size: var(--fs-l-min); line-height: var(--lh-tight); }
.catalog-product__price { color: var(--theme-text-soft); font-family: 'Alumni Sans', sans-serif; text-transform: uppercase; font-size: var(--fs-l-min); line-height: var(--lh-tight); }
.catalog-product__price ins { text-decoration: none; color: #fff; }
.catalog-product__price del { color: rgba(255,255,255,0.4); margin-right: 8px; }

.catalog-offer { margin-top: 48px; display: flex; flex-direction: column; align-items: center; gap: 10px; margin-inline: calc(var(--container-pad-mobile) * -1); padding: 16px 20px; text-align: center; background: var(--theme-accent); }
.catalog-offer__text { color: var(--theme-text-main); font-family: 'Alumni Sans', sans-serif; text-transform: uppercase; }

.catalog-filter-form { display: flex; flex-direction: column; gap: 32px; }
.catalog-filter-form__actions { display: flex; flex-direction: column; gap: 8px; }
.catalog-filter-group { display: flex; flex-direction: column; gap: 8px; }
.catalog-filter-group--collapsed .catalog-filter-options { display: none; }
.catalog-filter-group__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 24px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.catalog-filter-group__title { color: var(--theme-text-muted); font-family: 'Alumni Sans', sans-serif; text-transform: uppercase; }
.catalog-filter-group__toggle { position: relative; width: 16px; height: 16px; flex-shrink: 0; background: none; border: none; cursor: pointer; }
.catalog-filter-group__toggle::before { content: ""; position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cg clip-path='url(%23clip0_156_12508)'%3E%3Cpath d='M11.25 6.25L7.875 9.625L4.5 6.25' stroke='white' stroke-opacity='0.4'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_156_12508'%3E%3Crect width='16' height='16' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E") center / 16px 16px no-repeat; transform: translate(-50%,-50%) rotate(180deg); }
.catalog-filter-group--collapsed .catalog-filter-group__toggle::before { transform: translate(-50%,-50%) rotate(0deg); }
.catalog-filter-options { display: flex; flex-direction: column; gap: 10px; }

.catalog-check, .catalog-radio { display: flex; align-items: center; gap: 8px; min-height: 24px; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.catalog-check__input, .catalog-radio__input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }
.catalog-check__box, .catalog-radio__box { position: relative; flex: 0 0 24px; width: 24px; height: 24px; border: 1px solid rgba(255,255,255,0.6); transition: border-color .25s ease, background-color .25s ease; }
.catalog-radio__box { border-radius: 50%; }
.catalog-check__box::before { content: ""; position: absolute; inset: 4px; background: var(--theme-accent); opacity: 0; transition: opacity .25s ease; }
.catalog-radio__box::before { content: ""; position: absolute; inset: 4px; background: var(--theme-accent); border-radius: inherit; opacity: 0; transition: opacity .25s ease; }
.catalog-check__input:checked + .catalog-check__box::before, .catalog-radio__input:checked + .catalog-radio__box::before { opacity: 1; }
.catalog-check__input:focus-visible + .catalog-check__box, .catalog-radio__input:focus-visible + .catalog-radio__box { border-color: var(--theme-text-main); outline: none; }
.catalog-check__text, .catalog-radio__text { color: var(--theme-text-main); font-family: 'Alumni Sans', sans-serif; text-transform: uppercase; font-size: var(--fs-m-min); }

.catalog-price { display: flex; flex-direction: column; gap: 10px; width: 190px; }
.catalog-price__values { display: flex; align-items: center; gap: 10px; color: var(--theme-text-main); font-family: 'Alumni Sans', sans-serif; }
.catalog-price__range { position: relative; height: 24px; --price-min-percent: 0%; --price-max-percent: 100%; }
.catalog-price__range::before { content: ""; position: absolute; top: 9px; left: 0; right: 0; height: 1px; background: rgba(255,255,255,0.4); }
.catalog-price__range::after { content: ""; position: absolute; top: 9px; left: var(--price-min-percent); right: calc(100% - var(--price-max-percent)); height: 1px; background: var(--theme-text-main); }
.catalog-price__input { position: absolute; inset: 0; width: 100%; height: 24px; margin: 0; background: transparent; appearance: none; pointer-events: none; -webkit-appearance: none; }
.catalog-price__input::-webkit-slider-runnable-track { height: 24px; background: transparent; }
.catalog-price__input::-moz-range-track { height: 24px; background: transparent; }
.catalog-price__input::-webkit-slider-thumb { width: 16px; height: 16px; margin-top: 4px; background: var(--theme-text-main); border: 2px solid var(--theme-page-bg); border-radius: 0; cursor: pointer; pointer-events: auto; transition: width .25s ease, height .25s ease, margin-top .25s ease; -webkit-appearance: none; }
.catalog-price__input::-moz-range-thumb { width: 16px; height: 16px; background: var(--theme-text-main); border: 2px solid var(--theme-page-bg); border-radius: 0; cursor: pointer; pointer-events: auto; transition: width .25s ease, height .25s ease; }
.catalog-price__input:hover::-webkit-slider-thumb, .catalog-price__input:focus-visible::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: 1px; }
.catalog-price__input:hover::-moz-range-thumb, .catalog-price__input:focus-visible::-moz-range-thumb { width: 22px; height: 22px; }
.catalog-price__input:focus-visible { outline: none; }
.catalog-price__input--min { z-index: 2; }
.catalog-price__input--max { z-index: 3; }

.catalog-modal-button { width: 100%; }

.catalog-drawer__panel { pointer-events: auto; touch-action: manipulation; }
.catalog-drawer { position: fixed; inset: 0; z-index: 200; display: flex; justify-content: flex-end; visibility: hidden; pointer-events: none; touch-action: manipulation; }
.catalog-drawer.is-open { visibility: visible; pointer-events: auto; }
.catalog-drawer__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.48); opacity: 0; transition: opacity .25s ease; border: none; cursor: pointer; }
.catalog-drawer.is-open .catalog-drawer__backdrop { opacity: 1; }
.catalog-drawer__panel { position: relative; z-index: 1; display: flex; flex-direction: column; width: 100%; max-width: 100%; max-height: 100dvh; overflow-y: auto; background: #030303; transform: translateX(100%); transition: transform .25s ease; }
.catalog-drawer.is-open .catalog-drawer__panel { transform: translateX(0); }
.catalog-drawer__head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: flex-end; min-height: var(--header-height-mobile); padding-inline: 20px; background: #030303; }
.catalog-drawer__close { position: relative; width: 24px; height: 24px; background: none; border: none; cursor: pointer; }
.catalog-drawer__close::before, .catalog-drawer__close::after { content: ""; position: absolute; top: 50%; left: 50%; width: 18px; height: 1.5px; background: var(--theme-text-main); }
.catalog-drawer__close::before { transform: translate(-50%,-50%) rotate(45deg); }
.catalog-drawer__close::after { transform: translate(-50%,-50%) rotate(-45deg); }
.catalog-drawer__body { padding: 10px 20px 20px; }
.catalog-drawer__body .catalog-filter-form { gap: 32px; }
#catalog-sort-drawer .catalog-drawer__body { padding: 10px 20px 20px; }
#catalog-sort-drawer .catalog-sort-form { width: 100%; }

.woocommerce-pagination { margin-top: 40px; }
.woocommerce-pagination ul { display: flex; justify-content: center; align-items: center; gap: 16px; list-style: none; padding: 0; margin: 0; }
.woocommerce-pagination ul li { display: flex; align-items: center; justify-content: center; }
.woocommerce-pagination ul li a.page-numbers,
.woocommerce-pagination ul li span.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; font-family: 'Alumni Sans', sans-serif; font-size: 18px; font-weight: 500; text-transform: uppercase; color: var(--theme-text-muted); border: 1px solid transparent; transition: color .2s, border-color .2s; text-decoration: none; box-sizing: border-box; line-height: 1; }
.woocommerce-pagination ul li a.page-numbers:hover,
.woocommerce-pagination ul li a.page-numbers:focus-visible { color: var(--theme-text-main); border-color: var(--theme-border-muted); outline: none; }
.woocommerce-pagination ul li span.page-numbers.current { color: var(--theme-text-main); border-color: var(--theme-accent); }
.woocommerce-pagination ul li a.page-numbers.prev,
.woocommerce-pagination ul li a.page-numbers.next,
.woocommerce-pagination ul li span.page-numbers.prev,
.woocommerce-pagination ul li span.page-numbers.next { padding: 0 !important; width: 40px !important; min-width: 40px !important; max-width: 40px !important; height: 40px !important; min-height: 40px !important; max-height: 40px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; border: 1px solid transparent !important; box-sizing: border-box !important; font-size: 0 !important; line-height: 1 !important; overflow: hidden !important; }
.woocommerce-pagination ul li a.page-numbers.prev img,
.woocommerce-pagination ul li a.page-numbers.next img,
.woocommerce-pagination ul li span.page-numbers.prev img,
.woocommerce-pagination ul li span.page-numbers.next img { width: 32px; height: 32px; display: block; margin: 0; padding: 0; flex-shrink: 0; }

.catalog-product .product-card__hover-panel { opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity 180ms ease, transform 180ms ease; }
.catalog-product .product-card__line { opacity: 0; transition: opacity 180ms ease; }
@media (hover: hover) and (pointer: fine) {
  .catalog-product:hover .product-card__hover-panel { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .catalog-product:hover .product-card__line { opacity: 1; }
}

.catalog-filter-more { color: rgba(255,255,255,0.6); background: none; border: none; cursor: pointer; padding: 4px 0; text-transform: uppercase; font-family: 'Alumni Sans', sans-serif; transition: color .2s; }
.catalog-filter-more:hover { color: #fff; }

@media (min-width: 640px) and (max-width: 1024px) {
  .catalog-products__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .catalog-page { padding-bottom: 140px; }
  .catalog-offer { margin-top: 60px; margin-inline: calc(var(--container-pad-tablet) * -1); }
}
@media (min-width: 1025px) {
  .catalog-page { padding-bottom: 180px; }
  .catalog-section { padding-top: 40px; }
  .catalog-section__inner { gap: 40px; }
  .catalog-toolbar { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 40px; width: 100%; }
  .catalog-toolbar__top { grid-column: 2; grid-row: 1; display: flex; justify-content: flex-end; gap: 0; }
  .catalog-toolbar__button--filter { display: none; }
  .catalog-toolbar__button--sort { display: inline-flex; }
  .catalog-toolbar__chips { grid-column: 1; grid-row: 1; min-width: 0; min-height: 32px; }
  .catalog-desktop-sort { position: relative; display: block; width: 260px; }
  .catalog-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); align-items: start; gap: 40px; }
  .catalog-filter { display: flex; flex-direction: column; gap: 40px; width: 236px; }
  .catalog-filter .catalog-filter-form { gap: 40px; }
  .catalog-filter .catalog-filter-group { gap: 10px; }
  .catalog-filter .catalog-filter-form__actions { gap: 20px; align-items: flex-start; }
  .catalog-filter .catalog-modal-button { width: auto; }
  .catalog-products__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
  .catalog-offer { margin-inline: 0; margin-top: 80px; padding: 20px 144px; }
  .catalog-drawer { display: none; }
  .catalog-desktop-sort { position: absolute; top: calc(100% + 20px); right: 0; z-index: 20; display: none; padding: 20px; background: #030303; box-shadow: 0 20px 60px rgba(0,0,0,0.35); }
  .catalog-desktop-sort.is-open { display: block; }
  .catalog-filter .catalog-filter-form__actions, .catalog-desktop-sort .catalog-sort-form__actions { display: none; }
  .catalog-results { gap: 20px; }
}
@media (min-width: 1400px) {
  .catalog-page { padding-bottom: 220px; }
  .catalog-products__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ---------- Product card actions ---------- */
.product-card {
  position: relative;
  container: product-card / inline-size;
  --product-card-media-height: 151.643cqw;
  --product-card-action-padding-x: 10px;
  --product-card-action-padding-y: 10px;
  --product-card-action-bottom: var(--product-card-panel-line);
  --product-card-favorite-size: 45px;
  --product-card-icon-size: 29px;
  --product-card-cart-height: 45px;
  --product-card-cart-font-size: 16px;
  --product-card-action-gap: clamp(8px, 4cqw, 14px);
  --product-card-cart-padding-x: clamp(8px, 4cqw, 16px);
  --product-card-action-height: clamp(50px, 26cqw, 58px);
  --product-card-line-gap: 2px;
  --product-card-line-split: 66.666%;
  --product-card-panel-bg: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0) 100%);
  --product-card-panel-hover-bg: rgba(255, 255, 255, 0.14);
  --product-card-panel-line: 4px;
  --product-card-line-fill: 0%;
}
.product-card__link { display: block; color: inherit; text-decoration: none; }
.product-card__media { position: relative; isolation: isolate; overflow: hidden; }
.product-card__image { display: block; }
.product-card__hover-panel {
  position: absolute;
  top: calc(var(--product-card-media-height) - var(--product-card-action-bottom) - var(--product-card-action-height));
  right: 0; left: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center; gap: var(--product-card-action-gap);
  height: var(--product-card-action-height);
  padding: var(--product-card-action-padding-y) var(--product-card-action-padding-x);
  overflow: hidden; background: var(--product-card-panel-bg);
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
}
.product-card__line {
  position: absolute;
  top: calc(var(--product-card-media-height) - var(--product-card-panel-line));
  z-index: 4; height: var(--product-card-panel-line); overflow: hidden;
  background: var(--theme-text-main); opacity: 0; pointer-events: none;
  transition: opacity 180ms ease;
}
.product-card__line::before {
  content: ""; position: absolute; inset: 0; width: var(--product-card-line-fill);
  background: var(--theme-accent); transition: width 260ms ease;
}
.product-card__line--favorite { left: 0; width: calc(var(--product-card-line-split) - var(--product-card-line-gap)); }
.product-card__line--cart { right: 0; width: calc(100% - var(--product-card-line-split)); }
.product-card.is-favorite .product-card__line--favorite::before { width: 100%; }
.product-card.is-in-cart .product-card__line--cart::before { width: 100%; }
.product-card__favorite {
  appearance: none; border: 0; flex: 0 0 var(--product-card-favorite-size); flex-shrink: 0;
  width: var(--product-card-favorite-size); min-width: var(--product-card-favorite-size); height: var(--product-card-favorite-size); padding: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--theme-text-main); background: rgba(0, 0, 0, 0); cursor: pointer; font: inherit;
  transition: background-color 180ms ease;
}
.product-card__favorite-icon {
  flex: 0 0 var(--product-card-icon-size); width: var(--product-card-icon-size); height: var(--product-card-icon-size);
  background: url("/images/icon-heart-outline.svg") center / contain no-repeat;
}
.product-card__favorite.is-active,
.product-card.is-favorite .product-card__favorite,
.product-card--favorite .product-card__favorite { color: var(--theme-accent); }
.product-card__favorite.is-active .product-card__favorite-icon,
.product-card.is-favorite .product-card__favorite-icon,
.product-card--favorite .product-card__favorite-icon { background-image: url("/images/icon-heart-filled.svg"); }
.product-card__cart {
  flex: 1 1 auto; width: auto; min-width: 0; max-width: 100%; min-height: var(--product-card-cart-height);
  display: flex; align-items: center; justify-content: center;
  padding: 10px var(--product-card-cart-padding-x); font-size: var(--product-card-cart-font-size); white-space: nowrap;
}
@media screen and (min-width: 1025px) {
  .product-card {
    --product-card-cart-height: clamp(40px, 14cqw, 50px);
    --product-card-action-height: clamp(58px, 26cqw, 68px);
    --product-card-favorite-size: 45px;
    --product-card-icon-size: clamp(29px, 10.3cqw, 34px);
  }
  .product-card__cart { padding-inline: var(--product-card-cart-padding-x); }
}
@media (hover: hover) and (pointer: fine) {
  .product-card:not(.is-favorite):hover .product-card__line--favorite::before,
  .product-card:not(.is-favorite) .product-card__media:hover .product-card__line--favorite::before { width: 50%; }
  .product-card:hover .product-card__line { opacity: 1; }
  .product-card:hover .product-card__hover-panel { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .product-card.is-favorite:hover .product-card__line--favorite::before { width: 100%; }
  .product-card.is-in-cart:hover .product-card__line--cart::before { width: 100%; }
  .product-card__favorite:hover, .product-card__favorite:focus-visible { background-color: var(--product-card-panel-hover-bg); }
}
@container product-card (min-width: 280px) {
  .product-card__hover-panel {
    --product-card-action-height: 85px; --product-card-action-padding-x: 20px; --product-card-action-padding-y: 10px;
    --product-card-action-gap: 14px; --product-card-cart-padding-x: 14px; --product-card-action-bottom: 14px; --product-card-favorite-size: 45px;
    --product-card-icon-size: 34px; --product-card-cart-height: 45px; --product-card-cart-padding-x: 20px;
  }
}
@media (hover: hover) and (pointer: fine) {
  .product-card__favorite:hover, .product-card__favorite:focus-visible { background-color: transparent !important; }
  .product-card__favorite:hover .product-card__favorite-icon,
  .product-card__favorite:focus-visible .product-card__favorite-icon { opacity: 1; transform: scale(1.15); transition: opacity 180ms ease, transform 180ms ease; }
}

/* Out of stock */
.catalog-product.is-out-of-stock .product-card__image { filter: grayscale(100%); opacity: 0.6; }
.catalog-product.is-out-of-stock .product-card__hover-panel,
.catalog-product.is-out-of-stock .product-card__line { display: none !important; }

/* Hover states */
.catalog-toolbar__button { transition: background-color 0.2s ease; }
.catalog-toolbar__button:hover,
.catalog-toolbar__button:focus-visible { background-color: var(--theme-border-subtle); }
.catalog-chip__remove { transition: background-color 0.2s ease; }
.catalog-chip__remove:hover,
.catalog-chip__remove:focus-visible { background-color: var(--theme-border-subtle); }

/* Фикс: фиксируем пропорции обложек в каталоге */
.catalog-product__media,
.catalog-products__grid .product-card__media { aspect-ratio: 213 / 323; background-color: #1a1a1a; }
.catalog-product__image,
.catalog-products__grid .product-card__image { height: 100%; object-fit: cover; }
