:root {
  --white: #ffffff;
  --white-10: rgba(255, 255, 255, 0.1);
  --white-30: rgba(255, 255, 255, 0.3);
  --gray-100: #e2e2e2;
  --gray-200: #cccccc;
  --gray-300: #737373;
  --gray-400: #4a4a4a;
  --gray-500: #404040;
  --gray-600: #1f2022;

  --page-bg: var(--gray-500);
  --text-primary: var(--white);
  --text-muted: var(--gray-200);

  --radius-card: 10px;
  --radius-media: 6px;
  --radius-control: 6px;

  --shadow-card: 0 6px 12px rgba(0, 0, 0, 0.32);
  --hairline: rgba(255, 255, 255, 0.12);
  --hairline-strong: rgba(255, 255, 255, 0.18);
  --shadow-overlap: 0 10px 26px rgba(0, 0, 0, 0.16);
  --shadow-header: 0 12px 32px rgba(0, 0, 0, 0.24);
  --shadow-header-mobile: 0 8px 16px rgba(0, 0, 0, 0.16);

  --page-max: 1920px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

}

:root {
  --fs-h1: clamp(32px, calc(28.6851px + 0.884vw), 40px);
  --lh-h1: clamp(40px, calc(36.6851px + 0.884vw), 48px);
  --fs-h2: clamp(20px, calc(18.3425px + 0.442vw), 24px);
  --lh-h2: clamp(26px, calc(25.1713px + 0.221vw), 28px);
  --fs-h3: 16px;
  --lh-h3: clamp(20px, calc(22.8287px + -0.221vw), 22px);
  --fs-subtitle: clamp(14px, calc(13.5856px + 0.1105vw), 15px);
  --lh-subtitle: clamp(18px, calc(17.1713px + 0.221vw), 20px);
  --fs-body: clamp(13px, calc(14.4144px + -0.1105vw), 14px);
  --lh-body: clamp(17px, calc(18.4144px + -0.1105vw), 18px);
  --fs-caption: clamp(10px, calc(9.5856px + 0.1105vw), 11px);
  --lh-caption: clamp(14px, calc(13.5856px + 0.1105vw), 15px);
  --fs-cardinfo: 10px;
  --lh-cardinfo: 14px;
  --fs-price: 14px;
  --lh-price: clamp(16px, calc(21.6575px + -0.442vw), 20px);
  --fs-button: clamp(13px, calc(14.4144px + -0.1105vw), 14px);
  --lh-button: clamp(16px, calc(18.8287px + -0.221vw), 18px);
  --fs-nav: clamp(13px, calc(14.4144px + -0.1105vw), 14px);
  --lh-nav: clamp(16px, calc(18.8287px + -0.221vw), 18px);
  --page-pad: clamp(16px, calc(-10.5193px + 7.0718vw), 80px);
  --header-h: clamp(60px, calc(65.6575px + -0.442vw), 64px);
  --logo-h: 44px;
  --card-pad: clamp(8px, calc(6.3425px + 0.442vw), 12px);
  --card-pad-y: clamp(8px, calc(6.3425px + 0.442vw), 12px);
  --card-gap: 8px;
  --card-text-gap: 12px;
  --grid-col-gap: clamp(11px, calc(18.0718px + -0.5525vw), 16px);
  --grid-row-gap: clamp(32px, calc(27.8564px + 1.105vw), 42px);
  --tab-w: clamp(108px, calc(89.768px + 4.8619vw), 152px);
  --tab-h: clamp(44px, calc(42.3425px + 0.442vw), 48px);
  --tab-gap: clamp(0px, calc(-4.9724px + 1.326vw), 12px);
  --tabbar-h: clamp(52px, calc(48.6851px + 0.884vw), 60px);
  --ctl-h: clamp(32px, calc(30.3425px + 0.442vw), 36px);
  --hero-h: clamp(234px, calc(154.442px + 21.2155vw), 426px);
  --hero-pad: clamp(16px, calc(-30.4088px + 12.3757vw), 128px);
  --btn-pad-x: clamp(8px, calc(6.3425px + 0.442vw), 12px);
  --icon: clamp(16px, calc(14.3425px + 0.442vw), 20px);
  --chev-w: clamp(20px, calc(16.685px + 0.884vw), 28px);
}

