/* Навигация и главный поиск, редизайн 2026. Только цвета брендбука 1.0. */

html:has(dialog[open]) { overflow: hidden; }

/* ---------- Шапка ---------- */
.header-row { position: static; }
.header-search { display: none; }

@media (max-width: 759px) {
  /* На телефоне контакты живут в меню и на главной — шапка остаётся лёгкой. */
  .store-contact-bar { display: none; }
  .header-row { display: grid; grid-template-columns: 44px 1fr auto; }
  .header-row .brand { justify-self: center; }
  .header-row .brand img { width: 112px; }
}

@media (min-width: 760px) {
  .main-nav { align-self: stretch; flex-wrap: nowrap; gap: 0 clamp(10px, 1.9vw, 30px); }
  .main-nav > a, .nav-catalog { display: inline-flex; align-items: center; min-height: 100%; white-space: nowrap; }
  .nav-mega { display: flex; align-self: stretch; }
  .nav-catalog {
    gap: 8px;
    margin-block: 14px;
    min-height: 0;
    padding: 0 16px 0 13px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--cream);
    text-decoration: none;
  }
  .nav-catalog svg { width: 18px; height: 18px; color: var(--sun); }
  .nav-catalog[aria-current=page] { color: var(--sun); }

  /* Мегаменю: открывается при наведении и с клавиатуры, без JS. */
  .mega-panel {
    position: absolute;
    inset: 100% 0 auto;
    z-index: 5;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--cream);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
  }
  .nav-mega:is(:hover, :focus-within) .mega-panel {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: .08s, .08s, 0s;
  }
  .nav-mega:is(:hover, :focus-within) .nav-catalog { background: var(--pressed); }
  .mega-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: clamp(20px, 4vw, 60px);
    padding-block: 26px 30px;
    font-size: .875rem;
    font-weight: 500;
  }
  .mega-columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px 28px; align-content: start; }
  .mega-col { display: grid; gap: 2px; align-content: start; }
  .mega-title {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 1rem;
    font-weight: 750;
    text-decoration: none;
  }
  .mega-title small, .sheet-cat small, .sheet-sub small { color: var(--text); font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
  .mega-link { padding-block: 5px; color: var(--text); text-decoration: none; }
  .mega-link:hover, .mega-title:hover { color: var(--gold); }
  .mega-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    color: var(--gold);
    font-weight: 700;
    text-decoration: none;
  }
  .mega-all svg { width: 14px; height: 14px; }
  .mega-side { display: grid; gap: 10px; align-content: start; padding-left: clamp(20px, 3vw, 40px); border-left: 1px solid var(--line); }
  .mega-label { color: var(--text); font-size: .6875rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
  .mega-brands { display: flex; flex-wrap: wrap; gap: 6px; }
  .mega-brands a {
    padding: 6px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    font-size: .8125rem;
    font-weight: 650;
    text-decoration: none;
  }
  .mega-brands a:hover { border-color: var(--gold); }
  .mega-shortcuts { display: grid; gap: 6px; margin-top: 8px; }
  .mega-shortcuts a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 14px;
    background: var(--sand);
    font-weight: 700;
    text-decoration: none;
  }
  .mega-shortcuts svg { color: var(--gold); }
  .mega-shortcuts a:hover { background: var(--line); }
}

@media (min-width: 1200px) {
  .header-search {
    position: relative;
    display: flex;
    align-items: center;
    width: clamp(200px, 20vw, 300px);
  }
  .header-search svg { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--text); pointer-events: none; }
  .header-search input {
    width: 100%;
    min-height: 44px;
    padding: 0 14px 0 40px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    font-size: .875rem;
  }
  .header-search input:focus { border-color: var(--ink); outline: none; }
  .header-search-icon { display: none; }
  .header-actions { gap: 8px; }
}

