/* ── Catalog grid ── */
.catalog-sections {
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 8vw, 80px);
  margin-top: clamp(32px, 5vw, 48px);
}

.catalog-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(20px, 3vw, 28px);
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(20, 20, 20, 0.08);
}

.catalog-section__intro {
  max-width: 640px;
}

.catalog-section__title {
  margin: 0 0 8px;
  font-family: var(--ph-font-display);
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.catalog-section__subtitle {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ph-text-muted, #6b6b6b);
}

.catalog-section__count {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ph-text-muted, #6b6b6b);
  white-space: nowrap;
}

.catalog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.catalog__grid--products {
  margin-top: 0;
}

/* ── Catalog cards ── */
.catalog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(20, 20, 20, 0.08);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.catalog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(20, 20, 20, 0.08);
}

.catalog-card__link {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  color: inherit;
  text-decoration: none;
}

.catalog-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: rgba(20, 20, 20, 0.04);
}

.catalog-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  font-family: var(--ph-font-display);
  font-weight: 800;
  color: rgba(20, 20, 20, 0.25);
}

.catalog-card__count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.72);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.catalog-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 18px 16px;
  flex: 1 1 auto;
}

.catalog-card__title {
  margin: 0;
  font-family: var(--ph-font-display);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.catalog-card__subtitle {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ph-text-muted, #6b6b6b);
}

.catalog-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
}

.catalog-card__price {
  font-family: var(--ph-font-display);
  font-size: 15px;
  font-weight: 800;
}

.catalog-card__cta {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ph-text-muted, #6b6b6b);
}

.catalog-card__buy {
  display: block;
  padding: 12px 18px;
  text-align: center;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: #0a0a0a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.catalog-card__buy:hover {
  background: #141414;
  color: #fff;
}

/* ── Image slider ── */
.product-slider {
  position: relative;
}

.product-slider__viewport {
  position: relative;
  overflow: hidden;
}

.product-slider__track {
  display: flex;
  transition: transform 0.35s ease;
  will-change: transform;
}

.product-slider__slide {
  flex: 0 0 100%;
  margin: 0;
}

.product-card__img {
  position: relative;
}

.product-card__img .product-slider,
.catalog-card__media .product-slider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.product-card__img .product-slider__viewport,
.product-card__img .product-slider__track,
.product-card__img .product-slider__slide,
.catalog-card__media .product-slider__viewport,
.catalog-card__media .product-slider__track,
.catalog-card__media .product-slider__slide {
  height: 100%;
}

.product-card__img picture.ph-media,
.catalog-card__media picture.ph-media {
  display: block;
  width: 100%;
  height: 100%;
}

.product-card__img picture.ph-media img,
.catalog-card__media picture.ph-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-slider--card .product-slider__img {
  aspect-ratio: 4 / 5;
  max-height: 320px;
}

.product-card__img .product-slider--card .product-slider__img,
.catalog-card__media .product-slider--card .product-slider__img {
  aspect-ratio: auto;
  max-height: none;
  height: 100%;
}

.product-slider__img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.product-slider--single-page .product-slider__viewport {
  border-radius: 20px;
  background: rgba(20, 20, 20, 0.04);
}

.product-slider--single-page .product-slider__img {
  aspect-ratio: 4 / 5;
  max-height: min(72vh, 640px);
}

.product-slider--card .product-slider__img {
  aspect-ratio: 4 / 5;
  max-height: 320px;
}

.product-slider__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #141414;
  box-shadow: 0 8px 24px rgba(20, 20, 20, 0.12);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
}

.product-slider--card .product-slider__nav {
  width: 30px;
  height: 30px;
  font-size: 18px;
}

.product-slider__nav--prev { left: 10px; }
.product-slider__nav--next { right: 10px; }

.product-slider__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 0;
}

.product-slider--card .product-slider__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  padding: 0;
}

.product-slider__dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.18);
  cursor: pointer;
}

.product-slider--card .product-slider__dot {
  background: rgba(255, 255, 255, 0.55);
}

.product-slider__dot.is-active {
  background: #141414;
  transform: scale(1.15);
}

.product-slider--card .product-slider__dot.is-active {
  background: #fff;
}

.product-slider--single .product-slider__nav,
.product-slider--single .product-slider__dots {
  display: none;
}

/* ── Featured product cards from catalog ── */
.product-card--dynamic {
  display: flex;
  flex-direction: column;
}

.product-card--dynamic .product-card__link {
  color: inherit;
  text-decoration: none;
  flex: 1 1 auto;
}

.product-card__meta {
  padding: 12px 16px 0;
}

