:root {
  --paper: #f7f5f0;
  --surface: #ffffff;
  --ink: #202421;
  --muted: #667068;
  --line: #d9ddd7;
  --accent: #126b57;
  --accent-dark: #0b4b3d;
  --highlight: #e9b949;
  --danger: #a43d35;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(rgba(18, 107, 87, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(18, 107, 87, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
  line-height: 1.55;
}

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

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

header,
main {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

header {
  padding: 28px 0 22px;
  border-bottom: 1px solid var(--line);
}

header h1,
main > h1,
article > h1 {
  margin: 0 0 18px;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

header h1 {
  font-size: clamp(32px, 5vw, 56px);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

nav a {
  font-weight: 700;
  text-decoration: none;
}

.category-menu {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.category-menu-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  min-width: 0;
  min-height: 68px;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 5px 16px rgba(32, 36, 33, 0.05);
}

.category-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  overflow: hidden;
  border-radius: 5px;
  background: #eef2ed;
}

.category-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.category-menu-label {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

main {
  padding: 36px 0 72px;
}

section + section {
  margin-top: 48px;
}

h2 {
  margin: 0 0 18px;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0;
}

section:first-child > a {
  display: inline-block;
  margin: 0 8px 10px 0;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  text-decoration: none;
}

section:last-child {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

section:last-child > h2 {
  grid-column: 1 / -1;
}

section article {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(32, 36, 33, 0.06);
}

section article h3 {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.35;
}

section article p {
  margin: 0;
  color: var(--muted);
}

main > article {
  max-width: 900px;
  padding: clamp(20px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

main > article img {
  width: min(100%, 520px);
  height: auto;
  margin: 20px 14px 20px 0;
  border-radius: 6px;
  object-fit: contain;
  vertical-align: top;
}

.product-stock {
  display: flex;
  width: fit-content;
  min-height: 38px;
  align-items: center;
  margin: 12px 0;
  padding: 8px 12px;
  border-left: 4px solid var(--highlight);
  background: #f4f7f3;
  font-weight: 700;
}

.product-replacement {
  margin: 28px 0;
  padding: 18px;
  border: 1px solid var(--highlight);
  background: #fffaf0;
}

ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

li a {
  display: block;
  min-height: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  text-decoration: none;
}

@media (max-width: 640px) {
  header,
  main {
    width: min(100% - 20px, 1180px);
  }

  header {
    padding-top: 20px;
  }

  main {
    padding-top: 24px;
  }

  section:last-child,
  ul {
    grid-template-columns: 1fr;
  }

  .category-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-menu-item {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .category-icon {
    width: 44px;
    height: 44px;
  }
}

/* Storefront layout */
:root {
  --paper: #ffffff;
  --surface: #ffffff;
  --ink: #171717;
  --muted: #737373;
  --line: #e8e8e8;
  --accent: #fec207;
  --accent-dark: #171717;
  --highlight: #fec207;
  --soft: #f6f6f7;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

body {
  background: var(--paper);
  background-image: none;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
}

.site-shell {
  width: min(1280px, calc(100% - 40px));
  margin-inline: auto;
}

.site-topbar {
  min-height: 34px;
  display: flex;
  align-items: center;
  background: #171717;
  color: #ffffff;
  font-size: 13px;
}

.site-topbar .site-shell,
.topbar-contacts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.site-topbar a {
  color: #ffffff;
  text-decoration: none;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  width: 100%;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.header-main {
  display: grid;
  grid-template-columns: auto auto minmax(240px, 1fr) auto;
  min-height: 88px;
  align-items: center;
  gap: 18px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
}

.site-brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.catalog-button,
.site-search button,
.buy-button,
.product-card-button {
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #171717;
  font-weight: 800;
  text-decoration: none;
}

.catalog-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
}

.site-search {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  border: 2px solid var(--accent);
  border-radius: 14px;
  background: #ffffff;
}

.site-search input {
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
}

.site-search button {
  margin: 4px;
  padding: 0 18px;
  cursor: pointer;
}

.search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-results a {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.search-results a:last-child {
  border-bottom: 0;
}

.search-results small {
  display: block;
  color: var(--muted);
}

.header-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
}

.header-actions a {
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
}

.home-main,
.listing-page,
.product-page {
  width: min(1280px, calc(100% - 40px));
  padding: 42px 0 80px;
}

.catalog-section,
.brands-section,
.products-section {
  display: block;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 28px;
}

.section-heading > p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.section-heading h1,
.section-heading h2,
.listing-heading h1 {
  margin: 4px 0 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-weight: 800;
  letter-spacing: 0;
}

/* Название товара в карточке /product/: нежирное и мельче — длинные названия
   с брендом и фасовкой не должны перекрывать цену и кнопку. */
.product-summary h1 {
  margin: 4px 0 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-weight: 400;
  letter-spacing: 0;
}

.section-heading h1 {
  font-size: clamp(34px, 5vw, 60px);
}

.section-heading h2,
.listing-heading h1 {
  font-size: clamp(30px, 4vw, 46px);
}

.section-heading.compact {
  align-items: center;
}

.eyebrow {
  color: #9a7500;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.category-menu {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.category-menu-item {
  position: relative;
  display: block;
  min-height: 230px;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: var(--soft);
  box-shadow: none;
  color: var(--ink);
  text-decoration: none;
}

.category-icon {
  display: block;
  width: 100%;
  height: 178px;
  overflow: hidden;
  border-radius: 0;
  background: #f1f1f1;
}

.category-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.category-menu-item:hover .category-icon img {
  transform: scale(1.035);
}

.category-menu-label {
  display: block;
  padding: 14px 16px 18px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.brands-section,
.products-section {
  margin-top: 64px;
}

.brand-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.brand-cloud a {
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.brand-cloud a:hover {
  border-color: var(--accent);
  background: #fff9df;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(175px, 1fr));
  gap: 22px;
}

.product-card,
section .product-card {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: none;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

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

.product-card-image {
  display: grid;
  aspect-ratio: 1 / 1;
  place-items: center;
  overflow: hidden;
  padding: 14px;
  background: #f8f8f8;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  transition: transform 220ms ease;
}

.product-card:hover .product-card-image img {
  transform: scale(1.03);
}

.product-card-body {
  display: flex;
  min-height: 190px;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.product-card-brand {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.product-card h3,
section .product-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.product-card h3 a {
  color: var(--ink);
  /* Ссылка в названии — не жирная (вес задаём на <a>, а не на h3). */
  font-weight: 400;
  text-decoration: none;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
}

.product-card-button {
  padding: 9px 12px;
  font-size: 13px;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--muted);
}

.listing-heading {
  margin-bottom: 28px;
}

.listing-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.product-detail,
main > article.product-detail {
  display: grid;
  max-width: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  gap: 54px;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.product-gallery {
  display: grid;
  align-content: start;
  gap: 12px;
}

.product-gallery-main {
  display: grid;
  aspect-ratio: 1 / 1;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: var(--soft);
}

.product-gallery-main.is-navigable {
  position: relative;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.product-gallery-main.is-navigable::before,
.product-gallery-main.is-navigable::after {
  position: absolute;
  z-index: 1;
  top: 50%;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .82);
  color: #303030;
  font-size: 22px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 160ms ease-out;
}

.product-gallery-main.is-navigable::before {
  left: 14px;
  content: "‹";
}

.product-gallery-main.is-navigable::after {
  right: 14px;
  content: "›";
}

.product-gallery-main.is-navigable:hover::before,
.product-gallery-main.is-navigable:hover::after,
.product-gallery-main.is-navigable:focus-visible::before,
.product-gallery-main.is-navigable:focus-visible::after {
  opacity: 1;
}

.product-gallery-main img,
main > article.product-detail .product-gallery-main img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  object-fit: contain;
  transition: opacity 140ms ease-out, transform 220ms ease-out;
  -webkit-user-drag: none;
  user-drag: none;
}

.product-gallery-main img.is-switching {
  opacity: .25;
  transform: scale(.985);
}

.product-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.product-gallery-thumb {
  display: grid;
  aspect-ratio: 1 / 1;
  place-items: center;
  overflow: hidden;
  padding: 6px;
  border: 2px solid transparent;
  border-radius: 13px;
  background: var(--soft);
  cursor: pointer;
}

.product-gallery-thumb:hover {
  border-color: #d8b53d;
  background: #fffbed;
  transform: translateY(-1px);
}

.product-gallery-thumb.is-active {
  border-color: var(--accent);
  background: #fff9dd;
}

.product-gallery-thumb img,
main > article.product-detail .product-gallery-thumb img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  border-radius: 8px;
  object-fit: contain;
  -webkit-user-drag: none;
  user-drag: none;
}

.product-summary {
  align-self: start;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.product-summary h1 {
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.3;
}

.product-sku {
  color: var(--muted);
}

.product-price {
  margin: 24px 0 8px;
  font-size: 26px;
  font-weight: 900;
}

.product-stock {
  border: 0;
  border-radius: 10px;
  background: #f3f7ef;
}

/* Текст в карточке товара сдвинут на 22px — на столько подпись кнопки
   отступает от её края (кнопка: padding 0 22px, текст по центру).
   Так подпись «В корзину» и строки текста встают на одну вертикаль. */
.product-summary > .product-card-brand,
.product-summary > h1,
.product-summary > .product-sku,
.product-summary > .product-price,
.product-summary > .product-stock {
  padding-left: 22px;
}

.buy-button {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding: 0 22px;
}

.product-description,
.product-replacement {
  grid-column: 1 / -1;
  margin-top: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}

.product-description img {
  max-width: 100%;
  height: auto;
}

.product-description ul,
.product-description ol {
  display: block;
  margin: 1em 0;
  padding-left: 24px;
}

.product-description ul {
  list-style: disc;
}

.product-description li {
  margin: 5px 0;
}

.product-description li a {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  text-decoration: underline;
}

/* Перекрывает общее правило section:last-child (display:grid) — блок на всю ширину */
section.related-products {
  display: block;
  width: 100%;
  margin-top: 70px;
}

/* «Похожие товары» — горизонтальная лента на всю ширину (карточки в один ряд) */
section.related-products .product-grid {
  display: flex;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: auto;
  gap: 22px;
  touch-action: pan-x pan-y;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}

section.related-products .product-grid.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

section.related-products .product-grid::-webkit-scrollbar {
  display: none;
}

section.related-products .product-grid .product-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
}

/* Точки-пагинация (как у слайдера) */
.related-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.related-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d5d5d5;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.related-dot.is-active {
  background: var(--accent);
  transform: scale(1.35);
}

.site-footer {
  padding: 54px 0;
  background: #171717;
  color: #ffffff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 50px;
}

.footer-grid > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-grid p {
  margin: 0;
  color: #bdbdbd;
}

.footer-grid a {
  color: #ffffff;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .header-main {
    grid-template-columns: auto auto 1fr;
  }

  .header-actions {
    display: none;
  }

  .category-menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(175px, 1fr));
  }
}

@media (max-width: 700px) {
  .site-shell,
  .home-main,
  .listing-page,
  .product-page {
    width: min(100% - 24px, 1280px);
  }

  .site-topbar {
    display: none;
  }

  .header-main {
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 10px 0;
  }

  .site-brand span {
    display: none;
  }

  .site-brand img {
    width: 46px;
    height: 46px;
  }

  .catalog-button {
    min-height: 44px;
  }

  .header-subline {
    padding: 0 10px 12px;
  }

  .header-contacts {
    margin-right: 0;
  }

  .site-header .menu-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    color: #333333;
    cursor: pointer;
  }

  .header-subline .header-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 2px;
  }

  .header-subline.is-open .header-links {
    display: flex;
  }

  .header-subline .header-links a {
    width: 100%;
    padding: 9px 0;
    white-space: normal;
  }

  .site-search {
    grid-column: 1 / -1;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 12px;
  }

  .category-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .category-menu-item {
    min-height: 184px;
    border-radius: 16px;
  }

  .category-icon {
    width: 100%;
    height: 132px;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(175px, 1fr));
    gap: 12px;
  }

  .product-card-body {
    min-height: 180px;
    padding: 12px;
  }

  .product-card-footer {
    display: block;
  }

  section.related-products .product-grid .product-card {
    flex-basis: 210px;
  }

  .storefront-products .product-grid {
    grid-auto-columns: 210px;
  }

  .product-card-button {
    display: block;
    margin-top: 10px;
    text-align: center;
  }

  .product-detail,
  main > article.product-detail {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .product-summary {
    padding: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* Measured Business.Catalog desktop composition */
@media (min-width: 701px) {
  .site-shell,
  .home-main,
  .listing-page,
  .product-page {
    width: min(1260px, calc(100% - 32px));
    max-width: 1260px;
  }
}

.site-header {
  position: relative;
  min-height: 120px;
  border-bottom: 0;
  background: #ffffff;
  backdrop-filter: none;
}

.header-main {
  display: grid;
  grid-template-columns: 84px 138px minmax(0, 1fr) auto;
  min-height: 72px;
  gap: 0;
  padding-top: 12px;
}

.site-brand {
  width: 58px;
  height: 58px;
}

.site-brand img {
  width: 58px;
  height: 58px;
}

.catalog-button {
  width: 121px;
  min-height: 50px;
  justify-content: center;
  padding: 0 12px;
  border-radius: 15px;
  font-size: 16px;
}

.site-search {
  height: 50px;
  border-radius: 15px;
}

.site-search input {
  height: 46px;
}

.cart-link {
  position: relative;
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-left: 12px;
  padding: 0 14px;
  border-radius: 15px;
  background: #f2f2f2;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.cart-link:hover {
  background: #fff9dd;
  color: var(--ink);
}

.cart-link .cart-icon {
  flex-shrink: 0;
}

.cart-link.has-items,
.cart-link.has-items:hover {
  background: #3b8f43;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(59, 143, 67, .2);
}

.cart-link.has-items .cart-count {
  background: #ffffff;
  color: #307839;
}

.cart-count {
  display: inline-grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #171717;
  font-size: 11px;
  line-height: 1;
}

.cart-count[hidden] {
  display: none;
}

.header-subline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  row-gap: 6px;
  margin-top: 10px;
  padding: 0 10px;
  color: #626b75;
  font-size: 13px;
}

.header-contacts,
.header-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 24px;
  row-gap: 6px;
}

.header-contacts {
  margin-right: 28px;
}

.header-links {
  column-gap: 24px;
}

.header-subline a {
  color: #626b75;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
}

.header-contacts a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.contact-icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #fff4c2;
  color: #7a5d00;
  font-size: 11px;
  line-height: 1;
}

.header-links a {
  position: relative;
  padding: 4px 0;
}

.header-links a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transform: scaleX(.45);
  transition: opacity 150ms ease, transform 150ms ease;
}

.header-links a:hover {
  color: var(--ink);
}

.header-links a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.menu-burger {
  display: none;
}

.info-page {
  padding-top: 38px;
  padding-bottom: 80px;
}

.info-content {
  width: min(860px, 100%);
  /* Карточка уже контейнера (860 из 1280) — без этого она прилипала к левому краю. */
  margin-inline: auto;
  padding: 40px 48px 52px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .06);
}

.info-content h1 {
  margin: 0 0 30px;
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.12;
}

.info-content h2 {
  margin: 34px 0 14px;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 24px;
  font-weight: 800;
}

.info-content p {
  margin: 0 0 16px;
  color: #3f454b;
  font-size: 17px;
  line-height: 1.7;
}

.info-content ul,
.info-content ol {
  display: block;
  margin: 16px 0 24px;
  padding-left: 24px;
}

.info-content ul {
  list-style: disc;
}

.info-content li {
  margin: 8px 0;
  padding-left: 4px;
  font-size: 17px;
  line-height: 1.55;
}

.info-content li a {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #665000;
  text-decoration: underline;
}

.info-content blockquote {
  margin: 28px 0;
  padding: 20px 24px;
  border-left: 5px solid var(--accent);
  border-radius: 0 14px 14px 0;
  background: #fff9dd;
  color: #3b3522;
  font-size: 17px;
  line-height: 1.6;
}

.info-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 28px 0;
  border-radius: 18px;
}

.info-content code {
  padding: 2px 6px;
  border-radius: 5px;
  background: #f2f2f2;
}

.info-content hr {
  margin: 36px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.cart-page {
  padding-top: 38px;
  padding-bottom: 80px;
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.cart-panel,
.checkout-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
}

.cart-panel {
  min-height: 360px;
  padding: 28px;
}

.cart-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 24px;
}

.cart-heading h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.15;
}

.cart-clear,
.cart-item-remove {
  border: 0;
  background: transparent;
  color: #8a6800;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cart-empty {
  padding: 68px 20px;
  text-align: center;
}

.cart-empty[hidden],
.cart-items[hidden],
.cart-clear[hidden] {
  display: none;
}

.cart-empty h2 {
  margin-bottom: 8px;
}

.cart-empty p {
  margin: 0 0 24px;
  color: var(--muted);
}

.cart-empty .catalog-button {
  width: fit-content;
  margin-inline: auto;
}

.cart-items {
  display: grid;
  gap: 10px;
  container-type: inline-size;
}

.cart-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  grid-template-areas:
    "image details"
    "image controls";
  align-items: start;
  gap: 12px 20px;
  padding: 20px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  min-width: 250px;
}

