﻿/* TETU — простой магазин в духе diana37.ru */

/*
 * Базовая палитра — брендовая фуксия, но в более спокойном, «ягодном» тоне:
 * без неонового свечения, с читаемым белым текстом на кнопках.
 * Она же применяется, если JS не успел выставить data-theme, поэтому
 * страница не мигает чужим цветом. Остальные палитры — ниже, каждая
 * переопределяет только свои переменные.
 */
:root {
  --green: #a8126b;
  --green-dark: #7d0e4f;
  --green-soft: #fbeaf2;
  --green-banner: #f3d6e6;
  --header: #3d0a2e;
  --header-deep: #26061e;
  --showcase-start: #f7e6f0;
  --showcase-end: #fffafc;
  --background-pattern: none;
  --showcase-pattern: none;
  --pattern-size: 24px 24px;
  --text: #241a1f;
  --muted: #6f5c66;
  --line: #ece0e6;
  /* Фон почти нейтральный: розовый работает акцентом, а не заливкой всей страницы. */
  --bg: #faf6f8;
  --white: #fff;
  --red: #c0392b;
  --ok: #2e7d32;
  --max: 1280px;
  --font: Arial, Helvetica, sans-serif;
  /* Акцент кнопок и бейджей — глубокая малиновая фуксия, белый текст читается уверенно. */
  --accent: #c2185b;
  --accent-dark: #9c1245;
  --price: #b0154e;
}

html[data-theme="green"],
html[data-theme="green-pattern"] {
  --green: #18704f;
  --green-dark: #11533b;
  --green-soft: #e5f2e9;
  --green-banner: #c8e3c9;
  --header: #1b4b36;
  --header-deep: #102d20;
  --showcase-start: #e2f1e8;
  --showcase-end: #f7faf7;
  --bg: #f5f5f5;
  /* Прочие палитры используют свой основной цвет как акцент. */
  --accent: var(--green);
  --accent-dark: var(--green-dark);
  --price: #d32f2f;
}

html[data-theme="pink"],
html[data-theme="pink-pattern"] {
  --green: #ad3f6b;
  --green-dark: #7f294d;
  --green-soft: #fae8f0;
  --green-banner: #f4cfdd;
  --header: #6e2446;
  --header-deep: #45142a;
  --showcase-start: #f8e2eb;
  --showcase-end: #fff8fa;
  --bg: #faf5f7;
  --accent: var(--green);
  --accent-dark: var(--green-dark);
  --price: #d32f2f;
}

html[data-theme="red"],
html[data-theme="red-pattern"] {
  --green: #85254f;
  --green-dark: #611638;
  --green-soft: #f9e5ed;
  --green-banner: #efc7d7;
  --header: #571a3c;
  --header-deep: #371027;
  --showcase-start: #f5e1e9;
  --showcase-end: #fff8fa;
  --bg: #faf4f6;
  --accent: var(--green);
  --accent-dark: var(--green-dark);
  --price: #d32f2f;
}

html[data-theme="blue"],
html[data-theme="blue-pattern"] {
  --green: #086f9e;
  --green-dark: #055274;
  --green-soft: #e1f3f8;
  --green-banner: #c5e6ed;
  --header: #084862;
  --header-deep: #052d40;
  --showcase-start: #def1f6;
  --showcase-end: #f7fcfd;
  --bg: #f2f8fa;
  --accent: var(--green);
  --accent-dark: var(--green-dark);
  --price: #d32f2f;
}

html[data-theme="purple"],
html[data-theme="purple-pattern"] {
  --green: #7255b4;
  --green-dark: #523d88;
  --green-soft: #efe9fa;
  --green-banner: #dcd0f2;
  --header: #473277;
  --header-deep: #2d1f4f;
  --showcase-start: #eae4f8;
  --showcase-end: #fbfaff;
  --bg: #f7f5fb;
  --accent: var(--green);
  --accent-dark: var(--green-dark);
  --price: #d32f2f;
}

html[data-theme="orange"],
html[data-theme="orange-pattern"] {
  --green: #ba5537;
  --green-dark: #8b3726;
  --green-soft: #fbede5;
  --green-banner: #f3d3c4;
  --header: #773521;
  --header-deep: #4b2017;
  --showcase-start: #f9e6dc;
  --showcase-end: #fff9f6;
  --bg: #fbf6f3;
  --accent: var(--green);
  --accent-dark: var(--green-dark);
  --price: #d32f2f;
}

html[data-theme="brown"],
html[data-theme="brown-pattern"] {
  --green: #704431;
  --green-dark: #522c20;
  --green-soft: #f6ebe2;
  --green-banner: #e7cebc;
  --header: #4a2e24;
  --header-deep: #2e1b15;
  --showcase-start: #f2e5dc;
  --showcase-end: #fffaf7;
  --bg: #faf6f3;
  --accent: var(--green);
  --accent-dark: var(--green-dark);
  --price: #d32f2f;
}

/* Фуксия — основное оформление: глубокая малиновая, хедер — тёмная слива. */
html[data-theme="fuchsia"],
html[data-theme="fuchsia-pattern"] {
  --green: #a8126b;
  --green-dark: #7d0e4f;
  --green-soft: #fbeaf2;
  --green-banner: #f3d6e6;
  --header: #3d0a2e;
  --header-deep: #26061e;
  --showcase-start: #f7e6f0;
  --showcase-end: #fffafc;
  --bg: #faf6f8;
  --accent: #c2185b;
  --accent-dark: #9c1245;
  --price: #b0154e;
}

html[data-theme="gray"],
html[data-theme="gray-pattern"] {
  --green: #344a5c;
  --green-dark: #243744;
  --green-soft: #e7edf0;
  --green-banner: #cedce1;
  --header: #263b49;
  --header-deep: #172832;
  --showcase-start: #e2ebee;
  --showcase-end: #f8fbfc;
  --bg: #f3f7f8;
  --accent: var(--green);
  --accent-dark: var(--green-dark);
  --price: #d32f2f;
}

html[data-theme="green-pattern"] {
  --background-pattern: radial-gradient(rgba(24, 112, 79, 0.12) 1px, transparent 1.5px);
  --showcase-pattern: radial-gradient(rgba(24, 112, 79, 0.15) 1px, transparent 1.5px);
}

html[data-theme="pink-pattern"] {
  --background-pattern: repeating-linear-gradient(135deg, rgba(173, 63, 107, 0.09) 0 1px, transparent 1px 12px);
  --showcase-pattern: repeating-linear-gradient(135deg, rgba(173, 63, 107, 0.12) 0 1px, transparent 1px 12px);
  --pattern-size: auto;
}