@media (min-width: 1280px) {
  :root {
    --fs-h1: clamp(40px, calc(8px + 2.5vw), 48px);
    --lh-h1: clamp(48px, calc(16px + 2.5vw), 56px);
    --fs-h2: clamp(24px, calc(8px + 1.25vw), 28px);
    --lh-h2: clamp(28px, calc(-4px + 2.5vw), 36px);
    --fs-h3: clamp(16px, calc(8px + 0.625vw), 18px);
    --lh-h3: clamp(20px, calc(4px + 1.25vw), 24px);
    --fs-subtitle: clamp(15px, calc(7px + 0.625vw), 17px);
    --lh-subtitle: 20px;
    --fs-body: clamp(13px, calc(1px + 0.9375vw), 16px);
    --lh-body: clamp(17px, calc(5px + 0.9375vw), 20px);
    --fs-caption: clamp(11px, calc(3px + 0.625vw), 13px);
    --lh-caption: clamp(15px, calc(7px + 0.625vw), 17px);
    --fs-cardinfo: clamp(10px, calc(2px + 0.625vw), 12px);
    --lh-cardinfo: clamp(14px, calc(6px + 0.625vw), 16px);
    --fs-price: clamp(14px, calc(6px + 0.625vw), 16px);
    --lh-price: clamp(16px, calc(0px + 1.25vw), 20px);
    --fs-button: clamp(13px, calc(5px + 0.625vw), 15px);
    --lh-button: clamp(16px, calc(0px + 1.25vw), 20px);
    --fs-nav: clamp(13px, calc(5px + 0.625vw), 15px);
    --lh-nav: clamp(16px, calc(0px + 1.25vw), 20px);
    --page-pad: 80px;
    --header-h: clamp(60px, calc(-20px + 6.25vw), 80px);
    --logo-h: clamp(44px, calc(-36px + 6.25vw), 64px);
    --card-pad: 12px;
    --card-pad-y: clamp(12px, calc(-4px + 1.25vw), 16px);
    --card-gap: 8px;
    --card-text-gap: 12px;
    --grid-col-gap: clamp(11px, calc(-121px + 10.3125vw), 44px);
    --grid-row-gap: 42px;
    --tab-w: clamp(152px, calc(88px + 5vw), 168px);
    --tab-h: clamp(48px, calc(16px + 2.5vw), 56px);
    --tab-gap: 12px;
    --tabbar-h: clamp(60px, calc(28px + 2.5vw), 68px);
    --ctl-h: clamp(36px, calc(20px + 1.25vw), 40px);
    --hero-h: clamp(426px, calc(82px + 26.875vw), 512px);
    --hero-pad: clamp(128px, calc(-48px + 13.75vw), 172px);
    --btn-pad-x: clamp(12px, calc(-4px + 1.25vw), 16px);
    --icon: clamp(20px, calc(4px + 1.25vw), 24px);
    --chev-w: 28px;
  }
}

@media (min-width: 1600px) {
  :root {
    --fs-h1: 48px;
    --lh-h1: 56px;
    --fs-h2: clamp(28px, calc(8px + 1.25vw), 32px);
    --lh-h2: clamp(36px, calc(16px + 1.25vw), 40px);
    --fs-h3: clamp(18px, calc(8px + 0.625vw), 20px);
    --lh-h3: clamp(24px, calc(4px + 1.25vw), 28px);
    --fs-subtitle: clamp(17px, calc(2px + 0.9375vw), 20px);
    --lh-subtitle: clamp(20px, calc(0px + 1.25vw), 24px);
    --fs-body: clamp(16px, calc(6px + 0.625vw), 18px);
    --lh-body: clamp(20px, calc(0px + 1.25vw), 24px);
    --fs-caption: clamp(13px, calc(8px + 0.3125vw), 14px);
    --lh-caption: clamp(17px, calc(2px + 0.9375vw), 20px);
    --fs-cardinfo: clamp(12px, calc(2px + 0.625vw), 14px);
    --lh-cardinfo: clamp(16px, calc(-4px + 1.25vw), 20px);
    --fs-price: clamp(16px, calc(6px + 0.625vw), 18px);
    --lh-price: clamp(20px, calc(0px + 1.25vw), 24px);
    --fs-button: clamp(15px, calc(10px + 0.3125vw), 16px);
    --lh-button: 20px;
    --fs-nav: clamp(15px, calc(10px + 0.3125vw), 16px);
    --lh-nav: clamp(20px, calc(0px + 1.25vw), 24px);
    --page-pad: 80px;
    --header-h: clamp(80px, calc(-20px + 6.25vw), 100px);
    --logo-h: clamp(64px, calc(-36px + 6.25vw), 84px);
    --card-pad: clamp(12px, calc(-8px + 1.25vw), 16px);
    --card-pad-y: 16px;
    --card-gap: clamp(8px, calc(-12px + 1.25vw), 12px);
    --card-text-gap: 12px;
    --grid-col-gap: clamp(44px, calc(-56px + 6.25vw), 64px);
    --grid-row-gap: 42px;
    --tab-w: 168px;
    --tab-h: 56px;
    --tab-gap: 12px;
    --tabbar-h: 68px;
    --ctl-h: clamp(40px, calc(20px + 1.25vw), 44px);
    --hero-h: clamp(512px, calc(2px + 31.875vw), 614px);
    --hero-pad: clamp(172px, calc(-328px + 31.25vw), 272px);
    --btn-pad-x: clamp(16px, calc(-4px + 1.25vw), 20px);
    --chev-w: clamp(28px, calc(-52px + 5vw), 44px);
    --icon: 24px;
  }
}