.cart-item-image { grid-area: image; }
.cart-item-details { grid-area: details; }
.cart-item-controls { grid-area: controls; max-width: 100%; }

.cart-item-image {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: var(--soft);
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-item-details h2 {
  margin: 0 0 10px;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.cart-item-details h2 a {
  color: var(--ink);
  text-decoration: none;
}

.cart-item-price {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.cart-item-subtotal {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.cart-item-controls {
  display: grid;
  grid-template-columns: 36px 52px 36px;
  align-items: center;
  gap: 4px;
}

.cart-item-controls button:not(.cart-item-remove),
.cart-item-controls input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  text-align: center;
}

.cart-item-controls button:not(.cart-item-remove) {
  cursor: pointer;
  font-size: 20px;
}

.cart-item-controls button:not(.cart-item-remove):hover {
  border-color: var(--accent);
  background: #fff9dd;
}

.cart-item-controls input {
  padding: 0;
  appearance: textfield;
  -moz-appearance: textfield;
  text-align: center;
  text-align-last: center;
}

.cart-item-controls input::-webkit-inner-spin-button,
.cart-item-controls input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.cart-item-remove {
  grid-column: 1 / -1;
  margin-top: 5px;
  font-size: 13px;
}

.checkout-panel {
  padding: 28px;
  box-shadow: var(--shadow);
}

.checkout-panel h2 {
  margin: 0 0 22px;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 26px;
  font-weight: 800;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  color: var(--muted);
}

.cart-summary-row.total {
  margin-top: 4px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 21px;
}

/* Подпись «Бесплатно от N ₽» мелким шрифтом под словом «Доставка» */
.cart-delivery-label-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cart-delivery-free-note {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.3;
  color: #9aa0a6;
}

.checkout-form {
  display: grid;
  gap: 13px;
  margin-top: 12px;
}

.checkout-form label {
  display: grid;
  gap: 6px;
  color: #50565c;
  font-size: 13px;
  font-weight: 700;
}

.checkout-form input,
.checkout-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.checkout-form input {
  height: 44px;
  padding: 0 12px;
}

.checkout-form textarea {
  min-height: 84px;
  padding: 10px 12px;
  resize: vertical;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
  border-color: #d9a600;
  box-shadow: 0 0 0 3px rgba(254, 194, 7, .14);
  outline: 0;
}

/* Чекбоксы мессенджеров в форме заказа */
.checkout-messengers {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.checkout-messengers legend {
  font-weight: 600;
  margin-bottom: 2px;
  padding: 0;
}
.checkout-messengers .chk {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}
.checkout-messengers .chk input {
  width: auto;
  margin: 0;
}

/* Доставка: выбор способа и города (поисковый селектор) */
.cart-delivery-choose {
  display: grid;
  gap: 11px;
  margin-top: 2px;
}

.cart-delivery-label {
  display: grid;
  gap: 6px;
  color: #50565c;
  font-size: 13px;
  font-weight: 700;
}

.cart-delivery-label select,
.city-combo-input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.cart-delivery-label select {
  padding: 0 10px;
}

.city-combo {
  display: block;
}

.city-combo-input {
  padding: 0 12px;
}

.city-combo-input:focus {
  border-color: #d9a600;
  box-shadow: 0 0 0 3px rgba(254, 194, 7, .14);
  outline: 0;
}

.cart-delivery-note {
  margin: 2px 0 0;
  font-size: 12px;
  color: #7a8188;
  line-height: 1.45;
}

/* ПВЗ (Ozon): город и пункт выдачи на странице — read-only, открывают попап */
.cart-delivery-pick {
  display: grid;
  gap: 8px;
}

.dlv-pick-title {
  font-size: 12px;
  font-weight: 700;
  color: #7a8188;
}

.dlv-pick-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #ffffff;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.dlv-pick-row:hover {
  border-color: #d9a600;
  background: #fffdf2;
}

.dlv-pick-key {
  color: #7a8188;
  font-size: 12px;
  font-weight: 700;
}

.dlv-pick-value {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dlv-pick-arrow {
  color: #50565c;
  font-size: 12px;
}

/* Попап ПВЗ: шаг города (редактируемое поле + подсказки) */
.pvz-city {
  display: grid;
  gap: 8px;
  position: relative;
}

.pvz-city-label {
  color: #50565c;
  font-size: 13px;
  font-weight: 700;
}

.pvz-city-input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.pvz-city-input:focus {
  border-color: #d9a600;
  box-shadow: 0 0 0 3px rgba(254, 194, 7, .14);
  outline: 0;
}

.pvz-city-hint {
  margin: 0;
  font-size: 12px;
  color: #7a8188;
}

.pvz-city-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 5px;
  z-index: 30;
  overflow: auto;
  max-height: 220px; /* ~5 строк, прокрутка дальше */
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
}

.pvz-city-suggest[hidden] {
  display: none;
}

.pvz-city-suggest-item {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}

.pvz-city-suggest-item:hover {
  background: #fdf6e0;
}

.pvz-body {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.pvz-body[hidden] {
  display: none;
}

.pvz-city-chosen {
  font-size: 13px;
  color: #50565c;
}

/* Выбор пункта выдачи (поиск + список, как фильтр брендов) */
.cart-delivery-pvz {
  display: grid;
  gap: 8px;
}

.pvz-head {
  font-size: 13px;
  font-weight: 700;
  color: #50565c;
}

.pvz-search {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.pvz-search-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.pvz-search-input:focus {
  border-color: #d9a600;
  box-shadow: 0 0 0 3px rgba(254, 194, 7, .14);
  outline: 0;
}

.pvz-map-btn {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.pvz-map-btn:hover {
  border-color: #d9a600;
  color: #8a6d00;
}

.pvz-options {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #ffffff;
}

.pvz-option {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  line-height: 1.35;
}

.pvz-option:last-child {
  border-bottom: 0;
}

.pvz-option:hover {
  background: #fdf6e0;
}

.pvz-option.is-selected {
  background: #fef7e0;
  font-weight: 700;
  box-shadow: inset 3px 0 0 #d9a600;
}

.pvz-empty {
  font-size: 12px;
  color: #7a8188;
  padding: 6px 2px;
}

/* Встроенная карта выбора ПВЗ */
.pvz-map {
  height: 240px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.pvz-map-holder {
  position: relative;
}

/* Кнопка «Выбрать этот пункт» — поверх карты, нижний правый угол */
.pvz-map-confirm {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 5;
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  background: #d9a600;
  color: #3a2e00;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}

.pvz-map-confirm:hover {
  background: #f0b700;
}

.pvz-map-confirm[hidden] {
  display: none;
}

.pvz-map .leaflet-container {
  font: inherit;
}

.pvz-map .pvz-map-marker {
  cursor: pointer;
}

/* Модальный попап выбора ПВЗ на карте */
body.no-scroll {
  overflow: hidden;
}.pvz-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .45);
}

.pvz-modal[hidden] {
  display: none;
}

.pvz-modal-card {
  width: min(780px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}

.pvz-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.pvz-modal-title {
  font-weight: 700;
  font-size: 15px;
}

.pvz-modal-close {
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: #50565c;
  padding: 0 2px;
}

.pvz-modal-scroll {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 18px 18px;
  overflow: auto;
}

.pvz-modal-scroll .pvz-search-input {
  width: 100%;
}

.pvz-modal-scroll .pvz-map {
  height: 320px;
  flex: 0 0 auto;
}

.pvz-options-map {
  max-height: 180px;
}

@media (max-width: 560px) {
  .pvz-modal {
    padding: 0;
    align-items: flex-end;
  }

  .pvz-modal-card {
    width: 100%;
    max-height: 94vh;
    border-radius: 18px 18px 0 0;
  }

  .pvz-modal-scroll .pvz-map {
    height: 40vh;
  }
}

.checkout-button {
  min-height: 50px;
  margin-top: 6px;
  padding: 0 22px 0 0;
  border: 0;
  border-radius: 13px;
  background: var(--accent);
  color: #171717;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.checkout-button:hover:not(:disabled) {
  background: #ffd13d;
  box-shadow: 0 7px 18px rgba(184, 138, 0, .2);
  transform: translateY(-1px);
}

.checkout-button:disabled,
.add-to-cart:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.checkout-status {
  min-height: 22px;
  color: #665000;
  font-size: 13px;
  line-height: 1.45;
}

.add-to-cart {
  min-width: 104px;
  min-height: 36px;
  cursor: pointer;
  font: inherit;
}

.add-to-cart.is-stock-loading,
.add-to-cart.is-stock-loading:disabled {
  border-color: #d8d8d8;
  background: #dedede;
  box-shadow: none;
  opacity: 1;
}

.add-to-cart.is-in-cart,
.add-to-cart.is-in-cart:hover {
  border-color: #3b8f43;
  background: #3b8f43;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(59, 143, 67, .2);
}

.add-to-cart.is-in-cart:active {
  background: #307839;
  box-shadow: 0 2px 7px rgba(59, 143, 67, .18);
}

.home-main {
  padding-top: 16px;
}

/* --- Авторизация: кнопка в шапке + модалка --- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  min-height: 50px;
  padding: 0;
  border: 0;
  border-radius: 15px;
  background: #f2f2f2;
  color: var(--ink);
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.auth-button svg {
  display: block;
}

.auth-button:hover {
  background: #fff9dd;
  color: var(--ink);
}

.auth-button.is-authed {
  background: #dcf3e5;
  color: #1e7d45;
}

.auth-button.is-authed:hover {
  background: #c9ecd8;
  color: #176a3a;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
}

.auth-modal-panel {
  position: relative;
  width: min(420px, 100%);
  padding: 28px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}

.auth-modal-panel h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #888888;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.auth-modal-close:hover {
  background: #f2f2f2;
}

.auth-field {
  display: block;
  margin-bottom: 14px;
  color: #555555;
  font-size: 13px;
}

.auth-field input {
  width: 100%;
  height: 44px;
  margin-top: 6px;
  padding: 0 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  font: inherit;
}

.auth-field input:focus-visible {
  border-color: var(--accent);
  outline: 0;
}

.auth-submit {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 10px;
  background: #2bb673;
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.auth-submit:hover {
  filter: brightness(.96);
}

.auth-back {
  display: block;
  margin: 12px auto 0;
  border: 0;
  background: transparent;
  color: #666666;
  cursor: pointer;
  font: inherit;
}

.auth-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
  color: #555555;
  font-size: 12.5px;
  line-height: 1.35;
}

.auth-consent input {
  margin-top: 2px;
}

.auth-account-line {
  margin: 0 0 4px;
  color: #555555;
  font-size: 13.5px;
  text-align: center;
}

.auth-account-phone {
  margin: 0 0 18px;
  color: #171717;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

.auth-call-btn {
  display: block;
  width: 100%;
  margin-bottom: 4px;
  padding: 14px 12px;
  border: 0;
  border-radius: 12px;
  background: #2bb673;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
}

.auth-call-btn:active {
  filter: brightness(.94);
}

.auth-call-btn-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  opacity: .9;
}

.auth-call-btn-num {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .4px;
}

.auth-note {
  margin: 12px 0 0;
  color: #888888;
  font-size: 12.5px;
}

.auth-status {
  min-height: 20px;
  margin: 12px 0 0;
  color: #666666;
  font-size: 13px;
}

.catalog-title {
  margin: 0 0 16px;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 30px;
  font-weight: 800;
  line-height: 42px;
}

.category-menu {
  display: grid;
  grid-template-columns: repeat(5, 252px);
  grid-auto-rows: 289px;
  gap: 0;
}

.category-menu-item {
  display: flex;
  width: 252px;
  height: 289px;
  min-height: 289px;
  flex-direction: column;
  align-items: center;
  padding: 0;
  border-radius: 24px;
  background: #ffffff;
}

.category-icon {
  width: 204px;
  height: 204px;
  flex: 0 0 204px;
  margin: 24px 24px 0;
  border-radius: 8px;
}

.category-menu-label {
  display: flex;
  width: 220px;
  min-height: 21px;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 21px;
  text-align: center;
}

.storefront-products {
  margin-top: 24px;
}

.storefront-products .section-heading {
  margin-bottom: 24px;
}

.storefront-products .section-heading h2 {
  margin: 0;
  font-size: 30px;
  line-height: 42px;
}

.storefront-products .product-grid {
  display: grid;
  grid-auto-columns: 280px;
  grid-auto-flow: column;
  grid-template-columns: none;
  gap: 22px;
  padding: 2px 2px 16px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-x pan-y;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}

.storefront-products .product-grid::-webkit-scrollbar {
  display: none;
}

.storefront-products .product-grid.is-dragging {
  scroll-behavior: auto;
  scroll-snap-type: none;
  cursor: grabbing;
}

.storefront-products .product-card {
  scroll-snap-align: start;
}

.storefront-products .product-card a,
.storefront-products .product-card img {
  -webkit-user-drag: none;
  user-drag: none;
}

.brands-section {
  margin-top: 48px;
}

@media (max-width: 700px) {
  .site-header {
    min-height: auto;
  }

  .header-main {
    grid-template-areas:
      "brand catalog spacer cart"
      "search search search search";
    grid-template-columns: 50px 112px minmax(0, 1fr) 48px;
    row-gap: 12px;
    column-gap: 10px;
    padding: 10px 0 14px;
  }

  .site-brand {
    grid-area: brand;
  }

  .catalog-button {
    grid-area: catalog;
  }

  .site-search {
    grid-area: search;
    width: 100%;
    margin-top: 2px;
  }

  .cart-link {
    grid-area: cart;
  }

  .cart-link {
    width: 44px;
    min-height: 44px;
    margin-left: 4px;
    padding: 0;
  }

  .cart-link > .cart-label {
    display: none;
  }

  .cart-count {
    position: absolute;
    top: 0;
    right: 0;
  }

  .header-subline,
  .site-search button {
    display: none;
  }

  .info-content {
    padding: 26px 20px 34px;
    border-radius: 18px;
  }

  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-panel,
  .checkout-panel {
    padding: 20px;
    border-radius: 18px;
  }

  .checkout-panel {
    position: static;
  }

  .cart-item {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
  }

  .cart-item-image {
    width: 82px;
    height: 82px;
  }

  .cart-item-controls {
    grid-column: 2;
    justify-self: start;
  }

  .cart-item-subtotal {
    grid-column: 2;
    text-align: left;
  }

  .product-summary h1 {
    font-size: clamp(16px, 4vw, 22px);
    line-height: 1.25;
  }

  .category-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 12px;
  }

  .category-menu-item {
    width: 100%;
    height: auto;
    min-height: 0;
  }

  .category-icon {
    width: calc(100% - 24px);
    height: auto;
    aspect-ratio: 1 / 1;
    flex-basis: auto;
    margin: 12px 12px 0;
  }

  .category-menu-label {
    width: calc(100% - 24px);
    min-height: 42px;
    margin: 8px 12px 12px;
  }
}

/* Interaction motion */
a,
button,
[role="button"],
label,
summary,
.category-menu-item,
.product-card-button,
.buy-button,
.catalog-button,
.cart-link,
.header-links,
.header-contacts {
  user-select: none;
  -webkit-user-select: none;
}

input,
textarea,
.info-content,
.product-description {
  user-select: text;
  -webkit-user-select: text;
}

a,
button,
input,
.catalog-button,
.buy-button,
.product-card-button,
.category-menu-item,
.brand-cloud a,
.contact-icon,
.product-summary {
  transition-duration: 180ms;
  transition-property: color, background-color, border-color, box-shadow, opacity, transform;
  transition-timing-function: ease-out;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(254, 194, 7, .48);
  outline-offset: 3px;
}

.site-brand:hover {
  opacity: .82;
  transform: translateY(-1px);
}

.catalog-button:hover,
.buy-button:hover,
.product-card-button:hover,
.site-search button:hover {
  background: #ffd13d;
  color: #171717;
  box-shadow: 0 7px 18px rgba(184, 138, 0, .22);
  transform: translateY(-1px);
}

.catalog-button:active,
.buy-button:active,
.product-card-button:active,
.site-search button:active {
  box-shadow: 0 2px 7px rgba(184, 138, 0, .18);
  transform: translateY(1px);
}

.site-search:focus-within {
  border-color: #e3ad00;
  box-shadow: 0 0 0 4px rgba(254, 194, 7, .16);
}

.site-search input:focus-visible {
  outline: 0;
}

.header-contacts a:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.header-contacts a:hover .contact-icon {
  background: var(--accent);
  color: #171717;
  transform: scale(1.08);
}

.category-menu-item:hover {
  color: var(--ink);
  background: #fffdf5;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
  transform: translateY(-2px);
}

.category-menu-item:active {
  box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
  transform: translateY(0);
}

.category-menu-item:hover .category-menu-label {
  color: #7a5d00;
}

.product-card h3 a:hover,
.breadcrumbs a:hover,
.info-content a:hover {
  color: #8a6800;
}

.brand-cloud a:hover {
  box-shadow: 0 5px 14px rgba(0, 0, 0, .07);
  transform: translateY(-1px);
}

.brand-cloud a:active {
  box-shadow: none;
  transform: translateY(0);
}

.footer-grid a {
  opacity: .8;
}

.footer-grid a:hover {
  color: var(--accent);
  opacity: 1;
  transform: translateX(3px);
}

.product-gallery img {
  transition: box-shadow 220ms ease-out, transform 220ms ease-out;
}

.product-gallery img:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, .1);
  transform: scale(1.012);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
}

/* Sticky header and scroll-to-top */
.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease-out, box-shadow 180ms ease-out;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.scroll-to-top {
  position: fixed;
  z-index: 90;
  right: 24px;
  bottom: 24px;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #171717;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
  cursor: pointer;
  font-size: 24px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease-out, transform 180ms ease-out, background-color 180ms ease-out, box-shadow 180ms ease-out;
}

.scroll-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: #ffd13d;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .22);
  transform: translateY(-2px);
}

@media (max-width: 700px) {
  .scroll-to-top {
    right: 14px;
    bottom: 14px;
    width: 44px;
    height: 44px;
  }
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

.site-header,
.site-shell,
main,
section,
.listing-page,
.product-page,
.home-main {
  min-width: 0;
  max-width: 100%;
}

@media (orientation: portrait) {
  .product-card h3,
  section .product-card h3 {
    font-size: 13.6px;
  }
}

.site-search {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.search-brand-chip {
  grid-column: 1;
  display: inline-flex;
  min-width: 0;
  max-width: 190px;
  height: 32px;
  align-items: center;
  gap: 5px;
  margin-left: 7px;
  padding-left: 10px;
  border-radius: 8px;
  background: #e8e8e8;
  color: #444444;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.search-brand-chip[hidden] {
  display: none;
}

.search-brand-chip > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-brand-chip button {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #555555;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.search-brand-chip button:hover {
  background: #d6d6d6;
}

.site-search input[type="search"]::-webkit-search-cancel-button {
  display: none;
  appearance: none;
}

.site-search .search-submit {
  position: relative;
  grid-column: 3;
  justify-self: end;
  display: block;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  align-self: center;
  margin: 2px 4px 2px 2px;
  padding: 0;
  border-radius: 50%;
  overflow: hidden;
  color: transparent;
  font-size: 0;
  line-height: 1;
}

.site-search .search-submit::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
  width: 16px;
  height: 14px;
  background: #171717;
  clip-path: polygon(0 42%, 58% 42%, 58% 8%, 100% 50%, 58% 92%, 58% 58%, 0 58%);
  content: "";
}

.site-search > #site-search-input {
  grid-column: 2;
}

.search-results {
  max-height: min(60vh, 440px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.search-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.search-page-heading h1,
.search-page-heading p {
  margin-bottom: 0;
}

.share-search-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #171717;
  cursor: pointer;
  font-weight: 800;
}

.search-page-item {
  display: flex;
  min-width: 0;
}

.search-page-item[hidden] {
  display: none;
}

.search-page-item .product-card {
  width: 100%;
}

.search-empty {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  text-align: center;
}

@media (max-width: 700px) {
  .site-search {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .site-search input {
    font-size: 13px;
  }

  .site-search .search-submit {
    display: grid;
  }

  .search-brand-chip {
    max-width: 42vw;
  }

  .search-page-heading {
    display: block;
  }

  .share-search-button {
    margin-top: 16px;
  }
}

.brands-heading {
  margin-bottom: 16px;
}

.brands-heading .listing-heading {
  margin-bottom: 0;
}

.brand-filter {
  position: sticky;
  top: 0;
  z-index: 90;
  margin-bottom: 24px;
  padding: 10px 0;
  background: var(--paper);
}

.brand-filter input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  font: inherit;
}

.brand-filter input:focus-visible {
  border-color: var(--accent);
  outline: 0;
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.brand-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 14px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  text-align: center;
  text-decoration: none;
  transition: transform 180ms ease-out, box-shadow 180ms ease-out;
}

.brand-card[hidden] {
  display: none;
}

.brand-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

.brand-monogram {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.brand-logo {
  display: block;
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.brand-logo-large {
  width: 92px;
  height: 92px;
  margin: 0 0 12px;
  object-fit: contain;
}

.brand-description {
  max-width: 780px;
  margin: 0 auto 28px;
  color: var(--ink-soft, #444);
  line-height: 1.65;
  text-align: left;
}

.brand-description p {
  margin: 0 0 1em;
}

.brand-description p:last-child {
  margin-bottom: 0;
}

.brand-card-name {
  min-height: 42px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.brand-card-count {
  color: var(--muted);
  font-size: 13px;
}

.brand-empty {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  text-align: center;
}

@media (max-width: 900px) {
  .brands-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .brands-heading {
    display: block;
  }

  .brand-filter {
    width: 100%;
    margin-bottom: 18px;
  }

  .brands-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .brand-card {
    padding: 16px 10px 14px;
    gap: 8px;
  }

  .brand-monogram {
    width: 56px;
    height: 56px;
    font-size: 22px;
  }

  .brand-logo {
    width: 56px;
    height: 56px;
  }

  .brand-card-name {
    min-height: 38px;
    font-size: 14px;
  }
}

/* «Чип» — серая плашка-ссылка */
.chip {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 999px;
  background: #e8e8e8;
  color: #444444;
  font-size: inherit;
  font-weight: 700;
  line-height: 1.4;
  vertical-align: middle;
  text-decoration: none;
  transition: background-color 180ms ease-out, color 180ms ease-out;
}

.chip:hover {
  background: #d6d6d6;
  color: var(--ink);
}

/* Карточки SEO-страниц поиска (/search-seo/) со стикером-счётчиком в углу */
.seo-search-index {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.seo-card {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 16px 52px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: transform 180ms ease-out, box-shadow 180ms ease-out;
}

.seo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

/* Стикер с числом товаров — в правом верхнем углу карточки */
.seo-count {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 26px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f1ecc9;
  color: #7a5e00;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 700px) {
  .seo-search-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .seo-card {
    min-height: 64px;
    padding: 12px 44px 12px 12px;
    font-size: 13px;
  }
}

/* --- Меню категорий: плашки в строку с переносом (вместо сетки больших карточек) --- */
.category-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-menu-item {
  display: inline-flex;
  width: auto;
  height: auto;
  min-height: 84px;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 6px 22px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.category-menu-item:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 16px rgba(184, 138, 0, .18);
  transform: translateY(-1px);
}

.category-menu-item:hover .category-icon img {
  transform: scale(1.04);
}

.category-icon {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
}

.category-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-menu-label {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
}

/* --- Бургер-меню (детерминированно: планшет+телефон) --- */
@media (min-width: 1025px) {
  .menu-burger {
    display: none;
  }
  .header-subline .header-links {
    display: flex;
  }
}

@media (max-width: 1024px) {
  .menu-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    color: #333333;
    cursor: pointer;
  }
  .header-subline .header-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 2px;
  }
  .header-subline.is-open .header-links {
    display: flex;
  }
  .header-subline .header-links a {
    width: 100%;
    padding: 9px 0;
    white-space: normal;
  }
}

/* ============================================================
   ШАПКА: единая адаптивная компоновка (финальный блок, побеждает всё выше)
   ============================================================ */

/* --- База: бургер скрыт, меню открыто --- */
.menu-burger,
.site-header .menu-burger {
  display: none;
}
.site-header .header-subline .header-links {
  display: flex;
}

/* --- Десктоп: >=1025px --- */
@media (min-width: 1025px) {
  .site-header {
    min-height: 120px;
  }
  .header-main {
    display: grid;
    grid-template-columns: auto auto minmax(240px, 1fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 88px;
    padding: 12px 0 0;
  }
  .header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .menu-burger,
  .site-header .menu-burger {
    display: none;
  }
  .header-subline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 6px;
    padding: 0 10px;
  }
  .site-header .header-subline .header-links {
    display: flex;
  }
}

/* --- Планшет: 701-1024px (бургер виден, меню сворачивается) --- */
@media (min-width: 701px) and (max-width: 1024px) {
  .site-header {
    min-height: 120px;
  }
  .header-main {
    display: grid;
    grid-template-columns: auto auto minmax(160px, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 88px;
    padding: 12px 0 0;
  }
  .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .menu-burger,
  .site-header .menu-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    color: #333333;
    cursor: pointer;
  }
  .header-subline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 6px;
    padding: 0 10px;
  }
  .site-header .header-subline .header-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 2px;
  }
  .site-header .header-subline.is-open .header-links {
    display: flex;
  }
  .site-header .header-subline .header-links a {
    width: 100%;
    padding: 9px 0;
    white-space: normal;
  }
}

/* --- Мобильный: <=700px (два ряда: brand|catalog|actions, ниже поиск; меню в бургере) --- */
@media (max-width: 700px) {
  .site-header {
    min-height: auto;
  }
  .header-main {
    display: grid;
    grid-template-areas:
      "brand catalog actions"
      "search search search";
    grid-template-columns: auto auto auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 10px;
    padding: 10px 12px 0;
  }
  .site-brand {
    grid-area: brand;
  }
  .site-brand span {
    display: none;
  }
  .site-brand img {
    width: 46px;
    height: 46px;
  }
  .catalog-button {
    grid-area: catalog;
  }
  .site-search {
    grid-area: search;
    width: 100%;
  }
  .header-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }
  .menu-burger,
  .site-header .menu-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    color: #333333;
    cursor: pointer;
  }
  .auth-button {
    width: 44px;
    min-height: 44px;
    border-radius: 12px;
  }
  .cart-link {
    width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
  }
  .cart-link > .cart-label {
    display: none;
  }
  .header-subline {
    display: block;
    padding: 0 12px 12px;
  }
  .header-contacts {
    margin-right: 0;
  }
  .site-header .header-subline .header-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 2px;
  }
  .site-header .header-subline.is-open .header-links {
    display: flex;
  }
  .site-header .header-subline .header-links a {
    width: 100%;
    padding: 9px 0;
    white-space: normal;
  }
}
/* --- Корзина: компактные карточки при узком контейнере --- */
@container (max-width: 380px) {
  .cart-item {
    grid-template-columns: 80px minmax(0, 1fr);
    grid-template-areas:
      "image details"
      "controls controls";
    align-items: start;
    gap: 10px 14px;
  }
  .cart-item-image {
    grid-area: image;
    width: 80px;
    height: 80px;
  }
  .cart-item-details {
    grid-area: details;
  }
  .cart-item-controls {
    grid-area: controls;
    justify-self: start;
  }
}

/* --- Корзина: в одну колонку, когда двухколоночная раскладка не вмещает карточку --- */
@media (max-width: 820px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
  .checkout-panel {
    position: static;
  }
}

/* --- Каталог: 2 колонки на узких экранах, чтобы карточки были крупнее --- */
@media (max-width: 820px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(175px, 1fr));
    gap: 12px;
  }
}

/* --- Поиск: категории --- */
.search-found-cats {
  margin-bottom: 20px;
}

.search-cats-found {
  margin: 0 0 10px;
  color: var(--muted);
}

.search-cats-found-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.search-cats-found-item .breadcrumbs {
  margin: 0;
  font-size: 14px;
}

/* Отменяем глобальное правило li a (рамка/паддинг), чтобы крошки были как основные */
.search-cats-found-item .breadcrumbs a {
  display: inline;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.search-categories {
  margin-bottom: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}

.search-categories h2 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.search-categories-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-category-item {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.search-category-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(184, 138, 0, .16);
  transform: translateY(-1px);
}

/* --- Структура каталога --- */
.catalog-filter.brand-filter {
  margin-bottom: 24px;
}

.catalog-structure-tree .catalog-tree {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
}

.catalog-tree .catalog-tree {
  margin-left: 22px;
  margin-top: 6px;
}

.catalog-tree-item {
  margin: 4px 0;
}

.catalog-tree-item a {
  display: inline-block;
  min-height: auto;
  padding: 3px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.catalog-tree-item a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* --- Подкатегории --- */
.category-submenu {
  margin-bottom: 20px;
}

.category-submenu-title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.category-submenu-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-submenu-item {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.category-submenu-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(184, 138, 0, .16);
  transform: translateY(-1px);
}

/* --- Пагинация категорий --- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease;
}

.page-link:hover {
  border-color: var(--accent);
  background: #fff9df;
}

.page-link.is-current {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  cursor: default;
}

.page-ellipsis {
  padding: 0 4px;
  color: var(--muted);
}

/* --- Бренды «Популярное»: компоновка как у category-menu --- */
section.brands-section {
  display: block;
}

.brand-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.brand-cloud a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.brand-cloud a:hover {
  border-color: var(--accent);
  background: #fff9df;
  box-shadow: 0 6px 16px rgba(184, 138, 0, .18);
  transform: translateY(-1px);
}

/* ===== Главная: категории на мобильных — 2 колонки на всю ширину =====
   Карточка: иконка (квадрат) сверху, подпись под ней. */
@media (max-width: 700px) {
  .catalog-section > .category-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
  }

  .catalog-section > .category-menu .category-menu-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 0;
    border-radius: 18px;
    overflow: hidden;
  }

  .catalog-section > .category-menu .category-icon {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0;
    border-radius: 0;
    background: #f1f1f1;
  }

  .catalog-section > .category-menu .category-menu-label {
    display: block;
    width: 100%;
    margin: 0;
    padding: 10px 8px 12px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
  }
}