html[data-theme="red-pattern"] {
  --background-pattern: linear-gradient(rgba(133, 37, 79, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(133, 37, 79, 0.08) 1px, transparent 1px);
  --showcase-pattern: linear-gradient(rgba(133, 37, 79, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(133, 37, 79, 0.1) 1px, transparent 1px);
  --pattern-size: 20px 20px;
}

html[data-theme="blue-pattern"] {
  --background-pattern: radial-gradient(ellipse at 50% 0, rgba(8, 111, 158, 0.11) 0 1px, transparent 2px);
  --showcase-pattern: radial-gradient(ellipse at 50% 0, rgba(8, 111, 158, 0.14) 0 1px, transparent 2px);
  --pattern-size: 22px 15px;
}

html[data-theme="purple-pattern"] {
  --background-pattern: repeating-linear-gradient(45deg, rgba(114, 85, 180, 0.09) 0 1px, transparent 1px 10px);
  --showcase-pattern: repeating-linear-gradient(45deg, rgba(114, 85, 180, 0.12) 0 1px, transparent 1px 10px);
  --pattern-size: auto;
}

html[data-theme="orange-pattern"] {
  --background-pattern: radial-gradient(rgba(186, 85, 55, 0.12) 1.2px, transparent 1.7px);
  --showcase-pattern: radial-gradient(rgba(186, 85, 55, 0.15) 1.2px, transparent 1.7px);
  --pattern-size: 18px 18px;
}

html[data-theme="brown-pattern"] {
  --background-pattern: repeating-linear-gradient(0deg, rgba(112, 68, 49, 0.08) 0 1px, transparent 1px 14px), repeating-linear-gradient(90deg, rgba(112, 68, 49, 0.05) 0 1px, transparent 1px 14px);
  --showcase-pattern: repeating-linear-gradient(0deg, rgba(112, 68, 49, 0.1) 0 1px, transparent 1px 14px), repeating-linear-gradient(90deg, rgba(112, 68, 49, 0.07) 0 1px, transparent 1px 14px);
  --pattern-size: 28px 28px;
}

html[data-theme="fuchsia-pattern"] {
  --background-pattern: radial-gradient(rgba(194, 24, 91, 0.13) 1.2px, transparent 1.7px);
  --showcase-pattern: radial-gradient(rgba(194, 24, 91, 0.16) 1.2px, transparent 1.7px);
  --pattern-size: 20px 20px;
}

html[data-theme="gray-pattern"] {
  --background-pattern: linear-gradient(135deg, rgba(52, 74, 92, 0.07) 25%, transparent 25%), linear-gradient(225deg, rgba(52, 74, 92, 0.07) 25%, transparent 25%);
  --showcase-pattern: linear-gradient(135deg, rgba(52, 74, 92, 0.1) 25%, transparent 25%), linear-gradient(225deg, rgba(52, 74, 92, 0.1) 25%, transparent 25%);
  --pattern-size: 16px 16px;
}

* {
  box-sizing: border-box;
}

/* display у .btn и прочих компонентов иначе перебивает атрибут hidden. */
[hidden] {
  display: none !important;
}

/* Заголовок для поиска и скринридеров: на главной его роль играет баннер. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--background-pattern);
  background-size: var(--pattern-size);
  line-height: 1.45;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(100% - 24px, var(--max));
  margin: 0 auto;
}

/* Верхняя полоса с вариантами оформления */
.theme-toolbar {
  background: var(--header-deep);
  color: #fff;
}

.theme-toolbar-inner {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.theme-toolbar-copy {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  white-space: nowrap;
}

.theme-header-picker {
  display: flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 5px;
  padding: 5px 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.theme-header-option {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 3px 7px 3px 4px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}

.theme-header-option:hover,
.theme-header-option:focus-visible,
.theme-header-option[aria-pressed="true"] {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.28);
}

.theme-header-swatch {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--swatch-start) 0 52%, var(--swatch-end) 52% 100%);
}

.theme-header-name {
  font-size: 11px;
  font-weight: 700;
}

/* Верхняя часть в логике оптового каталога. */
/* Top bar */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
  padding: 6px 0;
  font-size: 13px;
}

.topbar-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.topbar-links a {
  color: var(--muted);
  font-size: 13px;
}

.topbar-links a:hover,
.topbar-links a[aria-current="page"] {
  color: var(--green-dark);
}

.theme-trigger {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}

.theme-trigger:hover,
.theme-trigger[aria-expanded="true"] {
  border-color: var(--green);
  color: var(--green-dark);
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-name {
  font-size: 28px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.5px;
}

.logo-sub {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.city {
  color: var(--muted);
  font-size: 14px;
}

.phone {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

/*
 * Шапка держит собственный контекст наложения и лежит выше баннера-карусели,
 * иначе выпадающий «Каталог» уходил под промо-баннер на главной.
 */
header {
  position: relative;
  z-index: 80;
}

/* Main green bar */
.mainbar {
  background: var(--header);
  color: var(--white);
}

.mainbar-inner {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 68px;
  padding: 10px 0;
}

/* Логотип переехал в основную полосу — на тёмном фоне он светлый. */
.mainbar .logo-name {
  color: #fff;
  font-size: 24px;
}

.mainbar .logo-sub {
  color: rgba(255, 255, 255, 0.7);
}

.btn-catalog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-dark);
  color: #fff;
  border: 0;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}

.btn-catalog:hover {
  background: var(--green-dark);
}

.search-form {
  display: flex;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  min-width: 0;
}

.search-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 11px 14px;
  min-height: 42px;
}

.search-form button {
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 700;
}

.user-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-links a {
  color: #fff;
  font-size: 13px;
  text-align: center;
  min-width: 56px;
}

.user-links .count {
  display: inline-block;
  background: #fff;
  color: var(--green);
  border-radius: 10px;
  min-width: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 2px;
}

.menu-toggle {
  display: none;
  border: 0;
  background: var(--green);
  color: #fff;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 700;
}

/* Выпадающий каталог: категории с миниатюрами вместо отдельной полосы разделов. */
.catalog-menu {
  position: relative;
}

.catalog-menu.is-open .btn-catalog {
  background: var(--accent);
}

.catalog-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 60;
  width: min(680px, calc(100vw - 32px));
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  padding: 14px;
}

.catalog-dropdown-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
}

.catalog-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 6px;
  color: var(--text);
}