@media (min-width: 1920px) {
  :root {
    /* На ультрашироких/4K 64px слишком крупный для длинных H1 */
    --fs-h1: 48px;   --lh-h1: 56px;
    --fs-h2: 32px;   --lh-h2: 40px;
    --fs-h3: 20px;   --lh-h3: 28px;
    --fs-subtitle: 20px; --lh-subtitle: 24px;
    --fs-body: 18px; --lh-body: 24px;
    --fs-caption: 14px; --lh-caption: 20px;
    --fs-cardinfo: 14px; --lh-cardinfo: 20px;
    --fs-price: 18px; --lh-price: 24px;
    --fs-button: 16px; --lh-button: 20px;
    --fs-nav: 16px;  --lh-nav: 24px;
    --page-pad: 80px;
    --header-h: 100px;
    --logo-h: 84px;
    --card-pad: 16px;
    --card-pad-y: 16px;
    --card-gap: 12px;
    --card-text-gap: 12px;
    --grid-col-gap: 64px;
    --grid-row-gap: 42px;
    --tab-w: 168px;
    --tab-h: 56px;
    --tab-gap: 12px;
    --tabbar-h: 68px;
    --ctl-h: 44px;
    --hero-h: 614px;
    --hero-pad: 272px;
    --btn-pad-x: 20px;
    --chev-w: 44px;
    --icon: 24px;
  }
}

:root { --min-card: 150px; }
@media (min-width: 640px) { :root { --min-card: 260px; } }

body.catalog-site-page {
  margin: 0;
  height: auto;
  min-height: 100%;
  background: var(--page-bg);
  color: var(--text-primary);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  overflow-x: clip;
}

body.catalog-site-page.is-locked {
  overflow: hidden;
}

.catalog-site-page *,
.catalog-site-page *::before,
.catalog-site-page *::after {
  box-sizing: border-box;
}

[v-cloak] { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

.icon-mask {
  display: block;
  flex: none;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.icon-cart   { -webkit-mask-image: url("/img/icon-11.svg");           mask-image: url("/img/icon-11.svg"); }
.icon-ne     { -webkit-mask-image: url("/img/icon-8.svg");            mask-image: url("/img/icon-8.svg"); }
.icon-chev   { -webkit-mask-image: url("/img/icon-chevron-right.svg"); mask-image: url("/img/icon-chevron-right.svg"); }
.icon-tg     { -webkit-mask-image: url("/img/tg-gray-icon.svg");      mask-image: url("/img/tg-gray-icon.svg"); }
.icon-vk     { -webkit-mask-image: url("/img/vk-gray-icon.svg");      mask-image: url("/img/vk-gray-icon.svg"); }
.icon-phone  { -webkit-mask-image: url("/img/phone-gray-icon.svg");   mask-image: url("/img/phone-gray-icon.svg"); }
.icon-mail   { -webkit-mask-image: url("/img/mail-gray-icon.svg");    mask-image: url("/img/mail-gray-icon.svg"); }
.icon-close  { -webkit-mask-image: url("/img/close-icon.svg");        mask-image: url("/img/close-icon.svg"); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background: var(--gray-500);
  border-bottom: 1px solid var(--hairline);
  transition: box-shadow 0.24s var(--ease);
}

.site-header.is-stuck { box-shadow: var(--shadow-header); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-header__logo {
  display: block;
  flex: none;
  height: var(--logo-h);
  aspect-ratio: 134 / 84;
  background: url("/img/logo.png?v=20260822-r") center / contain no-repeat;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--white);
  font-size: var(--fs-nav);
  line-height: var(--lh-nav);
  font-weight: 400;
  white-space: nowrap;
  transition: opacity 0.16s var(--ease);
}

.site-nav__link:hover { opacity: 0.7; }

.site-nav__link .icon-mask {
  width: 20px;
  height: 20px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 1px solid var(--white);
  border-radius: var(--radius-control);
  color: var(--white);
  background: transparent;
  font-size: var(--fs-button);
  line-height: var(--lh-button);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--gray-600);
}

.header-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  transition: opacity 0.16s var(--ease);
}

.header-cart:hover { opacity: 0.7; }

.header-cart .icon-mask {
  width: 32px;
  height: 32px;
}

.header-cart__badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--white);
  color: var(--gray-600);
  font-size: 11px;
  line-height: 18px;
  font-weight: 500;
  text-align: center;
}

.header-cart__badge:empty,
.header-cart__badge[hidden] { display: none; }

.burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  padding: 0;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-control);
  background: transparent;
  cursor: pointer;
}

.burger span {
  position: relative;
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.24s var(--ease), opacity 0.18s var(--ease);
}

.burger span::before,
.burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.24s var(--ease);
}

.burger span::before { top: -6px; }
.burger span::after  { top: 6px; }

.burger.is-open span { background: transparent; }
.burger.is-open span::before { transform: translateY(6px) rotate(45deg); }
.burger.is-open span::after  { transform: translateY(-6px) rotate(-45deg); }

.header-mobile-actions {
  display: none;
  align-items: center;
  gap: 12px;
}

@media (max-width: 1023px) {
  .site-nav { display: none; }
  .burger,
  .header-mobile-actions { display: flex; }
}

@media (max-width: 767px) {
  .site-header.is-stuck { box-shadow: var(--shadow-header-mobile); }
  .header-cart { width: 40px; height: 40px; }
  .header-cart .icon-mask { width: 24px; height: 24px; }
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: calc(var(--header-h) + 20px) 16px 1000px;
  height: 100dvh;
  background: var(--gray-500);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  overflow-y: auto;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}

.mobile-menu.is-open {
  transform: none;
  opacity: 1;
  visibility: visible;
}

.mobile-menu__item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  color: var(--white);
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
}

.mobile-menu__icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.mobile-menu__ext {
  width: 20px;
  height: 20px;
  flex: none;
  margin-left: 4px;
  -webkit-mask-image: url("/img/icon-8.svg");
  mask-image: url("/img/icon-8.svg");
}

.icon-partners { -webkit-mask-image: url("/img/icon-8.svg");  mask-image: url("/img/icon-8.svg"); }
.icon-brand    { -webkit-mask-image: url("/img/icon-10.svg"); mask-image: url("/img/icon-10.svg"); }
.icon-catalog  { -webkit-mask-image: url("/img/icon-11.svg"); mask-image: url("/img/icon-11.svg"); }
.icon-blog     { -webkit-mask-image: url("/img/icon-blog.svg"); mask-image: url("/img/icon-blog.svg"); }
.icon-garanty  { -webkit-mask-image: url("/img/icon-12.svg"); mask-image: url("/img/icon-12.svg"); }
.icon-connect  { -webkit-mask-image: url("/img/icon-13.svg"); mask-image: url("/img/icon-13.svg"); }

.page-head {
  /* отступ до линии; такой же ставим под ней, чтобы линия шла посередине зазора */
  --head-gap: clamp(24px, calc(15.7px + 2.21vw), 44px);
  position: relative;
  padding-top: clamp(40px, calc(31.7px + 2.21vw), 60px);
  padding-bottom: var(--head-gap);
}

/* линия обрезана по контенту, как в макете, — не во всю ширину страницы */
.page-head::after {
  content: "";
  position: absolute;
  left: var(--page-pad);
  right: var(--page-pad);
  bottom: 0;
  height: 1px;
  background: var(--hairline-strong);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--fs-nav);
  line-height: var(--lh-nav);
  color: var(--gray-300);
}

.breadcrumbs a {
  color: var(--gray-300);
  transition: color 0.16s var(--ease);
}

.breadcrumbs a:hover { color: var(--gray-100); }
.breadcrumbs span[aria-current] { color: var(--gray-100); }

.page-title {
  margin-top: clamp(16px, calc(9.4px + 1.77vw), 32px);
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: 700;
  color: var(--white);
}

.tabs-anchor { height: 0; }

.tabbar {
  /* 12px из этого зазора уже дают внутренние отступы панели вкладок */
  margin-top: calc(clamp(24px, calc(15.7px + 2.21vw), 44px) - 12px);
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  background: var(--gray-500);
  /* линия во всю ширину отделяет вкладки от карточек — как в макете */
  border-bottom: 2px solid var(--gray-300);
  transition: box-shadow 0.24s var(--ease);
}

/* под обложкой коллекции линии в макете нет: панель просто лежит поверх фото */
.tabbar--over-hero {
  border-bottom-color: transparent;
  box-shadow: var(--shadow-overlap);
}

/* Как только каталог уезжает под панель — линия уступает место наложению:
   панель полупрозрачная с размытием и тенью, содержимое видно, что оно снизу. */
.tabbar.is-stuck {
  border-bottom-color: transparent;
  background: rgba(64, 64, 64, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-overlap);
}



.tabbar__inner {
  display: flex;
  align-items: flex-end;
  min-height: var(--tabbar-h);
  padding-top: 12px;
}

.tabs {
  display: flex;
  align-items: flex-end;
  gap: var(--tab-gap);
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--tab-w);
  height: var(--tab-h);
  padding: 12px var(--btn-pad-x);
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  background: transparent;
  color: var(--gray-200);
  font-size: var(--fs-subtitle);
  line-height: var(--lh-subtitle);
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}

