/* Внутренние страницы: каталог, зона, товар, корзина, «под заказ» */

.page { padding-top: 12px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: var(--fs-sm); color: var(--ink-soft); margin: 8px 0 20px; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs span[aria-current] { color: var(--ink); }
.crumbs .sep { opacity: .5; }

.page-title { font-size: var(--fs-2xl); }
.page-lead { margin-top: 14px; color: var(--ink-soft); font-size: var(--fs-md); max-width: 60ch; }

/* ============ БАННЕР ЗОНЫ ============ */
.zone-hero {
  position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-xl);
  min-height: clamp(260px, 30vw, 400px); padding: clamp(22px, 4vw, 48px);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; color: var(--white);
}
.zone-hero img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.zone-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(34, 28, 25, .7), rgba(34, 28, 25, .05) 65%); }
.zone-hero h1 { font-size: var(--fs-2xl); }
.zone-hero p { max-width: 52ch; color: rgba(255, 255, 255, .9); font-size: var(--fs-md); }

/* Переключатель зон */
.zone-switch { display: flex; gap: 8px; overflow-x: auto; padding: 20px 0 4px; scrollbar-width: none; }
.zone-switch::-webkit-scrollbar { display: none; }
.pill {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px;
  border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--white);
  text-decoration: none; font-size: .95rem; white-space: nowrap; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.pill:hover { border-color: var(--ink); }
.pill[aria-current], .pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.pill small { color: inherit; opacity: .6; font-size: .8rem; }
.pill--soon { color: var(--ink-soft); }

/* Панель фильтров */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 28px 0 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sort { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--ink-soft); }
.sort select {
  min-height: 44px; padding: 8px 40px 8px 16px; border-radius: var(--r-pill); border: 1px solid var(--line);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='none' stroke='%23303030' stroke-width='1.8'%3E%3Cpath d='M3 6l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 16px center;
  appearance: none; color: var(--ink); font-size: .95rem; cursor: pointer;
}

/* Пустое состояние */
.empty {
  display: grid; gap: 14px; justify-items: start; padding: clamp(24px, 4vw, 48px);
  border: 1px dashed #CFCBC4; border-radius: var(--r-xl); background: var(--white);
}
.empty h2 { font-size: var(--fs-xl); }
.empty p { color: var(--ink-soft); max-width: 56ch; }

/* Полоса «не нашли?» */
.not-found {
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: clamp(22px, 3vw, 36px); border-radius: var(--r-xl); background: var(--linen);
}
.not-found h2 { font-size: var(--fs-xl); }
.not-found p { color: var(--ink-soft); margin-top: 8px; }

/* ============ ТОВАР ============ */
.product { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.gallery { display: grid; gap: 12px; }
.gallery__main { border-radius: var(--r-xl); overflow: hidden; background: var(--linen); aspect-ratio: 4 / 3.4; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: 10px; }
.gallery__thumbs button {
  width: 88px; aspect-ratio: 1; padding: 0; border-radius: var(--r-md); overflow: hidden;
  border: 2px solid transparent; background: var(--linen);
}
.gallery__thumbs button[aria-pressed="true"] { border-color: var(--wood); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }

.buy { position: sticky; top: 104px; display: grid; gap: 22px; }
.buy h1 { font-size: var(--fs-2xl); }
.buy__price { font-family: var(--font-display); font-size: var(--fs-2xl); }
.buy__price small { font-family: var(--font-text); font-size: var(--fs-md); color: var(--ink-soft); }
.specs { margin: 0; display: grid; border-top: 1px solid var(--line); }
.specs > div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--ink-soft); }
.specs dd { margin: 0; }
.specs a { color: inherit; }
.buy__row { display: flex; gap: 12px; flex-wrap: wrap; }
.buy__row .btn { flex: 1 1 200px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--white); min-height: 52px; }
.stepper button { width: 48px; height: 48px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; }
.stepper button:hover { background: var(--linen); }
.stepper input { width: 48px; border: 0; background: none; text-align: center; font-size: var(--fs-md); -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy__notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--ink-soft); font-size: var(--fs-sm); }
.buy__notes li { display: flex; gap: 10px; }
.buy__notes li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: .55em; border-radius: 50%; background: var(--wood); }
.buy__desc { color: var(--ink-soft); }
.buy__status { min-height: 1.5em; font-size: var(--fs-sm); color: var(--wood); }
@media (max-width: 900px) {
  .product { grid-template-columns: 1fr; }
  .buy { position: static; }
}

