/* Черновик карточки товара «как WooCommerce»: только страница product/_layout-stair-preview.html */

.product-stair-wc {
  padding-bottom: 3rem;
}

.product-stair-wc-wrap {
  max-width: 1100px;
}

/* CTA и FAQ на одной ширине с контентом витрины */
.wrap.product-works-cta-wrap,
.product-stair-page-callback > .wrap {
  max-width: 1100px;
}

/* Крошки — единый блок .category-crumbs (style.css), отступ сверху у .product-stair-wc-wrap */

.product-stair-wc-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 450px);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
  padding-top: 0.5rem;
  /* низ без своего воздуха: шаг до следующей секции задаёт ритм-блок в конце файла */
  padding-bottom: 0;
}

.product-stair-wc-media {
  grid-column: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.product-stair-wc-summary {
  grid-column: 2;
  min-width: 0;
}

.product-stair-wc-top:has(.product-stair-wc-summary--price-bottom) {
  align-items: stretch;
}

.product-stair-wc-summary--price-bottom {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.product-stair-wc-summary--price-bottom .product-stair-wc-summary-main {
  flex: 0 0 auto;
}

.product-stair-wc-summary--price-bottom .product-stair-wc-summary-price-slot {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  width: 100%;
}

.product-stair-wc-summary--price-bottom .product-stair-wc-summary-price-slot .product-stair-wc-price-cta-grid {
  margin: 0;
  width: 100%;
}

.product-stair-wc-summary-intro {
  margin: 0.85rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text);
}

.product-stair-wc-summary-intro:not(:has(+ .product-stair-wc-summary-note)) {
  margin-bottom: 1.1rem;
}

.product-stair-wc-prose-intro {
  margin: 0 0 1.1rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text);
}

.product-stair-wc-prose-intro + .product-stair-wc-options .product-stair-wc-options-lead:empty {
  display: none;
}

.product-stair-wc-summary-materials {
  margin-top: 1rem;
}

.product-stair-wc-summary-materials .product-stair-wc-options-lead:empty {
  display: none;
}

.product-stair-wc-summary-materials .product-stair-wc-options-title {
  margin: 0 0 0.45rem;
}

.product-stair-wc-summary-materials .product-stair-wc-options-list {
  margin: 0 0 0.65rem;
}

.product-stair-wc-summary-note {
  margin: 0.35rem 0 1.1rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--muted);
}

.product-stair-wc-summary-note--under-price {
  margin: 0.45rem 0 0;
  text-align: right;
}

.product-stair-wc-summary-price-block {
  width: 100%;
}

.product-stair-wc-highlights-line {
  margin: 0.65rem 0 0;
  padding-left: 0.6rem;
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--text);
}

@media (max-width: 880px) {
  .product-stair-wc-summary--price-bottom .product-stair-wc-summary-price-slot {
    flex: 0 0 auto;
    padding-top: 1.1rem;
  }
}

