/* EcoMotion — палитра под логотип: синий «c», зелёный «e/o» */

:root {
  --brand-blue: #1e70ab;
  --brand-blue-dark: #155685;
  --brand-green: #7ab539;
  --brand-green-dark: #5e8e2d;
  --ink: #163547;
  --ink-soft: #4a6b7d;
  --paper: #f2f7fb;
  --paper-dark: #dfeaf4;
  --header: #155685;
  --accent: #7ab539;
  --accent-hover: #5e8e2d;
  --line: rgba(21, 86, 133, 0.14);
  --radius: 10px;
  --shadow: 0 18px 50px rgba(21, 86, 133, 0.1);
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-category: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --leading-body: 1.65;
  --leading-snug: 1.35;
  /* Основной текст в карточках (товар, категория, новости, поиск) */
  --card-text-size: 14px;
  --container: min(94vw, 92rem);
  --have-kz-buy: #3d9a52;
  --have-kz-buy-hover: #338a47;
  --have-kz-line: #d5e4dc;
  /* Единая линия под ссылками: шапка и сайдбар каталога */
  --nav-underline-h: 2px;
  --nav-underline-bottom: 0.08rem;
  --nav-underline-transition: transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Иначе под прозрачным body виден не ролик, а заливка корня страницы */
html:has(body.page-catalog--bg-video) {
  background-color: transparent;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: var(--leading-body);
  letter-spacing: 0.01em;
  font-feature-settings: "kern" 1, "liga" 1;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, transparent 42%),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 96px,
      rgba(30, 112, 171, 0.035) 96px,
      rgba(30, 112, 171, 0.035) 97px
    );
  min-height: 100vh;
}

/* Ровные переносы и заголовки в основном контенте (только там, где движок поддерживает text-wrap) */
@supports (text-wrap: pretty) {
  main {
    text-wrap: pretty;
  }
}

@supports (text-wrap: balance) {
  main :where(h1, h2, h3) {
    text-wrap: balance;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

em,
i {
  font-style: normal;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

.container {
  width: var(--container);
  margin-inline: auto;
}

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

/* Top bar — выше .site-header (z-index: 40) для слоя контактов/поиска над липкой шапкой */
.top-bar {
  position: relative;
  z-index: 50;
  background: var(--header);
  color: #c9cdd4;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.top-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.55rem 0;
}

.top-bar__left {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.65rem 1rem;
  min-width: 0;
}

.top-bar__search-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
  flex-shrink: 0;
  text-transform: none;
  letter-spacing: normal;
}

.top-bar .search-form {
  flex: 1 1 22rem;
  min-width: min(14rem, 100%);
  max-width: 26rem;
}

.top-bar__cart {
  flex: 0 0 auto;
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.55rem;
  border-color: rgba(255, 255, 255, 0.35);
  color: #eef0f3;
}

.top-bar__cart:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.top-bar .search-form input,
.top-bar .search-form button {
  text-transform: none;
  letter-spacing: normal;
}

.top-bar .search-form input {
  font-size: 0.88rem;
  flex: 1 1 auto;
  min-width: 0;
}

.top-bar .search-form button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.top-bar a {
  color: #eef0f3;
  text-decoration: none;
}

.top-bar a:hover {
  color: #fff;
}

/* Телефон, WhatsApp — один размер на десктопе и мобильном */
.top-bar__left > a,
.top-bar__left > span:not(.dot):not(.top-bar__label):not(.top-bar__divider) {
  font-size: 0.8rem;
  line-height: 1.4;
}

/* Телефон и WhatsApp: та же линия, что у пунктов меню */
.top-bar__left > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.24s ease, transform 0.24s ease;
}

.top-bar__left > a:hover,
.top-bar__left > a:focus-visible {
  color: var(--accent);
}

.top-bar__left > a:focus-visible {
  outline: none;
}

.top-bar__label {
  opacity: 0.65;
}

.dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

/* Мягкий разделитель между WhatsApp и блоком соцсетей */
.top-bar__divider {
  flex-shrink: 0;
  width: 1px;
  height: 1.05rem;
  margin-inline: 0.35rem 0.5rem;
  align-self: center;
  border-radius: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.14) 22%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(255, 255, 255, 0.14) 78%,
    transparent 100%
  );
}

/* Соцсети в верхней полосе: только значки, после разделителя */
.top-bar__socials {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  flex-shrink: 0;
}

.top-bar__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.15s ease, transform 0.15s ease;
}

.top-bar__social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.top-bar__social-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 2px;
}

.top-bar__social-img {
  display: block;
  width: 14px;
  height: 14px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(236, 244, 252, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.logo__text {
  font-family: "Sora", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(1.3rem, 1.18rem + 0.55vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(96deg, #14639a 0%, #2f84c2 44%, #5e8e2d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 9px 20px rgba(21, 86, 133, 0.18);
  transition: filter 0.24s ease, transform 0.24s ease;
}

.logo:hover .logo__text {
  filter: saturate(1.14);
  transform: translateY(-0.5px);
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--brand-blue);
  color: #fff;
  border-radius: 8px;
  font-size: 0.85rem;
}

.logo__mark--img {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: transparent;
  border-radius: 0;
  object-fit: contain;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  position: relative;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}

.nav-toggle--label {
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 2.25rem;
  padding: 0.35rem 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(0.88rem, 3.2vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.nav-toggle--label .nav-toggle__text {
  pointer-events: none;
}

.nav-toggle__icon {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  flex-shrink: 0;
  gap: 5px;
  width: 1.15rem;
  /* Родитель .nav-toggle--label на мобильном с font-size: 0 — иначе WebKit даёт невидимый currentColor у полосок */
  font-size: 1rem;
  line-height: 1;
  color: var(--ink);
}

.nav-toggle__bar {
  display: block;
  height: 2.5px;
  border-radius: 2px;
  background-color: var(--ink);
}

.site-nav {
  flex: 1;
  min-width: 0;
}

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  align-items: center;
  font-family: var(--font-category);
  font-size: clamp(0.82rem, 0.74rem + 0.22vw, 0.94rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-nav__list > li {
  display: flex;
  align-items: center;
}

.site-nav__list > li > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 14.025px;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
  padding: 0.35rem 0;
  transition: color 0.24s ease, transform 0.24s ease;
}

.site-nav__list > li.site-nav__extra > a {
  font-size: 14.025px;
}

/* На «Для дома»: акцент на текущем разделе, BYD — как прочие пункты (не крупный). */
body.page-for-home .site-nav .has-mega > a {
  font-size: 14.025px;
  font-weight: 600;
}

body.page-for-home .site-nav__extra--primary > a {
  font-size: 16px;
  font-weight: 700;
}

.site-nav__extra--byd.site-nav__extra--primary > a {
  font-size: 16px;
  font-weight: 700;
}

.site-nav__sep {
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 14.025px;
  padding: 0.35rem 0.1rem;
  list-style: none;
}

.site-nav__sep span {
  display: inline-block;
}

.site-nav__list > li > a::after,
.sidebar-list a::after,
.mega__grid a::after,
.top-bar__left > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: var(--nav-underline-bottom);
  width: 100%;
  height: var(--nav-underline-h);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--brand-blue));
  transform: scaleX(0);
  transform-origin: left center;
  transition: var(--nav-underline-transition);
}

.site-nav__list > li > a:hover {
  color: var(--accent);
}

.site-nav__list > li > a:hover::after,
.site-nav__list > li > a:focus-visible::after,
.sidebar-list a:not([aria-current]):hover::after,
.sidebar-list a:not([aria-current]):focus-visible::after,
.sidebar-list a[aria-current="page"]::after,
.mega__grid a:hover::after,
.mega__grid a:focus-visible::after,
.mega__grid a[aria-current="page"]::after,
.top-bar__left > a:hover::after,
.top-bar__left > a:focus-visible::after {
  transform: scaleX(1);
}

.site-nav__list > li > a:focus-visible {
  outline: none;
  color: var(--accent);
}

.sidebar-list a:focus-visible {
  outline: none;
}

.sidebar-list a:not([aria-current]):focus-visible {
  color: var(--accent);
}

.sidebar-list a[aria-current="page"] {
  color: var(--accent);
}

.has-mega {
  position: relative;
}

.has-mega:hover .mega,
.has-mega:focus-within .mega {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega {
  position: absolute;
  left: 0;
  top: 100%;
  padding-top: 0.5rem;
  min-width: min(520px, 85vw);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.mega__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.35rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.mega__grid a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  max-width: 100%;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  transition: color 0.24s ease, transform 0.24s ease;
}

.mega__grid a:hover {
  color: var(--accent);
}

.mega__grid a:focus-visible {
  outline: none;
  color: var(--accent);
}

.mega__grid a[aria-current="page"] {
  color: var(--accent);
}

.mega__item--with-children {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

.mega__sub {
  display: none;
  margin-top: 0.2rem;
  padding: 0.35rem 0.5rem;
  border-left: 2px solid var(--line);
  gap: 0.2rem;
}

.mega__item--with-children:hover .mega__sub,
.mega__item--with-children:focus-within .mega__sub {
  display: grid;
}

.mega__sub-link {
  font-size: 0.82rem;
  color: var(--ink-soft);
  padding: 0.15rem 0;
}

.mega__sub-link:hover,
.mega__sub-link:focus-visible {
  color: var(--accent);
}

.header-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-header__actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.65rem;
  flex-shrink: 0;
}

.header-favorites {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--have-kz-buy);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(122, 181, 57, 0.45);
  background: #fff;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, color 0.2s ease;
}

.header-favorites__icon {
  color: #7ab539;
  font-size: 1.05rem;
  line-height: 1;
}

.header-favorites:hover {
  transform: scale(1.04);
  color: var(--have-kz-buy-hover);
  border-color: var(--have-kz-buy-hover);
}

.header-favorites__text {
  color: inherit;
  font-family: var(--font-category);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.header-favorites__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(122, 181, 57, 0.24), 0 0 12px rgba(122, 181, 57, 0.35);
}

.header-cart {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-category);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--have-kz-buy);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(122, 181, 57, 0.45);
  background: #fff;
  white-space: nowrap;
}

.header-cart:hover {
  border-color: var(--have-kz-buy-hover);
  color: var(--have-kz-buy-hover);
}

.header-cart__text {
  display: flex;
  color: var(--have-kz-buy);
}

.header-cart__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  line-height: 1;
}

.header-cart__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(122, 181, 57, 0.24), 0 0 12px rgba(122, 181, 57, 0.35);
}

@media (max-width: 768px) {
  .have-product-card {
    --have-card-side-btn: 2.5rem;
  }

  .header-cart__text,
  .header-favorites__text {
    display: none;
  }

  .header-cart,
  .header-favorites {
    gap: 0;
    min-width: 2.1rem;
    padding: 0.35rem 0.5rem;
    justify-content: center;
  }
}

.search-form {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.search-form input {
  border: 0;
  padding: 0.45rem 0.9rem;
  min-width: 160px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
}

.search-form button {
  border: 0;
  background: var(--brand-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  min-width: 2.5rem;
  padding: 0;
  cursor: pointer;
}

.search-form__icon {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-form button:hover {
  background: var(--brand-blue-dark);
}

.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 27px;
  min-width: 2.125rem;
  min-height: 1.875rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  z-index: 120;
}

.lang-switch__current {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: var(--ink);
  min-width: 2rem;
  text-align: center;
}

.lang-switch__current::after {
  content: "▾";
  margin-left: 0.3rem;
  font-size: 0.62rem;
  opacity: 0.7;
}

.lang-switch__menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 5rem;
  display: grid;
  gap: 0.15rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(21, 86, 133, 0.14);
  opacity: 0;
  transform: translateY(-4px);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 130;
}

.lang-switch.is-open .lang-switch__menu {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.lang-switch__menu .lang-switch__link {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.28rem 0.5rem;
  border-radius: 6px;
  text-align: center;
}

.lang-switch__menu .lang-switch__link:hover {
  background: var(--paper);
  color: var(--accent);
}

.lang-switch__menu .lang-switch__link.is-active {
  background: rgba(30, 112, 171, 0.1);
  color: var(--ink);
}

@media (max-width: 768px) {
  .lang-switch__menu {
    display: none;
  }

  .lang-switch.is-open .lang-switch__menu {
    display: grid;
  }
}

/* Hero */
.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(4rem, 10vw, 6rem);
  overflow: hidden;
}

.hero--video .hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero__video-el {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.hero__media-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    145deg,
    rgba(236, 244, 252, 0.94) 0%,
    rgba(220, 236, 248, 0.82) 42%,
    rgba(236, 244, 252, 0.9) 100%
  );
  pointer-events: none;
}

.hero__bg-slides {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero__bg-slides__stack {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__bg-slides__track {
  display: flex;
  width: 200%;
  height: 100%;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  will-change: transform;
  /* Плавное «приземление» влево без рывка */
  transition: transform 0.92s cubic-bezier(0.22, 1, 0.32, 1);
}

.hero__bg-slides__track.hero__bg-slides__track--instant {
  transition: none;
}

.hero__bg-slides__pane {
  position: relative;
  flex: 0 0 50%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  backface-visibility: hidden;
}

.hero__bg-slides__pane img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1) translateZ(0);
  filter: brightness(1);
  transition:
    transform 0.92s cubic-bezier(0.22, 1, 0.32, 1),
    filter 0.92s cubic-bezier(0.22, 1, 0.32, 1);
  backface-visibility: hidden;
}

/* Уходящий кадр чуть «уезжает» крупнее и темнее — следующий остаётся чистым */
.hero__bg-slides__track--sliding .hero__bg-slides__pane:first-child img {
  transform: scale(1.06) translateZ(0);
  filter: brightness(0.88) saturate(0.95);
}

@media (prefers-reduced-motion: reduce) {
  .hero--video .hero__video-el {
    display: none !important;
  }

  .hero--video:not(.hero--mobile-photo-bg) .hero__media {
    display: none;
  }

  .hero--video:not(.hero--mobile-photo-bg) {
    background: var(--paper);
  }

  .hero__bg-slides__track {
    transition: none;
  }
}