/* ============ КОРЗИНА ============ */
.cart { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; margin-top: 28px; }
.cart__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.line { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto auto; gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.line img { width: 96px; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-md); }
.line__name { font-family: var(--font-display); font-size: var(--fs-md); line-height: 1.3; }
.line__name a { text-decoration: none; }
.line__meta { color: var(--ink-soft); font-size: var(--fs-sm); margin-top: 4px; }
.line__sum { font-family: var(--font-display); font-size: var(--fs-md); min-width: 100px; text-align: right; white-space: nowrap; }
.line__remove { width: 44px; height: 44px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; color: var(--ink-soft); }
.line__remove:hover { background: var(--linen); color: var(--ink); }
.cart__h { font-size: var(--fs-lg); margin: 36px 0 10px; }
@media (max-width: 700px) {
  .line { grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: "img info rm" "img step sum"; gap: 10px 14px; }
  .line img { width: 72px; grid-area: img; align-self: start; }
  .line__info { grid-area: info; } .line .stepper { grid-area: step; justify-self: start; }
  .line__sum { grid-area: sum; min-width: 0; } .line__remove { grid-area: rm; }
}

.summary { position: sticky; top: 104px; display: grid; gap: 18px; padding: clamp(20px, 3vw, 32px); border-radius: var(--r-xl); background: var(--white); border: 1px solid var(--line); }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.summary__total b { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-xl); }
.summary__note { color: var(--ink-soft); font-size: var(--fs-sm); }
.summary form { display: grid; gap: 14px; }
.summary .btn { width: 100%; }
.fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 1000px) { .cart { grid-template-columns: 1fr; } .summary { position: static; } }
@media (max-width: 420px) { .fields-2 { grid-template-columns: 1fr; } }

.done { display: grid; gap: 14px; justify-items: start; padding: clamp(24px, 4vw, 48px); border-radius: var(--r-xl); background: var(--linen); margin-top: 28px; }
.done h2 { font-size: var(--fs-xl); }
.done p { color: var(--ink-soft); max-width: 56ch; }

/* ============ ПОД ЗАКАЗ ============ */
.order { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.order__photo { border-radius: var(--r-xl); overflow: hidden; position: sticky; top: 104px; }
.order__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.order__steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.order__steps li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.order__form { display: grid; gap: 14px; margin-top: 32px; padding: clamp(20px, 3vw, 32px); border-radius: var(--r-xl); background: var(--white); border: 1px solid var(--line); }
.order__form h2 { font-size: var(--fs-lg); }
.file { display: grid; gap: 8px; font-size: var(--fs-sm); color: var(--ink-soft); }
.file input { min-width: 0; max-width: 100%; padding: 14px; border: 1px dashed #CFCBC4; border-radius: var(--r-md); background: var(--bg); color: var(--ink); }
.order__note { font-size: var(--fs-sm); color: var(--ink-soft); }
.order__note a { color: inherit; }
@media (max-width: 900px) { .order { grid-template-columns: minmax(0, 1fr); } .order__photo { position: static; } .order__photo img { aspect-ratio: 16 / 9; } }

/* Фильтр «С электроприводом» и пустая выдача */
.pill--accent { border-color: var(--wood); color: var(--wood); }
.pill--accent[aria-pressed="true"] { background: var(--wood); border-color: var(--wood); color: var(--white); }
.grid-empty { grid-column: 1 / -1; padding: 32px 0; color: var(--ink-soft); }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ============ КАТАЛОГ: комнаты и подразделы ============ */
.dir__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.dir__head h2 { font-size: var(--fs-xl); }
.dir__head a { color: var(--ink-soft); }
.dir__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 16px; }
.dir__cat { display: grid; gap: 10px; text-decoration: none; }
.dir__cat img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-lg); background: var(--linen); transition: transform .5s var(--ease); }
.dir__cat:hover img { transform: scale(1.02); }
.dir__cat span { font-size: var(--fs-base); }
.dir__cat:hover span { text-decoration: underline; text-underline-offset: 3px; }

/* Комплект: коллаж целиком и список состава */
.gallery--set .gallery__main { aspect-ratio: 4 / 5; background: var(--white); border: 1px solid var(--line); }
.gallery--set .gallery__main img { object-fit: contain; }
.parts { list-style: none; padding: 0; margin: 0; max-width: 760px; counter-reset: part; border-top: 1px solid var(--line); }
.parts__item { display: flex; justify-content: space-between; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); counter-increment: part; }
.parts__name::before { content: counter(part, decimal-leading-zero); display: inline-block; width: 2.4em; color: var(--ink-soft); font-size: var(--fs-sm); }
.parts__name a { text-decoration: underline; text-underline-offset: 3px; }
.parts__size { color: var(--ink-soft); white-space: nowrap; }
@media (max-width: 600px) { .parts__item { flex-direction: column; gap: 4px; } .parts__size { padding-left: 2.4em; } }

.gallery--photo .gallery__main { aspect-ratio: auto; }
.gallery--photo .gallery__main img { height: auto; }

/* Текстовые страницы: политика конфиденциальности */
.prose { max-width: 760px; margin-top: 8px; }
.prose h2 { font-size: var(--fs-lg); margin: 36px 0 12px; }
.prose p, .prose li { color: var(--ink-soft); line-height: 1.65; }
.prose p + p { margin-top: 10px; }
.prose ul { margin: 10px 0 0; padding-left: 1.2em; display: grid; gap: 4px; }
.prose a { color: var(--ink); }
.prose__date { margin-top: 36px; font-size: var(--fs-sm); }