/* ---------- Мобильное меню: шторка слева ---------- */
.menu-sheet {
  inset: 0 auto 0 0;
  width: min(100%, 420px);
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0 24px 24px 0;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), overlay .28s allow-discrete, display .28s allow-discrete;
}
.menu-sheet[open] { display: flex; flex-direction: column; transform: none; }
@starting-style { .menu-sheet[open] { transform: translateX(-100%); } }
.menu-sheet::backdrop { background: rgb(36 28 20 / 0); transition: background .28s, overlay .28s allow-discrete, display .28s allow-discrete; }
.menu-sheet[open]::backdrop { background: rgb(36 28 20 / 50%); }
@starting-style { .menu-sheet[open]::backdrop { background: rgb(36 28 20 / 0); } }

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) 10px 8px 20px;
  border-bottom: 1px solid var(--line);
}
.sheet-head .brand img { width: 104px; }
.sheet-head .icon-btn { background: var(--sand); }
.sheet-body {
  display: grid;
  gap: 22px;
  align-content: start;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 16px max(24px, env(safe-area-inset-bottom));
}

.sheet-search, .home-search-bar { position: relative; display: flex; align-items: center; }
.sheet-search > svg { position: absolute; left: 15px; color: var(--text); pointer-events: none; }
.sheet-search input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px 0 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  font-size: 1rem;
}
.sheet-search input:focus { border-color: var(--ink); outline: none; }

.sheet-section { display: grid; gap: 8px; }
.sheet-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-inline: 4px; }
.sheet-section-head h3 { color: var(--text); font-size: .6875rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.sheet-section-head a { color: var(--gold); font-size: .8125rem; font-weight: 700; text-underline-offset: 3px; }

.sheet-cats { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.sheet-cat { border-top: 1px solid var(--line); }
.sheet-cat:first-child { border-top: 0; }
a.sheet-cat, .sheet-cat > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 0 14px 0 16px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  list-style: none;
  cursor: pointer;
}
.sheet-cat > summary::-webkit-details-marker { display: none; }
.sheet-cat span { flex: 1; min-width: 0; }
.sheet-cat svg { width: 16px; height: 16px; color: var(--gold); transition: transform .2s; }
.sheet-cat[open] > summary svg { transform: rotate(90deg); }
.sheet-cat[open] > summary { color: var(--gold); }
.sheet-sub { display: grid; padding: 0 10px 10px; }
.sheet-sub a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 0 10px;
  border-radius: 12px;
  color: var(--ink);
  font-size: .9375rem;
  text-decoration: none;
}
.sheet-sub a:active, a.sheet-cat:active, .sheet-cat > summary:active { background: var(--sand); }

.sheet-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sheet-quick a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--sand);
  font-size: .875rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
}
.sheet-quick svg { flex: none; color: var(--gold); }
.sheet-quick small { display: block; margin-top: 2px; color: var(--text); font-size: .75rem; font-weight: 500; }

.sheet-brands {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 96px;
  gap: 8px;
  margin-inline: -16px;
  padding: 2px 16px 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 16px;
  scrollbar-width: none;
}
.sheet-brands::-webkit-scrollbar { display: none; }
.sheet-brands a {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  font-size: .6875rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  scroll-snap-align: start;
}
.sheet-brands .brand-logo-box { min-height: 34px; max-width: 76px; }
.sheet-brands .brand-logo-box img { height: 34px; }
.sheet-brands .brand-initials { width: 34px; height: 34px; font-size: .75rem; }
.sheet-brands span:last-child { overflow: hidden; width: 100%; text-overflow: ellipsis; white-space: nowrap; }

.menu-sheet .menu-list { gap: 0; }
.menu-sheet .menu-list .menu-link { min-height: 48px; padding-inline: 4px; font-weight: 600; }
.menu-sheet .menu-list .menu-link:last-child { border-bottom: 0; }

