/* AM-PERF-20261126 / AM-PERF-CLS-20261126 — резерв места и полоска ЧП уже в первом кадре. */

html {
  --am-ux-d2c-header-h: 70px;
  --am-ux-m2-header-h: 70px;
  --am-ux-m2-strip-h: 40px;
}
@media (max-width: 990px) {
  html {
    --am-ux-d2c-header-h: 69px;
    --am-ux-m2-header-h: 69px;
    --am-ux-m2-strip-h: 52px;
  }
}

/* Полоска ЧП: fixed с первого кадра, не в потоке (иначе #root прыгает вниз, потом вверх). */
.am-ux-m2-strip,
.am-ux-m2-strip.am-ux-bf-strip,
.am-ux-m2-strip.am-ux-bf-strip.is-on {
  display: flex !important;
  position: fixed !important;
  left: 0;
  right: 0;
  top: var(--am-ux-d2c-header-h, 71px);
  z-index: 19;
  box-sizing: border-box;
  width: 100%;
  min-height: var(--am-ux-m2-strip-h, 40px);
  margin: 0;
  padding: 7px 16px;
  background: #0d0d0d;
  color: #fff;
  font-family: var(--baseFontFamily, "Montserrat"), Arial, sans-serif;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
  text-align: center;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3px 12px;
}
@media (max-width: 600px) {
  .am-ux-m2-strip,
  .am-ux-m2-strip.am-ux-bf-strip {
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.3;
  }
}

#root {
  margin-top: 0;
}

/* Отступ под фиксированные шапку и полоску — в px, не в rem (rem зависит от 100vw и опаздывает). */
html.am-ux-m2-hasstrip .main,
html.am-ux-m2-hasstrip .main.mt-0 {
  margin-top: calc(var(--am-ux-d2c-header-h, 71px) + var(--am-ux-m2-strip-h, 40px) + 12px) !important;
}
html.am-bf-home.am-ux-m2-hasstrip .main,
html.am-bf-home.am-ux-m2-hasstrip .main.mt-0 {
  margin-top: calc(var(--am-ux-d2c-header-h, 71px) + var(--am-ux-m2-strip-h, 40px)) !important;
}


/* Сетка каталога с первого кадра: как d2 (2 кол. ≤500px), иначе до footer CSS плитки на всю ширину. */
.catalog-content-cards {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  margin-left: -2.3rem;
}
.catalog-content__card {
  width: calc(33.333% - 2.3rem);
  margin-left: 2.3rem;
  margin-bottom: 4.4rem;
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
@media (max-width: 990px) {
  .catalog-content__card {
    width: calc(50% - 2.3rem);
  }
}
@media (max-width: 500px) {
  .catalog-content-cards {
    margin-left: -8px;
  }
  .catalog-content__card {
    width: calc(50% - 8px);
    margin-left: 8px;
    margin-bottom: 16px;
  }
}
.catalog-content__card-subtitle {
  display: none !important;
}

/* Каталог: высота из aspect-ratio, фото absolute */
.catalog-content__card-img,
a.catalog-content__card-img,
.catalog-content__card-img.am-perf-card-img {
  display: block;
  width: 100%;
  position: relative !important;
  aspect-ratio: 3 / 4 !important;
  height: auto !important;
  min-height: 0;
  flex: 0 0 auto;
  align-self: stretch;
  overflow: hidden;
  background: #f3f3f3;
  box-sizing: border-box;
}
.catalog-content__card-img img,
.catalog-content__card-img picture,
.catalog-content__card-img .am-perf-picture,
.catalog-content__card-img .am-perf-img {
  position: absolute !important;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  object-fit: cover;
  aspect-ratio: auto !important;
}


/* Карточка: до swiper.css виден только первый слайд.
   overflow:hidden только у большого слайдера + flex-shrink:0 / min-width:67.5rem,
   иначе во flex-ряду (.product-page__content { width:100% }) галерея сжимается
   (min-width:auto обнуляется при overflow≠visible). Слайд заполняет исходный
   бокс 67.5×86.8rem, без aspect-ratio/height:auto. AM-PERF-PDP-20261126 */
.product-page__photo {
  flex-shrink: 0;
  overflow: visible;
}
.product-page__photo-swiper--big,
.swiper.product-page__photo-swiper--big {
  overflow: hidden;
  flex-shrink: 0;
  width: 67.5rem;
  min-width: 67.5rem;
}
.product-page__photo-swiper--big > .swiper-wrapper {
  display: flex;
}
.product-page__photo-swiper--big > .swiper-wrapper > .swiper-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

/* Карточка товара: слайд = 100% исходного бокса (не 3/4 auto). */
.product-page__photo-slide--big,
.product-page__photo-slide--small {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #f3f3f3;
  aspect-ratio: auto;
}
.product-page__photo-slide--big img,
.product-page__photo-slide--big picture,
.product-page__photo-slide--big .am-perf-picture,
.product-page__photo-slide--big .am-perf-img,
.product-page__photo-slide--small img,
.product-page__photo-slide--small picture,
.product-page__photo-slide--small .am-perf-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-page__photo-slide--big img,
.product-page__photo-slide--big .am-perf-img {
  object-fit: contain;
}

@media (max-width: 500px) {
  .product-page__photo-swiper--big,
  .swiper.product-page__photo-swiper--big {
    width: 33.5rem;
    min-width: 0;
    height: 47.3rem;
    overflow: visible;
    margin: 0 auto;
  }
}

/* Баннер на главной */
.index_big_top_slider .banner,
.index_big_top_slider .banner__image,
.index_big_top_slider .am-bf-slide-link {
  display: block;
  width: 100%;
}
.index_big_top_slider .banner__image {
  position: relative;
  overflow: hidden;
  background: #111;
  width: 100%;
}
.index_big_top_slider .banner__image img,
.index_big_top_slider .banner__image picture,
.index_big_top_slider .banner__image .am-perf-picture,
.index_big_top_slider .banner__image .am-perf-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
  object-fit: cover;
}

.index_big_top_slider {
  overflow: hidden;
}

/* Главная: кнопки слайдера не в потоке (иначе высота +32px и прыгает .am-ux-m3). */
.am-bf-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.am-bf-slider-btn--prev { left: 16px; }
.am-bf-slider-btn--next { right: 16px; }
@media (max-width: 927px) {
  .am-bf-slider-btn { display: none; }
}
.am-bf-slider-dots {
  position: absolute;
  right: 24px;
  bottom: 20px;
  z-index: 4;
}
.am-bf-slide-rules {
  position: absolute;
  left: 96px;
  bottom: 20px;
  z-index: 4;
}