@media (max-width: 880px) {
  .product-stair-wc-top {
    display: flex;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .product-stair-wc-media {
    order: 1;
  }

  .product-stair-wc-summary {
    order: 2;
  }
}

.product-stair-wc-media-between:empty {
  display: none;
}

.product-stair-wc-media-between:not(:empty) {
  margin: clamp(0.75rem, 2vw, 1.25rem) 0;
}

.product-stair-wc-works--full {
  width: 100%;
  margin-top: clamp(0.85rem, 2vw, 1.35rem);
}

.product-stair-wc-works--full .gallery-mount,
.product-stair-wc-works--full .gallery__root,
.product-stair-wc-works--full .gallery__masonry {
  width: 100%;
}

/* —— Галерея —— */
.product-stair-wc-gallery {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
}

/* Заголовок «Наши работы» в секции masonry: после блока с гарантией, перед сеткой (не в колонке с фото — иначе на моб. он оказывается над крошками) */
.product-stair-wc-works .product-stair-wc-works-heading {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0.35rem;
  width: 100%;
}

@media (min-width: 881px) {
  .product-stair-wc-works .product-stair-wc-works-heading {
    padding-top: 0.5rem;
  }
}

/* Габарит навеса в последней крошке (product.php, только canopies) */
.category-crumbs__size {
  margin-left: 0.5em;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.category-crumbs__size::before {
  content: "·";
  margin-right: 0.5em;
}

/* Белая карточка-подложка в стиле «хита сезона» (.cat-hero__hit): фото вложено
   с отступами и своим закруглением, под ним инфо-строка название+цена */
.product-stair-wc-main-frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 26px 50px -30px rgba(20, 24, 27, 0.55);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-self: start;
  width: 100%;
}

.product-stair-wc-main-img {
  display: block;
  width: 100%;
  height: auto;
}

.product-stair-wc-main-open {
  position: relative;
  display: block;
  width: 100%;
  line-height: 0;
  padding: 0;
  margin: 0;
  border: none;
  cursor: zoom-in;
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
}

.product-stair-wc-main-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.product-stair-wc-main-open-badge {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  font-size: 1.15rem;
  line-height: 1;
  pointer-events: none;
}

.product-stair-wc-main-open:hover .product-stair-wc-main-open-badge {
  background: #fff;
}

.product-stair-wc-main-open .card-capacity {
  position: absolute;
  left: 0.65rem;
  bottom: 0.65rem;
  z-index: 3;
}

/* Инфо-строка карточки фото: название товара (как cat-hero__hit-info) */
.product-stair-wc-main-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.35rem 0.25rem;
}

.product-stair-wc-main-info__title {
  color: var(--text);
  font-weight: 700;
  font-size: 0.98rem;
  min-width: 0;
  line-height: 1.3;
}

/* тип+размер — всегда своей строкой под названием, с заглавной буквы */
.product-stair-wc-main-info__meta {
  display: block;
  margin-top: 0.1rem;
}

.product-stair-wc-main-info__meta::first-letter {
  text-transform: uppercase;
}

.product-stair-wc-main-info__type {
  color: var(--muted);
  font-weight: 600;
}