.catalog-dropdown-item:hover {
  background: var(--green-soft);
  color: var(--green-dark);
}

.catalog-dropdown-item img,
.catalog-dropdown-placeholder {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex: 0 0 auto;
  background: var(--green-soft);
}

.catalog-dropdown-item strong {
  display: block;
  font-size: 14px;
}

.catalog-dropdown-item small {
  color: var(--muted);
  font-size: 12px;
}

.catalog-dropdown-all {
  grid-column: 1 / -1;
  display: block;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--green-dark);
  font-weight: 700;
  font-size: 14px;
}

.drawer-categories {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--line);
  margin: 4px 0 4px 8px;
  padding-left: 10px;
}

/* Hero — большой слайдер как у diana37 / modellini */
.home-cats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.home-cats-bar-inner {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  padding: 10px 0;
  scrollbar-width: thin;
}

.home-cats-bar-inner a {
  flex: 0 0 auto;
  padding: 8px 14px;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 2px;
}

.home-cats-bar-inner a:hover {
  background: var(--green-soft);
}

/* Первый экран: каталог слева, витрина новинок справа. */
.home-showcase {
  background-color: var(--showcase-start);
  background-image: var(--showcase-pattern), linear-gradient(135deg, var(--showcase-start), var(--showcase-end) 62%);
  background-size: var(--pattern-size), auto;
  border-bottom: 1px solid var(--line);
}

.home-showcase-grid {
  padding: 12px 0 0;
}

.home-catalog-panel {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-top: 5px solid var(--green);
  background: #fff;
  box-shadow: 0 12px 28px rgba(38, 58, 46, 0.1);
}

.home-catalog-panel .catalog-focus-kicker,
.home-catalog-section .catalog-focus-kicker {
  margin-bottom: 7px;
  color: var(--green);
}

.home-catalog-panel h1 {
  margin: 0;
  color: #20382d;
  font-size: clamp(28px, 3.1vw, 42px);
  line-height: 1.04;
}

.home-catalog-panel > p:not(.catalog-focus-kicker) {
  margin: 13px 0 18px;
  color: var(--muted);
  font-size: 15px;
}

.home-catalog-menu {
  display: grid;
  margin-bottom: 18px;
  border-top: 1px solid var(--line);
}

.home-catalog-menu a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-height: 46px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
}

.home-catalog-menu a:hover {
  color: var(--green-dark);
}

.home-catalog-menu small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.home-catalog-menu b {
  color: var(--green);
  font-size: 18px;
}

.home-catalog-all {
  width: 100%;
  justify-content: center;
  margin-top: auto;
}

.home-hero-column {
  min-width: 0;
}

.home-hero-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 11px;
}

.home-hero-heading span,
.home-hero-heading strong {
  display: block;
}

.home-hero-heading span {
  margin-bottom: 2px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.9px;
}

.home-hero-heading h1 {
  margin: 0;
  color: #263c31;
  font-size: 20px;
}

.home-hero-heading a {
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}


/* Главный путь для оптового покупателя: каталог до промо-контента. */
.catalog-focus {
  background: linear-gradient(120deg, var(--green-dark), var(--green));
  color: #fff;
}

.catalog-focus-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
  align-items: center;
  gap: 28px;
  padding: 32px 0;
}

.catalog-focus-kicker {
  margin: 0 0 7px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
}

.catalog-focus h1 {
  max-width: 680px;
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(27px, 4vw, 44px);
  line-height: 1.08;
}

.catalog-focus > .catalog-focus-inner > div > p:not(.catalog-focus-kicker) {
  max-width: 670px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
}

.catalog-focus-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.catalog-focus .btn-primary {
  background: #fff;
  color: var(--green-dark);
}

.catalog-focus .btn-primary:hover {
  background: var(--green-soft);
}

.catalog-focus .catalog-focus-secondary {
  border-color: rgba(255, 255, 255, 0.82);
  background: transparent;
  color: #fff;
}

.catalog-focus .catalog-focus-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.catalog-focus-points {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.catalog-focus-points li {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
}

.catalog-focus-points strong,
.catalog-focus-points span {
  display: block;
}

.catalog-focus-points strong {
  font-size: 15px;
}

.catalog-focus-points span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

/*
 * Рекламный баннер главной. Картинку монтируют вручную раз в месяц и
 * загружают в админке, поэтому блок подстраивается под любую пропорцию:
 * ширина по контейнеру, высота — по самой картинке.
 */
.promo-banner {
  padding: 18px 0 4px;
}

.promo-frame {
  position: relative;
  width: min(100% - 24px, var(--max));
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
  background: var(--green-soft);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.1);
}

.promo-track {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
}

.promo-slide {
  aspect-ratio: 16 / 5;
  flex: 0 0 100%;
  width: 100%;
  display: block;
  line-height: 0;
}

.promo-slide img {
  width: 100%;
  height: 100%;
  /*
   * Страховка от непропорциональной картинки: даже если загрузят вертикальный
   * снимок, баннер не растянет главную на три экрана.
   */
  max-height: 520px;
  object-fit: contain;
  object-position: center;
  display: block;
}

.promo-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  color: var(--green-dark);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.promo-arrow:hover {
  background: #fff;
  color: var(--accent-dark);
}

.promo-prev {
  left: 12px;
}

.promo-next {
  right: 12px;
}

.promo-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.promo-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.promo-dots button.is-active {
  background: var(--accent);
  transform: scale(1.25);
}

/* Заглушка, пока баннер не загружен */
.promo-banner-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 42px 24px;
  text-align: center;
  background: linear-gradient(135deg, var(--showcase-start), var(--showcase-end));
  border: 1px dashed var(--accent);
  border-radius: 10px;
}

.promo-banner-empty strong {
  font-size: 20px;
}

.promo-banner-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* Legacy hero kept for safety if referenced elsewhere */
.hero {
  background: linear-gradient(180deg, var(--green-banner), #dcead8);
  border-bottom: 1px solid #c5d8c5;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
  padding: 28px 0;
  min-height: 280px;
}

.hero-text h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 40px);
  color: #1e3d55;
  line-height: 1.15;
}

.hero-text p {
  margin: 0 0 18px;
  color: #355;
  max-width: 36ch;
}

.hero-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-cats a {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #b7cdb7;
  padding: 8px 12px;
  font-size: 14px;
}

.hero-cats a:hover {
  background: #fff;
}

.hero-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hero-photos img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: #b9ccb9;
}