.sheet-store { display: grid; gap: 12px; padding: 16px; border-radius: 18px; background: var(--ink); color: var(--cream); }
.sheet-store-title { display: flex; gap: 10px; font-size: .8125rem; line-height: 1.45; }
.sheet-store-title svg { color: var(--sun); margin-top: 1px; }
.sheet-store-title strong { display: block; font-size: .9375rem; }
.sheet-store-title small { display: block; margin-top: 2px; color: var(--sand); }
.sheet-store-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-store-actions a {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgb(247 244 233 / 30%);
  border-radius: 999px;
  color: var(--cream);
  font-size: .8125rem;
  font-weight: 700;
  text-decoration: none;
}
.sheet-store-actions a:first-child { flex-basis: 100%; border-color: var(--cream); background: var(--cream); color: var(--pressed); }
.sheet-store-actions a:not(:first-child) { flex: 1 1 0; }
.sheet-store-actions svg { width: 17px; height: 17px; }

@media (prefers-reduced-motion: reduce) {
  .menu-sheet, .menu-sheet::backdrop, .mega-panel { transition: none; }
}

/* ---------- Главная: первый экран ---------- */
/* Светлый блок без фоновых эффектов: поиск слева, разделы справа. Жёлтый — только у главного действия. */
.home-intro { display: grid; gap: clamp(14px, 2.4vw, 24px); margin-block: clamp(14px, 2.4vw, 28px) 8px; }
.home-hero {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(20px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: clamp(22px, 3vw, 32px);
  background: var(--paper);
}
.home-hero-main { display: grid; gap: clamp(12px, 1.6vw, 16px); align-content: center; min-width: 0; }
.home-kicker { display: inline-flex; align-items: center; color: var(--text); font-size: .75rem; font-weight: 650; }
.home-hero h1 { max-width: 14ch; color: var(--ink); font-size: clamp(1.9rem, 4.6vw, 3.4rem); line-height: 1.04; }
.home-lead { max-width: 46ch; color: var(--text); font-size: clamp(.875rem, 1.4vw, 1rem); }

.home-search { display: block; margin-top: 4px; }
.home-search-bar {
  gap: 4px;
  min-height: 60px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
}
.home-search-bar:focus-within { border-color: var(--text); }
.home-search-bar > svg { flex: none; margin-left: 10px; color: var(--text); }
.home-search .home-search-bar input[type=search] {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 1rem;
  outline: none;
  box-shadow: none;
}
.home-search-bar input::placeholder { color: var(--text); }
.home-search .home-search-tools { display: flex; grid-column: auto; gap: 2px; }
.home-search .home-search-tools[hidden] { display: none; }
.home-search .home-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 700;
}
.home-search .home-tool svg { color: var(--gold); }
.home-search .home-tool:is(:hover, :active) { background: var(--cream); }
.home-search .home-tool span { display: none; }
.home-search .home-search-submit { flex: none; min-height: 46px; padding: 0 22px; border-radius: 12px; background: var(--ink); color: var(--cream); }
.home-search .home-search-submit:is(:hover, :active):not(:disabled) { background: var(--pressed); color: var(--cream); }
.home-search .home-search-submit .label-short { display: none; }
.home-search-feedback { color: var(--text); }
.home-photo-error { color: var(--error); }