a.tab:visited { color: var(--gray-200); }
a.tab.is-active:visited { color: var(--white); }

.tab__label {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 0 0;
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid transparent;
}

.tab:hover { color: var(--white); }

.tab.is-active {
  background: var(--gray-400);
  border-color: var(--gray-300);
  color: var(--white);
}

.tab.is-active .tab__label { border-bottom-color: var(--white); }

.collection-hero {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--hero-h);
  background: var(--gray-400) center / cover no-repeat;
  overflow: hidden;
}

.collection-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.collection-hero--geometry { background-position: center 40%; }

.collection-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--hero-pad);
}

.collection-hero__name {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
}

.collection-hero__description {
  flex: none;
  width: min(416px, 42vw);
  padding-left: 32px;
  padding-right: 10px;
  border-left: 1px solid var(--gray-200);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--gray-100);
}

@media (max-width: 767px) {
  .collection-hero {
    align-items: stretch;
  }
  .collection-hero__inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
  }
  .collection-hero__name { white-space: normal; }
  .collection-hero__description {
    width: 100%;
    font-size: var(--fs-body);
  }
}

/* первый ряд карточек лежит вплотную под панелью вкладок — сверху зазора нет,
   панель просто накрывает каталог */
.catalog-body { padding-block: 0 clamp(40px, calc(23.5px + 4.42vw), 80px); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--grid-col-gap);
  row-gap: var(--grid-row-gap);
  align-items: stretch;
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(
      auto-fill,
      minmax(max(var(--min-card), (100% - 3 * var(--grid-col-gap)) / 4), 1fr)
    );
  }
}

.catalog-empty {
  padding: 48px 0;
  color: var(--gray-200);
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  text-align: center;
}

.pcard {
  position: relative;
  container-type: inline-size;
  container-name: pcard;
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
  padding: var(--card-pad-y) var(--card-pad);
  border-radius: var(--radius-card);
  background: var(--gray-500);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: background-color 0.22s var(--ease), transform 0.22s var(--ease);
}

.pcard__link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  text-indent: -9999px;
  overflow: hidden;
}

/* the nav arrows and dots are ABSOLUTE (see .media-nav/.media-dots): they only need to sit above the card link overlay, never to become position:relative.
   The photo track must also sit above the overlay, otherwise the overlay takes every pointer and the carousel gets no swipe. */
.pcard .product-card__actions {
  position: relative;
  z-index: 2;
}
.pcard .media-nav,
.pcard .media-dots {
  z-index: 2;
}

@media (hover: hover) {
  .pcard:hover {
    background-image: linear-gradient(var(--white-10), var(--white-10));
  }
}

.product-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-media);
  overflow: hidden;
  background: var(--gray-400);
}

.product-card__track {
  position: absolute;
  inset: 0;
  z-index: 2;
  /* вертикальный свайп остаётся браузеру, горизонтальный забирает карусель */
  touch-action: pan-y;
}

.product-card__media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  transition: transform 0.26s cubic-bezier(0.33, 1, 0.68, 1);
}

/* под пальцем кадр идёт след в след, без сглаживания */
.product-card__track.is-dragging img { transition: none; }

@media (prefers-reduced-motion: reduce) {
  .product-card__media img { transition: none; }
}

.media-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  color: var(--white);
  opacity: 0;
  cursor: pointer;
  transform: translateY(-50%);
  transition: opacity 0.18s var(--ease), background-color 0.18s var(--ease);
}

.media-nav:hover { background: rgba(0, 0, 0, 0.7); }
.media-nav--prev { left: 6px; }
.media-nav--next { right: 6px; }

.media-nav .icon-mask {
  width: 7px;
  height: 7px;
}

.media-nav--prev .icon-mask { transform: rotate(180deg); }

.pcard:hover .media-nav,
.media-nav:focus-visible { opacity: 1; }

@media (hover: none) {
  .media-nav { display: none; }
}

.media-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  pointer-events: none;
}

.media-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: width 0.22s var(--ease), background-color 0.22s var(--ease);
}

.media-dot.is-active {
  width: 14px;
  background: var(--white);
}

.product-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--card-text-gap);
  flex: 1;
}

.product-card__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-card__title {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 600;
  color: var(--white);
  overflow-wrap: anywhere;
}

.product-card__info {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font-size: var(--fs-cardinfo);
  line-height: var(--lh-cardinfo);
  font-weight: 400;
  color: var(--gray-200);
  overflow-wrap: anywhere;
}

.product-card__price {
  font-size: var(--fs-price);
  line-height: var(--lh-price);
  font-weight: 600;
  color: var(--white);
}