/* Sections */
.section {
  padding: 28px 0;
}

.section-title {
  margin: 0 0 16px;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.section-head .section-title {
  margin: 0;
}

.section-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.section-head a:not(.btn) {
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
}

/* Advantages */
.advantages {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 18px;
  display: grid;
  /* Три колонки в два ряда: в шести узких текст сжимался в лапшу. */
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 22px;
}

.advantage {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: start;
  gap: 12px;
  text-align: left;
  padding: 4px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.advantage strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
  font-size: 14px;
}

.advantage-icon {
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-dark);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
}

/* Category cards */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.cat-card {
  position: relative;
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.cat-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #f3eef0;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cat-card span {
  display: block;
  padding: 13px 12px;
  font-weight: 700;
  text-align: center;
}

.cat-card:hover {
  border-color: rgba(194, 24, 91, 0.35);
  box-shadow: 0 14px 30px rgba(61, 10, 46, 0.12);
  transform: translateY(-3px);
}

.cat-card:hover img {
  transform: scale(1.06);
}

.cat-card:hover span {
  color: var(--green);
}

/* Products */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* В каталоге сетка соседствует с фильтрами — три колонки читаются лучше четырёх. */
.catalog-layout .product-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.product-card:hover {
  border-color: rgba(194, 24, 91, 0.35);
  box-shadow: 0 14px 30px rgba(61, 10, 46, 0.12);
  transform: translateY(-3px);
}

.product-media {
  position: relative;
  background: #f3eef0;
  overflow: hidden;
}

.product-media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* Лёгкое затемнение снизу + плашка «Подробнее» появляются при наведении.
   Фото увеличивается внутри рамки (overflow:hidden), не вылезая за углы. */
.product-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(38, 6, 24, 0.42));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.product-media::after {
  content: "Подробнее →";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 9px 18px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--header);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow: 0 8px 22px rgba(38, 6, 24, 0.28);
  z-index: 2;
  pointer-events: none;
  white-space: nowrap;
}

.product-card:hover .product-media::before {
  opacity: 1;
}

.product-card:hover .product-media::after {
  opacity: 1;
}

.product-image-link {
  display: block;
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
}

.product-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  min-height: 40px;
}

.product-sku {
  color: var(--muted);
  font-size: 12px;
}

/* Цены — как в типичных каталогах: крупная сумма + «руб.» */
.price {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
  margin: 2px 0;
}

.price-old {
  color: #999;
  font-size: 13px;
  text-decoration: line-through;
  font-weight: 400;
}

.price-current {
  color: var(--price);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.2px;
}

.price-current .price-cur {
  font-size: 14px;
  font-weight: 600;
  margin-left: 2px;
}

.price-tiers {
  display: grid;
  gap: 4px;
}

.price-tier {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  font-size: 13px;
}

.price-tier span {
  color: var(--muted);
}

.price-tier strong {
  color: var(--price);
  font-size: 15px;
}

.admin-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.admin-preset {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  cursor: pointer;
}

.admin-preset.is-on {
  border-color: var(--accent);
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 700;
}

.price-row-inline {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.price-row-inline .price-old {
  order: 2;
  font-size: 15px;
}

.sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sizes span {
  border: 1px solid var(--line);
  font-size: 12px;
  padding: 4px 8px;
  color: var(--muted);
  background: #fff;
}

.size-picker {
  margin: 4px 0 2px;
}

.size-picker-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}

.size-chip {
  min-width: 40px;
  min-height: 34px;
  border: 1px solid #cfcfcf;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 8px;
  cursor: pointer;
  line-height: 1;
}

.size-chip:hover {
  border-color: var(--green);
  color: var(--green);
}

.size-chip.is-selected {
  border-color: var(--green);
  background: var(--accent);
  color: #fff;
}

.size-chip.is-pulse {
  animation: sizePulse 0.28s ease;
}

.stock {
  font-size: 12px;
  font-weight: 700;
}

.stock.in {
  color: var(--ok);
}

.stock.out {
  color: var(--red);
}

.product-actions {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  justify-items: center;
}

.product-more {
  font-size: 12px;
  color: var(--muted);
}

.product-more:hover {
  color: var(--green-dark);
}

.product-meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-outline {
  background: #fff;
  border-color: var(--green);
  color: var(--green);
}

.btn-outline:hover {
  background: var(--green-soft);
}

.btn-block {
  width: 100%;
}

.btn-light {
  background: #fff;
  color: var(--text);
  border-color: #ccc;
}

/* Широкая карусель новинок */
.new-carousel {
  position: relative;
}

.new-carousel-viewport {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 8px;
}

.new-carousel-viewport:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.new-carousel-track {
  display: flex;
  gap: 16px;
}

/*
 * Раньше карточка занимала 920px и в полосе умещалась одна модель, а соседние
 * торчали обрезками — блок повторял слайдер сверху. Теперь в ряд входит
 * несколько новинок, и подборка читается как подборка.
 */
.new-arrival-card {
  flex: 0 0 min(420px, calc(100% - 24px));
  width: min(420px, calc(100% - 24px));
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(140px, 45%) 1fr;
  overflow: hidden;
  scroll-snap-align: start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.new-arrival-image {
  min-height: 320px;
  background: #eee;
}

.new-arrival-image img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.new-arrival-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px;
}

.new-arrival-kicker {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.new-arrival-body h3 {
  margin: 8px 0 6px;
  font-size: 23px;
  line-height: 1.2;
}

.new-arrival-meta {
  min-height: 38px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.new-arrival-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin-top: auto;
}

.new-arrival-actions .btn {
  flex: 1 1 130px;
}

.new-carousel-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.carousel-control {
  width: 40px;
  height: 40px;
  border: 1px solid var(--green);
  background: var(--white);
  color: var(--green);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.carousel-control:hover:not(:disabled) {
  background: var(--green-soft);
}

.carousel-control:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.carousel-status {
  min-width: 86px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* Выбор одной из восьми палитр для согласования */
.theme-preview {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  align-items: center;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
}

.theme-preview .section-title {
  margin-bottom: 8px;
}

.theme-preview p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
}

.theme-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.theme-option {
  min-height: 82px;
  border: 2px solid transparent;
  background: #f7f7f7;
  padding: 8px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.theme-option:hover,
.theme-option[aria-pressed="true"] {
  border-color: var(--green);
}

.theme-option[aria-pressed="true"] {
  background: var(--green-soft);
}

.theme-swatch {
  display: block;
  width: 100%;
  height: 30px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--swatch-start) 0 52%, var(--swatch-end) 52% 100%);
}

.theme-option-name {
  display: block;
  font-size: 12px;
  font-weight: 700;
}

/* About */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 20px;
}