.product-card__upholstery {
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ph-text-muted, #6b6b6b);
}

.product-card__price {
  margin: 0 0 12px;
  font-family: var(--ph-font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.product-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 220px;
  font-family: var(--ph-font-display);
  font-weight: 800;
  color: rgba(20, 20, 20, 0.25);
}

/* ── Single product page ── */
.prostohome-product-page {
  padding: var(--ph-section-y, clamp(80px, 12vw, 140px)) 0;
}

.prostohome-product__container {
  max-width: var(--ph-container-max, 1320px);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, var(--ph-container-x-max, 64px));
}

.prostohome-product__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ph-text-subtle, #9a9a9a);
  margin-bottom: 24px;
}

.prostohome-product__hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  margin-bottom: 40px;
}

.prostohome-product__media {
  min-width: 0;
}

.prostohome-product__summary {
  position: sticky;
  top: calc(80px + var(--ph-section-y, 0px));
}

.prostohome-product__title {
  font-family: var(--ph-font-display);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 12px;
}

.prostohome-product__price {
  font-family: var(--ph-font-display);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  margin: 0 0 16px;
}

.prostohome-product__lead {
  font-size: var(--ph-body-lg, 17px);
  line-height: 1.75;
  color: var(--ph-text-muted, #6b6b6b);
  margin: 0 0 24px;
}

.prostohome-product__upholstery {
  font-size: var(--ph-body-sm, 15px);
  color: var(--ph-text-muted, #6b6b6b);
  margin: 0 0 12px;
}

.prostohome-product__variants {
  margin-bottom: 32px;
}

.prostohome-product__variants h2 {
  font-family: var(--ph-font-display);
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 800;
  margin-bottom: 16px;
}

.product-variant__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 12px;
}

.product-variant {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.product-variant__img {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  background: rgba(20, 20, 20, 0.04);
}

.product-variant__img img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1;
  object-fit: cover;
}

.product-variant.is-active .product-variant__img {
  border-color: var(--ph-text, #141414);
}

.product-variant__label {
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  color: var(--ph-text-muted, #6b6b6b);
}

.product-variant__placeholder {
  display: block;
  aspect-ratio: 1;
  background: rgba(20, 20, 20, 0.06);
}

.prostohome-product__cover {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
}

.prostohome-product__cover-img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.prostohome-product__buy {
  margin-bottom: 20px;
  padding: 20px;
  background: rgba(20, 20, 20, 0.04);
  border-radius: 16px;
}

.prostohome-product__buy-title {
  font-size: var(--ph-label, 14px);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.product-buy__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  font-size: var(--ph-label, 14px);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #fff;
  background: var(--ph-surface-dark, #0a0a0a);
  border-radius: 999px;
  transition: opacity 0.2s ease;
}

.product-buy:hover {
  opacity: 0.85;
  color: #fff;
}

.product-buy--wb { background: #a73afd; }
.product-buy--ozon { background: #005bff; }
.product-buy--ym { background: #fc0; color: #141414; }

.prostohome-product__tags {
  font-size: var(--ph-body-sm, 15px);
  color: var(--ph-text-muted, #6b6b6b);
  margin: 0;
}

.prostohome-product__specs {
  margin-bottom: 32px;
  padding: 24px;
  border-radius: 16px;
  background: rgba(20, 20, 20, 0.03);
}

.prostohome-product__specs h2 {
  font-family: var(--ph-font-display);
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 800;
  margin: 0 0 12px;
}

.prostohome-product__specs ul {
  margin: 0;
  padding-left: 1.25em;
}

.prostohome-product__specs li {
  margin-bottom: 8px;
  line-height: 1.65;
}

.prostohome-product__content {
  margin-bottom: 32px;
  line-height: 1.72;
}

.prostohome-product__footer {
  padding-top: 32px;
  border-top: 1px solid rgba(20, 20, 20, 0.08);
}

.prostohome-product__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--ph-label, 14px);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
}

.prostohome-product__back svg {
  transform: rotate(180deg);
}

.prostohome-product-archive .section {
  padding-top: var(--ph-section-y, clamp(80px, 12vw, 140px));
}

@media (max-width: 960px) {
  .prostohome-product__hero {
    grid-template-columns: 1fr;
  }

  .prostohome-product__summary {
    position: static;
  }
}

@media (max-width: 640px) {
  .catalog-section__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .catalog__grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .catalog-card__body {
    padding: 14px;
  }

  .catalog-card__title {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .catalog__grid {
    grid-template-columns: 1fr;
  }
}