.product-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.btn-cart {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-width: 0;
  padding-block: 0;
  padding-left: var(--btn-pad-x);
  padding-right: 4px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--white);
  color: var(--gray-600);
  font-size: var(--fs-button);
  line-height: var(--lh-button);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.18s var(--ease), transform 0.12s var(--ease);
}

.btn-cart:active { transform: scale(0.97); }

.btn-cart__box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--ctl-h);
  height: var(--ctl-h);
  flex: none;
}

.btn-cart__box .icon-mask {
  width: var(--icon);
  height: var(--icon);
}

.btn-cart--iconly {
  padding-left: 0;
  padding-right: 0;
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-cart--iconly .btn-cart__box { width: calc(var(--ctl-h) + var(--btn-pad-x)); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 0;
  height: var(--ctl-h);
  padding-left: var(--btn-pad-x);
  padding-right: 0;
  border: 1px solid var(--white);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--white);
  font-size: var(--fs-button);
  line-height: var(--lh-button);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.btn-ghost__chev {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--chev-w);
  height: 100%;
  flex: none;
}

.btn-ghost__chev .icon-mask {
  width: 12px;
  height: 12px;
}

.btn-ghost:hover { background: var(--white); color: var(--gray-600); }

.btn-ghost--plain {
  padding-left: var(--btn-pad-x);
  padding-right: var(--btn-pad-x);
}

.qty {
  display: inline-flex;
  align-items: stretch;
  flex: none;
  gap: clamp(4px, calc(-0.3px + 1.15vw), 16px);
  height: var(--ctl-h);
  min-width: 0;
  border: 1px solid var(--white);
  border-radius: var(--radius-control);
  overflow: hidden;
}

.qty__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--ctl-h) - 4px);
  align-self: stretch;
  flex: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
  font-size: 0;
  line-height: 1;
  cursor: pointer;
  transition: color 0.16s var(--ease), background-color 0.16s var(--ease);
}

@media (hover: hover) {
  .qty__btn:hover:not(:disabled) { background: rgba(0, 0, 0, 0.28); }
}

.qty__btn:not(:disabled):active { background: rgba(0, 0, 0, 0.42); }

.qty__btn::before,
.qty__btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.qty__btn::before {
  width: calc(var(--ctl-h) * 0.36);
  height: 2px;
}

.qty__btn--plus::after {
  width: 2px;
  height: calc(var(--ctl-h) * 0.36);
}

.qty__btn--minus { border-right: 1px solid var(--white); }
.qty__btn--plus  { border-left: 1px solid var(--white); }

.qty__btn:disabled {
  color: var(--white-30);
  cursor: default;
}

.qty__value {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5ch;
  height: 100%;
  text-align: center;
  font-size: var(--fs-button);
  line-height: var(--lh-button);
  font-weight: 500;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.cart-slot {
  position: relative;
  display: flex;
  align-items: center;
  flex: none;
  min-width: 0;
  min-height: var(--ctl-h);
}

.cart-slot__sizer {
  display: flex;
  align-items: center;
  visibility: hidden;
  pointer-events: none;
  padding-left: var(--btn-pad-x);
  padding-right: 4px;
  font-size: var(--fs-button);
  line-height: var(--lh-button);
  font-weight: 500;
  white-space: nowrap;
}

.cart-slot__sizer .btn-cart__box {
  width: var(--ctl-h);
  height: var(--ctl-h);
}

.cart-slot__sizer ~ .btn-cart,
.cart-slot__sizer ~ .qty {
  position: absolute;
  inset: 0;
  width: auto;
}

.product-card__head {
  gap: 0;
  padding-bottom: 8px;
  border-bottom: 0.5px solid var(--gray-200);
}

.product-card__actions {
  flex-direction: column;
  align-items: stretch;
  gap: var(--card-text-gap);
}

.product-card__actions-row {
  order: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
  row-gap: 6px;
}

.cart-slot { order: 2; display: block; }

@container pcard (max-width: 148px) {
  .product-card__actions-row { gap: 4px; }

  .btn-ghost {
    padding-left: 6px;
    font-size: 12.5px;
  }

  .btn-ghost--plain { padding-inline: 6px; }

  .btn-ghost__chev { width: 12px; }
  .btn-ghost__chev .icon-mask { width: 6px; height: 6px; }
}

@container pcard (max-width: 126px) {
  .product-card__actions-row { gap: 3px; }

  .btn-ghost {
    padding-left: 4px;
    font-size: 11.5px;
  }

  .btn-ghost--plain { padding-inline: 4px; }

  .btn-ghost__chev { width: 10px; }
  .btn-ghost__chev .icon-mask { width: 5px; height: 5px; }
}

.product-card__price { display: none; }

.product-card__price--mobile {
  display: block;
  flex: none;
  font-size: var(--fs-price);
  line-height: var(--lh-price);
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
}

.cart-slot .btn-cart,
.cart-slot .qty {
  display: flex;
  width: 100%;
  justify-content: center;
}

.cart-slot .btn-cart { padding-right: 4px; }

.cart-slot .qty {
  justify-content: space-between;
  gap: 0;
}

.cart-slot .qty > * {
  flex: 1 1 0;
  min-width: 0;
}

.cart-slot .qty__btn { width: auto; }

@container pcard (min-width: 230px) {
  .product-card__head {
    gap: 8px;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .product-card__actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .product-card__actions-row { display: contents; }

  .cart-slot { order: 0; display: flex; align-items: center; }

  .cart-slot .btn-cart { padding-right: 4px; }

  .product-card__price { display: block; }
  .product-card__price--mobile { display: none; }
}

.catalog-outro {
  position: relative;
  padding-block: clamp(40px, calc(23.5px + 4.42vw), 80px);
  text-align: center;
}

.catalog-outro::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--page-pad);
  right: var(--page-pad);
  height: 1px;
  background: var(--gray-300);
}