@media (max-width: 768px) {
  .hero--video.hero--mobile-photo-bg .hero__video-el {
    display: none !important;
  }

  .hero--video.hero--mobile-photo-bg .hero__bg-slides {
    display: block;
  }
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 38rem;
  animation: rise 0.8s ease-out both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

.hero__lead {
  margin: 0 0 1.75rem;
  color: var(--ink-soft);
  font-size: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  transition: transform 0.15s, background 0.15s, color 0.15s;
}

button.btn {
  cursor: pointer;
  appearance: none;
  font: inherit;
}

/* Единый стиль: кнопки без овальных углов */
.btn,
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.header-cart,
.header-favorites,
.have-product-card__quick-link,
.have-product-card__quick-kaspi,
.product-offer-card__kaspi-pay,
.favorite-toggle {
  border-radius: 0 !important;
}

/* Кнопки-иконки маркетплейсов (логотипы с сайтов) */
.btn--store-icon {
  min-width: 3rem;
  min-height: 3rem;
  padding: 0.5rem 0.65rem;
}

.btn__store-logo {
  display: block;
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--line);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--small {
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
}

/* Sections */
.section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

#about.section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section--muted {
  background: rgba(255, 255, 255, 0.55);
  border-block: 1px solid var(--line);
}

.section--kaspi {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(230, 242, 252, 0.92) 100%);
  border-block: 1px solid var(--line);
}

.page-product {
  padding-bottom: 3rem;
}

.product-page {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  align-items: start;
  max-width: 56rem;
}

/* Карточка товара: слева галерея + описание (скроллятся), справа цена/купить (sticky, не перекрывает текст) */
.product-page--commerce {
  max-width: min(72rem, 100%);
  margin-inline: auto;
  grid-template-columns: minmax(0, 1fr) minmax(288px, 360px);
  grid-template-areas: "main offer";
  gap: clamp(1.75rem, 3.5vw, 3rem);
  align-items: start;
}

.product-page__main {
  grid-area: main;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.product-page--commerce .product-page__detail {
  padding-top: 0;
  border-top: 0;
}

.product-page--commerce .product-page__offer {
  grid-area: offer;
  position: sticky;
  top: 5.75rem;
  align-self: start;
  max-height: none;
  overflow: visible;
}

.product-page--commerce .product-page__offer::-webkit-scrollbar {
  width: 6px;
}

.product-page--commerce .product-page__offer::-webkit-scrollbar-thumb {
  background: rgba(21, 86, 133, 0.18);
  border-radius: 999px;
}

.product-page__offer .product-page__product-id {
  margin: 0 0 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
}

.product-page__offer .product-page__title {
  margin: 0 0 1rem;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
}

.product-trust-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.product-trust-list li {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0.45rem 0.6rem;
  text-align: center;
}

.product-offer-card {
  padding: 1.25rem 1.35rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 14px 36px rgba(10, 12, 14, 0.08);
}

.product-price {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.product-price--muted {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.product-stock {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.product-stock--in {
  color: #1d6b3a;
}

.product-stock--transit {
  color: #a56b12;
}

.product-stock--out {
  color: #8a2c2c;
}

.product-offer-card__cta {
  margin-bottom: 1rem;
}

.product-offer-card__cta-kaspi-split {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.7rem;
  width: 100%;
}

.product-offer-card__cta-kaspi-split .product-offer-card__kaspi-link {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 2.7rem;
  padding: 0.35rem 1rem;
  box-sizing: border-box;
  border-radius: 0;
}

.product-offer-card__cta-kaspi-split .product-offer-card__kaspi-link .btn__buy-text {
  white-space: nowrap;
}

.product-offer-card__kaspi-pay {
  flex: 0 0 auto;
  min-width: 6.4rem;
  min-height: 2.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.45rem;
  text-decoration: none;
}

.product-offer-card__kaspi-pay img {
  display: block;
  width: auto;
  height: 2rem;
  max-width: 100%;
}

.product-offer-card__cta .btn--buy {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  justify-content: center;
  padding: 0.85rem 1.25rem;
}

.product-offer-card__cta .btn--buy-wide {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.9rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}

.product-offer-card__cta .btn--buy-static {
  cursor: not-allowed;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

.product-cart-form {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.product-favorite-form {
  margin: 0 0 0.7rem;
}

.product-favorite-form__submit {
  display: block;
  width: 100%;
  text-align: center;
}

.product-favorite-form__submit[aria-pressed="true"] {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

.product-favorite-form__submit[aria-pressed="true"]:hover {
  background: transparent;
  border-color: var(--accent-hover);
  color: var(--accent-hover);
}

.product-cart-form__row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0;
}

.product-cart-form__label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.product-cart-form__qty {
  width: 5rem;
  padding: 0.5rem 0.65rem;
  font: inherit;
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.product-cart-form__qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 0;
  background: #fff;
  overflow: hidden;
}

.product-cart-form__qty-btn {
  width: 2.15rem;
  height: 2.15rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.product-cart-form__qty-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.product-cart-form__qty-stepper .product-cart-form__qty {
  width: 2.6rem;
  min-width: 2.6rem;
  border: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  text-align: center;
  padding: 0.3rem 0.2rem;
}

.product-cart-form__qty-stepper .product-cart-form__qty::-webkit-outer-spin-button,
.product-cart-form__qty-stepper .product-cart-form__qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.product-cart-form__qty-stepper .product-cart-form__qty[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.product-cart-form__submit {
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.72rem 1rem;
  border-radius: 0;
}

.btn__buy-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.product-seller-note {
  margin: 0 0 0.5rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.product-retailer {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.product-side-info {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.5rem;
}

.product-side-info__item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.65rem 0.8rem;
}

.product-side-info__item summary,
.product-side-info__title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.product-side-info__item p {
  margin: 0.65rem 0 0;
  font-size: 12px;
  color: var(--ink-soft);
}

.product-section-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.85rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.product-desc-block {
  margin-bottom: 2rem;
}

.product-spec-block {
  margin-bottom: 1rem;
}

.product-related {
  margin-top: 2.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.product-spec-table {
  margin: 0;
  padding: 0.75rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.product-spec-table__row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 11rem) minmax(0, 1fr);
  gap: 0.5rem 1.25rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.product-spec-table__row:last-child {
  border-bottom: 0;
}

.product-spec-table__row dt {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 600;
}

.product-spec-table__row dd {
  margin: 0;
}

@media (max-width: 900px) {
  .product-page--commerce {
    display: flex;
    flex-direction: column;
    gap: clamp(1.25rem, 3vw, 1.75rem);
  }

  .product-page--commerce .product-page__main {
    display: contents;
  }

  .product-page--commerce .product-page__gallery {
    order: 1;
  }

  .product-page--commerce .product-page__offer {
    order: 2;
    position: static;
    max-height: none;
    overflow: visible;
  }

  .product-page--commerce .product-page__detail {
    order: 3;
  }

  /* Галерея на всю ширину окна (вылет из .container), остальной текст — по полям контейнера */
  .page-product .product-page__gallery {
    width: 100vw;
    max-width: 100vw;
    margin-inline: calc(50% - 50vw);
  }

  .page-product .product-page__gallery .kaspi-gallery__main {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .page-product .product-page__gallery .kaspi-gallery__thumbs {
    padding-inline: max(0.65rem, env(safe-area-inset-left, 0px));
    padding-inline-end: max(0.65rem, env(safe-area-inset-right, 0px));
  }
}

@media (max-width: 768px) {
  .page-subsection .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .page-subsection .product-card__title {
    font-size: var(--card-text-size);
    padding: 0.7rem 0.7rem 0.25rem;
  }

  .page-subsection .product-card__price {
    font-size: var(--card-text-size);
    padding: 0 0.7rem 0.15rem;
  }

  .product-page {
    grid-template-columns: 1fr;
  }

  /* Телефон: галерея на всю ширину сверху; блок цены/покупки, затем описание и характеристики */
  .product-page--commerce {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: clamp(1rem, 2.5vw, 1.35rem);
  }

  .product-page--commerce .product-page__gallery {
    flex: none;
  }

  .product-page--commerce .product-page__offer {
    width: 100%;
    max-width: 100%;
    flex: none;
    min-width: 0;
  }

  .product-page--commerce .product-page__detail {
    width: 100%;
    min-width: 0;
  }

  .product-page--commerce .product-page__offer .product-page__product-id {
    font-size: 0.65rem;
    margin-bottom: 0.25rem;
  }

  .product-page--commerce .product-page__offer .product-page__title {
    font-size: clamp(0.95rem, 3.8vw, 1.15rem);
    line-height: 1.2;
    margin-bottom: 0.45rem;
  }

  .product-page--commerce .product-trust-list {
    grid-template-columns: 1fr;
    gap: 0.3rem;
    margin-bottom: 0.55rem;
  }

  .product-page--commerce .product-trust-list li {
    font-size: 0.62rem;
    padding: 0.3rem 0.45rem;
    text-align: left;
  }

  .product-page--commerce .product-offer-card {
    padding: 0.75rem 0.85rem;
    box-shadow: 0 8px 22px rgba(10, 12, 14, 0.07);
  }

  .product-page--commerce .product-price {
    font-size: clamp(1.05rem, 4vw, 1.25rem);
    margin-bottom: 0.4rem;
  }

  .product-page--commerce .product-stock {
    margin-bottom: 0.55rem;
    font-size: 0.72rem;
  }

  .product-page--commerce .product-cart-form {
    margin-bottom: 0.65rem;
    padding-bottom: 0.65rem;
  }

  .product-page--commerce .product-cart-form__row {
    margin-bottom: 0;
  }

  .product-page--commerce .product-cart-form__label {
    font-size: 0.68rem;
    letter-spacing: 0.05em;
  }

  .product-page--commerce .product-cart-form__qty {
    width: 4rem;
    padding: 0.4rem 0.5rem;
    font-size: 0.9rem;
  }

  .product-page--commerce .product-cart-form__qty-stepper .product-cart-form__qty {
    width: 2.35rem;
    min-width: 2.35rem;
    padding: 0.25rem 0.15rem;
  }

  .product-page--commerce .product-cart-form__submit {
    padding: 0.62rem 0.8rem;
    font-size: 0.88rem;
  }

  .product-page--commerce .product-cart-form__qty-btn {
    width: 1.95rem;
    height: 1.95rem;
    font-size: 1.08rem;
  }

  .product-page--commerce .product-offer-card__cta .btn--buy-wide,
  .product-page--commerce .product-offer-card__cta-kaspi-split .product-offer-card__kaspi-link {
    min-height: 2.35rem;
    padding: 0.3rem 0.75rem;
    font-size: 0.88rem;
  }

  .product-page--commerce .product-offer-card__cta-kaspi-split .product-offer-card__kaspi-link .btn__buy-text {
    white-space: nowrap;
    font-size: 0.84rem;
    line-height: 1;
  }

  .product-page--commerce .product-offer-card__kaspi-pay {
    min-width: 5.8rem;
    min-height: 2.35rem;
    padding: 0.28rem 0.35rem;
  }

  .product-page--commerce .product-offer-card__kaspi-pay img {
    height: 1.75rem;
  }

  .product-page--commerce .product-side-info {
    margin-top: 0.5rem;
    font-size: 0.85rem;
  }

  .product-page--commerce .product-side-info__item summary {
    font-size: 12px;
  }

  .product-page--commerce .product-side-info__item p {
    font-size: 12px;
    margin-top: 0.45rem;
    line-height: 1.4;
  }

  .product-page__gallery .kaspi-gallery {
    gap: 0.4rem;
  }

  .product-page__gallery .kaspi-gallery__main {
    aspect-ratio: 4 / 3;
    max-height: none;
    width: 100%;
  }

  .product-page__gallery .kaspi-gallery__thumbs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.35rem;
    padding-bottom: 0.15rem;
  }

  @supports (scrollbar-width: thin) {
    .product-page__gallery .kaspi-gallery__thumbs {
      scrollbar-width: thin;
    }
  }

  .product-page__gallery .kaspi-gallery__thumb {
    flex: 0 0 40px;
    width: 40px;
  }

  .product-page--commerce .product-desc-block .kaspi-card__lead,
  .product-page--commerce .product-desc-block .kaspi-card__text {
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .product-page--commerce .product-section-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .catalog-back a {
    font-size: 0.82rem;
    line-height: 1.3;
  }

  .product-spec-table__row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .product-offer-card {
    padding: 1rem;
  }

  .product-page--commerce .product-offer-card {
    padding: 0.65rem 0.75rem;
  }

  .product-page--commerce .product-trust-list {
    display: none;
  }

  .product-page--commerce .product-page__offer .product-page__product-id {
    font-size: 0.6rem;
  }

  .product-page--commerce .product-page__offer .product-page__title {
    font-size: clamp(0.88rem, 4.1vw, 1.02rem);
    margin-bottom: 0.35rem;
  }

  .product-page--commerce .product-price {
    font-size: clamp(0.98rem, 4.4vw, 1.12rem);
    margin-bottom: 0.3rem;
  }

  .product-page--commerce .product-stock {
    font-size: 0.66rem;
    margin-bottom: 0.45rem;
  }

  .product-page--commerce .product-cart-form__label {
    font-size: 0.62rem;
  }

  .product-page--commerce .product-cart-form__qty {
    width: 3.6rem;
    font-size: 0.84rem;
    padding: 0.35rem 0.45rem;
  }

  .product-page--commerce .product-side-info__item summary {
    font-size: 12px;
  }

  .product-page--commerce .product-side-info__item p {
    font-size: 12px;
  }

  .catalog-back a {
    font-size: 0.76rem;
  }

  .product-cart-form__row {
    flex-wrap: nowrap;
    align-items: center;
  }

  .product-cart-form__qty-stepper {
    flex: 0 0 auto;
  }

  .product-cart-form__qty-stepper .product-cart-form__qty {
    width: 2rem;
    min-width: 2rem;
    max-width: 2rem;
  }

  .product-cart-form__qty-btn {
    width: 1.8rem;
    height: 1.8rem;
  }

  .product-cart-form__submit {
    white-space: nowrap;
  }

  .product-cart-form__qty-stepper {
    width: auto;
  }

  .page-subsection .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .page-subsection .product-card__title {
    font-size: var(--card-text-size);
    line-height: 1.25;
    padding: 0.55rem 0.55rem 0.2rem;
  }

  .page-subsection .product-card__price {
    font-size: var(--card-text-size);
    padding: 0 0.55rem 0.1rem;
  }

  .have-product-card__thumb {
    min-height: 13rem;
    padding: 0.5rem 0.6rem;
  }
}

.product-page__gallery .kaspi-gallery__main {
  max-width: 100%;
}

.product-page__title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.65rem;
}

.product-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.kaspi-embed {
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.kaspi-card {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 1.35rem);
  padding: clamp(1.25rem, 2vw, 1.75rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.kaspi-showcase-list {
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 3.5vw, 2.75rem);
}

.kaspi-gallery {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  width: 100%;
}

.kaspi-gallery__main {
  position: relative;
  display: block;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: zoom-in;
  background: #f7f9fc;
  border: 1px solid var(--line);
}

.kaspi-gallery__main:focus {
  outline: none;
}

.kaspi-gallery__main:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Убираем рамку/фон карточки вокруг главного фото — иначе на части кадров видны «поля» */
.kaspi-gallery .kaspi-gallery__main.kaspi-card__media {
  border: 1px solid var(--line);
  background: #f7f9fc;
  border-radius: 12px;
  padding: 0.35rem;
}

.kaspi-gallery__main-stack {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.kaspi-gallery__layer {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  z-index: 0;
  transition: opacity 0.55s ease;
}

.kaspi-gallery__layer.is-on {
  opacity: 1;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .kaspi-gallery__layer {
    transition: none;
  }
}

.kaspi-gallery__main-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Перебиваем .kaspi-card__media img { height: auto }, иначе обложка не работает */
.kaspi-gallery__main.kaspi-card__media .kaspi-gallery__layer,
.kaspi-gallery__main.kaspi-card__media > .kaspi-gallery__main-img:only-child {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.kaspi-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 0.45rem;
  width: 100%;
}

.kaspi-gallery__thumb {
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  line-height: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.kaspi-gallery__thumb:hover {
  border-color: rgba(194, 86, 31, 0.5);
}

.kaspi-gallery__thumb.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.kaspi-gallery__thumb:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.kaspi-gallery__thumb img {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
  display: block;
}

@media (max-width: 900px) {
  .kaspi-gallery__thumbs {
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  }
}

.kaspi-card--stack .kaspi-card__media--hero {
  align-self: center;
  width: 100%;
  max-width: min(420px, 100%);
}

.kaspi-card__media {
  display: block;
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-dark);
}

.kaspi-card__media img {
  width: 100%;
  height: auto;
  display: block;
}

.kaspi-card__body {
  min-width: 0;
}

.kaspi-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

.kaspi-card__title--page {
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  margin: 0 0 0.65rem;
}

.kaspi-card__title a {
  color: var(--ink);
  text-decoration: none;
}

.kaspi-card__title a:hover {
  color: var(--accent);
}

.kaspi-card__meta {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.kaspi-card__code {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
}

.kaspi-card__lead {
  margin: 0 0 0.65rem;
  font-weight: 600;
  font-size: var(--card-text-size);
  line-height: var(--leading-snug);
}

.kaspi-card__text {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: var(--card-text-size);
  line-height: var(--leading-body);
}

.kaspi-card__bullets {
  margin: 0 0 1.15rem;
  padding-left: 1.2rem;
  color: var(--ink-soft);
  font-size: var(--card-text-size);
  line-height: var(--leading-body);
}

/* Характеристики из менеджера: колонки «метка … значение» — как в textarea (пробелы не схлопываются). */
.product-spec-block .kaspi-card__bullets {
  padding-left: 0;
  list-style: none;
}

.product-spec-block .kaspi-card__bullets > li {
  white-space: pre-wrap;
  font-family: var(--font-body);
  font-size: var(--card-text-size);
  line-height: var(--leading-body);
  color: var(--ink-soft);
}

.product-spec-block .kaspi-card__bullets > li.kaspi-card__bullet--spacer {
  height: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0;
  line-height: 0;
}

.kaspi-card__specs {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--paper);
  border-radius: 8px;
  border: 1px solid var(--line);
}

.kaspi-card__spec-row {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 0.5rem 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.kaspi-card__spec-row:last-child {
  border-bottom: 0;
}

.kaspi-card__spec-row dt {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 600;
}

.kaspi-card__spec-row dd {
  margin: 0;
}

@media (max-width: 480px) {
  .kaspi-card__spec-row {
    grid-template-columns: 1fr;
  }
}

.kaspi-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.kaspi-card__merchant-line {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
}

.kaspi-card__merchant-line a {
  color: var(--ink-soft);
  text-decoration: none;
}

.kaspi-card__merchant-line a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section__head {
  margin-bottom: 2rem;
}

.section__head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin: 0 0 0.5rem;
}

.section__head p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 42rem;
}

#byd .section__head h2 {
  font-family: var(--font-category);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.25;
}

#byd .section__head p {
  font-size: 14px;
}

#byd .section-byd-subline,
.page-category .catalog-view-toggle.section-byd-subline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
  margin: 0;
  max-width: 48rem;
  font-size: 14px;
  color: var(--ink-soft);
}

#byd .section-byd-subline__text {
  margin: 0;
  font-family: var(--font-category);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

/* Как у «Главная / О нас / Новости» в .site-nav__list */
#byd .section-byd-subline__tab,
.page-category .catalog-view-toggle__btn.section-byd-subline__tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-category);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: none;
  padding: 0.35rem 0;
  transition: color 0.24s ease, transform 0.24s ease;
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  margin: 0;
}

#byd .section-byd-subline__tab::after,
.page-category .catalog-view-toggle__btn.section-byd-subline__tab::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: var(--nav-underline-bottom);
  width: 100%;
  height: var(--nav-underline-h);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--brand-blue));
  transform: scaleX(0);
  transform-origin: left center;
  transition: var(--nav-underline-transition);
}

#byd .section-byd-subline__tab:hover,
.page-category .catalog-view-toggle__btn.section-byd-subline__tab:hover {
  color: var(--accent);
}

#byd .section-byd-subline__tab:hover::after,
#byd .section-byd-subline__tab:focus-visible::after,
.page-category .catalog-view-toggle__btn.section-byd-subline__tab:hover::after,
.page-category .catalog-view-toggle__btn.section-byd-subline__tab:focus-visible::after {
  transform: scaleX(1);
}

#byd .section-byd-subline__tab.is-active,
.page-category .catalog-view-toggle__btn.section-byd-subline__tab.is-active {
  color: var(--accent);
}

#byd .section-byd-subline__tab.is-active::after,
.page-category .catalog-view-toggle__btn.section-byd-subline__tab.is-active::after {
  transform: scaleX(1);
}

#byd .section-byd-subline__tab:focus-visible,
.page-category .catalog-view-toggle__btn.section-byd-subline__tab:focus-visible {
  outline: none;
  color: var(--accent);
}

/* Два слоя: неактивный вне потока (absolute), иначе высота = max(оба) и под моделями пустота.
   overflow: hidden — иначе огромный DOM вкладки «Все товары» увеличивает scrollHeight страницы,
   даже когда активна только сетка моделей. */
#byd .home-byd-panels {
  position: relative;
  margin-top: 0.35rem;
  overflow: hidden;
}

#byd .home-byd-panels__layer {
  position: relative;
  min-width: 0;
  z-index: 1;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

#byd .home-byd-panels__layer.home-byd-panels__layer--inactive {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
}

#byd .home-byd-panels .home-all-catalog {
  margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
  #byd .home-byd-panels__layer {
    transition: none;
  }
}