.about img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  background: #ddd;
}

.about h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.about p {
  margin: 0 0 10px;
  color: var(--muted);
}

/* Page title */
.page-title {
  padding: 20px 0 10px;
}

.page-title h1 {
  margin: 0 0 6px;
  font-size: 26px;
}

.page-title p,
.breadcrumbs {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs a:hover {
  color: var(--green);
}

/* Catalog */
/* Плитки разделов над каталогом */
.catalog-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.catalog-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.catalog-tile:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  color: var(--text);
}

.catalog-tile.is-active {
  border-color: var(--accent);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.catalog-tile img,
.catalog-tile-all {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 6px;
  object-fit: cover;
  background: var(--green-soft);
}

.catalog-tile-all {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--green-dark);
}

.catalog-tile-body strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.catalog-tile-body small {
  color: var(--muted);
  font-size: 12px;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 22px;
  padding-bottom: 32px;
  /* Сетка не должна тянуться до подвала, когда товаров мало. */
  align-items: start;
}

.filters {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  align-self: start;
  /* Фильтры остаются под рукой при прокрутке длинного каталога. */
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
}

.filters h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.filter-group {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.filter-group:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-group h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.filter-group label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  cursor: pointer;
}

/* Свёрнутые группы фильтров */
.filter-more > summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  list-style-position: inside;
}

.filter-more > summary:hover {
  color: var(--green-dark);
}

/* Размеры — компактными чипами вместо столбца чекбоксов */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chips label {
  margin: 0;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  font-size: 13px;
  color: var(--text);
}

.filter-chips label:hover {
  border-color: var(--accent);
}

.filter-chips input {
  margin: 0;
}

.filter-price {
  display: flex;
  gap: 8px;
}

.filter-price label {
  flex: 1;
  margin: 0;
  gap: 4px;
}

.filter-price input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
}

/* Кнопки прилипают к низу панели: не нужно доскроливать список фильтров */
.filter-actions {
  position: sticky;
  bottom: -16px;
  display: grid;
  gap: 8px;
  margin: 4px -16px -16px;
  padding: 12px 16px;
  background: var(--white);
  border-top: 1px solid var(--line);
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  color: var(--muted);
}

.toolbar [data-catalog-count] {
  color: var(--text);
  font-weight: 700;
}

.toolbar select {
  border: 1px solid var(--line);
  background: #fff;
  padding: 7px 10px;
}

.load-more {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.filter-group[hidden] {
  display: none;
}

.load-more[hidden] {
  display: none;
}

/* Product page */
.product-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 16px;
  margin-bottom: 32px;
}

.gallery-main {
  background: #eee;
}

.gallery-main img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.gallery-thumbs button {
  border: 2px solid transparent;
  padding: 0;
  background: #eee;
  cursor: pointer;
}

.gallery-thumbs button.active {
  border-color: var(--green);
}

.gallery-thumbs img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.product-info h1 {
  margin: 0 0 6px;
  font-size: 26px;
}

.product-info .sku {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.product-info .price {
  margin-bottom: 16px;
}

.product-info .price-tier {
  font-size: 14px;
}

.product-info .price-tier strong {
  font-size: 20px;
}

.product-info .price-current {
  font-size: 32px;
}

.product-info .price-current .price-cur {
  font-size: 18px;
}

.product-info .price-old {
  font-size: 16px;
}

.option {
  margin-bottom: 14px;
}

.option-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.option-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.option-list button {
  min-width: 46px;
  min-height: 42px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 14px;
}

.option-list button.active {
  border-color: var(--green);
  background: var(--accent);
  color: #fff;
}

.option-list button:disabled {
  opacity: 0.35;
  text-decoration: line-through;
  cursor: not-allowed;
  background: #f3f3f3;
}

.qty {
  display: inline-flex;
  border: 1px solid var(--line);
  margin-bottom: 14px;
}

.qty button {
  width: 38px;
  height: 38px;
  border: 0;
  background: #f3f3f3;
  cursor: pointer;
}

.qty input {
  width: 48px;
  border: 0;
  text-align: center;
  font-weight: 700;
}

.specs {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.specs table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.specs td {
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

.specs td:first-child {
  width: 140px;
  color: var(--muted);
}

/* Cart / checkout */
.cart-layout,
.checkout-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 16px;
  padding-bottom: 32px;
}

.cart-list {
  display: grid;
  gap: 10px;
}

.cart-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 12px;
}

.cart-item img {
  width: 90px;
  height: 110px;
  object-fit: cover;
  background: #eee;
}

.cart-item h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.cart-item .meta {
  color: var(--muted);
  font-size: 13px;
}

.cart-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  margin: 8px 0 10px;
}

.cart-specs div {
  display: grid;
  gap: 2px;
}

.cart-specs dt {
  color: var(--muted);
  font-size: 12px;
}

