/* ==========================================================================
   Витрина: каталог, карточки товаров, форма заявки.

   Подключается после brand.css и site.css. Цвета берём из общей
   палитры, не подменяем их отдельной схемой витрины.
   ========================================================================== */

:root {
  --radius: 10px;
  --shadow: 0 1px 2px rgba(var(--brand-ink-rgb), .05), 0 6px 18px rgba(var(--brand-ink-rgb), .06);
  --serif: var(--sans);
  --accent-ink: var(--brand-blue);
  --accent-wash: var(--brand-section);

  /* Моноширинный ряд для цен и счётчиков: цифры выстраиваются столбиком. */
  --num: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

h1, h2, h3 { font-weight: 700; letter-spacing: -.01em; }

/* ---- шапка --------------------------------------------------------------- */

.contact-line { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.header__contact { margin-left: auto; flex-shrink: 0; }
.header__phone {
  color: var(--brand-on-dark);
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  text-decoration: none;
}
.header__phone:hover { color: var(--brand-on-dark); text-decoration: underline; }
.messengers { display: inline-flex; align-items: center; gap: .28rem; }
.messengers__link {
  display: inline-grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px;
  border-radius: var(--radius);
}
.messengers__link img { width: 32px; height: 32px; object-fit: contain; }

/* Логотип и город образуют один компактный блок, не вытесняющий меню. */
.brand {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  flex-shrink: 0;
  gap: 4px;
}
.brand__logo {
  width: auto;
  height: 42px;
  max-width: 210px;
}
.brand__logo--official { background: transparent; border-radius: 0; box-shadow: none; }
.brand__tagline { line-height: 1.2; }

@media (max-width: 38rem) {
  .header__inner { flex-wrap: wrap; column-gap: 10px; row-gap: 7px; padding-top: 9px; padding-bottom: 9px; }
  .brand { min-width: 0; flex: 1 1 128px; gap: 3px; }
  .brand__logo { width: min(150px, 43vw); max-width: 100%; height: 34px; object-position: left center; }
  .brand__tagline { font-size: .68rem; }
  .nav-toggle, .header__cart { flex-shrink: 0; }
  .header .header__cart { padding: .35rem .65rem; }
  .header__contact {
    flex: 0 0 100%;
    margin-left: 0;
    padding-top: 6px;
    border-top: 1px solid var(--brand-line-on-dark);
    justify-content: center;
  }
  .header__phone { font-size: .88rem; }
}

/* ---- закреплённая строка поиска и навигации ------------------------------ */

html { scroll-padding-top: 4rem; }
.storebar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(var(--brand-ink-rgb), .08);
}
.storebar__inner { display: flex; align-items: center; gap: .7rem; padding-block: .45rem; }
.storebar__links { display: flex; flex: 0 0 auto; gap: .35rem; }
.storebar .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; gap: .45rem; padding: .38rem .65rem; }
.storebar .btn[aria-current] { background: var(--accent-wash); }
.storebar svg { width: 1.05rem; height: 1.05rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- поля ввода ---------------------------------------------------------- */

:where(input:not([type]), input[type="text"], input[type="tel"], input[type="email"],
       input[type="search"], input[type="number"], input[type="url"], input[type="password"], select, textarea) {
  min-width: 0;
  max-width: 100%;
  padding: .7rem .9rem;
  font: inherit;
  font-size: 1rem;
  border: 1px solid var(--brand-control);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}

textarea { resize: vertical; }

.account-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.account-profile-heading { margin-top: 1.75rem; }
.account-password > form { margin-top: 1rem; }
.password-visibility:not([hidden]) {
  display: flex;
  align-items: center;
  align-self: flex-start;
  gap: .45rem;
  min-height: 2rem;
  cursor: pointer;
}
.password-visibility input { margin: 0; accent-color: var(--brand-blue); }
.order-history { margin: .7rem 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.order-history > summary { cursor: pointer; padding: .75rem .9rem; overflow-wrap: anywhere; }
.order-history > summary span { margin-left: .7em; }
.order-history > div { padding: .25rem .9rem .75rem; }

/* ---- поиск --------------------------------------------------------------- */

.search {
  display: flex;
  gap: .5rem;
  margin: 1.25rem 0;
  max-width: 34rem;
}
.search input[type="search"] { flex: 1; }
.storebar .search { flex: 1; min-width: 0; max-width: none; margin: 0; }
.storebar input[type="search"] { width: 0; min-height: 44px; padding: .45rem .7rem; }
@media (max-width: 42rem) {
  .storebar__inner { padding-inline: .55rem; gap: .35rem; }
  .storebar .search, .storebar__links { gap: .25rem; }
  .storebar .btn { width: 44px; padding: 0; }
  .storebar__label { display: none; }
}
.search-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem 1rem;
  margin-top: .75rem;
}
.search-controls__reset { font-size: .9rem; }
.search-results { padding-top: 1.65rem; }
.search-pages {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  margin-bottom: 1rem;
}
.search-pages h2 { font-size: 1.05rem; margin: 0 0 .5rem; }
.search-pages ul { margin: 0; padding-inline-start: 1.1rem; }
.stock-filter { margin-top: .75rem; }
.stock-filter.is-on { background: var(--accent-soft); border-color: var(--accent); font-weight: 700; }

/* ---- сетки --------------------------------------------------------------- */

.grid { display: grid; gap: 1rem; }
.grid--sections { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.grid--products { grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.grid--benefits { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem; }
.grid--halves  { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 2rem; }

/* ---- плитка раздела ------------------------------------------------------ */

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s;
}
.tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.tile__img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; width: 100%; }
.tile__title { font-weight: 600; line-height: 1.3; }
.tile__main { display: grid; gap: .5rem; color: inherit; text-decoration: none; }
.tile__main:hover .tile__title { text-decoration: underline; }
.tile--section .tile__title { padding-right: 2.6rem; }
.tile__links { display: grid; gap: .35rem; list-style: none; padding: 0; margin: .2rem 0 0; font-size: .9rem; }
.tile__links a { color: var(--muted); }
.tile__links a:hover { color: var(--accent); }
.catalog-other { margin-top: 2rem; }
.tile__count {
  position: absolute;
  top: .6rem;
  right: .7rem;
  font-size: .75rem;
  color: var(--muted);
  background: var(--sand);
  border-radius: 999px;
  padding: .1rem .5rem;
}

/* ---- карточка товара, страница ------------------------------------------- */

.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 52rem) { .product { grid-template-columns: 1fr; gap: 1.5rem; } }