.section__head--about {
  margin-bottom: 2rem;
}

.section__head--about p {
  color: var(--ink);
}

.about-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 17rem);
  gap: 1.25rem 1.75rem;
  align-items: center;
}

.about-intro__text {
  min-width: 0;
}

.about-intro__text h2 {
  margin: 0 0 0.65rem;
}

.about-intro__text p {
  margin: 0;
  max-width: 52ch;
  font-size: clamp(0.98rem, 1.05vw, 1.06rem);
  line-height: 1.58;
}

.about-intro__brand {
  justify-self: end;
  width: 100%;
  max-width: min(17rem, 42vw);
}

.about-intro__logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: right center;
}

@media (max-width: 700px) {
  .about-intro {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: stretch;
  }

  .about-intro__brand {
    justify-self: center;
    max-width: min(16rem, 70vw);
    order: -1;
  }

  .about-intro__logo {
    object-position: center;
  }

  .about-intro__text p {
    max-width: none;
  }
}

.category-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  grid-auto-rows: 1fr;
}

.category-grid__item {
  min-width: 0;
  display: flex;
}

.category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  height: 100%;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(21, 86, 133, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.category-card__media {
  height: 220px;
  background: linear-gradient(180deg, #f0eeea 0%, #fff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1rem;
}

.category-card__media img {
  width: auto;
  height: auto;
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
}

@media (max-width: 768px) {
  .category-card__media {
    display: none;
  }
}

/* Разный фон под превью модели (блок «Каталог BYD» и шапка /catalog/…). */
.category-card--destroyer-05 .category-card__media {
  background: linear-gradient(180deg, #ebe8e4 0%, #faf9f7 100%);
}

.category-card--sealion-7 .category-card__media {
  background: linear-gradient(180deg, #e6eaf0 0%, #fafbfc 100%);
}

.category-card--yuan-up .category-card__media {
  background: linear-gradient(180deg, #e8f0eb 0%, #fbfcfa 100%);
}

.category-card--song-plus .category-card__media {
  background: linear-gradient(180deg, #f2ece4 0%, #fff 100%);
}

.category-card--han .category-card__media {
  background: linear-gradient(180deg, #eae8ee 0%, #faf9fb 100%);
}

.category-card--tang-atto-8 .category-card__media {
  background: linear-gradient(180deg, #ebe9f2 0%, #fcfbfd 100%);
}

.category-card--seal-06 .category-card__media {
  background: linear-gradient(180deg, #e5eef3 0%, #f7fafc 100%);
}

.category-card--charging-stations .category-card__media {
  background: linear-gradient(180deg, #e5f4f0 0%, #f8fffc 100%);
}

.category-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.15rem;
  min-height: 4.1rem;
}

.category-card:hover {
  border-color: rgba(194, 86, 31, 0.45);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.category-card__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, transparent 40%, rgba(194, 86, 31, 0.06) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.5s;
}

.category-card:hover .category-card__shine {
  transform: translateX(100%);
}

.category-card__name {
  font-family: var(--font-category);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.25;
  position: relative;
}

.category-card__arrow {
  font-family: var(--font-display);
  opacity: 0.35;
  position: relative;
  transition: transform 0.2s, opacity 0.2s;
}

.category-card:hover .category-card__arrow {
  opacity: 1;
  transform: translateX(4px);
}

.home-all-catalog {
  margin-top: 0.35rem;
  scroll-margin-top: 6rem;
}

.home-all-catalog__lead {
  margin: 0;
  font-family: var(--font-category);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.25;
}

.home-all-catalog__layout {
  display: block;
}

.home-all-catalog__main {
  min-width: 0;
}

#byd .section-byd-subline {
  position: relative;
}

.section-byd-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-byd-subline__filter-wrap {
  margin-left: auto;
  position: relative;
  display: inline-flex;
  align-items: center;
}

#byd:not(.section--byd-all) .section-byd-subline__filter-wrap {
  display: none;
}

.catalog-model-switcher:not(.catalog-model-switcher--all) .section-byd-subline__filter-wrap {
  display: none;
}

.home-all-catalog__filter-toggle {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  min-height: 1.35rem;
  font-family: var(--font-category);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.25;
  padding: 0;
  cursor: pointer;
}

.home-all-catalog__filter-toggle:hover {
  color: var(--ink);
  background: transparent;
}

.home-all-catalog__filter-toggle[aria-expanded="true"] {
  color: var(--ink);
  background: transparent;
}

.home-all-catalog__filter-icon {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-all-catalog__filter-text {
  white-space: nowrap;
}

.home-all-catalog__empty {
  margin: 1rem 0 0;
}

.home-all-filter {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.4rem);
  z-index: 20;
  max-width: 280px;
  width: min(280px, calc(100vw - 2rem));
  box-sizing: border-box;
  border: 1px solid rgba(21, 86, 133, 0.24);
  border-radius: var(--radius);
  background: #eef3f8;
  padding: 0.9rem 0.95rem;
  box-shadow: 0 10px 28px rgba(10, 12, 14, 0.16);
}

.home-all-filter__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.home-all-filter__title {
  margin: 0;
  font-family: var(--font-category);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.home-all-filter__reset {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-category);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.home-all-filter__reset--bottom {
  display: block;
  margin-top: 0.9rem;
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}

.home-all-filter__group + .home-all-filter__group {
  margin-top: 0.8rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.home-all-filter__label {
  margin: 0 0 0.45rem;
  font-family: var(--font-category);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

.home-all-filter__checks {
  display: grid;
  gap: 0.34rem;
}

.home-all-filter__price-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.home-all-filter__price-caption {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.home-all-filter__price-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.home-all-filter__price-range {
  width: 100%;
}

.home-all-filter__check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  line-height: 1.3;
  color: var(--ink);
}

.home-all-filter__check input {
  margin: 0;
}

html.theme-evening .home-all-filter {
  background: rgba(24, 33, 46, 0.96);
  border-color: rgba(122, 181, 57, 0.28);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.46);
}

html.theme-evening .home-all-filter__title,
html.theme-evening .home-all-filter__label,
html.theme-evening .home-all-filter__check {
  color: #e8eef5;
}

html.theme-evening .home-all-filter__price-value {
  color: #e8eef5;
}

html.theme-evening .home-all-filter__price-caption {
  color: #b8c7d8;
}

html.theme-evening .home-all-filter__reset {
  color: #9fd06a;
}

.home-all-catalog__grouped {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.home-all-catalog__model {
  scroll-margin-top: 5.5rem;
}

.home-all-catalog__model-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid rgba(122, 181, 57, 0.35);
}

.home-all-catalog__model-title {
  margin: 0;
  font-family: var(--font-category);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.25;
}

.home-all-catalog__model-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.home-all-catalog__model-link {
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent, #5a8f24);
  white-space: nowrap;
}

.home-all-catalog__model-link:hover {
  text-decoration: none;
}

.home-all-catalog__section {
  margin-bottom: 1.35rem;
}

.home-all-catalog__section:last-child {
  margin-bottom: 0;
}

.home-all-catalog__section-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem 0;
  margin-bottom: 0.65rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(26, 29, 34, 0.1);
}

.home-all-catalog__section-title {
  margin: 0;
  width: 100%;
  font-size: clamp(0.98rem, 1.9vw, 1.12rem);
  font-weight: 700;
  line-height: 1.25;
}

.home-all-catalog__section-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 0.85rem;
  width: 100%;
  font-size: 0.82rem;
}

.home-all-catalog__section-count {
  font-weight: 600;
  color: rgba(26, 29, 34, 0.5);
}

.home-all-catalog__section-link {
  font-weight: 600;
  text-decoration: none;
  color: var(--accent, #5a8f24);
  white-space: nowrap;
}

.home-all-catalog__section-link:hover {
  text-decoration: none;
}

.home-all-catalog__grid {
  margin-top: 0.15rem;
}

@media (max-width: 640px) {
  .home-all-catalog__model-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-all-catalog__model-links {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

}

/* Главная, вкладка «Все»: have-карточки, сетка 6 / 3 / 2 колонки. */
#byd .product-grid.product-grid--home-all-have {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.2rem;
}

@media (max-width: 1100px) {
  #byd .product-grid.product-grid--home-all-have {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .section-byd-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 0.5rem;
    row-gap: 0.1rem;
    align-items: center;
    width: 100%;
  }

  .section-byd-subline__filter-wrap {
    margin-left: 0;
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    align-self: center;
  }

  #byd .section-byd-subline,
  .page-category .catalog-view-toggle.section-byd-subline {
    grid-column: 1;
    grid-row: 1 / span 2;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem 0;
    max-width: 100%;
  }

  .home-all-filter {
    width: min(320px, calc(100vw - 0.5rem));
    max-width: calc(100vw - 0.5rem);
    padding: 0.75rem 0.8rem;
    top: auto;
    bottom: calc(100% + 0.35rem);
    max-height: min(70vh, 420px);
    overflow-y: auto;
  }

  .home-all-filter__head {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.35rem 0.5rem;
  }

  .home-all-filter__title {
    font-size: 13px;
    line-height: 1.2;
    white-space: normal;
    max-width: 100%;
  }

  .home-all-filter__reset {
    margin-left: auto;
    white-space: nowrap;
    font-size: 0.74rem;
  }

}

@media (max-width: 768px) {
  #byd .product-grid.product-grid--home-all-have {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

/* Мобильная строка вкладок BYD: «Выберите модель» / «Все товары» + удобный тап */
@media (max-width: 520px) {
  #byd .section-byd-subline,
  .page-category .catalog-view-toggle.section-byd-subline {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem 0;
  }

  #byd .section-byd-subline__tab,
  .page-category .catalog-view-toggle__btn.section-byd-subline__tab {
    min-height: 2.75rem;
    padding: 0.4rem 0;
    text-align: left;
  }
}

.placeholder-strip {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-soft);
}

.muted {
  color: var(--ink-soft);
}

.news-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.15rem;
}

.news-grid__item {
  min-width: 0;
}

.news-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(21, 86, 133, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.news-card:hover {
  border-color: rgba(194, 86, 31, 0.35);
  box-shadow: var(--shadow);
}

.news-card__source {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.news-card__title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: var(--card-text-size);
  font-weight: 700;
  line-height: 1.3;
}

.news-card__title a {
  color: var(--ink);
  text-decoration: none;
}

.news-card__title a:hover {
  color: var(--accent);
}

.news-card__blurb {
  margin: 0 0 1rem;
  flex: 1;
  font-size: var(--card-text-size);
  color: var(--ink-soft);
  line-height: 1.5;
}

.news-card__link {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent);
}

.news-card__link:hover {
  color: var(--accent-hover);
}

.news-live {
  margin-top: 2.75rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.news-live__head {
  margin-bottom: 1.25rem;
}

.news-live__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.news-live__status {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.news-live__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.news-live__item {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 640px) {
  .news-live__item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .news-live__time {
    font-size: 0.78rem;
  }
}

.news-live__time {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

.news-live__link {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.98rem;
  line-height: 1.45;
}

.news-live__link:hover {
  color: var(--accent);
  text-decoration: none;
}

.news-live__src {
  font-size: 0.78rem;
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 600;
  text-align: right;
}

@media (max-width: 640px) {
  .news-live__src {
    text-align: left;
  }
}

.news-live__empty {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
}

/* Category page */
.page-category {
  padding: 1.5rem 0 4rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 0.35rem;
  font-family: var(--font-category);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  line-height: var(--leading-snug);
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 1.75rem;
}

.breadcrumb__home {
  flex-shrink: 0;
}

.breadcrumb a {
  color: var(--ink-soft);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb .sep {
  margin: 0 0.4rem;
  opacity: 0.5;
}

/* Полноэкранный фон каталога (Yuan Up, Destroyer / Chazor) */
body.page-catalog--bg-video {
  min-height: 100vh;
  /* Иначе фон body перекрывает слой с z-index: 0 и видео не видно */
  background-color: transparent;
  background-image: none;
}

.catalog-bg-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  min-width: 100%;
  min-height: 100vh;
  overflow: hidden;
  pointer-events: none;
}

/* Как .hero__video-el на главной: cover на весь слой; vw/vh — запас, если только <source> без размеров */
.catalog-bg-video__el {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: max(100%, 100vw);
  min-height: max(100%, 100vh);
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

/* Как .hero__media-scrim — тот же градиент и угол, что у hero на index */
.catalog-bg-video__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    145deg,
    rgba(236, 244, 252, 0.94) 0%,
    rgba(220, 236, 248, 0.82) 42%,
    rgba(236, 244, 252, 0.9) 100%
  );
  pointer-events: none;
}

/* Контент и шапка поверх фонового видео (z-index: 0).
   Не задавать .site-header { position: relative } — иначе ломается position: sticky у шапки.
   top-bar выше site-header для верхней полосы (контакты/поиск) над липкой шапкой на фоне видео. */
body.page-catalog--bg-video > .top-bar {
  position: relative;
  z-index: 5;
}

body.page-catalog--bg-video > .site-header {
  position: sticky;
  top: 0;
  z-index: 3;
}

body.page-catalog--bg-video > main,
body.page-catalog--bg-video > .site-footer {
  position: relative;
  z-index: 1;
}

/* main: как у hero на главной — без своей заливки, видео читается в полях; ритм отступов ближе к hero */
body.page-catalog--bg-video main {
  background: transparent;
  min-height: calc(100dvh - 7.5rem);
}

body.page-catalog--bg-video .page-category {
  padding: clamp(2rem, 5vw, 3.25rem) 0 clamp(3rem, 8vw, 5rem);
}

@media (prefers-reduced-motion: reduce) {
  .catalog-bg-video {
    display: none;
  }

  body.page-catalog--bg-video {
    min-height: unset;
    background-color: var(--paper);
    background-image:
      linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, transparent 42%),
      repeating-linear-gradient(
        -12deg,
        transparent,
        transparent 96px,
        rgba(30, 112, 171, 0.035) 96px,
        rgba(30, 112, 171, 0.035) 97px
      );
  }

  body.page-catalog--bg-video > .top-bar {
    z-index: 5;
  }

  body.page-catalog--bg-video > .site-header {
    position: sticky;
    top: 0;
    z-index: 3;
  }

  body.page-catalog--bg-video > main,
  body.page-catalog--bg-video > .site-footer {
    z-index: 1;
  }

  body.page-catalog--bg-video main {
    min-height: unset;
  }

  body.page-catalog--bg-video .page-category {
    padding: 1.5rem 0 4rem;
  }
}

.layout-catalog {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

.layout-catalog.layout-catalog--single {
  grid-template-columns: minmax(0, 1fr);
}

.catalog-sidebar {
  position: sticky;
  top: 5.5rem;
  width: 100%;
  max-width: 240px;
  justify-self: start;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.sidebar-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
}

.sidebar-title:not(:first-child) {
  margin-top: 1.5rem;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.28rem;
}

.sidebar-list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.2rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.25;
  border-radius: 0;
  border: 0;
  background: transparent;
  transition: color 0.24s ease;
}

.sidebar-list a:not([aria-current]):hover {
  color: var(--accent);
}

.sidebar-search {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-search input {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-body);
}

.sidebar-search button {
  padding: 0.5rem;
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
}

.sidebar-search button:hover {
  background: var(--accent);
}

.catalog-header {
  margin-bottom: 1.5rem;
  display: grid;
  gap: 1.1rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

@media (min-width: 768px) {
  .catalog-header {
    grid-template-columns: minmax(200px, 320px) minmax(0, 1fr);
  }
}

.catalog-model {
  margin: 0;
  aspect-ratio: 16 / 10;
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid rgba(21, 86, 133, 0.16);
  background:
    radial-gradient(120% 90% at 12% 10%, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(160deg, #eef3f8 0%, #ffffff 58%, #f7fbff 100%);
  padding: 0;
  overflow: hidden;
  box-shadow:
    0 16px 34px rgba(15, 41, 62, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.catalog-model:hover {
  transform: translateY(-2px);
  border-color: rgba(122, 181, 57, 0.45);
  box-shadow:
    0 22px 40px rgba(15, 41, 62, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.catalog-model img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  filter: drop-shadow(0 8px 16px rgba(15, 41, 62, 0.12));
  transform: translateZ(0);
  transition: transform 0.24s ease, filter 0.24s ease;
}

.catalog-model:hover img {
  transform: scale(1.02);
  filter: drop-shadow(0 12px 24px rgba(15, 41, 62, 0.16));
}

.catalog-model--destroyer-05 {
  background: linear-gradient(165deg, #ebe8e4, #fff);
}

.catalog-model--sealion-7 {
  background: linear-gradient(165deg, #e6eaf0, #fafbfc);
}

.catalog-model--yuan-up {
  background: linear-gradient(165deg, #e8f0eb, #fbfcfa);
}

.catalog-model--song-plus {
  background: linear-gradient(165deg, #f2ece4, #fff);
}

.catalog-model--han {
  background: linear-gradient(165deg, #eae8ee, #faf9fb);
}

.catalog-model--tang-atto-8 {
  background: linear-gradient(165deg, #ebe9f2, #fcfbfd);
}

.catalog-model--seal-06 {
  background: linear-gradient(165deg, #e5eef3, #f7fafc);
}

.catalog-model--charging-stations {
  background: linear-gradient(165deg, #e5f4f0, #f8fffc);
}

.catalog-model--leopard {
  background: linear-gradient(165deg, #eceef2, #f9fafc);
}

.catalog-model--leopard img {
  object-fit: cover;
  object-position: center;
  transform: scale(1.06);
  filter: none;
}

.catalog-model--custom {
  background: linear-gradient(165deg, #e9edf2, #f8fafd);
}

.catalog-model--custom img {
  object-fit: cover;
  object-position: center;
  transform: scale(1.14);
  filter: none;
}

.catalog-model--custom:hover img {
  transform: scale(1.18);
}

.catalog-header__text {
  min-width: 0;
}

.catalog-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-category .catalog-title {
  font-family: var(--font-category);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.25;
}

.page-category .sidebar-list a {
  font-family: var(--font-category);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 14px;
}

.page-category .product-card__title,
.page-category .have-product-card__title {
  font-family: var(--font-category);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.08em;
  line-height: 1.25;
  font-size: 14px;
}

.catalog-intro {
  margin: 0;
  color: var(--ink-soft);
  max-width: 48rem;
  font-size: 0.92rem;
  line-height: var(--leading-body);
}

.page-category .catalog-intro {
  font-size: 0.84rem;
}

/* Подстраницы раздела каталога (Song Plus — багажник, защита, декор и т.д.) */
.page-subsection .catalog-header .catalog-model.subsection-hero__media {
  display: none;
}

.page-subsection .subsection-hero {
  margin-bottom: clamp(1.35rem, 3vw, 2rem);
  padding: clamp(0.9rem, 2vw, 1.5rem) clamp(0.95rem, 2vw, 1.65rem);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.97) 0%,
    rgba(248, 249, 252, 0.92) 48%,
    rgba(242, 244, 248, 0.98) 100%
  );
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 8px 28px rgba(10, 12, 14, 0.05);
  align-items: center;
  gap: clamp(0.9rem, 2.2vw, 1.75rem);
}

@media (min-width: 768px) {
  .page-subsection .subsection-hero {
    grid-template-columns: minmax(0, 1fr);
  }
}

.page-subsection .subsection-hero__media {
  margin: 0;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  border: 1px solid rgba(21, 86, 133, 0.08);
  background: linear-gradient(168deg, #ebeef4 0%, #f6f7fa 55%, #fff 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: 200px;
}

.page-subsection .subsection-hero__media img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(260px, 46vw);
  object-fit: contain;
  object-position: center;
  margin: 0;
}

.page-subsection .subsection-hero__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  text-align: left;
  padding-block: 0.35rem;
}

.page-subsection .subsection-hero__eyebrow {
  margin: 0 0 0.3rem;
  font-family: var(--font-category);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.25;
  color: var(--accent);
}

.page-subsection .subsection-hero .catalog-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-category);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.08em;
  text-transform: none;
}

#subsection-title {
  font-size: 17.025px;
}

.page-subsection .subsection-hero .catalog-intro {
  margin: 0;
  max-width: 46em;
  font-family: var(--font-category);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
}

.page-subsection .product-grid {
  gap: 1.5rem;
  /* Десктоп: 6 карточек в ряд (мобильные брейкпоинты ниже без изменений). */
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.page-category .catalog-model-panels__layer[data-catalog-panel="sections"] .product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
  margin-top: 0.6rem;
}

.page-subsection .product-card__title {
  line-height: 1.35;
}

.catalog-back {
  margin: 1.1rem auto 0;
  max-width: min(72rem, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(288px, 360px);
  gap: clamp(1rem, 2vw, 1.5rem);
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.catalog-back a {
  grid-column: 1;
  display: inline;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.catalog-back a:hover {
  text-decoration: underline;
}

/* На страницах разделов каталога ссылка "Назад" должна идти ровно по границе блока контента. */
.page-subsection .catalog-back {
  margin: 1.1rem 0 0;
  max-width: 100%;
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
}

.page-subsection .catalog-back a {
  display: inline-block;
}

@media (max-width: 900px) {
  .catalog-back {
    display: block;
  }
}


.product-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.product-grid__item {
  min-width: 0;
}

.sidebar-list__item {
  min-width: 0;
}

.pagination__item {
  min-width: 0;
}

@media (min-width: 769px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.product-card {
  position: relative;
  height: 100%;
}

.product-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}

.product-card__link:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.product-card__media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--paper-dark);
  display: block;
  position: relative;
  border-bottom: 1px solid rgba(21, 86, 133, 0.08);
}

.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  display: block;
}

.product-card__img--hover {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.35s ease;
}

.product-card__link:hover .product-card__media--has-hover .product-card__img--hover {
  opacity: 1;
}

.product-card__link:hover .product-card__media--has-hover .product-card__img--primary {
  opacity: 0;
}

.product-card__link:hover .product-card__img {
  transform: scale(1.04);
}

.product-card__title {
  font-family: var(--font-body);
  font-size: var(--card-text-size);
  font-weight: 400;
  margin: 0;
  padding: 1rem 1rem 0.35rem;
  line-height: 1.35;
}

.product-card--section .product-card__link {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  min-height: 0;
  padding: 0.82rem 0.92rem;
  background:
    radial-gradient(140% 120% at 100% 0%, rgba(122, 181, 57, 0.12) 0%, rgba(122, 181, 57, 0) 56%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  border-color: rgba(21, 86, 133, 0.18);
  border-radius: 12px;
  gap: 0.45rem;
}

.product-card--section .product-card__title {
  margin: 0;
  padding: 0;
  font-family: var(--font-category);
  font-size: clamp(1.08rem, 1.45vw, 1.22rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ink);
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 0.6rem;
}

.page-category .product-card--section .product-card__title,
.page-category .product-card--section .product-card__title a {
  text-transform: none;
  letter-spacing: 0.01em;
}

.product-card--section .product-card__title a {
  color: inherit;
  text-decoration: none;
}

.product-card--section .product-card__title a:hover {
  color: var(--accent);
  text-decoration: none;
}

.product-card--section .product-card__link::after {
  content: "→";
  margin-top: 0;
  margin-left: auto;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  opacity: 0.72;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.product-card--section .product-card__link:hover::after {
  opacity: 1;
  transform: translateX(3px);
}

.product-card--section .product-card__link:hover {
  border-color: rgba(122, 181, 57, 0.45);
  box-shadow: 0 12px 30px rgba(21, 86, 133, 0.1);
}

@media (max-width: 768px) {
  .page-category .catalog-model-panels__layer[data-catalog-panel="sections"] .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
  }

  .product-card--section .product-card__link {
    padding: 0.72rem 0.75rem;
  }

  .product-card--section .product-card__title {
    font-size: 0.94rem;
  }
}

@media (max-width: 560px) {
  .page-category .catalog-model-panels__layer[data-catalog-panel="sections"] .product-grid {
    grid-template-columns: 1fr;
  }
}

.product-card__price {
  font-family: var(--font-body);
  font-size: calc(var(--card-text-size) + 3px);
  font-weight: 600;
  margin: 0;
  padding: 0 1rem 0.25rem;
  color: var(--ink);
}

.product-card__cta {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0 1rem 1.1rem;
}

/* Страница модели: вкладки + два слоя (как главная BYD) */
.page-category .catalog-model-switcher {
  margin-bottom: 0.15rem;
}

.page-category .catalog-model-panels {
  position: relative;
  margin-top: 0.25rem;
}

.page-category .catalog-model-panels__layer {
  position: relative;
  min-width: 0;
  z-index: 1;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.page-category .catalog-model-panels__layer.catalog-model-panels__layer--inactive {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
}

@media (prefers-reduced-motion: reduce) {
  .page-category .catalog-model-panels__layer {
    transition: none;
  }
}

.catalog-overview__block {
  margin-bottom: 2.25rem;
  scroll-margin-top: 5.5rem;
}

.catalog-overview {
  margin-top: 0.6rem;
}

.catalog-overview__head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem 0;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(26, 29, 34, 0.1);
}

.catalog-overview__title {
  margin: 0;
  width: 100%;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.catalog-overview__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  width: 100%;
  font-size: 0.84rem;
}

.catalog-overview__count {
  font-weight: 600;
  color: rgba(26, 29, 34, 0.55);
}

.catalog-overview__link {
  font-weight: 600;
  text-decoration: none;
  color: var(--accent, #5a8f24);
  white-space: nowrap;
}

.catalog-overview__link:hover {
  text-decoration: none;
}

/* Листинги подразделов: карточка как на have.kz (ID, цена, наличие, Купить / Подробнее) */
.page-subsection .product-grid.product-grid--have-kz {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.2rem;
}

.page-subsection .product-grid.product-grid--have-kz .product-grid__item {
  width: 100%;
}

@media (max-width: 1100px) {
  .page-subsection .product-grid.product-grid--have-kz {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .page-subsection .product-grid.product-grid--have-kz {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .page-subsection .product-grid.product-grid--have-kz .product-grid__item {
    max-width: none;
  }

  .have-product-card {
    border-radius: 12px;
  }

  .have-product-card__thumb {
    min-height: 12.5rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f8fa;
  }

  .have-product-card__thumb--has-hover {
    position: relative;
  }

  .have-product-card__thumb--has-hover .have-product-card__img,
  .have-product-card__thumb--has-hover .have-product-card__img--hover {
    position: absolute;
    inset: 0.7rem;
    width: calc(100% - 1.4rem);
    height: calc(100% - 1.4rem);
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    object-fit: contain;
    object-position: center;
  }

  .have-product-card__thumb--has-hover .have-product-card__img--primary {
    z-index: 1;
  }

  .have-product-card__thumb--has-hover .have-product-card__img--hover {
    z-index: 2;
    opacity: 0;
    display: block !important;
  }

  .have-product-card__thumb--has-hover.ecomotion-mobile-alt .have-product-card__img--hover {
    opacity: 1 !important;
  }

  .have-product-card__thumb--has-hover.ecomotion-mobile-alt .have-product-card__img--primary {
    opacity: 0 !important;
  }

  .have-product-card__body {
    padding: 0.8rem 0.85rem 0.9rem;
    gap: 0.3rem;
  }
}

/* Галерея в листинге: второй img только для hover на широком экране; на таче — только primary + свайп */
@media (max-width: 768px) {
  .have-product-card__thumb--has-gallery > .have-product-card__img--hover,
  .product-card__media--has-gallery > .product-card__img--hover {
    display: none !important;
  }
}

.have-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  font-size: var(--card-text-size);
  background: #fff;
  border: 1px solid var(--have-kz-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(21, 86, 133, 0.06);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.have-product-card:hover {
  box-shadow: 0 8px 28px rgba(21, 86, 133, 0.1);
  border-color: rgba(21, 86, 133, 0.14);
}

.favorite-toggle-form {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 8;
  margin: 0;
}

@media (hover: hover) and (pointer: fine) {
  .favorite-toggle-form {
    opacity: 0;
    transform: translateY(-2px) scale(0.94);
    transition: opacity 0.16s ease, transform 0.16s ease;
    pointer-events: none;
  }

  .have-product-card:hover .favorite-toggle-form,
  .have-product-card:focus-within .favorite-toggle-form,
  .product-card:hover .favorite-toggle-form,
  .product-card:focus-within .favorite-toggle-form {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .favorite-toggle-form:has(.favorite-toggle[aria-pressed="true"]) {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
}

.favorite-toggle {
  width: 2rem;
  height: 2rem;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: #8aa0b1;
  font-size: 1.28rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, color 0.2s ease;
}

.favorite-toggle:hover {
  transform: scale(1.12);
  color: #7ab539;
}

.favorite-toggle.is-active {
  background: transparent;
  color: #7ab539;
  border-color: transparent;
}

.favorite-toggle[aria-pressed="true"] {
  background: transparent;
  color: #7ab539;
  border-color: transparent;
}

.have-product-card__thumb {
  display: block;
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  min-height: 12.5rem;
  background: #fafaf8;
  overflow: hidden;
  text-decoration: none;
  box-sizing: border-box;
  padding: 0;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  border-bottom: 1px solid rgba(21, 86, 133, 0.08);
  isolation: isolate;
}

.have-product-card__thumb::after {
  display: none;
}

.have-product-card__img {
  position: absolute;
  inset: 0.7rem;
  width: calc(100% - 1.4rem);
  height: calc(100% - 1.4rem);
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: transform 0.35s ease;
}

.have-product-card__img--hover {
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.35s ease;
}

.have-product-card:hover .have-product-card__thumb--has-hover .have-product-card__img--hover {
  opacity: 1;
}

.have-product-card:hover .have-product-card__thumb--has-hover .have-product-card__img--primary {
  opacity: 0;
}

.have-product-card:hover .have-product-card__img {
  transform: scale(1.03);
}

/* Touch / грубый указатель: нет :hover — второе фото через класс .ecomotion-mobile-alt (свайп в main.js) */
@media (hover: none), (pointer: coarse) {
  /* Без плавного crossfade: иначе второе фото ещё не декодировано — на мгновение белый фон */
  .product-card__media--has-hover .product-card__img--primary,
  .product-card__media--has-hover .product-card__img--hover,
  .have-product-card__thumb--has-hover .have-product-card__img--primary,
  .have-product-card__thumb--has-hover .have-product-card__img--hover {
    transition: opacity 0s, transform 0s !important;
  }

  .product-card__media--has-hover .product-card__img--hover {
    display: block !important;
    opacity: 0;
    pointer-events: none;
  }

  .product-card__media--has-hover.ecomotion-mobile-alt .product-card__img--hover {
    opacity: 1 !important;
  }

  .product-card__media--has-hover.ecomotion-mobile-alt .product-card__img--primary {
    opacity: 0 !important;
  }

  .have-product-card__thumb--has-hover .have-product-card__img--hover {
    display: block !important;
    opacity: 0;
    pointer-events: none;
  }

  .have-product-card__thumb--has-hover.ecomotion-mobile-alt .have-product-card__img--hover {
    opacity: 1 !important;
  }

  .have-product-card__thumb--has-hover.ecomotion-mobile-alt .have-product-card__img--primary {
    opacity: 0 !important;
  }
}

/* Залипший :hover после тапа — только при hover: none (настоящий тач).
   Не объединять с pointer: coarse: на ноутбуках с тачем Chrome даёт coarse + мышь — тогда гасилось второе фото. */
@media (hover: none) {
  .product-card__link:hover .product-card__media--has-hover:not(.ecomotion-mobile-alt) .product-card__img--hover {
    opacity: 0;
  }
}

/* iOS Safari: фикс геометрии медиа-слоя внутри карточки */
@supports (-webkit-touch-callout: none) {
  .have-product-card__thumb {
    padding: 0;
  }

  .have-product-card__thumb--has-hover {
    position: relative;
  }

  .have-product-card__thumb--has-hover .have-product-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: contain;
    object-position: center;
  }

  .have-product-card__thumb--has-hover .have-product-card__img--primary {
    z-index: 1;
  }

  .have-product-card__thumb--has-hover .have-product-card__img--hover {
    z-index: 2;
    opacity: 0;
    display: block !important;
  }

  .have-product-card__thumb--has-hover.ecomotion-mobile-alt .have-product-card__img--hover {
    opacity: 1 !important;
  }

  .have-product-card__thumb--has-hover.ecomotion-mobile-alt .have-product-card__img--primary {
    opacity: 0 !important;
  }
}

.have-product-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.9rem 1rem 1rem;
  flex: 1;
  min-height: 0;
}

.have-product-card__meta {
  margin-top: auto;
  display: grid;
  gap: 0.28rem;
  min-height: 2.5rem;
}

.have-product-card__id {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.have-product-card__title {
  font-family: var(--font-body);
  font-size: 1em;
  font-weight: 400;
  line-height: 1.42;
  margin: 0;
  flex-shrink: 1;
  min-height: 0;
  letter-spacing: 0.005em;
}

.have-product-card__title a {
  font-size: 14.025px;
  color: var(--ink);
  text-decoration: none;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}

.have-product-card__title a:hover {
  color: var(--have-kz-buy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.have-product-card__price {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2em;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  min-height: 1.25em;
}

.have-product-card__price--empty {
  visibility: hidden;
}

.have-product-card__stock {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
  min-height: 1.2em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.have-product-card__stock--in {
  color: var(--have-kz-buy);
}

.have-product-card__stock--transit {
  color: #b8860b;
}

.have-product-card__stock--out {
  color: #a33;
}

.have-product-card__actions {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.5rem;
  margin-top: 0;
  padding-top: 0.55rem;
  flex-shrink: 0;
}

.have-product-card__actions--placeholder {
  min-height: 5.9rem;
  visibility: hidden;
  pointer-events: none;
}

.have-product-card__actions-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.45rem;
  width: 100%;
  min-width: 0;
}

@media (hover: hover) and (pointer: fine) and (min-width: 769px) {
  .have-product-card__actions-row {
    opacity: 0;
    transform: scale(0.86);
    transform-origin: center center;
    pointer-events: none;
    transition: opacity 0.24s ease, transform 0.24s ease;
  }

  .have-product-card:hover .have-product-card__actions-row,
  .have-product-card:focus-within .have-product-card__actions-row {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
  }
}

.have-product-card__cart-form {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  display: flex;
}

.have-product-card__cart-plus-form {
  flex: 0 0 auto;
  margin: 0;
  display: flex;
}

.have-product-card__cart-form .have-product-card__btn--buy {
  width: 100%;
}

.have-product-card__btn {
  font-family: var(--font-display);
  font-size: 0.92em;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  padding: 0.55rem 0.9rem;
  border-radius: 6px;
  border: 1px solid transparent;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 2.3rem;
  box-sizing: border-box;
}

.have-product-card__btn--buy {
  background: var(--have-kz-buy);
  color: #fff;
  border-color: var(--have-kz-buy);
  white-space: nowrap;
  min-width: min-content;
}

.have-product-card__btn--buy:hover {
  background: var(--have-kz-buy-hover);
  border-color: var(--have-kz-buy-hover);
  color: #fff;
}

.have-product-card__btn--plus {
  min-width: 2.3rem;
  padding-inline: 0.55rem;
  background: #fff;
  color: var(--have-kz-buy);
  border-color: rgba(122, 181, 57, 0.5);
}

.have-product-card__btn--plus:hover {
  background: rgba(122, 181, 57, 0.14);
  border-color: rgba(122, 181, 57, 0.7);
}

.have-product-card__btn--disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  background: #c5cac6;
  border-color: #c5cac6;
  color: #fff;
}

.have-product-card__btn--more {
  background: #fff;
  color: var(--ink);
  border-color: var(--have-kz-line);
}

.have-product-card__btn--more:hover {
  border-color: var(--ink-soft);
  background: var(--paper);
}

.have-product-card__quick-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  margin-top: 0.2rem;
  width: 100%;
  min-width: 0;
}

.have-product-card__quick-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 2.3rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(122, 181, 57, 0.45);
  border-radius: 8px;
  background: #fff;
  font-family: var(--font-display);
  font-size: 0.92em;
  font-weight: 700;
  line-height: 1.1;
  color: var(--have-kz-buy);
  box-sizing: border-box;
}

.have-product-card__quick-kaspi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 2.3rem;
  min-width: 2.3rem;
  padding: 0.48rem;
  border: 1px solid rgba(122, 181, 57, 0.45);
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}

.have-product-card__quick-kaspi img {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 3px;
}

.have-product-card__kaspi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  align-self: center;
  border-radius: 8px;
  border: 1px solid var(--have-kz-line);
  background: #fff;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.have-product-card__kaspi:hover {
  border-color: rgba(21, 86, 133, 0.22);
  box-shadow: 0 2px 10px rgba(21, 86, 133, 0.08);
}

.have-product-card__kaspi img {
  display: block;
  width: 1.55rem;
  height: 1.55rem;
  object-fit: contain;
}

/* Мобильные: первая строка — «В корзину» и иконка Kaspi рядом; ниже — «Подробнее» на всю ширину */
@media (max-width: 768px) {
  .have-product-card__meta {
    grid-template-rows: minmax(1.25em, auto) minmax(1.2em, auto);
  }

  .have-product-card__stock {
    min-height: 1.2em;
    line-height: 1.2;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
  }

  .have-product-card__actions {
    gap: 0.45rem;
  }

  .have-product-card__actions--placeholder {
    min-height: 5.9rem;
  }

  .have-product-card__actions-row {
    justify-content: flex-start;
  }

  .have-product-card__actions-row .have-product-card__cart-form {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: 100%;
  }

  .have-product-card__actions-row .have-product-card__cart-plus-form {
    flex: 0 0 var(--have-card-side-btn);
    width: var(--have-card-side-btn);
    min-width: var(--have-card-side-btn);
    max-width: var(--have-card-side-btn);
    height: var(--have-card-side-btn);
    min-height: var(--have-card-side-btn);
    max-height: var(--have-card-side-btn);
    display: flex;
  }

  .have-product-card__actions-row .have-product-card__btn--buy {
    width: 100%;
    height: var(--have-card-side-btn);
    min-height: var(--have-card-side-btn);
    max-height: var(--have-card-side-btn);
    padding-top: 0;
    padding-bottom: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }

  .have-product-card__actions-row .have-product-card__kaspi {
    flex: 0 0 auto;
    flex-shrink: 0;
    align-self: stretch;
    margin: 0;
    min-width: 2.5rem;
  }

  .have-product-card__quick-row {
    width: 100%;
    justify-content: flex-start;
    gap: 0.45rem;
  }

  .have-product-card__quick-link {
    flex: 1 1 0;
    width: 100%;
    min-width: 0;
    height: var(--have-card-side-btn);
    min-height: var(--have-card-side-btn);
    max-height: var(--have-card-side-btn);
    white-space: nowrap;
    padding-inline: 0.55rem;
    box-sizing: border-box;
    line-height: 1;
  }

  .have-product-card__quick-kaspi,
  .have-product-card__actions-row .have-product-card__btn--plus {
    width: var(--have-card-side-btn);
    min-width: var(--have-card-side-btn);
    max-width: var(--have-card-side-btn);
    height: var(--have-card-side-btn);
    min-height: var(--have-card-side-btn);
    max-height: var(--have-card-side-btn);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border-radius: 0 !important;
    box-sizing: border-box;
    flex: 0 0 var(--have-card-side-btn);
  }

  .have-product-card__actions-row .have-product-card__btn--plus {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 100%;
    min-height: 0;
    max-height: none;
    margin: 0;
    padding: 0 !important;
    border-width: 1px;
  }

  .have-product-card__btn--more {
    width: 100%;
    flex: 0 0 auto;
    box-sizing: border-box;
  }
}

/* Очень узкие экраны: «В корзину» и Kaspi по-прежнему в одной строке — чуть компактнее отступы и иконка */
@media (max-width: 400px) {
  .have-product-card {
    --have-card-side-btn: 2.25rem;
  }

  .have-product-card__actions-row {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.35rem;
  }

  .have-product-card__actions-row .have-product-card__btn--buy {
    font-size: 0.82em;
  }

  .have-product-card__actions-row .have-product-card__kaspi {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
  }

  .have-product-card__quick-kaspi,
  .have-product-card__actions-row .have-product-card__btn--plus {
    width: var(--have-card-side-btn);
    min-width: var(--have-card-side-btn);
    max-width: var(--have-card-side-btn);
    height: var(--have-card-side-btn);
    min-height: var(--have-card-side-btn);
    max-height: var(--have-card-side-btn);
    flex: 0 0 var(--have-card-side-btn);
  }

  .have-product-card__actions-row .have-product-card__cart-plus-form {
    width: var(--have-card-side-btn);
    min-width: var(--have-card-side-btn);
    max-width: var(--have-card-side-btn);
    height: var(--have-card-side-btn);
    min-height: var(--have-card-side-btn);
    max-height: var(--have-card-side-btn);
  }

  .have-product-card__actions-row .have-product-card__kaspi img {
    width: 1.4rem;
    height: 1.4rem;
  }
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
}

.pagination a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  border: 1px solid transparent;
}

.pagination a:hover {
  border-color: var(--line);
  background: #fff;
}

.pagination a[aria-current="page"] {
  background: var(--ink);
  color: #fff;
}

.pagination__pages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.pagination .ellipsis {
  padding: 0 0.35rem;
  opacity: 0.45;
}

.pagination__prev[aria-disabled="true"],
.pagination__next[aria-disabled="true"] {
  opacity: 0.35;
  pointer-events: none;
}

/* Footer */
.site-footer {
  background: var(--header);
  color: #b4bac4;
  padding: 3rem 0 0;
  margin-top: 2rem;
}

.site-footer a {
  color: #e8eaee;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8b929e;
  margin: 0 0 1rem;
  line-height: 1.35;
}

.site-footer__grid > div > p {
  margin: 0 0 1rem;
  line-height: var(--leading-body);
  letter-spacing: 0.01em;
}

.site-footer__grid > div > p:last-child {
  margin-bottom: 0;
}

.site-footer__grid > div > p strong {
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #d8dce3;
}

.footer-socials {
  margin: 0 0 1rem;
}

.footer-socials__label {
  display: block;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #d8dce3;
  margin-bottom: 0.5rem;
}

.footer-socials__icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.footer-socials__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.15s ease, transform 0.15s ease;
}

.footer-socials__link:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.footer-socials__link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 2px;
}

.footer-socials__img {
  display: block;
  width: 22px;
  height: 22px;
}

.site-footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
  line-height: var(--leading-snug);
}

.footer-links a {
  letter-spacing: 0.01em;
}

.footer-links--cols {
  columns: 2;
  column-gap: 1.5rem;
}

.site-footer__bottom {
  padding: 1.25rem 0;
  font-size: 0.85rem;
  opacity: 0.75;
}

.site-footer__bottom p {
  margin: 0;
}

body.page-product-preview-embed > .top-bar,
body.page-product-preview-embed > .site-header,
body.page-product-preview-embed > .site-footer {
  display: none !important;
}

body.page-product-preview-embed .page-category.page-product {
  padding-top: 0.5rem;
  padding-bottom: 0.4rem;
}

body.page-product-preview-embed {
  min-width: 1100px;
  /* Глобальный body { min-height: 100vh } тянет высоту под окно iframe → пустота под описанием и разный scrollHeight при обновлении */
  min-height: 0;
  overflow-x: hidden;
  overflow-y: visible;
}

body.page-product-preview-embed .product-page__gallery {
  margin-top: 0.5rem;
}

body.page-product-preview-embed .product-page__offer {
  margin-top: 0.5rem;
}

body.page-product-preview-embed .breadcrumbs {
  display: none !important;
}

body.page-product-preview-embed .catalog-back {
  display: none !important;
}

body.page-product-preview-embed .product-page--commerce .product-page__offer {
  position: static;
  top: auto;
}

/* 404 */
.narrow {
  max-width: 32rem;
}

.not-found {
  padding: 4rem 0 5rem;
  text-align: center;
}

.not-found h1 {
  font-family: var(--font-display);
  font-size: 4rem;
  margin: 0 0 0.5rem;
}

/* Mobile */
@media (max-width: 900px) {
  .layout-catalog {
    grid-template-columns: 1fr;
  }

  .catalog-sidebar {
    position: static;
  }

  .top-bar .search-form input {
    min-width: 120px;
  }
}

@media (max-width: 768px) {
  .catalog-sidebar {
    display: none;
  }

  .top-bar__inner {
    flex-wrap: nowrap;
    gap: 0.4rem;
    padding: 0.45rem 0;
  }

  .logo__mark--img {
    display: none;
  }

  .logo {
    min-width: 0;
    flex: 1 1 auto;
    gap: 0.45rem;
    font-size: clamp(0.88rem, 3.6vw, 1.05rem);
  }

  .logo__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(1.16rem, 4.9vw, 1.38rem);
  }

  .nav-toggle {
    display: flex;
    order: -1;
    margin-left: 0;
    margin-right: 0;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
  }

  .nav-toggle__icon {
    display: flex;
  }

  .nav-toggle--label {
    display: inline-flex;
    width: 2.25rem;
    min-width: 2.25rem;
    height: 2.25rem;
    min-height: 2.25rem;
    padding: 0;
    font-size: 0;
    line-height: 0;
    color: var(--ink);
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    z-index: 60;
    max-height: 0;
    overflow: hidden auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(236, 244, 252, 0.98);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(10, 12, 14, 0.14);
    transition: max-height 0.28s ease, opacity 0.22s ease, visibility 0.22s ease;
  }

  .site-nav.is-open {
    max-height: min(75vh, 26rem);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Вечером только выпадающая панель бургера — не десктопная строка nav */
  html.theme-evening .site-nav {
    background: rgba(26, 35, 48, 0.98);
    border-color: var(--line);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    padding: 0.65rem 0.85rem 0.85rem;
    gap: 0;
    background: transparent;
  }

  .site-nav__list > li > a {
    padding: 0.72rem 0.2rem;
    border-bottom: 1px solid var(--line);
  }

  .site-nav__list > li.site-nav__sep {
    display: none;
  }

  .site-nav__sep + li {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid var(--line);
  }

  /* В мобильном бургер-меню показываем только верхний уровень без выпадающих списков */
  .mega {
    display: none !important;
  }

  .header-tools {
    display: none;
  }

  .site-header__actions {
    order: 4;
    margin-left: auto;
  }

  .top-bar__left {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    gap: 0.25rem 0.35rem;
    overflow: hidden;
    white-space: nowrap;
  }

  .top-bar__socials {
    flex-shrink: 0;
    gap: 0.18rem;
  }

  .top-bar__social-link {
    width: 1.42rem;
    height: 1.42rem;
  }

  .top-bar__social-img {
    width: 12px;
    height: 12px;
  }

  /* Открыт поиск: убираем соцсети, номер и WhatsApp остаются читаемыми */
  .top-bar__inner--search-expanded .top-bar__socials {
    display: none;
  }

  .top-bar__inner--search-expanded .top-bar__left > a {
    overflow: visible;
    text-overflow: unset;
    flex: 0 0 auto;
    max-width: none;
  }

  .top-bar__label,
  .top-bar__left .dot {
    display: none;
  }

  .top-bar__left > a,
  .top-bar__left > span:not(.dot):not(.top-bar__label):not(.top-bar__divider) {
    font-size: 0.68rem;
  }

  .top-bar__search-wrap {
    margin-left: auto;
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-end;
    display: flex;
    align-items: center;
  }

  .top-bar .search-form {
    width: auto;
    max-width: min(46vw, 11rem);
    min-width: auto;
    flex: 0 0 auto;
  }

  .top-bar .search-form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem;
  }

  .top-bar .search-form input {
    min-width: 0;
    flex: 1;
  }

  .top-bar .search-form:not(.is-open) input {
    width: 0;
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
    border-width: 0;
    opacity: 0;
    pointer-events: none;
  }

  .top-bar .search-form.is-open input {
    width: min(52vw, 11rem);
    min-width: 0;
    font-size: 16px;
    border-width: 1px;
    opacity: 1;
    pointer-events: auto;
    padding-top: 0.32rem;
    padding-bottom: 0.32rem;
    padding-left: 0.42rem;
    padding-right: 0.42rem;
    letter-spacing: 0.01em;
  }

  /* Плейсхолдер меньше самого поля: больше текста помещается, 16px у input сохраняет iOS без зума */
  .top-bar .search-form.is-open input::placeholder {
    font-size: 12px;
    letter-spacing: 0.02em;
  }

  .top-bar__inner--search-expanded .top-bar .search-form.is-open input {
    width: min(62vw, 13.5rem);
  }

  .top-bar .search-form button {
    flex: 0 0 auto;
    width: 2.35rem;
    min-width: 2.35rem;
    height: 30px;
    border-radius: 999px;
  }

  .site-header__inner {
    flex-wrap: wrap;
    align-items: center;
    position: relative;
  }

  .top-bar__cart .header-cart__text {
    font-size: 0.72rem;
  }

  .top-bar__cart .header-cart__badge {
    min-width: 1.15rem;
    height: 1.15rem;
    font-size: 0.62rem;
  }
}

/* Telegram lead popup */
body.tg-lead-open {
  overflow: hidden;
}

.tg-lead-fab {
  position: fixed;
  right: clamp(0.8rem, 2.2vw, 1.35rem);
  bottom: clamp(0.8rem, 2.2vw, 1.35rem);
  z-index: 1100;
  border: 1px solid rgba(21, 86, 133, 0.2);
  border-radius: 999px;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-green));
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: 0 12px 30px rgba(21, 86, 133, 0.24);
}

.tg-lead-fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(21, 86, 133, 0.28);
}

.tg-lead-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.tg-lead-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.tg-lead-modal__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(14, 25, 34, 0.5);
  margin: 0;
  padding: 0;
}

.tg-lead-modal__card {
  position: relative;
  z-index: 1;
  width: min(100%, 22rem);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.tg-lead-modal__close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: rgba(21, 86, 133, 0.1);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
}

.tg-lead-modal__title {
  margin: 0 2rem 0.3rem 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.tg-lead-modal__lead {
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.tg-lead-form {
  display: grid;
  gap: 0.55rem;
}

.tg-lead-form input,
.tg-lead-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.62rem 0.72rem;
  color: var(--ink);
  font: inherit;
}

.tg-lead-form textarea {
  resize: vertical;
  min-height: 5.2rem;
}

.tg-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 11rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(21, 86, 133, 0.03);
  padding: 0.5rem;
}

.tg-chat-messages:empty {
  display: none;
}

.tg-chat-messages__item {
  max-width: 88%;
  border-radius: 10px;
  padding: 0.42rem 0.55rem;
  font-size: 0.84rem;
  line-height: 1.35;
  white-space: pre-wrap;
}

.tg-chat-messages__item--client {
  align-self: flex-end;
  background: rgba(122, 181, 57, 0.14);
}

.tg-chat-messages__item--manager {
  align-self: flex-start;
  background: rgba(21, 86, 133, 0.1);
}

.tg-chat-messages__item--assistant {
  align-self: flex-start;
  background: rgba(21, 86, 133, 0.06);
  border: 1px dashed rgba(21, 86, 133, 0.22);
}

.tg-chat-hint {
  margin: 0.1rem 0 0.15rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.tg-lead-form__country {
  margin: -0.2rem 0 0.1rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  min-height: 1rem;
}

.tg-lead-modal__card--chat-only .tg-lead-modal__lead {
  display: none;
}

.tg-lead-form__submit {
  width: 100%;
}

.tg-lead-form__status {
  min-height: 1.15rem;
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
}

.tg-lead-form__status.is-ok {
  color: #2f8a43;
}

.tg-lead-form__status.is-error {
  color: #be3434;
}

@media (max-width: 720px) {
  .tg-lead-fab {
    right: 0.7rem;
    bottom: 0.7rem;
    font-size: 0.75rem;
  }

  .tg-lead-modal {
    align-items: flex-end;
    justify-content: center;
    padding: 0.65rem;
  }

  .tg-lead-modal__card {
    width: min(100%, 29rem);
  }
}

/* Fullscreen photo lightbox (product cards + product gallery) */
body.photo-lightbox-open {
  overflow: hidden;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right))
    max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.38s ease,
    visibility 0.38s ease;
}

.photo-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.photo-lightbox__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(12, 14, 18, 0.88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  cursor: zoom-out;
}

.photo-lightbox__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
  width: min(100%, 96vw);
}

.photo-lightbox__figure {
  margin: 0;
  max-width: 100%;
  max-height: min(88dvh, 88vh);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-x pan-y;
}

.photo-lightbox__img {
  max-width: 100%;
  max-height: min(88dvh, 88vh);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  transform: scale(0.94);
  opacity: 0;
  transition:
    opacity 0.42s cubic-bezier(0.2, 0.85, 0.25, 1),
    transform 0.45s cubic-bezier(0.2, 0.85, 0.25, 1);
}

.photo-lightbox.is-open .photo-lightbox__img {
  transform: scale(1);
  opacity: 1;
}

.photo-lightbox__close {
  position: absolute;
  top: max(-2.5rem, -8vh);
  right: 0;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.photo-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.05);
}

.photo-lightbox__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.photo-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.75rem;
  height: 3.5rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.85rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.photo-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.photo-lightbox__nav:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.photo-lightbox__prev {
  left: max(-3.25rem, -12vw);
}

.photo-lightbox__next {
  right: max(-3.25rem, -12vw);
}

.photo-lightbox__counter {
  position: absolute;
  bottom: max(-2.25rem, -6vh);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.04em;
}

@media (max-width: 720px) {
  .photo-lightbox__prev {
    left: 0.25rem;
  }

  .photo-lightbox__next {
    right: 0.25rem;
  }

  .photo-lightbox__close {
    top: 0.25rem;
    right: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-lightbox,
  .photo-lightbox__img {
    transition-duration: 0.01ms;
  }
}

.product-card__link:not(:has(.product-card__media)) {
  justify-content: center;
  padding: 1.25rem 1rem;
  min-height: 6rem;
}

/* Корзина */
.page-cart {
  padding: clamp(1.5rem, 4vw, 2.5rem) 0 3rem;
  max-width: 56rem;
  margin: 0 auto;
}

.cart-page__title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin: 0 0 1.25rem;
}

.cart-page__empty {
  color: var(--ink-soft);
  margin: 0 0 1rem;
}

.cart-page__total {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 1.5rem 0 0;
  text-align: right;
}

.cart-page__footer-actions {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-items: stretch;
}

@media (min-width: 560px) {
  .cart-page__footer-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cart-page__footer-actions .btn {
  width: 100%;
  min-height: 2.85rem;
  box-sizing: border-box;
  padding-inline: 0.85rem;
  text-align: center;
}

.cart-page__clear-form {
  display: contents;
}

.cart-page__footer-actions .btn--clear-cart {
  color: #8a2c2c;
  border-color: rgba(138, 44, 44, 0.35);
}

.cart-page__footer-actions .btn--clear-cart:hover {
  background: rgba(138, 44, 44, 0.06);
  border-color: rgba(138, 44, 44, 0.5);
  color: #6f221f;
}

.cart-page__checkout-note {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  max-width: 36rem;
}

.js .cart-line-form__submit-fallback {
  display: none;
}

.cart-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.cart-table__head {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.cart-table__row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) minmax(5rem, 7rem) minmax(7rem, 9rem) minmax(5rem, 7rem) minmax(4rem, 5.5rem);
  gap: 0.5rem 0.75rem;
  align-items: center;
  padding: 0.65rem 1rem;
  font-size: 0.92rem;
}

.cart-table__row--head {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.cart-table__body .cart-table__row {
  border-top: 1px solid var(--line);
}

.cart-table__body .cart-table__row:first-child {
  border-top: 0;
}

.cart-table__thumb {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  background: var(--paper-dark);
}

.cart-table__thumb img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.cart-table__product-link {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.cart-table__product-link:hover {
  color: var(--ink);
  text-decoration: none;
}

.cart-table__sku {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 0.2rem;
}

.cart-table__body .cart-table__cell--price,
.cart-table__body .cart-table__cell--sum {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink);
}

.cart-table__cell--actions {
  display: flex;
  justify-content: flex-end;
}

.cart-line-form {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
}

.cart-line-form__remove-inline {
  white-space: nowrap;
  margin-left: 0.45rem;
}

.cart-line-form__qty-stepper--ghost {
  opacity: 0;
  pointer-events: none;
}

.cart-line-form__qty--ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-line-form__qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.cart-line-form__qty-btn {
  width: 1.9rem;
  height: 1.9rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  border-radius: 999px;
}

.cart-line-form__qty-btn > span {
  display: inline-block;
  min-width: 0.75rem;
  text-align: center;
  font-size: 1.18rem;
  line-height: 1;
}

.cart-line-form__qty-btn:hover {
  background: rgba(21, 86, 133, 0.1);
}

.cart-line-form__qty {
  width: 2rem;
  min-width: 2rem;
  max-width: 2rem;
  padding: 0.2rem 0.12rem;
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 0;
  text-align: center;
  background: transparent;
}

.cart-line-form__qty::-webkit-outer-spin-button,
.cart-line-form__qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-line-form__qty[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.cart-remove-form__btn {
  color: #8a2c2c;
  border-color: rgba(138, 44, 44, 0.35);
}

.cart-remove-form__btn:hover {
  color: #fff;
  background: #8a2c2c;
  border-color: #8a2c2c;
}

.favorites-table__actions {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 0.6rem;
  flex-wrap: nowrap;
  justify-content: flex-end;
  margin-left: auto;
  width: fit-content;
}

.favorites-table__status-col {
  min-width: 6.8rem;
}

.favorites-table__buttons-col {
  min-width: 6.8rem;
  display: flex;
  justify-content: flex-end;
}

.favorites-table__actions .cart-remove-form {
  margin: 0;
  display: inline-flex;
  justify-content: flex-end;
}

.favorites-table__actions .btn {
  width: auto;
  flex: 0 0 auto;
  white-space: nowrap;
}

.favorites-table__stock-note {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  color: #8a2c2c;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.favorites-table__price {
  text-align: left;
}

.favorites-table__stock-note--price {
  display: block;
  margin-bottom: 0.18rem;
}

.favorites-table__price-label {
  display: inline-block;
}

@media (min-width: 861px) {
  .favorites-table .cart-table__row {
    grid-template-columns: 80px minmax(0, 1fr) minmax(5rem, 7rem) minmax(5.3rem, 6.4rem) minmax(4rem, 5rem);
    gap: 0.5rem 0.5rem;
  }
}

@media (min-width: 861px) {
  .favorites-table__actions--out {
    width: 100%;
    justify-content: flex-end;
  }

  .favorites-table__actions--out .favorites-table__buttons-col--single {
    width: 6.8rem;
    min-width: 6.8rem;
  }
}

@media (max-width: 860px) {
  .favorites-table .cart-table__row:not(.cart-table__row--head) {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    grid-template-areas:
      "media title title"
      "media price price"
      "media qty actions";
    align-items: center;
  }

  .favorites-table .cart-table__cell--qty {
    justify-self: end;
    display: flex;
    justify-content: flex-end;
  }

  .favorites-table .cart-table__cell--actions {
    justify-self: end;
    margin-top: 0;
  }

  .cart-table__head {
    display: none;
  }

  .cart-table__row:not(.cart-table__row--head) {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas:
      "media title"
      "media price"
      "media qty"
      "media sum"
      "media actions";
    padding: 1rem;
  }

  .cart-table__cell--media {
    grid-area: media;
  }

  .cart-table__cell--title {
    grid-area: title;
  }

  .cart-table__cell--price {
    grid-area: price;
  }

  .cart-table__cell--qty {
    grid-area: qty;
  }

  .cart-table__cell--sum {
    grid-area: sum;
  }

  .cart-table__cell--actions {
    grid-area: actions;
  }

  .favorites-table .cart-table__cell--qty .cart-remove-form {
    display: inline-flex;
  }
}

/* Страница «Для дома» — тёплая подложка и спокойная типографика */
body.page-for-home {
  background-color: #faf7f2;
  background-image:
    linear-gradient(180deg, rgba(255, 252, 247, 0.95) 0%, transparent 50%),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 96px,
      rgba(194, 86, 31, 0.045) 96px,
      rgba(194, 86, 31, 0.045) 97px
    );
}

.for-home-wrap {
  min-height: 42vh;
}

.for-home-hero {
  padding: clamp(2rem, 6vw, 3.5rem) 0 clamp(1.5rem, 4vw, 2.25rem);
  border-bottom: 1px solid rgba(194, 86, 31, 0.12);
  background: linear-gradient(180deg, rgba(255, 248, 238, 0.65) 0%, transparent 100%);
}

.for-home-hero__inner {
  max-width: 40rem;
}

.for-home-hero__eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #b85a2a;
  margin: 0 0 0.65rem;
}

.for-home-hero__title {
  font-family: var(--font-category);
  font-size: 14px;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: none;
  margin: 0 0 1rem;
  color: var(--ink);
}

.for-home-hero__lead {
  margin: 0;
  font-family: var(--font-category);
  font-size: 14px;
  font-weight: 600;
  font-style: normal;
  line-height: 1.25;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--ink-soft);
  max-width: 36em;
}

.for-home-body {
  padding: clamp(1.5rem, 4vw, 2.5rem) 0 3.5rem;
}

.for-home-panel {
  max-width: 64rem;
  padding: clamp(1.15rem, 2.2vw, 1.85rem);
  background: #fff;
  border: 1px solid rgba(194, 86, 31, 0.14);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(21, 86, 133, 0.06);
}

.page-for-home .for-home-panel .product-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.page-for-home .for-home-panel .product-card__link:not(:has(.product-card__media)) {
  align-items: flex-start;
  justify-content: flex-start;
  min-height: 0;
  padding: 1rem 1.1rem;
}

.page-for-home .for-home-panel .product-card__title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .page-for-home .for-home-panel .product-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .for-home-hero {
    padding: 1.35rem 0 1.05rem;
  }
  .for-home-hero__title {
    font-size: 1.45rem;
  }
  .for-home-hero__lead {
    font-size: 0.96rem;
    line-height: 1.45;
  }
  .for-home-body {
    padding: 1rem 0 2.2rem;
  }
  .for-home-panel {
    padding: 0.85rem 0.9rem;
  }
  .page-for-home .for-home-panel .product-card__link:not(:has(.product-card__media)) {
    padding: 0.85rem 0.9rem;
  }
  .page-for-home .for-home-panel .product-card__title {
    font-size: 0.95rem;
  }
}

.for-home-panel__text {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.for-home-panel__back {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
}

.for-home-panel__back a {
  color: var(--accent);
  text-decoration: none;
}

.for-home-panel__back a:hover {
  text-decoration: underline;
}

html.theme-evening body.page-for-home {
  background-color: #1c2128;
  background-image:
    linear-gradient(180deg, rgba(32, 28, 26, 0.5) 0%, transparent 45%),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 96px,
      rgba(232, 180, 120, 0.04) 96px,
      rgba(232, 180, 120, 0.04) 97px
    );
}

html.theme-evening .for-home-hero {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(45, 38, 34, 0.35) 0%, transparent 100%);
}

html.theme-evening .for-home-hero__eyebrow {
  color: #e8a86c;
}

html.theme-evening .for-home-panel {
  background: var(--surface);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
}

/* Поиск по каталогу */
.page-search {
  padding: clamp(1.5rem, 4vw, 2.5rem) 0 3rem;
  max-width: 52rem;
  margin: 0 auto;
}

.search-page__head {
  margin-bottom: 1.5rem;
}

.search-page__title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin: 0 0 0.5rem;
}

.search-page__query {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.search-page__hint,
.search-page__empty {
  margin: 0;
  color: var(--ink-soft);
  max-width: 40rem;
}

.search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.search-result-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.search-result-card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(21, 86, 133, 0.14);
}

.search-result-card__link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: inherit;
}

.search-result-card__media {
  flex: 0 0 5rem;
  width: 5rem;
  height: 5rem;
  background: var(--paper-dark);
  border-radius: 8px;
  overflow: hidden;
}

.search-result-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.search-result-card__body {
  min-width: 0;
  flex: 1;
}

.search-result-card__title {
  font-family: var(--font-body);
  font-size: var(--card-text-size);
  font-weight: 600;
  margin: 0 0 0.25rem;
  line-height: 1.35;
  color: var(--ink);
}

.search-result-card__link:hover .search-result-card__title {
  color: var(--accent);
}

.search-result-card__id {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.search-result-card__price {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--card-text-size);
}

/* Локальное время: с 18:00 до 7:00 — тёмная тема (класс ставит скрипт в base.html + main.js). */
html.theme-evening {
  color-scheme: dark;
  --ink: #e4edf5;
  --ink-soft: #94a8b8;
  --paper: #0f141c;
  --paper-dark: #181f29;
  --line: rgba(140, 176, 210, 0.16);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --have-kz-line: rgba(140, 176, 210, 0.22);
  --surface: #1a2330;
  --surface-2: #232e3e;
}

html.theme-evening:has(body.page-catalog--bg-video) {
  background-color: transparent;
}

html.theme-evening body {
  background-color: var(--paper);
  background-image:
    linear-gradient(180deg, rgba(22, 32, 44, 0.92) 0%, transparent 42%),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 96px,
      rgba(122, 181, 57, 0.045) 96px,
      rgba(122, 181, 57, 0.045) 97px
    );
}

html.theme-evening .site-header {
  background: rgba(15, 22, 30, 0.92);
}

html.theme-evening .nav-toggle,
html.theme-evening .header-cart,
html.theme-evening .search-form,
html.theme-evening .lang-switch,
html.theme-evening .lang-switch__menu,
html.theme-evening .mega__grid,
html.theme-evening .category-card,
html.theme-evening .catalog-sidebar,
html.theme-evening .news-card,
html.theme-evening .product-card__link,
html.theme-evening .have-product-card,
html.theme-evening .kaspi-card,
html.theme-evening .kaspi-gallery__thumb,
html.theme-evening .product-offer-card,
html.theme-evening .product-trust-list li,
html.theme-evening .product-cart-form__qty,
html.theme-evening .product-side-info__item,
html.theme-evening .search-result-card,
html.theme-evening .cart-table {
  background: var(--surface);
}

html.theme-evening .have-product-card__btn--more,
html.theme-evening .have-product-card__kaspi {
  background: var(--surface);
}

html.theme-evening .header-cart,
html.theme-evening .header-cart__text {
  color: #9fd764;
}

html.theme-evening .header-cart {
  border-color: rgba(159, 215, 100, 0.45);
}

html.theme-evening .header-cart:hover {
  color: #b7ea81;
  border-color: rgba(183, 234, 129, 0.7);
}

html.theme-evening .header-favorites {
  color: #9fd764;
  border-color: rgba(159, 215, 100, 0.45);
  background: var(--surface);
}

html.theme-evening .header-favorites:hover {
  color: #b7ea81;
  border-color: rgba(183, 234, 129, 0.7);
}

html.theme-evening .header-favorites__badge {
  background: #7ab539;
  box-shadow: 0 0 0 2px rgba(122, 181, 57, 0.28), 0 0 14px rgba(122, 181, 57, 0.45);
}

html.theme-evening .favorite-toggle {
  background: transparent;
  color: #97aab8;
  border-color: transparent;
}

html.theme-evening .favorite-toggle.is-active {
  background: transparent;
  border-color: transparent;
  color: #8fd058;
}

html.theme-evening .product-cart-form__qty-stepper {
  background: var(--surface);
  border-color: transparent;
}

html.theme-evening .product-cart-form__qty-stepper .product-cart-form__qty {
  background: transparent;
  color: var(--ink);
  border-left-color: transparent;
  border-right-color: transparent;
}

html.theme-evening .product-cart-form__qty-btn {
  color: var(--ink);
}

html.theme-evening .product-cart-form__qty-btn:hover {
  background: var(--surface-2);
}

html.theme-evening .have-product-card__btn--plus {
  background: var(--surface);
  color: #c6e8aa;
  border-color: rgba(122, 181, 57, 0.45);
}

html.theme-evening .have-product-card__btn--plus:hover {
  background: var(--surface-2);
  border-color: rgba(122, 181, 57, 0.65);
}

html.theme-evening .have-product-card__btn--more:hover {
  background: var(--surface-2);
}

html.theme-evening .have-product-card__quick-link {
  color: #c6e8aa;
  background: var(--surface);
  border-color: rgba(122, 181, 57, 0.45);
}

html.theme-evening .have-product-card__quick-kaspi {
  background: var(--surface);
  border-color: rgba(122, 181, 57, 0.45);
}

html.theme-evening .search-form input {
  background: transparent;
  color: var(--ink);
}

html.theme-evening .search-form input::placeholder {
  color: var(--ink-soft);
  opacity: 0.85;
}

html.theme-evening .lang-switch__menu .lang-switch__link.is-active {
  background: rgba(122, 181, 57, 0.14);
  color: var(--ink);
}

html.theme-evening .category-card .category-card__media {
  background: linear-gradient(180deg, #1a222c 0%, #2a3545 100%);
}

html.theme-evening .placeholder-strip {
  background: rgba(26, 35, 48, 0.75);
}

html.theme-evening .section--muted {
  background: rgba(26, 35, 48, 0.55);
}

html.theme-evening .section--kaspi {
  background: linear-gradient(180deg, rgba(26, 35, 48, 0.65) 0%, rgba(18, 26, 36, 0.92) 100%);
}

html.theme-evening .kaspi-gallery__main {
  background: #141c26;
}

html.theme-evening .pagination a:hover {
  background: var(--surface);
}

html.theme-evening .cart-table__head {
  background: var(--paper-dark);
}

html.theme-evening .cart-line-form__qty-stepper {
  background: transparent;
  border-color: transparent;
}

html.theme-evening .cart-line-form__qty-btn {
  background: transparent;
  color: #e8eef5;
}

html.theme-evening .cart-line-form__qty-btn:hover {
  background: rgba(122, 181, 57, 0.2);
}

html.theme-evening .cart-line-form__qty {
  background: transparent;
  color: #e8eef5;
}

html.theme-evening .catalog-bg-video__scrim {
  background: linear-gradient(
    145deg,
    rgba(8, 12, 18, 0.94) 0%,
    rgba(6, 10, 16, 0.88) 42%,
    rgba(8, 12, 18, 0.93) 100%
  );
}

/* Мобильный подраздел: одно фото — flex; два фото — наложение (свайп .ecomotion-mobile-alt), без display:none у hover */
@media (max-width: 768px) {
  .page-subsection .have-product-card__thumb {
    display: block !important;
    padding: 0.7rem !important;
    overflow: hidden !important;
    background: #f7f8fa !important;
  }

  .page-subsection .have-product-card__thumb:not(.have-product-card__thumb--has-hover) .have-product-card__img {
    position: absolute !important;
    inset: 0.7rem !important;
    width: calc(100% - 1.4rem) !important;
    height: calc(100% - 1.4rem) !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  .page-subsection .have-product-card__thumb--has-hover {
    position: relative !important;
  }

  .page-subsection .have-product-card__thumb--has-hover .have-product-card__img,
  .page-subsection .have-product-card__thumb--has-hover .have-product-card__img--hover {
    position: absolute !important;
    inset: 0.7rem !important;
    width: calc(100% - 1.4rem) !important;
    height: calc(100% - 1.4rem) !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  .page-subsection .have-product-card__thumb--has-hover .have-product-card__img--primary {
    z-index: 1 !important;
  }

  /* Без !important у opacity: иначе блокируется .have-product-card:hover (десктоп с узким окном ≤768px) */
  .page-subsection .have-product-card__thumb--has-hover .have-product-card__img--hover {
    display: block !important;
    z-index: 2 !important;
    opacity: 0;
    transition: opacity 0s, transform 0s !important;
  }

  .page-subsection .have-product-card__thumb--has-hover.ecomotion-mobile-alt .have-product-card__img--hover {
    opacity: 1 !important;
  }

  .page-subsection .have-product-card__thumb--has-hover.ecomotion-mobile-alt .have-product-card__img--primary {
    opacity: 0 !important;
  }
}

/* Чуть темнее и менее «кричащее» видео под вечерним скримом */
html.theme-evening .catalog-bg-video__el {
  filter: saturate(0.78) brightness(0.86);
}

/* Шапка подраздела каталога: тот же тёмный каркас, что у карточек */
html.theme-evening .page-subsection .catalog-header.subsection-hero,
html.theme-evening .page-subsection .subsection-hero {
  background: linear-gradient(
    145deg,
    rgba(28, 38, 52, 0.98) 0%,
    rgba(22, 30, 42, 0.95) 48%,
    rgba(26, 35, 48, 0.98) 100%
  );
  border-color: var(--line);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 12px 40px rgba(0, 0, 0, 0.35);
}

html.theme-evening .page-subsection .subsection-hero__media {
  border-color: rgba(140, 176, 210, 0.12);
  background: linear-gradient(168deg, #1c2430 0%, #252f3e 55%, var(--surface) 100%);
}

/* Главная: hero с видео — тёмный слой поверх ролика (как у каталога) */
html.theme-evening .hero__media-scrim {
  background: linear-gradient(
    145deg,
    rgba(8, 12, 18, 0.94) 0%,
    rgba(6, 10, 16, 0.88) 42%,
    rgba(8, 12, 18, 0.93) 100%
  );
}

html.theme-evening .hero--video .hero__video-el {
  filter: saturate(0.78) brightness(0.86);
}

html.theme-evening .tg-lead-modal__card,
html.theme-evening .tg-lead-form input,
html.theme-evening .tg-lead-form textarea {
  background: var(--surface);
  border-color: rgba(140, 176, 210, 0.22);
  color: var(--ink);
}

html.theme-evening .tg-lead-modal__close {
  background: rgba(140, 176, 210, 0.16);
  color: var(--ink);
}

html.theme-evening .tg-lead-modal__lead {
  color: #9fb2c1;
}

html.theme-evening .tg-chat-messages {
  background: rgba(140, 176, 210, 0.08);
  border-color: rgba(140, 176, 210, 0.22);
}

html.theme-evening .tg-chat-messages__item--client {
  background: rgba(122, 181, 57, 0.26);
}

html.theme-evening .tg-chat-messages__item--manager {
  background: rgba(21, 86, 133, 0.32);
}

html.theme-evening .tg-chat-messages__item--assistant {
  background: rgba(140, 176, 210, 0.12);
  border-color: rgba(140, 176, 210, 0.35);
}

html.theme-evening .tg-chat-hint {
  color: #9fb2c1;
}

@media (prefers-reduced-motion: reduce) {
  html.theme-evening .hero--video {
    background: var(--paper);
  }

  html.theme-evening body.page-catalog--bg-video {
    background-color: var(--paper);
    background-image:
      linear-gradient(180deg, rgba(22, 32, 44, 0.9) 0%, transparent 42%),
      repeating-linear-gradient(
        -12deg,
        transparent,
        transparent 96px,
        rgba(122, 181, 57, 0.045) 96px,
        rgba(122, 181, 57, 0.045) 97px
      );
  }
}