.cart-specs dd {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.cart-qty-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.cart-qty-label {
  font-size: 13px;
  font-weight: 700;
}

.cart-qty-row .qty {
  margin-bottom: 0;
}

.cart-line-label {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.checkout-items {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.checkout-item {
  display: grid;
  gap: 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.checkout-item strong {
  font-size: 14px;
}

.checkout-item span {
  color: var(--muted);
}

.cart-item .remove {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  margin-top: 8px;
  font-size: 13px;
}

.summary {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 16px;
  align-self: start;
}

.summary h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}

.summary-total {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 10px;
  font-weight: 700;
  font-size: 18px;
}

.summary-total [data-total],
.summary-total [data-subtotal] {
  color: #d32f2f;
  font-size: 20px;
}

.line-price .price-current {
  font-size: 18px;
  white-space: nowrap;
  animation: none;
}

/* Избранное на карточке */
.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #888;
  z-index: 3;
}

.fav-btn.is-on {
  color: #d32f2f;
}

.fav-btn:hover {
  background: #fff;
}

.product-info .fav-inline {
  margin-left: 8px;
  border: 1px solid var(--line);
  background: #fff;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 20px;
  color: #888;
}

.product-info .fav-inline.is-on {
  color: #d32f2f;
}

/* Контентные страницы */
.content-page {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 24px;
  margin-bottom: 32px;
}

.content-page h1 {
  margin: 0 0 16px;
  font-size: 28px;
}

.content-page h2 {
  margin: 24px 0 10px;
  font-size: 20px;
}

.content-page p,
.content-page li {
  color: #444;
  font-size: 15px;
}

.content-page ul {
  padding-left: 20px;
}

.content-page a:not(.btn) {
  color: var(--green);
}

.legal-note {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  margin-bottom: 32px;
}

.content-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 18px;
}

.content-card h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.content-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.contacts-map {
  background: #e8ece8;
  border: 1px solid var(--line);
  min-height: 260px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  padding: 20px;
}

.account-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.account-tabs button {
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

.account-tabs button.active {
  background: var(--accent);
  border-color: var(--green);
  color: #fff;
}

.account-panel[hidden] {
  display: none;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.step {
  background: var(--green-soft);
  padding: 14px;
  border: 1px solid #cfe3d6;
}

.step strong {
  display: block;
  margin-bottom: 6px;
}

@media (max-width: 900px) {
  .content-grid,
  .steps {
    grid-template-columns: 1fr;
  }
}

.form-box {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 16px;
}

.form-grid {
  display: grid;
  gap: 10px;
}

.form-grid.two {
  grid-template-columns: 1fr 1fr;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  padding: 10px;
  min-height: 40px;
  background: #fff;
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

.catalog-wholesale-action {
  margin: 12px 0 0 !important;
}

.home-catalog-section {
  background-color: var(--white);
  background-image: var(--background-pattern);
  background-size: var(--pattern-size);
  border-bottom: 1px solid var(--line);
}

.home-catalog-section .section-head {
  margin-bottom: 18px;
}

.home-catalog-section .catalog-focus-kicker {
  margin-bottom: 4px;
  color: var(--green);
}

.home-catalog-section .cat-card {
  box-shadow: 0 8px 22px rgba(61, 10, 46, 0.08);
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.home-catalog-section .cat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(194, 24, 91, 0.35);
  box-shadow: 0 14px 30px rgba(61, 10, 46, 0.14);
}

.home-catalog-section .cat-card img {
  height: 250px;
}

.field small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

/* Панель администратора */
.admin-page {
  padding-bottom: 32px;
}

.admin-notice {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  background: var(--white);
  color: var(--muted);
  font-size: 14px;
}

.admin-notice.is-success {
  border-left-color: var(--ok);
  background: #f2faf3;
  color: #236329;
}

.admin-notice.is-error {
  border-left-color: var(--red);
  background: #fff5f4;
  color: #9d2e25;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
}

.admin-tabs button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.admin-tabs button.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.admin-panel[hidden] {
  display: none;
}

.admin-card {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--white);
}

.admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-card h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.admin-card-head p,
.admin-stock-head span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.admin-form-grid .field {
  min-width: 0;
}

.admin-span-2 {
  grid-column: 1 / -1;
}

.admin-stock {
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.admin-stock-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.admin-stock-map {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.admin-stock-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.8fr) repeat(auto-fit, minmax(72px, 1fr));
  gap: 8px;
  align-items: end;
}

.admin-stock-row > strong {
  padding: 9px 0;
  overflow-wrap: anywhere;
}

.admin-stock-row label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-stock-row label span {
  font-size: 12px;
}

.admin-stock-row input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--white);
}

.admin-checkbox {
  margin: 0;
}

/* Быстрое добавление товара: выделенный блок с минимумом полей. */
.admin-quick {
  background: var(--green-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 14px;
}

.admin-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-quick select {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: var(--white);
  font: inherit;
}

.admin-new-category {
  background: var(--white);
  border-radius: 6px;
  padding: 10px;
}

.admin-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.admin-thumb {
  position: relative;
  width: 132px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.admin-thumb img {
  display: block;
  width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: 6px;
  background: #f4f1f4;
}

.admin-thumb-mark {
  display: block;
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--green-dark);
}

.admin-thumb-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.admin-more {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--white);
}

.admin-more > summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 700;
  color: var(--green-dark);
}