.product-stair-wc-main-info__size {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.product-stair-wc-options {
  margin-top: 0;
  width: 100%;
}

.product-stair-wc-options-lead {
  margin: 0 0 0.85rem;
}

.product-stair-wc-options-lead:empty {
  display: block;
}

.product-stair-wc-options-title {
  margin: 0 0 0.5rem;
  font-size: inherit;
  font-weight: 600;
}

.product-stair-wc-options-list {
  margin: 0;
  padding-left: 1.2rem;
}

.product-stair-wc-options-list li {
  margin-bottom: 0.35rem;
  color: var(--text);
}

.product-stair-wc-options-list li strong {
  font-weight: 600;
}

/* Десктоп: главное фото не выше блока справа; рамка облегает картинку (без полос по бокам) */
@media (min-width: 881px) {
  .product-stair-wc-main-frame {
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .product-stair-wc-main-open {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
    text-align: center;
  }

  .product-stair-wc-main-img {
    width: auto;
    max-width: 100%;
    max-height: clamp(390px, 70vh, 520px);
    height: auto;
    object-fit: contain;
  }
}

.product-stair-wc-thumbs-outer {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.product-stair-wc-thumbs-scroll {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.15rem 0;
  scrollbar-width: thin;
}

.product-stair-wc-thumbs-scroll::-webkit-scrollbar {
  height: 6px;
}

.product-stair-wc-thumbs-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.product-stair-wc-thumb {
  flex: 0 0 auto;
  width: 4.75rem;
  height: 4.75rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.product-stair-wc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-stair-wc-thumb:hover,
.product-stair-wc-thumb:focus-visible {
  border-color: rgba(45, 106, 79, 0.45);
}

.product-stair-wc-thumb.is-active {
  border-color: var(--accent);
}

.product-stair-wc-thumbs-next {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
}

.product-stair-wc-thumbs-next:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Блок «Наши работы» на карточке: та же masonry + lightbox, что на pages/gallery.html (assets/gallery.js) */
.product-stair-gallery-mount {
  margin-top: 0;
}

/* SEO-текст под галереей */
.product-stair-wc-wrap .product-stair-seo.wp-desc {
  margin-top: 0.5rem;
  padding-top: 0;
  color: var(--text);
}

/* Единый размер текста: SEO + опции + блок справа */
.product-stair-wc-wrap .product-stair-wc-prose,
.product-stair-wc-wrap .product-stair-wc-summary,
.product-stair-wc-wrap .product-stair-wc-excerpt--body-text,
.product-stair-wc-wrap .product-stair-wc-spec.product-stair-wc-excerpt {
  font-size: 0.95rem;
  line-height: 1.55;
}

.product-stair-wc-wrap .product-stair-wc-prose :where(p, li, ul, ol, span, strong, .product-stair-wc-options-title),
.product-stair-wc-wrap .product-stair-wc-summary :where(p, li, ul, ol, span, strong, .product-stair-wc-includes-title),
.product-stair-wc-wrap .product-stair-wc-excerpt--body-text :where(p, li, ul, ol, span, strong) {
  font-size: inherit;
  line-height: inherit;
}

.product-stair-wc-wrap .product-stair-wc-prose strong,
.product-stair-wc-wrap .product-stair-wc-summary strong,
.product-stair-wc-wrap .product-stair-wc-excerpt--body-text strong {
  font-weight: 600;
}

/* SEO h3 — та же схема, что у «Наши работы»: .home-works-heading + .home-h2-split + .home-head-split__* */
.product-stair-seo > h3.home-works-heading.home-h2-split:first-of-type {
  margin-top: 0;
}

.product-stair-seo > h3.home-works-heading.home-h2-split:not(:first-of-type) {
  margin-top: 1.75rem;
}

/* FAQ-аккордеон: классы home-faq-* из style.css; на карточке — на всю ширину блока */
.product-stair-seo .product-stair-seo-faq.home-faq-list {
  max-width: none;
  margin: 0;
}

.product-stair-seo p {
  margin: 0 0 0.85rem;
}

.product-stair-seo p:last-child {
  margin-bottom: 0;
}

.product-stair-seo-list {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.product-stair-seo-list li {
  margin-bottom: 0.5rem;
}

.product-stair-seo-list li:last-child {
  margin-bottom: 0;
}

.product-stair-seo-list--num {
  list-style: decimal;
}

/* Название и подпись в sticky-крошках (беседки) */
.category-crumbs-product-head {
  flex: 0 1 auto;
  max-width: min(58%, 32rem);
  text-align: right;
  margin-left: auto;
}

.category-crumbs-product-head__title {
  margin: 0;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text, #1a1a1a);
}

.category-crumbs-product-head .product-stair-wc-card-teaser {
  margin: 0.2rem 0 0;
  font-size: clamp(0.82rem, 1.5vw, 0.92rem);
  line-height: 1.35;
  color: var(--muted);
}

@media (max-width: 720px) {
  .category-crumbs-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }

  .category-crumbs-product-head {
    max-width: none;
    text-align: left;
    margin-left: 0;
  }
}

/* —— Легенда справа —— */
.product-stair-wc-title {
  margin: 0 0 1rem;
  font-size: clamp(1.55rem, 3.2vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.product-stair-wc-card-teaser {
  margin: -0.35rem 0 0.85rem;
}

/* 2×2: слева — «Цена от»+старая (верх) и новая цена (низ), справа — объединённая колонка с кнопкой */
.product-stair-wc-price-cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 0;
  margin-bottom: 1.1rem;
  line-height: 1.35;
}

.product-stair-wc-price-cta-grid__from {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  align-content: center;
  gap: 0.25rem 0.4rem;
  min-width: 0;
  padding: 0.42rem 0.5rem 0.15rem 0.6rem;
}

.product-stair-wc-price-cta-grid__current {
  grid-column: 1;
  grid-row: 2;
  padding: 0.1rem 0.45rem 0.4rem 0.6rem;
  min-width: 0;
  text-align: right;
}

.product-stair-wc-price-cta-grid__per-meter-note {
  grid-column: 1;
  grid-row: 3;
  margin: 0;
  padding: 0 0.45rem 0.15rem 0.6rem;
  text-align: right;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--muted);
}

.product-stair-wc-price-cta-grid__action {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  place-content: center;
  place-items: center;
  align-self: stretch;
  min-height: 0;
  min-width: min(12.25rem, 44vw);
  box-sizing: border-box;
  padding: 0.4rem 0.5rem 0.4rem 0.4rem;
}

.product-stair-wc-price-cta-grid__action .product-stair-wc-cta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  text-align: center;
  white-space: normal;
  line-height: 1.2;
  font-size: 0.95rem;
  padding: 0.7rem 0.65rem;
  gap: 0.1em;
  align-self: center;
  border-radius: 11px;
}

.product-stair-wc-price-cta-grid__action .product-stair-wc-cta .product-stair-wc-cta__line {
  display: block;
  line-height: 1.1;
}

.product-stair-wc-price-label {
  display: inline;
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

.product-stair-wc-price-old {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: #c62828;
  text-decoration-thickness: 1.5px;
  white-space: nowrap;
}

.product-stair-wc-price-current {
  font-size: 1.82rem;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.12;
}

.product-stair-wc-includes-title {
  margin: 0 0 0.5rem;
  font-size: inherit;
  font-weight: 600;
  color: var(--text);
}

.product-stair-wc-includes-list {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: var(--text);
}

.product-stair-wc-includes-list li {
  margin-bottom: 0.35rem;
  color: var(--text);
}

.product-stair-wc-includes,
.product-stair-wc-includes * {
  color: var(--text);
}

.product-stair-wc-spec {
  margin: 0 0 1rem;
  color: var(--muted);
}

.product-stair-wc-excerpt--body-text {
  margin: 0 0 1rem;
  color: var(--text);
}

.product-stair-wc-excerpt--body-text,
.product-stair-wc-excerpt--body-text p,
.product-stair-wc-excerpt--body-text strong {
  color: var(--text);
}

.product-stair-wc-excerpt--body-text ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.product-stair-wc-excerpt--body-text li {
  margin-bottom: 0.35rem;
  color: var(--text);
}

.product-stair-wc-excerpt--body-text li strong {
  font-weight: 600;
}

.product-stair-wc-excerpt-body {
  line-height: 1.5;
}

.product-stair-wc-excerpt--full .product-stair-wc-excerpt-body {
  max-height: none;
  overflow: visible;
}

.product-stair-wc-excerpt.is-collapsed .product-stair-wc-excerpt-body {
  max-height: var(--excerpt-6l, 8.1em);
  overflow: hidden;
}

.product-stair-wc-excerpt-toggle {
  display: inline-block;
  margin: 0.5rem 0 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0073aa;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.product-stair-wc-excerpt-toggle:hover {
  color: #005a87;
}

.product-stair-wc-excerpt-toggle:focus-visible {
  outline: 2px solid var(--accent, #0073aa);
  outline-offset: 2px;
}

.product-stair-wc-highlight {
  margin: 0.35rem 0;
  font-size: inherit;
}

.product-stair-wc-cta {
  display: inline-flex;
  margin-top: 0;
  padding: 0.85rem 1.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.88rem;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.product-stair-wc-cta:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.product-stair-wc-preview-note {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* —— Лайтбокс галереи: затемнение как у .home-video-dialog (backdrop из style.css); без внешней «рамки» окна —— */
.product-stair-lb.home-video-dialog {
  max-height: min(96dvh, 100dvh);
  overflow: hidden;
  background: transparent;
  color: #fff;
  border: none;
  box-shadow: none;
  box-sizing: border-box;
}

.product-stair-lb-inner.home-video-dialog__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  background: transparent;
  padding: 0.65rem 0.85rem 0.85rem;
  box-sizing: border-box;
}

/* Шапка с «×» на фоне окна (#0a0a0a), не на чёрной подложке кадра */
.product-stair-lb-head {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  align-self: stretch;
  width: 100%;
  min-height: 0;
  padding: 0 0 0.15rem;
  box-sizing: border-box;
}

.product-stair-lb-inner .product-stair-lb-head .home-video-dialog__close {
  position: static;
  flex-shrink: 0;
}

/* «Закрыть» — как стрелки (.product-stair-lb-nav): заметный белый круг */
.product-stair-lb .product-stair-lb-head .home-video-dialog__close,
.product-stair-lb .product-stair-lb-head .product-stair-lb-close {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  box-shadow: var(--shadow);
  transition: background 0.15s ease;
}

.product-stair-lb .product-stair-lb-head .home-video-dialog__close:hover,
.product-stair-lb .product-stair-lb-head .home-video-dialog__close:focus-visible,
.product-stair-lb .product-stair-lb-head .product-stair-lb-close:hover,
.product-stair-lb .product-stair-lb-head .product-stair-lb-close:focus-visible {
  background: #fff;
}

.product-stair-lb-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  max-width: 100%;
}

/* Ряд: стрелки на фоне окна, чёрная подложка только у .product-stair-lb-stage */
.product-stair-lb-row {
  flex: 0 1 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 0;
  max-width: 100%;
  width: max-content;
  box-sizing: border-box;
}

/* Чёрная подложка = только узкая рамка вокруг фото (паспарту) */
.product-stair-lb-stage {
  flex: 0 1 auto;
  min-width: 0;
  width: fit-content;
  max-width: min(calc(100vw - 6.5rem), 1200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-sizing: border-box;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  line-height: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.product-stair-lb-img {
  display: block;
  max-width: 100%;
  max-height: min(78dvh, calc(100dvh - 13rem));
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
}

/* Как .slide-prev / .slide-next у баннера */
.product-stair-lb-nav {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: background 0.15s ease;
}

.product-stair-lb-nav:hover,
.product-stair-lb-nav:focus-visible {
  background: #fff;
}

@media (max-width: 520px) {
  .product-stair-lb-nav {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 1.35rem;
  }

  .product-stair-lb-stage {
    max-width: min(calc(100vw - 5.75rem), 1200px);
  }
}

/* Миниатюры на фоне окна, без отдельной «чёрной полки» под кадром */
.product-stair-lb-thumbs {
  flex: 0 0 auto;
  align-self: center;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0 0.15rem;
  margin: 0;
  max-width: calc(100vw - 2.5rem);
  width: max-content;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow-x: auto;
  box-sizing: border-box;
}

.product-stair-lb-thumb {
  flex: 0 0 auto;
  width: 3.5rem;
  height: 3.5rem;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0.88;
  transition:
    opacity 0.15s ease,
    border-color 0.15s ease;
}

.product-stair-lb-thumb:hover,
.product-stair-lb-thumb:focus-visible {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.42);
}

.product-stair-lb-thumb.is-active {
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.product-stair-lb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* —— Модалка «Заказать расчёт» —— */
.product-stair-order-dialog {
  width: calc(100vw - 1.5rem);
  max-width: 56rem;
  margin: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: #111;
  box-sizing: border-box;
}

.product-stair-order-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.product-stair-order-panel {
  background: #fff;
  border: 4px solid #000;
  border-radius: 2px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  max-height: min(92dvh, 92vh);
  overflow: auto;
}

.product-stair-order-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.product-stair-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem 0.75rem;
  border-bottom: 1px solid #ddd;
}

.product-stair-order-title {
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 700;
  line-height: 1.25;
}

.product-stair-order-close {
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.product-stair-order-close:hover,
.product-stair-order-close:focus-visible {
  background: #333;
}

.product-stair-order-form {
  padding: 1rem 1.25rem 1.35rem;
}

.product-stair-order-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
}

@media (max-width: 820px) {
  .product-stair-order-grid {
    grid-template-columns: 1fr;
  }
}

.product-stair-order-col-title {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.product-stair-order-field {
  margin-bottom: 0.85rem;
}

.product-stair-order-field:last-child {
  margin-bottom: 0;
}

.product-stair-order-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #333;
}

.product-stair-order-req {
  color: #c41e3a;
  font-weight: 700;
}

.product-stair-order-input,
.product-stair-order-textarea,
.product-stair-order-select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.65rem;
  font: inherit;
  font-size: 0.92rem;
  border: 1px solid #c8c8c8;
  border-radius: 4px;
  background: #fff;
  color: #111;
}

.product-stair-order-textarea {
  resize: vertical;
  min-height: 7rem;
}

.product-stair-order-input:focus-visible,
.product-stair-order-textarea:focus-visible,
.product-stair-order-select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: #999;
}

.product-stair-order-stars {
  display: flex;
  gap: 0.2rem;
}

.product-stair-order-star {
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.65rem;
  line-height: 1;
  color: #d4d4d4;
  transition: color 0.12s ease;
}

.product-stair-order-star.is-active,
.product-stair-order-star:hover {
  color: #eab308;
}

.product-stair-order-consent-block {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e5e5;
  text-align: center;
}

.product-stair-order-consent-note {
  margin: 0 auto;
  max-width: 36rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #555;
  text-align: center;
}

.product-stair-order-consent-note a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.product-stair-order-consent-note a:hover {
  color: var(--accent-hover);
}

.product-stair-order-error {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: #b91c1c;
}

.product-stair-order-status {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  color: #444;
}

.product-stair-order-actions {
  margin-top: 1.1rem;
  display: flex;
  justify-content: center;
}

.product-stair-order-submit {
  min-width: min(100%, 16rem);
  padding: 0.85rem 2rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.product-stair-order-submit:hover,
.product-stair-order-submit:focus-visible {
  background: var(--accent-hover);
}

.product-stair-order-submit:disabled {
  opacity: 0.75;
  cursor: wait;
}

.product-stair-order-thanks {
  padding: 2rem 1.5rem 2.25rem;
  text-align: center;
}

.product-stair-order-thanks p {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  line-height: 1.5;
}

/* ============================================================
   ВИТРИНА, мобила: фото → цена → «В стоимость входит»/описание →
   галерея-столбик → дальше как было. Обёртка становится flex-колонкой,
   top и aside расклеены display:contents, блоки упорядочены order.
   ============================================================ */
@media (max-width: 640px) {
  .product-stair-wc-wrap {
    display: flex;
    flex-direction: column;
  }

  /* всё неупомянутое — в конец в своём DOM-порядке */
  .product-stair-wc-wrap > * { order: 20; }

  .product-stair-wc-top,
  .product-stair-wc-summary { display: contents; }

  .product-stair-wc-media { order: 1; }

  .product-stair-wc-summary-price-slot {
    order: 2;
    margin: 0.75rem 0 0;
  }

  .product-stair-wc-summary-main {
    order: 3;
    margin-top: 1.25rem;
  }

  .product-stair-wc-wrap > .product-stair-wc-works {
    order: 4;
    margin-top: 1.5rem;
  }

  /* галерея: 2 столбика (CSS columns; JS-колонки расклеены display:contents,
     сам gallery.js не трогаем — он общий со страницей «Наши работы») */
  .product-stair-wc-works .gallery__masonry {
    display: block;
    columns: 2;
    column-gap: 0.5rem;
  }

  .product-stair-wc-works .gallery__col { display: contents; }

  .product-stair-wc-works .gallery__link {
    display: block;
    width: 100%;
    margin: 0 0 0.5rem !important;
    break-inside: avoid;
  }

  .product-stair-wc-works .gallery__link img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
  }
}

/* ============================================================
   ВИТРИНЫ: отступ до футера (было 40px у main + 80px маргина футера)
   и блок «У вас остались вопросы?» по шаблону главной страницы
   ============================================================ */
main { padding-bottom: 0; }
.site-footer { margin-top: 24px !important; }

.product-stair-page-callback .home-callback-card {
  background: var(--primary) !important;
  border: none !important;
  border-radius: 22px !important;
  color: #fff !important;
  overflow: hidden;
}

.product-stair-page-callback .home-callback-title .home-head-split__primary { color: var(--text) !important; }
.product-stair-page-callback .home-callback-title .home-head-split__secondary { color: var(--primary) !important; font-weight: 700; }

.product-stair-page-callback .home-callback-field input {
  background: #fff !important;
  border: 1px solid rgba(20, 24, 27, 0.14) !important;
  border-radius: 11px !important;
}

.product-stair-page-callback .home-callback-submit { background: #16181b !important; color: #fff !important; }
.product-stair-page-callback .home-callback-submit:hover { background: #2a2d31 !important; }
.product-stair-page-callback .home-callback-error { color: #fff; }
.product-stair-page-callback .home-callback-consent-notice { color: rgba(255, 255, 255, 0.72) !important; }
.product-stair-page-callback .home-callback-consent-notice a { color: #fff !important; }

/* ===== Вертикальный ритм витрины товара (десктоп) =====
   Как на всём сайте: --rhythm-master из style.css, видимый воздух ≈80px.
   Числа в calc — СОБСТВЕННЫЙ внутренний воздух блоков, не сосед. */
@media (min-width: 641px){
  .product-stair-wc-wrap > section.home-works,
  .product-stair-wc-wrap > section.product-stair-seo{margin-top:calc(var(--rhythm-master, 96px) - 16px)!important}
  /* CTA «Понравился проект?»: 48 — нижний воздух карточки товара над ним */
  main > .product-works-cta-wrap{margin-top:calc(var(--rhythm-master, 96px) - 16px - 48px)!important}
  /* FAQ: 40 — свой внутренний padding-top; на категориях перекрывается
     более специфичными правилами style.css — это правило для витрин */
  main > section.home-faq-callback{margin-top:calc(var(--rhythm-master, 96px) - 16px - 40px)!important}
}

/* ===== «Примеры наших работ» на линии прайс-блока (десктоп) =====
   Заголовок-дубль сидит в низу колонки фото; прайс при наличии галереи
   прижат к низу правой колонки (у крылец остаётся у списка — их правило
   специфичнее по body-классу). Секционный заголовок остаётся для мобилы. */
@media (min-width: 881px) {
  /* контент растягивается с равными промежутками, цена прижата к низу колонки */
  .product-stair-wc-top:has(.product-stair-wc-works-headslot) .product-stair-wc-summary--price-bottom .product-stair-wc-summary-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .product-stair-wc-top:has(.product-stair-wc-works-headslot) .product-stair-wc-summary--price-bottom .product-stair-wc-summary-price-slot {
    flex: 0 0 auto;
    align-items: flex-end;
    padding-bottom: 0.3rem;
  }
  .product-stair-wc-works-headslot {
    margin-top: auto;
    padding-top: 1rem;
  }
  .product-stair-wc-works-heading--in-media {
    margin: 0;
  }
  .product-stair-wc-works-heading--in-section {
    display: none;
  }
  .product-stair-wc-wrap > section.home-works.product-stair-wc-works {
    margin-top: 0.75rem !important;
  }
}
@media (max-width: 880px) {
  .product-stair-wc-works-headslot {
    display: none;
  }
}

/* Абзацы описания товара участвуют в растяжке правой колонки: обёртки описания
   прозрачны для flex (display:contents), воздух распределяется и между абзацами.
   Селекторы-потомки (.excerpt--body-text p и т.п.) продолжают работать. */
@media (min-width: 881px) {
  .product-stair-wc-top:has(.product-stair-wc-works-headslot) .product-stair-wc-summary--price-bottom .product-stair-wc-summary-main .product-stair-wc-excerpt--full,
  .product-stair-wc-top:has(.product-stair-wc-works-headslot) .product-stair-wc-summary--price-bottom .product-stair-wc-summary-main .product-stair-wc-excerpt--full .product-stair-wc-excerpt-body {
    display: contents;
  }
}

/* ===== Мобильный ритм витрины: крупные стыки = --rhythm-master-m (28px),
   как между секциями главной. Внутренние отступы карточки не трогаем. ===== */
@media (max-width: 640px) {
  .product-stair-wc { padding-bottom: var(--rhythm-master-m, 28px); }
  .product-stair-wc-wrap > section.product-stair-seo { margin-top: var(--rhythm-master-m, 28px) !important; }
  main > .product-works-cta-wrap { margin-top: 0 !important; }
  main > section.home-faq-callback { margin-top: 0 !important; }
}