.catalog-outro__title {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: 600;
  color: var(--white);
}

.catalog-outro__text {
  margin-top: clamp(12px, calc(8.9px + 0.83vw), 16px);
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  color: var(--gray-200);
}

.catalog-sentinel { height: 1px; }

.catalog-loading {
  display: flex;
  justify-content: center;
  padding: 32px 0;
}

.catalog-loading__dot {
  width: 8px; height: 8px;
  margin: 0 4px;
  border-radius: 50%;
  background: var(--gray-200);
  animation: catalog-pulse 1s infinite ease-in-out;
}

.catalog-loading__dot:nth-child(2) { animation-delay: 0.15s; }
.catalog-loading__dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes catalog-pulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); }
  40%           { opacity: 1;    transform: scale(1); }
}

.site-footer {
  background: var(--gray-600);
  color: var(--gray-200);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: clamp(24px, calc(19.9px + 1.1vw), 38px);
}

.site-footer__left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-footer__brand {
  font-size: var(--fs-subtitle);
  line-height: var(--lh-subtitle);
  font-weight: 500;
  white-space: nowrap;
}

.site-footer__links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
}

.site-footer__links a {
  color: var(--gray-200);
  transition: color 0.16s var(--ease);
}

.site-footer__links a:hover { color: var(--white); }

.site-footer__contacts {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-footer__contact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  color: var(--gray-200);
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  white-space: nowrap;
  transition: color 0.16s var(--ease);
}

.site-footer__contact:hover { color: var(--white); }
.site-footer__contact--link { text-decoration: underline; }

.site-footer__contact .icon-mask {
  width: 20px;
  height: 20px;
}

@media (max-width: 1023px) {
  .site-footer__inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .site-footer__left {
    flex-direction: column;
    gap: 10px;
  }
  .site-footer__contacts { flex-wrap: wrap; justify-content: center; gap: 12px 16px; }
}

@media (max-width: 767px) {
  /* На телефоне политика и соглашение в одной строке через точку,
     «Реквизиты» — отдельной строкой по центру, без точки перед ними */
  .site-footer__links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
  .site-footer__links .footer-dot-requisites { display: none; }
  .site-footer__links .footer-link-requisites {
    flex: 0 0 100%;
    text-align: center;
  }
}

:root {
  --modal-bg: #f4f2ed;
  --modal-text: #404040;
  --modal-text-soft: #4a4a4a;
  --modal-required: red;
  --modal-muted: #737373;
  --modal-line: #cccccc;
  --modal-field-bg: #e2e2e2;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s var(--ease), visibility 0.22s;
}

.modal.is-open { opacity: 1; visibility: visible; }

.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: calc(100vh - 48px);
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--modal-bg);
  box-shadow: var(--shadow-card);
  overflow-y: auto;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s var(--ease);
}

.modal.is-open .modal__dialog { transform: none; }

.modal__title {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: 600;
  color: var(--modal-text);
  text-align: center;
}

.modal__close {
  position: absolute;
  top: 8px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--modal-text);
  cursor: pointer;
  transition: opacity 0.16s var(--ease);
}

.modal__close:hover { opacity: 0.6; }
.modal__close .icon-mask { width: 16px; height: 16px; background-color: var(--modal-text); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.field { display: flex; flex-direction: column; gap: 6px; }

.field__label {
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  color: var(--modal-text);
}

.field__label .req { color: var(--modal-required); }

.field input {
  height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: var(--modal-field-bg);
  color: var(--modal-text);
  font-family: inherit;
  font-size: var(--fs-button);
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 0.16s var(--ease);
}

.field input::placeholder { color: var(--modal-muted); }
.field input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--modal-text); }

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  margin-top: 24px;
  border: 1px solid var(--modal-text);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--modal-text);
  font-family: inherit;
  font-size: var(--fs-button);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.btn-submit:hover { background: var(--modal-text); color: var(--modal-bg); }

