/* Client catalog corrections 2026-10 */
.product-detail-related-card p { font-style: normal; }

/* 2026-10-05: hero карточки товара - высота 80vh вместо фиксированной (фон обрезался при отдалении) */
.product-detail-hero.product-detail-hero--figma {
  height: 80vh;
  height: 80svh;
  min-height: 28rem;
}

/* 2026-10-05: блок «История» в карточке товара - тоже 80vh вместо фиксированной высоты */
.product-detail-gallery.product-detail-gallery--figma {
  height: 80vh;
  height: 80svh;
  min-height: 28rem;
}

/* 2026-10-07: мобильная карточка товара - фото отдельным блоком на всю ширину, высота по пропорциям картинки, текст под фото (а не поверх).
   Hero: текст на ПК слева -> фото прижато вправо. «История»: текст на ПК справа -> фото прижато влево. */
@media (max-width: 767px) {
  .product-detail-hero.product-detail-hero--figma,
  .product-detail-gallery.product-detail-gallery--figma {
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .product-detail-hero--figma:after { display: none; }

  .product-detail-hero--figma .product-detail-hero__image,
  .product-detail-gallery--figma .product-detail-gallery__image {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    flex: none;
  }
  .product-detail-hero--figma .product-detail-hero__image { object-position: right center; }
  .product-detail-gallery--figma .product-detail-gallery__image { object-position: left center; }

  .product-detail-hero--figma .product-detail-hero__content {
    height: auto;
    background-color: #2c293f;
    border-top: .375rem solid #ea533d;
  }
  .product-detail-hero--figma .product-detail-hero__content:before,
  .product-detail-hero--figma .product-detail-hero__content:after { display: none; }
  .product-detail-hero--figma .product-detail-hero__copy { padding: 1.75rem 1.25rem 2.25rem; }

  .product-detail-gallery--figma .product-detail-gallery__panel {
    position: relative;
    inset: auto;
    min-height: 0;
    background-color: #2c293f;
  }
}

/* Header auto-hide on scroll down (assets/header-autohide.js) */
#masthead.site-header {
    transition: transform .3s ease;
    will-change: transform;
}
.header-hidden #masthead.site-header {
    transform: translateY(calc(-100% - 2px));
}
@media (min-width: 1024px) {
    .catalog-filter-sidebar {
        transition: top .3s ease;
    }
    .header-hidden .catalog-filter-sidebar {
        top: 10px;
    }
}

/* Desktop filter sidebar: fit into the viewport. The filter lists scroll
   inside .catalog-filter-scroll, "Сбросить фильтры" stays below them. */
@media (min-width: 1024px) {
    .catalog-filter-panel {
        display: flex;
        flex-direction: column;
        max-height: calc(100vh - 110px);
    }
    .catalog-filter-scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        padding-right: 4px;
    }
    .catalog-filter-panel > [data-catalog-reset] {
        flex: none;
        margin-top: 16px;
    }
}

/* 2026-10-15: заголовки на баннерах товара - один размер для всех товаров (раньше тема уменьшала шрифт
   только у названий длиннее 24 символов, см. *--long в output.css). Берём размеры «длинного» варианта.
   Слова не рвём посреди («Однозернов-ая», «Киндзмараул-и»), перенос только между словами. */
.product-detail-hero.product-detail-hero--figma .product-detail-hero__title {
  font-size: 2rem;
  line-height: 1.12;
}
.product-detail-gallery.product-detail-gallery--figma .product-detail-gallery__copy h2 {
  font-size: 2.5rem;
  line-height: 1.08;
}
.product-detail-hero.product-detail-hero--figma .product-detail-hero__title,
.product-detail-gallery.product-detail-gallery--figma .product-detail-gallery__copy h2 {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}
@media (max-width: 1023px) {
  .product-detail-hero.product-detail-hero--figma .product-detail-hero__title { font-size: clamp(1.75rem, 5.5vw, 2.125rem); }
}
@media (max-width: 767px) {
  .product-detail-hero.product-detail-hero--figma .product-detail-hero__title { font-size: clamp(1.625rem, 7.5vw, 2rem); }
  .product-detail-gallery.product-detail-gallery--figma .product-detail-gallery__copy h2 { font-size: clamp(1.875rem, 8vw, 2.375rem); }
}