.home-popular { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.home-popular > span { margin-right: 4px; color: var(--text); font-size: .75rem; font-weight: 650; }
.home-popular a {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s;
}
.home-popular a:is(:hover, :focus-visible) { background: var(--sand); }

.home-trust { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 0; padding: 0; list-style: none; color: var(--text); font-size: .8125rem; font-weight: 600; }
.home-trust li { display: inline-flex; align-items: center; gap: 6px; }
.home-trust svg { width: 16px; height: 16px; color: var(--gold); }

@media (max-width: 559px) {
  .home-hero { padding: 20px 16px; }
  .home-search-bar { min-height: 56px; padding: 5px; border-radius: 16px; }
  .home-search-bar > svg { display: none; }
  .home-search .home-search-bar input[type=search] { padding-left: 10px; }
  .home-search .home-tool { padding: 0 10px; }
  .home-search .home-search-submit { width: 46px; padding: 0; }
  .home-search .home-search-submit .label-full { display: none; }
  .home-search .home-search-submit .label-short { display: grid; place-items: center; }
  .home-popular { flex-wrap: nowrap; margin-inline: -16px; padding-inline: 16px; overflow-x: auto; scrollbar-width: none; }
  .home-popular::-webkit-scrollbar { display: none; }
  .home-popular > span { flex: none; }
}
@media (min-width: 760px) {
  .home-search .home-tool span { display: inline; }
}

/* ---------- Разделы: справа от поиска на десктопе, лентой на телефоне ---------- */
.home-cats {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, 40%);
  gap: 10px;
  margin-inline: -16px;
  padding: 2px 16px 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 16px;
  scrollbar-width: none;
}
.home-cats::-webkit-scrollbar { display: none; }
.home-cat {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border-radius: 18px;
  background: var(--cream);
  text-decoration: none;
  scroll-snap-align: start;
  transition: background .2s, transform .2s;
}
.home-cat-image { display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; }
.home-cat-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.home-cat-image.is-cutout { padding: 12%; }
.home-cat-image.is-cutout img { object-fit: contain; }
.home-cat-image > svg { width: 30px; height: 30px; color: var(--gold); }
.home-cat-copy { display: grid; gap: 1px; padding: 6px 14px 14px; }
.home-cat-copy strong { font-size: .9375rem; line-height: 1.2; }
.home-cat-copy small { color: var(--text); font-size: .75rem; font-weight: 600; }
.home-cat-all { background: var(--ink); color: var(--cream); }
.home-cat-all .home-cat-image > svg { color: var(--sun); }
.home-cat-all .home-cat-copy small { color: var(--sand); }

@media (hover: hover) {
  .home-cat:not(.home-cat-all):hover { background: var(--sand); }
  .home-cat:hover .home-cat-image img { transform: scale(1.05); }
}
@media (min-width: 760px) {
  .home-cats { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; overflow: visible; }
}
@media (min-width: 1030px) {
  .home-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; }
  .home-cat-copy strong { font-size: .875rem; }
}