.policy-note {
  margin-top: 16px;
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  color: var(--modal-muted);
  text-align: center;
}

.policy-note a { color: var(--modal-text); text-decoration: underline; }

.policy-note--phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: left;
}

.policy-note--phone .icon-mask {
  width: 20px;
  height: 20px;
  flex: none;
  background-color: var(--modal-muted);
  -webkit-mask-image: url("/img/icon-9.svg");
  mask-image: url("/img/icon-9.svg");
}

.cart-line {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--modal-line);
}

.cart-line__media {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 4px;
  background: var(--modal-field-bg) center / cover no-repeat;
}

.cart-line__name {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-button);
  line-height: var(--lh-button);
  color: var(--modal-text-soft);
  overflow-wrap: break-word;
}

.cart-line__price {
  flex: 0 0 96px;
  text-align: right;
  font-size: var(--fs-price);
  font-weight: 600;
  color: var(--modal-text-soft);
  white-space: nowrap;
}

.cart-line .qty {
  flex: 0 0 120px;
  gap: 0;
}

/* предзаказ: вместо счётчика — фиксированная единица, бокс тот же */
.cart-line .cart-line__count {
  flex: 0 0 120px;
  text-align: center;
  font-size: var(--fs-price);
  color: var(--modal-text-soft);
  white-space: nowrap;
}

@media (max-width: 480px) {
  .cart-line .cart-line__count { flex-basis: 92px; font-size: 13px; }
}

.cart-line .qty > * { flex: 1 1 0; min-width: 0; }
.cart-line .qty__btn { width: auto; }

@media (max-width: 480px) {
  .cart-line { gap: 8px; }
  .cart-line__media { width: 36px; height: 36px; }
  .cart-line .qty { flex-basis: 92px; }
  .cart-line__price { flex-basis: 68px; font-size: 13px; }
}

.modal .qty {
  border-color: var(--modal-text);
}

.modal .qty__btn { color: var(--modal-text); }
.modal .qty__btn::before,
.modal .qty__btn::after { background: var(--modal-text); }
.modal .qty__btn--minus { border-right-color: var(--modal-text); }
.modal .qty__btn--plus { border-left-color: var(--modal-text); }
.modal .qty__value { color: var(--modal-text); }
.modal .qty__btn:disabled { color: var(--modal-line); }
.modal .qty__btn:disabled::before,
.modal .qty__btn:disabled::after { background: var(--modal-line); }

@media (hover: hover) {
  .modal .qty__btn:hover:not(:disabled) { background: rgba(0, 0, 0, 0.08); }
}
.modal .qty__btn:not(:disabled):active { background: rgba(0, 0, 0, 0.14); }

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 600;
  color: var(--modal-text);
}

.cart-empty {
  padding: 32px 0;
  text-align: center;
  color: var(--modal-muted);
}

.cookie-notice {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(680px, calc(100% - 32px));
  padding: 16px 20px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-card);
  background: var(--gray-400);
  box-shadow: var(--shadow-card);
  transform: translateX(-50%);
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  color: var(--gray-100);
}

.cookie-notice a { color: var(--white); text-decoration: underline; }

.cookie-notice__accept {
  flex: none;
  padding: 10px 20px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--white);
  color: var(--gray-600);
  font-family: inherit;
  font-size: var(--fs-button);
  font-weight: 500;
  cursor: pointer;
}

@media (max-width: 767px) {
  .cookie-notice { flex-direction: column; align-items: stretch; text-align: center; }
}

.cookie-wrapper { display: contents; }
.cookie-wrapper.cookie-hidden { display: none; }
.cookie-text { flex: 1; }

.hero-enter-active,
.hero-leave-active { transition: opacity 0.28s var(--ease), transform 0.28s var(--ease); }
.hero-enter-from,
.hero-leave-to { opacity: 0; transform: translateY(-8px); }

.field input.error-input {
  border-color: #ff6b6b;
}

.confirm-order-caption { margin-top: 12px; }

:where(a, button, input):focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .catalog-site-page *,
  .catalog-site-page *::before,
  .catalog-site-page *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.cart-slot > [hidden] { display: none !important; }

#modalBasketPopout { align-items: flex-start; padding-top: 28px; }

@media (max-width: 767px) {
  .media-nav { display: none; }
}

/* Нет в наличии — блока добавления нет. Вправо уводим саму кнопку «Под заказ»,
   а не весь ряд: в узкой карточке ряд растянут на всю ширину, и margin на нём
   утаскивал вправо и цену. */
.product-card__actions > .product-card__actions-row:only-child > .btn-ghost { margin-left: auto; }