.admin-more[open] > summary {
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.admin-more > .admin-form-grid,
.admin-more > .admin-stock {
  margin-bottom: 14px;
}

/* QR-код на карточке товара: ссылка на маркетплейс для сканирования телефоном */
.product-qr {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  padding: 14px;
  background: var(--green-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-qr-code {
  line-height: 0;
  padding: 6px;
  background: #fff;
  border-radius: 6px;
}

.product-qr-text strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.product-qr-text p {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.product-qr-text a {
  font-size: 13px;
  font-weight: 700;
  color: var(--green-dark);
}

/* Список загруженных баннеров в админке */
.admin-banner-list {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.admin-banner-row {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-banner-row img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--green-soft);
}

.admin-banner-row select,
.admin-banner-row input {
  width: 100%;
  min-height: 38px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
}

.admin-banner-tools {
  display: grid;
  gap: 6px;
}

.admin-settings-form {
  display: grid;
  gap: 16px;
}

.admin-settings-form h3 {
  margin: 4px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 16px;
}

.admin-settings-form h3:first-child {
  padding-top: 0;
  border-top: 0;
}

.admin-settings-hint {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 14px;
}

.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-month-products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.admin-month-products label {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  cursor: pointer;
}

.admin-month-products small {
  grid-column: 2;
  color: var(--muted);
}

.admin-product-list {
  display: grid;
  gap: 10px;
}

.admin-product-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
}

.admin-product-row img,
.admin-product-placeholder {
  width: 64px;
  height: 76px;
  object-fit: cover;
  background: var(--green-soft);
}

.admin-product-row h3 {
  margin: 0 0 3px;
  font-size: 15px;
}

.admin-product-row p,
.admin-product-row small {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-empty {
  padding: 20px;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

.admin-empty h3,
.admin-empty p {
  margin: 0 0 6px;
}

.admin-orders-list {
  display: grid;
  gap: 10px;
}

.admin-messages-list {
  display: grid;
  gap: 10px;
}

.admin-order-card {
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--white);
}

.admin-message-card {
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--white);
}

.admin-order-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.admin-order-card h3 {
  margin: 9px 0 3px;
  font-size: 16px;
}

.admin-message-card h3 {
  margin: 9px 0 3px;
  font-size: 16px;
}

.admin-order-card p {
  margin: 4px 0;
  overflow-wrap: anywhere;
}

.admin-message-card p {
  margin: 4px 0;
  overflow-wrap: anywhere;
}

.admin-message-body {
  white-space: pre-wrap;
}

.admin-order-card ul {
  margin: 10px 0;
  padding-left: 18px;
}

.admin-order-total {
  color: var(--green-dark);
  font-weight: 700;
}

.form-hint {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.admin-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.checkout-status {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  background: var(--green-soft);
  font-size: 14px;
}

.checkout-status.is-error {
  border-left-color: var(--red);
  background: #fff5f4;
  color: #9d2e25;
}

.form-status {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  background: var(--green-soft);
  font-size: 14px;
}

.form-status.is-success {
  border-left-color: var(--green);
}

.form-status.is-error {
  border-left-color: var(--red);
  background: #fff5f4;
  color: #9d2e25;
}

.honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0;
}

.empty {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 40px 20px;
  text-align: center;
}

.empty h2 {
  margin: 0 0 8px;
}

.success-box {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 28px 20px;
  text-align: center;
}

/* Footer */
.footer {
  background: #2a2a2a;
  color: #ddd;
  padding: 32px 0 18px;
  margin-top: 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.footer .logo-name {
  color: #fff;
}

.footer p {
  color: #aaa;
  font-size: 14px;
  max-width: 280px;
}

.footer h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #fff;
  text-transform: uppercase;
}

.footer a {
  display: block;
  color: #bbb;
  font-size: 14px;
  margin-bottom: 6px;
}

.footer a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #444;
  padding-top: 12px;
  font-size: 12px;
  color: #888;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* Mobile drawer */
.drawer {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 50;
}

.drawer.open {
  display: block;
}

.drawer-panel {
  width: min(300px, 90%);
  height: 100%;
  background: #fff;
  padding: 16px;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
}

.drawer.open .drawer-panel {
  transform: translateX(0);
}

.drawer-panel a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(100px);
  background: #222;
  color: #fff;
  padding: 12px 16px;
  z-index: 100;
  font-size: 14px;
  transition: transform 0.25s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1100px) {
  .theme-toolbar-copy {
    display: none;
  }

  .theme-toolbar-inner {
    justify-content: center;
  }

  .advantages {
    grid-template-columns: repeat(3, 1fr);
  }

  .cat-grid,
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  /* Гамбургер и логотип в первой строке, поиск во второй, ссылки в третьей. */
  .mainbar-inner {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 10px;
  }

  .search-form {
    grid-column: 1 / -1;
    max-width: none;
  }

  .topbar-links {
    display: none;
  }

  /* Топбар на узком экране: город и телефон переносятся, ничего не обрезается. */
  .topbar-inner {
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .topbar-right {
    gap: 10px;
  }

  .user-links {
    grid-column: 1 / -1;
    justify-content: space-between;
    gap: 8px;
  }

  .user-links a {
    min-width: 0;
  }

  .hero-inner,
  .about,
  .catalog-focus-inner,
  .home-showcase-grid,
  .catalog-layout,
  .product-layout,
  .cart-layout,
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  /* Гамбургер ставим в первую колонку, логотип — во вторую. */
  .menu-toggle {
    display: inline-flex;
    grid-row: 1;
    grid-column: 1;
    align-self: center;
    width: 44px;
    justify-content: center;
  }

  .mainbar .logo {
    grid-row: 1;
    grid-column: 2;
  }

  /* На мобильных роль каталога берёт выдвижное меню. */
  .catalog-menu {
    display: none;
  }

  .phone {
    font-size: 15px;
  }

  /* Баннер на узком экране: стрелки и точки компактнее. */
  .promo-banner {
    padding: 12px 0 2px;
  }

  .promo-arrow {
    width: 34px;
    height: 34px;
    margin-top: -17px;
    font-size: 20px;
  }

  .promo-prev { left: 6px; }

  .promo-next { right: 6px; }

  .promo-banner-empty {
    padding: 28px 16px;
  }

  .promo-slide img {
    max-height: 320px;
  }

  .new-arrival-card {
    flex: 0 0 min(100%, 920px);
    width: min(100%, 920px);
    grid-template-columns: 1fr;
  }

  .home-catalog-section .cat-card img {
    height: 220px;
  }

  .new-arrival-image,
  .new-arrival-image img {
    min-height: 250px;
  }

  .theme-preview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .advantages,
  .cat-grid,
  .product-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-quick-grid {
    grid-template-columns: 1fr;
  }

  .admin-banner-row {
    grid-template-columns: 1fr;
  }

  .user-links a span.label {
    display: inline;
  }

  .mainbar .logo-name {
    font-size: 20px;
  }

  .product-actions {
    grid-template-columns: 1fr;
  }

  .form-grid.two {
    grid-template-columns: 1fr;
  }

  .admin-card {
    padding: 14px;
  }

  .admin-card-head,
  .admin-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-card-head .btn,
  .admin-form-actions .btn {
    width: 100%;
  }

  .admin-form-grid,
  .admin-month-products {
    grid-template-columns: 1fr;
  }

  .admin-span-2 {
    grid-column: auto;
  }

  .admin-stock-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-stock-row > strong {
    grid-column: 1 / -1;
    padding: 0;
  }

  .admin-product-row {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .admin-product-row img,
  .admin-product-placeholder {
    width: 54px;
    height: 66px;
  }

  .admin-product-row .btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .cart-item {
    grid-template-columns: 70px 1fr;
  }

  .cart-item .line-price {
    grid-column: 2;
  }

  .hero-photos {
    display: none;
  }

  .theme-toolbar-copy {
    display: none;
  }

  .theme-toolbar-inner {
    justify-content: center;
  }

  .theme-header-picker {
    gap: 5px;
    width: 100%;
  }

  .theme-header-option {
    width: auto;
    height: auto;
    min-height: 28px;
    padding: 3px 6px 3px 4px;
  }

  .theme-header-name {
    font-size: 10px;
  }

  .catalog-nav-inner a {
    min-height: 40px;
    padding: 0 12px;
    font-size: 13px;
  }

  .home-catalog-panel {
    padding: 20px;
  }

  .home-catalog-panel h1 {
    font-size: 32px;
  }

  .home-hero-heading {
    align-items: start;
  }

  .topbar-right .city {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .search-form button {
    padding: 0 10px;
  }

  .new-arrival-card {
    flex-basis: 100%;
  }

  .new-arrival-body {
    padding: 16px;
  }

  .theme-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ——— Анимации ——— */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .btn,
  .btn-catalog,
  .cat-card,
  .product-card,
  .user-links a,
  .hero-cats a,
  .option-list button,
  .size-chip,
  .fav-btn,
  .search-form button,
  .cart-item,
  .summary {
    transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease,
      transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
  }

  .mainbar {
    animation: barSlide 0.45s ease both;
  }

  .logo-name {
    transition: transform 0.25s ease, color 0.25s ease;
  }

  .logo:hover .logo-name {
    transform: scale(1.03);
  }

  .product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(61, 10, 46, 0.12);
  }

  .product-media img,
  .cat-card img,
  .about img,
  .gallery-main img {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
  }

  .product-card:hover .product-media img,
  .cat-card:hover img {
    transform: scale(1.06);
  }

  .hero {
    animation: fadeIn 0.5s ease both;
  }

  .hero-text h1,
  .hero-text p,
  .hero-cats {
    animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .hero-text p {
    animation-delay: 0.12s;
  }

  .hero-cats {
    animation-delay: 0.22s;
  }

  .hero-cats a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }

  .hero-photos img {
    animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .hero-photos img:nth-child(1) { animation-delay: 0.1s; }
  .hero-photos img:nth-child(2) { animation-delay: 0.18s; }
  .hero-photos img:nth-child(3) { animation-delay: 0.26s; }
  .hero-photos img:nth-child(4) { animation-delay: 0.34s; }

  .section-title {
    animation: fadeUp 0.55s ease both;
  }

  /* Карточки товаров и панель фильтров не прячем: каталог должен читаться сразу. */
  .advantage,
  .cat-card,
  .content-card,
  .form-box,
  .summary,
  .content-page,
  .cart-item,
  .step {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
      box-shadow 0.25s ease;
  }

  .advantage.is-visible,
  .cat-card.is-visible,
  .content-card.is-visible,
  .form-box.is-visible,
  .summary.is-visible,
  .content-page.is-visible,
  .cart-item.is-visible,
  .step.is-visible {
    opacity: 1;
    transform: none;
  }

  .btn:hover {
    transform: translateY(-1px);
  }

  .btn:active {
    transform: translateY(1px) scale(0.98);
  }

  .btn.is-added {
    animation: btnPop 0.55s ease;
  }

  .option-list button:hover:not(:disabled),
  .size-chip:hover {
    transform: translateY(-1px);
  }

  .option-list button.active,
  .size-chip.is-selected {
    box-shadow: 0 2px 0 rgba(47, 107, 79, 0.25);
  }

  .fav-btn:hover,
  .fav-inline:hover {
    transform: scale(1.12);
  }

  .fav-btn.is-on,
  .fav-inline.is-on {
    animation: heartBeat 0.4s ease;
  }

  .toast {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
  }

  .drawer-panel {
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .drawer.open .drawer-panel {
    transform: translateX(0);
  }

  .page-title h1 {
    animation: fadeUp 0.5s ease both;
  }

  .gallery-thumbs button:hover img {
    transform: scale(1.06);
  }

  .price-current {
    animation: priceIn 0.45s ease both;
  }

  .cart-item .price-current {
    animation: none;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes barSlide {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes sizePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes btnPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.05); background: #24553f; }
  100% { transform: scale(1); }
}

@keyframes heartBeat {
  0% { transform: scale(1); }
  40% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.filters-toggle {
  display: none;
  margin-bottom: 10px;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--green);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.order-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.order-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 14px;
}

.order-items {
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
}

.order-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 120;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-banner p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  max-width: 720px;
}

.cookie-banner a {
  color: var(--green);
  text-decoration: underline;
}

.scroll-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 110;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.scroll-top:hover {
  transform: translateY(-2px);
}

@media (max-width: 900px) {
  .filters-toggle {
    display: inline-flex;
  }

  .filters {
    display: none;
  }

  .filters.filters-open {
    display: block;
  }
}

@keyframes priceIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Проверка витрины: читаемые акценты и удобный каталог на узком экране. */
:root { --accent-ink: #fff; }
.btn-primary, .scroll-top, .product-badge, .search-form button, .size-chip.is-selected, .option-list button.active, .catalog-menu.is-open .btn-catalog {
  color: var(--accent-ink);
}
.btn, .size-chip, .swatch, .size-opt { border-radius: 6px; }
.btn { min-height: 44px; }
.product-card { border-radius: 10px; overflow: hidden; }
.product-body { gap: 10px; }
.product-name { line-height: 1.45; }
.card-color { display: grid; gap: 5px; font-size: 12px; color: var(--muted); margin: 8px 0; }
.card-color select { width: 100%; min-width: 0; min-height: 40px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: #fff; }
.product-meta { overflow-wrap: anywhere; }
.size-chip { min-width: 34px; min-height: 34px; }
.empty-state { text-align: center; padding: 64px 20px; }
.empty-state p { color: var(--muted); margin: 16px 0 24px; }
.catalog-notice { padding: 14px 18px; margin: 16px 0; border: 1px solid #c98a24; border-radius: 8px; background: #fff8e8; color: #674500; }
.cart-problem { color: #9e2820; font-size: 13px; margin: 8px 0; }
:focus-visible { outline: 3px solid var(--header); outline-offset: 3px; }
.topbar :focus-visible, .mainbar :focus-visible { outline-color: #fff; }
.advantage, .cat-card, .content-card, .form-box, .summary, .content-page, .cart-item, .step { opacity: 1; transform: none; }
body.menu-open { overflow: hidden; }
.promo-pause { position: absolute; right: 12px; bottom: 10px; z-index: 4; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.5); color: var(--green-dark); font-size: 12px; line-height: 1; cursor: pointer; opacity: 0.55; transition: opacity 0.2s ease, background 0.2s ease; }
.promo-pause:hover, .promo-pause:focus-visible { opacity: 1; background: rgba(255, 255, 255, 0.92); }
@media (max-width: 900px) {
  .catalog-layout .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .user-links a { min-height: 40px; }
  .promo-slide img { max-height: none; }
}
@media (max-width: 640px) {
  .catalog-layout .product-grid, .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-body { padding: 12px 10px; }
  .product-name { font-size: 14px; }
  .product-meta { font-size: 12px; }
  .card-color select, input[type="search"], .form-grid input, .form-grid textarea { font-size: 16px; }
  .product-actions .btn { padding: 9px 6px; font-size: 13px; }
  .new-arrival-card { border-radius: 10px; }
  .theme-choice { min-height: 44px; }
  .promo-dots { bottom: 7px; }
  .promo-pause { right: 6px; bottom: 6px; width: 26px; height: 26px; font-size: 11px; }
}
@media (max-width: 360px) {
  .catalog-layout .product-grid, .product-grid { grid-template-columns: minmax(0, 1fr); }
}