/* ---------- Подбор подарка ---------- */
.home-gift-card {
  display: grid;
  gap: 14px;
  padding: clamp(16px, 2.6vw, 24px) clamp(16px, 3vw, 32px);
  border-radius: 22px;
  background: var(--sand);
}
.home-gift-copy { display: flex; align-items: center; gap: 14px; }
.home-gift-icon { display: grid; flex: none; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.home-gift-copy h2 { font-size: 1.125rem; }
.home-gift-copy p { color: var(--text); font-size: .8125rem; }
.home-gift-card .home-gift-goals { display: grid; gap: 8px; width: 100%; }
.home-gift-card .home-gift-goal { border: 0; border-radius: 14px; background: var(--paper); }
.home-gift-card .home-gift-goal > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 50px;
  padding: 0 16px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.home-gift-card .home-gift-goal > summary::-webkit-details-marker { display: none; }
.home-gift-card .home-gift-goal > summary svg { overflow: visible; width: 16px; height: 16px; color: var(--gold); transform: rotate(90deg); transition: transform .2s; }
.home-gift-card .home-gift-goal[open] > summary svg { transform: rotate(-90deg); }
.home-gift-card .home-gift-budgets { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px; }
.home-gift-card .home-gift-budgets a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 650;
  text-decoration: none;
}
.home-gift-card .home-gift-budgets a:is(:hover, :focus-visible) { border-color: var(--ink); background: var(--ink); color: var(--cream); }
@media (min-width: 1030px) {
  .home-gift-card { grid-template-columns: minmax(260px, .8fr) 2fr; align-items: center; }
  .home-gift-card .home-gift-goals { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
}

@media (min-width: 760px) and (max-width: 1099px) {
  /* Узкий десктоп и планшет: третий раздел и журнал остаются в мегаменю «Каталог». */
  .main-nav > a:nth-of-type(3), .main-nav > .main-nav-journal { display: none; }
}

/* ---------- Каталог: фильтры ---------- */
.catalog-layout { display: grid; gap: 20px; align-items: start; margin-top: 8px; }
.catalog-results { min-width: 0; }
.catalog-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-block: 4px 12px; }
.catalog-toolbar .result-count { margin-right: auto; }
.filter-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  font-size: .875rem;
}
.filter-open b, .facet > summary b {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding-inline: 6px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: .75rem;
}
.filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.filter-chips a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px 0 14px;
  border-radius: 999px;
  background: var(--sand);
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 650;
  text-decoration: none;
}
.filter-chips a svg { width: 14px; height: 14px; color: var(--text); }
.filter-chips a:hover { background: var(--line); }
.filter-chips .filter-chips-reset { background: transparent; color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

/* Панель: на телефоне — шторка снизу, на десктопе — колонка слева (тот же элемент). */
.filter-panel {
  inset: auto 0 0;
  width: 100%;
  max-width: 100%;
  height: min(92dvh, 900px);
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 24px 24px 0 0;
}
.filter-panel[open] { display: flex; }
.filter-form { display: flex; flex-direction: column; width: 100%; min-height: 0; margin: 0; }
.filter-head { display: flex; align-items: center; gap: 12px; padding: 14px 12px 10px 20px; border-bottom: 1px solid var(--line); }
.filter-head h2 { margin-right: auto; font-size: 1.25rem; }
.filter-reset { color: var(--gold); font-size: .875rem; font-weight: 700; text-underline-offset: 3px; }
.filter-close { background: var(--sand); }
.filter-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px 16px; }
.filter-foot { padding: 12px 20px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--cream); }
.filter-foot .primary { width: 100%; min-height: 52px; background: var(--ink); border-color: var(--ink); color: var(--cream); }

.facet { border-bottom: 1px solid var(--line); }
.facet > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  font-weight: 750;
  list-style: none;
  cursor: pointer;
}
.facet > summary::-webkit-details-marker { display: none; }
.facet > summary b { margin-right: auto; }
.facet > summary:not(:has(b)) { justify-content: space-between; }
.facet-body { display: grid; gap: 2px; margin: 0; padding: 0 0 14px; border: 0; min-width: 0; }
.facet .check-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: .9375rem;
  cursor: pointer;
}
.facet .check-option:hover { background: var(--cream); }
.facet .check-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facet .check-option small { margin: 0; color: var(--text); font-size: .75rem; font-variant-numeric: tabular-nums; }
.facet .check-option.is-empty { opacity: .45; }
.facet:not(.is-expanded) .check-option.is-more { display: none; }
.facet.is-searching .check-option.is-more { display: grid; }
.facet .check-option.is-hidden { display: none !important; }
.facet-more { justify-self: start; min-height: 36px; padding: 0 6px; border: 0; background: none; color: var(--gold); font-size: .8125rem; font-weight: 700; }
.facet.is-expanded .facet-more { display: none; }
.facet-search {
  width: 100%;
  min-height: 40px;
  margin-bottom: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font-size: .875rem;
}
.facet-search:focus { border-color: var(--ink); outline: none; }

.price-bands { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.price-bands a {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 650;
  text-decoration: none;
}
.price-bands a small { color: var(--text); font-size: .6875rem; }
.price-bands a[aria-current] { border-color: var(--ink); background: var(--ink); color: var(--cream); }
.price-bands a[aria-current] small { color: var(--sand); }
.price-bands a.is-empty { opacity: .45; pointer-events: none; }
.price-range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.price-range input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font-size: .9375rem;
  -moz-appearance: textfield;
}
.price-range input::-webkit-inner-spin-button, .price-range input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.price-range input:focus { border-color: var(--ink); outline: none; }
.price-range > span { color: var(--text); }
.price-apply { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--ink); color: var(--cream); }