.product__photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--paper);
  border-radius: var(--radius);
}
.product__noimg {
  aspect-ratio: 1;
  background: var(--sand);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  font-size: 4rem;
  opacity: .25;
}
.product__thumbs { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.product__thumb {
  width: 4.5rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  cursor: pointer;
}
.product__thumb[aria-current="true"] { border-color: var(--accent); }
.product__thumb img { aspect-ratio: 1; object-fit: contain; }

.product__meta { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: .9rem; margin: 0 0 1rem; }
.product__price { color: var(--accent-ink); font-size: 1.9rem; font-weight: 700; margin: 0 0 1.25rem; }
.product__actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.product__descr { margin-top: 1.5rem; }
.product__finishes { margin: 0 0 1.5rem; }
.product__finish { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.product__finish dt { flex: 1 1 13rem; min-width: 0; overflow-wrap: anywhere; }
.product__finish dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .7rem; margin: 0; }
.product__finish span { color: var(--muted); font-size: .875rem; }
.product__finish dt span { display: block; margin-top: .15rem; }

.props { width: 100%; border-collapse: collapse; font-size: .95rem; }
.props th, .props td { text-align: left; padding: .55rem .2rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.props th { font-weight: 500; color: var(--muted); width: 45%; }
@media (max-width: 30rem) {
  #requisites .props { table-layout: fixed; }
  #requisites .props :is(th, td) { overflow-wrap: anywhere; }
}

/* ---- кнопки -------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: .7rem 1.3rem;
  border: 1px solid var(--brand-control);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--accent-ink);
  font: inherit;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--accent-wash); border-color: var(--accent); color: var(--accent-dark); }
.btn--primary { background: var(--brand-red); border-color: var(--brand-red); color: var(--brand-on-dark); }
.btn--primary:hover { background: var(--brand-red-hover); border-color: var(--brand-red-hover); color: var(--brand-on-dark); }
.btn--ghost { background: transparent; border-color: var(--accent-ink); }

/* ---- форма заявки -------------------------------------------------------- */

.section--request { background: var(--sand); }
.form__row { margin-bottom: 1rem; display: flex; flex-direction: column; gap: .35rem; }
.form__row label { font-size: .9rem; color: var(--muted); }
.form__project-file {
  width: 100%;
  min-width: 0;
  font: inherit;
  color: var(--ink);
}
.form__project-file::file-selector-button {
  min-height: 2.65rem;
  margin-inline-end: .65rem;
  padding: .5rem .8rem;
  border: 1px solid var(--brand-red);
  border-radius: var(--radius);
  background: var(--brand-red);
  color: var(--brand-on-dark);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.form__project-file::file-selector-button:hover {
  border-color: var(--brand-red-hover);
  background: var(--brand-red-hover);
}
.form__note { font-size: .8rem; color: var(--muted); margin-top: .8rem; }

/* Ловушка для роботов: убирается из потока, но не display:none —
   часть ботов такие поля пропускает. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.note { padding: .8rem 1rem; border-radius: var(--radius); margin: 0 0 1.25rem; }
.note--good { background: var(--brand-ok-bg); border-left-color: var(--brand-ok); color: var(--brand-ok); }
.note--bad { background: var(--brand-error-bg); border-left-color: var(--brand-error); color: var(--brand-error); }

/* ---- чат ----------------------------------------------------------------- */

.site-chat-launch,
.site-chat {
  --chat-right: max(.85rem, env(safe-area-inset-right));
  --chat-bottom: max(.85rem, env(safe-area-inset-bottom));
  position: fixed;
  inset: auto var(--chat-right) var(--chat-bottom) auto;
}
.site-chat-launch:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  z-index: 45;
  min-height: 3.1rem;
  border-radius: 1.6rem;
  box-shadow: var(--shadow);
  font-weight: 650;
}
.site-chat-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 1.4rem;
  height: 1.05rem;
  background: var(--brand-on-dark);
  color: var(--brand-red);
  border-radius: .45rem;
  font-size: 1rem;
  line-height: 1;
}
.site-chat-icon::after {
  position: absolute;
  bottom: -.17rem;
  left: .3rem;
  width: .32rem;
  height: .32rem;
  background: var(--brand-on-dark);
  transform: rotate(45deg);
  content: "";
}
.site-chat {
  margin: 0;
  padding: 0;
  width: min(25rem, calc(100% - var(--chat-right) - max(.85rem, env(safe-area-inset-left))));
  max-width: none;
  max-height: calc(100% - var(--chat-bottom) - .85rem);
  max-height: calc(100dvh - var(--chat-bottom) - .85rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.site-chat::backdrop { background: rgba(var(--brand-ink-rgb), .24); }
.site-chat__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .45rem .8rem .45rem 1rem;
  background: var(--brand-blue);
  color: var(--brand-on-dark);
}
.site-chat__heading h2 { color: inherit; font-size: 1.14rem; margin: 0; }
.site-chat__close {
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}
.site-chat__close:hover { background: var(--brand-line-on-dark); }
.site-chat__close:focus-visible { outline-color: var(--brand-focus-on-dark); }
.site-chat__form { padding: 1rem; }

@media (max-width: 36rem) {
  .site-chat-launch:not([hidden]) { width: 3.15rem; height: 3.15rem; padding: 0; border-radius: 50%; }
  .site-chat-launch__label { display: none; }
}

/* ---- корзина ------------------------------------------------------------- */

.header__cart {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .8rem;
  border: 1px solid var(--brand-control-on-dark);
  border-radius: 999px;
  text-decoration: none;
  color: var(--brand-on-dark);
  font-size: .9rem;
  white-space: nowrap;
}
.header__cart:hover { background: var(--brand-blue); border-color: var(--brand-on-dark); color: var(--brand-on-dark); }
.header__cart.is-full { background: var(--brand-red); border-color: var(--brand-red); color: var(--brand-on-dark); }
.header__cart.is-full:hover { background: var(--brand-red-hover); border-color: var(--brand-on-dark); }
.header__cart-num:not(:empty) {
  font-family: var(--num);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

/* Плитка товара — ссылка целиком, поэтому кнопка лежит рядом с ней,
   а не внутри: кнопка внутри ссылки — недопустимая вложенность. */
.grid--products > .card { margin-bottom: 0; }
.card__add {
  width: 100%;
  margin-top: -1px;
  padding: .55rem;
  font: inherit;
  font-size: .88rem;
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--paper);
  color: var(--accent-ink);
  cursor: pointer;
}
.card__add:hover { background: var(--accent-wash); border-color: var(--accent); }
.card__add.is-added { background: var(--accent); border-color: var(--accent); color: var(--brand-on-dark); }

.cart { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 2rem; }
.cart__row {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto auto auto;
  gap: 1rem;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .7rem .9rem;
}
.cart__img {
  width: 4.5rem; height: 4.5rem;
  display: grid; place-items: center;
  background: var(--paper); border-radius: 6px;
  font-size: 1.6rem; text-decoration: none;
}
.cart__img img { width: 100%; height: 100%; object-fit: contain; }
.cart__main { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.cart__title { color: inherit; text-decoration: none; line-height: 1.35; }
.cart__title:hover { color: var(--accent-ink); }
.cart__unit { font-size: .85rem; color: var(--muted); }

.cart__qty { display: flex; align-items: center; border: 1px solid var(--brand-control); border-radius: var(--radius); overflow: hidden; }
.cart__qty button {
  width: 2.1rem; height: 2.1rem; padding: 0;
  border: 0; background: var(--paper); cursor: pointer; font-size: 1.05rem; color: var(--ink);
}
.cart__qty button:hover { background: var(--accent-wash); }
.cart__qty input {
  width: 3rem; height: 2.1rem; padding: 0; text-align: center;
  border: 0; border-inline: 1px solid var(--line);
  font-family: var(--num); font-variant-numeric: tabular-nums; font-size: .95rem;
  background: var(--paper); color: var(--ink);
}
.cart__qty input:focus-visible { outline-offset: -2px; }
.cart__sum {
  color: var(--accent-ink);
  font-family: var(--num); font-variant-numeric: tabular-nums;
  font-weight: 700; white-space: nowrap; min-width: 6rem; text-align: right;
}
.cart__drop {
  width: 2rem; height: 2rem; padding: 0; line-height: 1;
  border: 0; background: transparent; color: var(--muted);
  font-size: 1.3rem; cursor: pointer; border-radius: 6px;
}
.cart__drop:hover { background: var(--brand-error-bg); color: var(--brand-error); }

@media (max-width: 44rem) {
  .cart__row { grid-template-columns: 3.5rem minmax(0, 1fr) auto; row-gap: .6rem; }
  .cart__img { width: 3.5rem; height: 3.5rem; }
  .cart__qty { grid-column: 2; }
  .cart__sum { grid-column: 3; }
  .cart__drop { grid-row: 1; grid-column: 3; justify-self: end; }
}

.order__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 52rem) { .order__grid { grid-template-columns: minmax(0, 1fr); } }

.order__fields h2, .order__total h2 { font-size: 1.15rem; margin: 0 0 1rem; }
.order__total {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  position: sticky;
  top: 1rem;
}
.order__line { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 .6rem; }
.order__line b { font-family: var(--num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.order__line--big {
  color: var(--accent-ink);
  border-top: 1px solid var(--line);
  margin-top: 1rem; padding-top: .9rem;
  font-size: 1.15rem;
}
.btn--wide { width: 100%; margin-top: .6rem; }

@media (max-width: 23rem) {
  .cart__qty { grid-column: 1 / 3; justify-self: start; }
  .order__line b { text-align: right; white-space: normal; }
}

/* ---- как нас найти ------------------------------------------------------- */

.place {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}
@media (max-width: 46rem) { .place { grid-template-columns: 1fr; gap: 1.25rem; } }

.place__photo { margin: 0; }
.place__photo img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.place__photo figcaption { margin-top: .5rem; font-size: .85rem; color: var(--muted); }

.place__info p { margin: 0 0 .6rem; }
.place__address { font-size: 1.15rem; font-weight: 600; line-height: 1.35; }
.place__hours { color: var(--muted); }
.place__phone a { font-size: 1.3rem; font-weight: 700; text-decoration: none; }

.map { margin-top: 1.5rem; }

/* ---- мелочи -------------------------------------------------------------- */

.page-head__note { color: var(--muted); font-size: .95rem; margin: -.3rem 0 0; }
.section--tight { padding-top: 0; }
.section--grey { background: var(--sand); }
.empty { color: var(--muted); }
.map iframe, .map > * { width: 100%; min-height: 20rem; border: 0; border-radius: var(--radius); }

.pager { display: flex; gap: 1.5rem; align-items: center; justify-content: center; margin-top: 2rem; }
.pager span { color: var(--muted); font-size: .9rem; }

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

/* ---- согласие и документы ------------------------------------------------- */

.agree {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin: 1rem 0 .4rem;
  font-size: .85rem;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
}
.agree input { margin-top: .15rem; }
.agree a { color: var(--accent-ink); }

.footer__legal {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  border-top: 1px solid var(--brand-line-on-dark);
}
.footer__docs { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.footer__docs a { font-size: .85rem; }
.footer__req { margin: 0; font-size: .8rem; color: var(--brand-muted-on-dark); line-height: 1.5; }

/* ---- наличие -------------------------------------------------------------- */

.stock {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.stock::before {
  content: "";
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.stock--yes { color: var(--brand-ok); }
.stock--order { color: var(--muted); font-weight: 500; }

.stock--big {
  font-size: .95rem;
  margin: -.6rem 0 1.25rem;
  padding: .5rem .8rem;
  border-radius: var(--radius);
  background: var(--sand);
}
.stock--big.stock--yes { background: var(--brand-ok-bg); }

.facet__more { display: inline-block; }
.facet__more > summary {
  cursor: pointer;
  padding: .28rem .65rem;
  border: 1px dashed var(--line);
  border-radius: 999px;
  font-size: .85rem;
  color: var(--muted);
  list-style: none;
}
.facet__more > summary::-webkit-details-marker { display: none; }
.facet__more > summary:hover { border-color: var(--accent); color: var(--ink); }
.facet__more[open] > summary { margin-bottom: .4rem; }
.facet__more .facet__values { margin-top: .3rem; }
.chip--hint { border-style: dashed; color: var(--muted); }

/* ---- раскладка каталога: фильтры слева ------------------------------------ */

.shop {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
}
@media (max-width: 56rem) { .shop { grid-template-columns: 1fr; gap: 1rem; } }

.side {
  position: sticky;
  top: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .9rem 1rem 1rem;
  font-size: .9rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}
@media (max-width: 56rem) { .side { position: static; max-height: none; } }

.side__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: .6rem;
  margin-bottom: .5rem;
  border-bottom: 1px solid var(--line);
  font-weight: 650;
}
.side__head a { font-size: .82rem; font-weight: 400; }
.side__heading { cursor: pointer; font-weight: 650; margin-bottom: .25rem; }
.side__panel:not([open]) .side__heading { margin-bottom: 0; }
.side__reset { display: inline-block; margin: .3rem 0 .55rem; font-size: .85rem; }
.side__brand { margin: .45rem .35rem .15rem; font-size: .82rem; font-weight: 600; }

.side__group + .side__group { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.side__title {
  margin: 0 0 .45rem;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.side__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .1rem; }

.side__opt {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .28rem .35rem;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  line-height: 1.3;
}
.side__opt:hover { background: var(--accent-wash); }
.side__box {
  width: .95rem; height: .95rem; flex: none;
  border: 1px solid var(--brand-control);
  border-radius: 4px;
  background: var(--paper);
}
.side__opt.is-on .side__box {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--paper);
}
.side__opt.is-on { font-weight: 600; }
.side__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side__n {
  font-family: var(--num);
  font-variant-numeric: tabular-nums;
  font-size: .78rem;
  color: var(--muted);
}

.side__more > summary {
  cursor: pointer;
  padding: .3rem .35rem;
  font-size: .82rem;
  color: var(--accent-ink);
  list-style: none;
}
.side__more > summary::-webkit-details-marker { display: none; }
.side__more > summary:hover { text-decoration: underline; }
.side__hint { margin: .4rem .35rem 0; font-size: .78rem; color: var(--muted); }

.available-side {
  top: calc(74px + .8rem);
  max-height: calc(100vh - 74px - 1.6rem);
}
.available-side__selected { font-weight: 400; }
.available-side nav { margin-top: .6rem; }
.available-side > .side__panel + .side__panel {
  border-top: 1px solid var(--line);
  margin-top: .7rem;
  padding-top: .7rem;
}
.available-filters { scroll-margin-top: 6rem; }
.available-tree { list-style: none; margin: 0; padding: 0; }
.available-tree .available-tree {
  margin: .15rem 0 .3rem .6rem;
  padding-inline-start: .5rem;
  border-inline-start: 1px solid var(--line);
}
.available-tree__link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .45rem;
  padding: .38rem .4rem;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.25;
}
.available-tree__link > span:first-child { overflow-wrap: anywhere; }
.available-tree__link .side__n { flex: none; }
.available-tree__link:hover { background: var(--accent-wash); }
.available-tree__link[aria-current="true"] {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 700;
}
.available-tree__all,
.available-side nav > .available-tree > li > .available-tree__link { font-weight: 650; }
@media (max-width: 56rem) {
  .available-side { max-height: none; }
  .available-side .side__heading { padding: .25rem 0; }
  .available-tree__link { padding-block: .65rem; }
}

/* ---- карточка товара в списке -------------------------------------------- */

.grid--products { grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: .75rem; }

.card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .7rem .75rem .75rem;
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--accent); box-shadow: var(--shadow); }

.card__link { display: flex; flex-direction: column; gap: .4rem; text-decoration: none; color: inherit; }
.card__img {
  aspect-ratio: 1;
  background: var(--paper);
  border-radius: 6px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.card__img img { width: 100%; height: 100%; object-fit: contain; }
.card__noimg { font-size: 2rem; opacity: .25; }
.card__title { font-size: .88rem; line-height: 1.35; }

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-top: auto;
  padding-top: .6rem;
}
.card__price { color: var(--accent-ink); font-weight: 700; font-size: 1rem; white-space: nowrap; }

/* Кнопка намеренно мелкая: в плитке главное — товар и цена,
   а не призыв. Крупная кнопка на два десятка карточек кричит. */
.card__add {
  padding: .3rem .6rem;
  font: inherit;
  font-size: .78rem;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--paper);
  color: var(--accent-ink);
  cursor: pointer;
}
.card__add:hover { background: var(--accent-wash); }
.card__add.is-added { background: var(--accent); border-color: var(--accent); color: var(--brand-on-dark); }
.product__delivery {
    margin: 1.2rem 0;
    border: 1px solid var(--line, #d6dbdd);
    border-radius: 0.6rem;
}

.product__delivery > summary {
    padding: 0.8rem 1rem;
    font-weight: 650;
    cursor: pointer;
}

.product__delivery .form__row {
    padding: 0 1rem 0.9rem;
}

.delivery-result {
    margin: 0;
    font-weight: 650;
}

.delivery-result:empty {
    display: none;
}

select[data-delivery-picker] {
  padding: .65rem .85rem;
  border-radius: 999px;
}

select.delivery-picker__source {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  clip-path: inset(50%);
  pointer-events: none;
}

.delivery-picker__trigger {
  display: flex;
  width: 100%;
  min-height: 2.75rem;
  justify-content: space-between;
  text-align: left;
  border-radius: 999px;
}
.delivery-picker__trigger::-webkit-details-marker { display: none; }
.delivery-picker__trigger::after {
  content: "";
  width: .45rem;
  height: .45rem;
  margin-inline: .5rem .15rem;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  flex: none;
}
.delivery-picker[open] > .delivery-picker__trigger::after { transform: rotate(225deg); }

.delivery-picker__list {
  margin-top: .45rem;
  max-height: 17rem;
  overflow-y: auto;
  padding: .65rem .75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.delivery-picker__heading { margin: .55rem 0 .35rem; font-size: .85rem; font-weight: 700; }
.delivery-picker__choices { display: flex; flex-wrap: wrap; gap: .35rem; }
.delivery-picker__choices + .delivery-picker__choices { margin-top: .45rem; }
.delivery-picker__choice {
  min-height: 2.4rem;
  padding: .4rem .75rem;
  border-radius: 999px;
  white-space: normal;
  text-align: left;
  font-size: .9rem;
}
.delivery-picker__choice[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.delivery-picker__hint { margin: .4rem 0 0; color: var(--brand-red); }

.gutter-family {
    margin: 0.75rem 0;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line, #d6dbdd);
    border-radius: 0.6rem;
    background: #fff;
}

.gutter-family summary {
    cursor: pointer;
    font-weight: 650;
}

.gutter-list {
    list-style: none;
    padding: 0;
    margin: 0.8rem 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: 0.75rem;
}

.gutter-list li {
    display: grid;
    gap: 0.25rem;
    padding: 0.65rem;
    border: 1px solid var(--line, #d6dbdd);
    border-radius: 0.4rem;
}

.gutter-list span {
    font-size: 0.9rem;
}

.terrace-form {
    margin-top: 1rem;
}

.terrace-form__fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
    gap: 0.8rem;
}

.terrace-form__actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.terrace-form__actions [hidden],
.terrace-request[hidden] {
    display: none;
}

.terrace-result,
.terrace-request {
    white-space: pre-line;
}

.terrace-request p {
    margin-top: 0;
}