@media (min-width: 1030px) {
  .catalog-layout { grid-template-columns: 264px minmax(0, 1fr); grid-template-areas: "filters results"; gap: 32px; }
  .catalog-results { grid-area: results; }
  .filter-panel, .filter-panel:not([open]) {
    grid-area: filters;
    position: sticky;
    top: calc(var(--header-height) + 16px);
    inset: auto;
    display: block;
    width: auto;
    height: auto;
    max-height: calc(100dvh - var(--header-height) - 32px);
    overflow-y: auto;
    border-radius: 0;
    background: transparent;
  }
  .filter-panel .filter-head { padding: 0 0 8px; }
  .filter-panel .filter-head h2 { font-size: 1rem; }
  .filter-panel .filter-close, .filter-panel .filter-foot, .filter-open { display: none; }
  .filter-panel .filter-body { overflow: visible; padding: 0; }
  .catalog-page .product-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1300px) {
  .catalog-page .product-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Системные элементы в стиле сайта ---------- */
:where(input[type=checkbox]) { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
:where(input[type=radio]) { accent-color: var(--ink); }
.sort-form select, select.styled, .field select {
  min-height: 44px;
  padding: 0 40px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23372C20' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px;
  color: var(--ink);
  font-size: .875rem;
  font-weight: 650;
  appearance: none;
  cursor: pointer;
}
/* Где браузер умеет, раскрывающийся список тоже рисуем сами — без системного синего. */
@supports (appearance: base-select) {
  .sort-form select, select.styled, .field select { appearance: base-select; background-image: none; }
  .sort-form select::picker-icon, select.styled::picker-icon, .field select::picker-icon { color: var(--ink); transition: rotate .2s; }
  .sort-form select:open::picker-icon, select.styled:open::picker-icon, .field select:open::picker-icon { rotate: 180deg; }
  ::picker(select) {
    appearance: base-select;
    margin-top: 6px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--paper);
    color: var(--ink);
  }
  .sort-form option, select.styled option, .field select option {
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: .875rem;
    font-weight: 600;
  }
  .sort-form option:hover, select.styled option:hover, .field select option:hover { background: var(--cream); }
  .sort-form option:checked, select.styled option:checked, .field select option:checked { background: var(--sand); }
  .sort-form option::checkmark, select.styled option::checkmark, .field select option::checkmark { color: var(--gold); }
}
.sort-form select:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

details:not(.facet):not(.sheet-cat):not(.home-gift-goal):not(.accordion) > summary { list-style: none; cursor: pointer; }
details:not(.facet):not(.sheet-cat):not(.home-gift-goal):not(.accordion) > summary::-webkit-details-marker { display: none; }
.folder-directory { margin-block: 6px 4px; }
.folder-directory > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink);
  font-size: .9375rem;
  font-weight: 700;
}
.folder-directory > summary::after {
  content: "";
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237D5F37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s;
}
.folder-directory[open] > summary::after { transform: rotate(180deg); }
.facet > summary::after {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  margin-left: auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237D5F37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s;
}
.facet[open] > summary::after { transform: rotate(180deg); }
.facet > summary b { margin-right: 0; }
.filter-panel .facet { margin: 0; padding: 0; border-top: 0; }
.catalog-toolbar .result-count { order: 3; flex-basis: 100%; margin: 0; }
.catalog-toolbar .sort-form { margin-left: auto; }
@media (min-width: 1030px) {
  .catalog-toolbar .result-count { order: 0; flex-basis: auto; margin-right: auto; }
}
@supports (appearance: base-select) {
  .sort-form select::picker-icon, select.styled::picker-icon, .field select::picker-icon {
    content: "";
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23372C20' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  .sort-form select, select.styled, .field select { display: inline-flex; align-items: center; gap: 8px; padding-right: 14px; }
}
