/* ===== HERO ===== */

.hero__container {
  position: relative;
  height: 632px;
}

.hero__headings {
  position: relative;
  height: 100%;
  padding: 40px 60px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: end;
}

.hero__heading1 {
  color: #fff;
  font-family: "SegoeUIWeb";
  font-size: 24px;
  font-style: normal;
  font-weight: 350;
  line-height: normal;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.author {
  color: rgba(255, 255, 255, 0.6);
  font-family: Inter;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.hero__video {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: #f4f0ec;
  background-position: center;
  background-size: cover;
  border-radius: 25px;
  object-fit: cover;
}

@media (max-width: 480px) {
  body.home section {
    margin-left: 0;
    margin-right: 0;
  }

  body.home section > .heading2,
  body.home section > .heading__desk,
  body.home .blog__heading,
  body.home .blog__actions {
    padding-left: 20px;
    padding-right: 20px;
  }

  body.home .main__hero {
    margin-top: 0;
  }

  .hero__video,
  .catalog__category,
  .product__slide-img,
  .product__slider.swiper,
  .blog__panel,
  .blog__card {
    border-radius: 0;
  }

  .hero__headings {
    padding: 20px;
  }

  .author {
    color: rgba(255, 255, 255, 0.6);
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    white-space: nowrap;
  }
}

@media (max-width: 980px) {
  body.home .catalog__category,
  body.home .blog__panel,
  body.home .blog__card,
  body.home .blog__image {
    border-radius: 30px !important;
  }

  body.home .hero__video,
  body.home .product__img-container,
  body.home .product__img,
  body.home .product__slider .swiper-slide,
  body.home .product__slide-img,
  body.home .product__slider.swiper {
    border-radius: 0 !important;
  }
}

/* Tablet hero: keep the mobile crop and avoid a desktop-height video on narrow screens.
   Баннер на планшете идёт во всю ширину экрана (без боковых полей секции),
   как на мобильных. Высота задаётся с !important, чтобы перебить
   .hero__container { height: 582px !important } из header.css и держать
   секцию и контейнер одной высоты (раньше контейнер был выше секции). */
@media (min-width: 481px) and (max-width: 980px) {
  body.home .main__hero {
    margin-left: 0;
    margin-right: 0;
  }

  body.home .hero__container,
  body.home .main__hero {
    height: min(582px, calc(100vw * 0.72)) !important;
    max-height: none;
  }

  body.home .hero__video {
    border-radius: 0;
  }

  body.home .hero__headings {
    padding: 32px;
  }
}

/* ===== CATALOG ===== */

.catalog {
  margin-top: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  align-self: stretch;
}

body.home .catalog {
  margin-top: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  align-self: stretch;
  padding: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

body.home .catalog__heading,
body.home .catalog__desk {
  display: block;
  height: auto;
  width: 100%;
  max-width: none;
  align-self: stretch;
  text-align: center;
}

body.home .catalog__container {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 25px;
  align-self: stretch;
}

.catalog__container {
  display: flex;
  align-items: flex-start;
  gap: 25px;
  align-self: stretch;
}

.catalog__category {
  display: flex;
  aspect-ratio: 1 / 1;
  padding: 40px 0;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex: 1 0 0;
  border-radius: 25px;
  background-color: lightgray;
  background-position: 50% 50%;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Картинки плашек подставляются через inline style из настроек главной (ACF) */

.catalog__button {
  display: flex;
  padding: 20px 40px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-family: "SegoeUIWeb";
  font-size: 18px;
  font-weight: 400;
  line-height: normal;
  backdrop-filter: blur(3px) saturate(120%);
  -webkit-backdrop-filter: blur(3px) saturate(120%);
  overflow: hidden;
  transition:
    background 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.25s ease,
    border-color 0.35s ease;
}

/* hover */
.catalog__button:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow:
    0 8px 30px rgba(255, 255, 255, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* active */
.catalog__button:active {
  transform: translateY(0);
  box-shadow:
    0 4px 16px rgba(255, 255, 255, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

/* fallback */
@supports not (
  (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))
) {
  .catalog__button {
    background: rgba(255, 255, 255, 0.25);
  }

  .catalog__button:hover {
    background: rgba(255, 255, 255, 0.35);
  }
}

/* === Плитки категорий на главной: планшетный тир ===================
   Плашка задана жёстко (padding 20/40, шрифт 18px) под десктопную
   плитку. В диапазоне 481-980px плитки стоят по три в ряд и ужимаются
   примерно до 200px, а плашка не масштабировалась: длинные названия
   («Ювелирные изделия») переносились в две строки и кнопка занимала
   почти всю плитку. Ниже 480px плитки разворачиваются в столбик на
   всю ширину — там базовый размер уместен. */
@media (min-width: 481px) and (max-width: 980px) {
  .catalog__category {
    padding: 24px 12px;
    gap: 8px;
  }

  .catalog__button {
    max-width: 100%;
    box-sizing: border-box;
    padding: clamp(10px, 1.5vw, 16px) clamp(14px, 2.6vw, 26px);
    font-size: clamp(13px, 1.6vw, 16px);
    line-height: 1.25;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .catalog__container,
  body.home .catalog__container {
    flex-direction: column;
    gap: 25px;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  .catalog__category {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    flex: none;
  }
}

/* ===== PRODUCT ===== */

.product {
  margin-top: 100px;
  margin-bottom: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  align-self: stretch;
}

body.home .product {
  margin-top: 100px;
  margin-bottom: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  align-self: stretch;
}

.product__heading,
.product__desk {
  display: block;
  width: 100%;
  max-width: none;
  align-self: stretch;
  text-align: center;
}

body.home .product__heading,
body.home .product__desk {
  display: block;
  width: 100%;
  max-width: none;
  align-self: stretch;
  text-align: center;
}

.product__heading {
  line-height: 1.18;
  text-wrap: balance;
}

.product__desk {
  line-height: 1.35;
  text-wrap: balance;
}

.product__container {
  width: 100%;
  position: relative;
  height: fit-content;
  display: flex;
  align-items: center;
  gap: 30px;
	margin-top: 60px;
}

body.home .product__container {
  width: 100%;
  position: relative;
  height: fit-content;
  display: flex;
  align-items: center;
  gap: 30px;
  margin-top: 60px;
}

.product__img-container {
  aspect-ratio: 9 / 16;
  width: 100%;
  max-height: 800px;
  border-radius: 25px;
  overflow: hidden;
}
.product__img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.product__slider {
  text-align: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.product__slide-img {
  height: 500px;
  border-radius: 25px;
  object-fit: cover;
  object-position: top;
}

.product__slide {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 25px;
}

.product_slide-heading {
  color: rgba(23, 23, 23, 0.8);
  font-family: "SegoeUIWeb";
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.product_slide-price {
  color: rgba(23, 23, 23, 0.9);
  font-family: "SegoeUIWeb";
  font-size: 18px;
  font-weight: 400;
}

.product_slide-price del {
  color: rgba(23, 23, 23, 0.4);
  font-weight: 400;
  margin-right: 8px;
}

.product_slide-price ins {
  text-decoration: none;
  color: #c41e3a;
}

.product_slide-button {
  color: rgba(23, 23, 23, 0.4);
  text-align: center;
  font-family: "SegoeUIWeb";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-skip-ink: auto;
  text-decoration-thickness: auto;
  text-underline-offset: auto;
  text-underline-position: from-font;
}

/* 50/50: фото слева, слайдер справа */
.product__img-container {
  flex: 1 1 50%;
  min-width: 0;
}
.product__slider {
  flex: 1 1 50%;
  min-width: 0;
}

/* Swiper внутри product */
.product__slider.swiper {
  width: 100%;
  border-radius: 25px;
  overflow: hidden;
}
.product__slider .swiper-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
  justify-content: center;
}
.product__slide-img {
  height: 500px;
  width: auto;
  object-fit: contain;
  display: block;
}
.product__static-media {
  position: relative;
  width: 100%;
}

.product__static-label {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 2;
  color: #fff;
  font-family: "SegoeUIWeb";
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  text-transform: uppercase;
  /* Белым по светлому студийному фону тень 0.35 не спасает —
     подпись сливается с кадром. Усилено. */
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
@media (max-width: 768px) {
  .product__slide-img {
    height: auto;
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
  }
}

/* стрелки product */
.product__next,
.product__prev {
  display: flex;
  width: 50px;
  height: 50px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  border-radius: 25px;
  background: rgba(23, 23, 23, 0.15);
  transition: all ease-in-out 0.2s;
}
.product__slider .swiper-button-prev::after,
.product__slider .swiper-button-next::after {
  content: none;
}
.product__slider .swiper-button-prev {
  left: 10px;
}
.product__slider .swiper-button-next {
  right: 10px;
}
.product__slider .swiper-button-prev svg {
  transform: scaleX(-1);
}
.product__slider .swiper-button-prev svg,
.product__slider .swiper-button-next svg {
  width: 22px;
  height: 16px;
}
.product__slider .swiper-button-prev:hover,
.product__slider .swiper-button-next:hover {
  background: rgb(249 249 249 / 95%);
}
.product__slider .swiper-button-prev:focus-visible,
.product__slider .swiper-button-next:focus-visible {
  outline: 2px solid #171717;
  outline-offset: 2px;
}
.product__slider .swiper-button-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

@media (max-width: 480px) {
	.product__container,
  body.home .product__container {
    margin-top: 30px;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
	}	

  .product__slider .swiper-slide {
    padding-left: 0;
    padding-right: 0;
  }

  .product__desk {
    max-width: 100%;
  }

  .product__img-container {
    display: none;
  }

  .product__heading.heading2 {
    font-size: 20px;
    max-width: 375px;
    margin: auto;
  }
  .product_slide-heading {
    font-size: 18px;
    margin-top: 8px;
  }
  .product_slide-price {
    font-size: 16px;
  }

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

  .product__slider .swiper-slide {
    width: 100% !important;
    gap: 8px;
    padding-left: 0;
    padding-right: 0;
  }

  .product__static-media {
    width: 100%;
  }

  .product__static-label {
    left: 20px;
    bottom: 20px;
    font-size: 16px;
  }

  .product {
    gap: 25px;
    margin-top: 60px;
  }
}

/* ===== BLOG SLIDER (окончательная версия) ===== */

.blog {
  /* margin-top: 100px; */
  
}
.blog__panel {
  overflow: hidden;
  background: #fbfbfb;
  border-radius: 25px;
  padding: 50px 56px; /* как просил */
}

.blog__heading {
  text-align: left;
  color: #171717;
  font-family: "SegoeUIWeb";
  font-size: 24px;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
  text-transform: uppercase;
  margin-bottom: 40px;
}

/* Свайпер под карточки 397×587 и gap 15 */
.blog__slider.swiper {
  overflow: visible;
  -webkit-overflow-scrolling: touch;
}
.blog__slider .swiper-wrapper {
  align-items: stretch;
  -webkit-transform: translate3d(0, 0, 0);
}
.blog__slider .swiper-slide {
  width: 397px !important;
  flex-shrink: 0;
}

.blog__card {
  height: 587px; /* фикс высоты */
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}
.blog__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.blog__card:active {
  transform: translateY(-2px);
}
.blog__image {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  object-position: top;
}
.blog__body {
  padding: 30px 20px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.blog__tag {
  color: rgba(23, 23, 23, 0.7);
  font-family: "SegoeUIWeb";
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  text-transform: uppercase;
}
.blog__title {
  color: #171717;
  font-family: "SegoeUIWeb";
  font-size: 20px;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
  text-transform: uppercase;
}
.blog__excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3; /* показываем максимум 3 строки */
  overflow: hidden;

  font-family: "SegoeUIWeb";
  font-size: 18px;
  font-weight: 300;
  line-height: 1.4; /* важно фиксировать высоту строки */
  text-overflow: ellipsis;
}

.blog__date {
  overflow: hidden;
  color: rgba(23, 23, 23, 0.6);
  text-overflow: ellipsis;
  font-family: "SegoeUIWeb";
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

/* стрелки блога */
.blog__slider .swiper-button-prev::after,
.blog__slider .swiper-button-next::after {
  content: none;
}
.blog__prev,
.blog__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: #171717;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(6px);
}
.blog__prev {
  left: -22px;
}
.blog__next {
  right: -22px;
}
.blog__prev svg {
  transform: scaleX(-1);
}

/* CTA */
.blog__actions {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.blog__desk {
  color: rgba(23, 23, 23, 0.7);
  font-family: Inter;
  font-size: 18px;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
}
.blog__cta {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 10px 30px;
  border-radius: 999px;
  border-radius: 97px;
  border: 1px solid #171717;
  background: #fff;
  color: #171717;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;

  font-family: "SegoeUIWeb";
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}
.blog__cta:hover {
  background: #f9f9f9;
  transform: translateY(-1px);
}
.blog__cta-icon {
  width: 22px;
  height: 16px;
}

/* адаптив */
@media (max-width: 900px) {
  .blog__prev {
    left: -8px;
  }
  .blog__next {
    right: -8px;
  }
}

@media (max-width: 480px) {
  .blog__desk {
    display: none;
  }

  .blog__panel {
    padding: 30px 0;
    margin: 0;
  }

  .blog__heading {
    font-size: 20px;
  }

  .blog__slider .swiper-slide {
    width: 100vw !important;
  }

  .blog__title {
    font-size: 18px;
  }

  .blog__excerpt {
    font-size: 16px;
  }

  .blog__slider.swiper {
    overflow: visible;
  }

  .blog__panel {
    overflow: hidden;
  }

  .blog__cta {
    font-size: 16px;
    width: 100%;
    justify-content: center;
  }
}

/* === «Лук дня» на планшете =========================================
   В диапазоне 481-980px было три дефекта:
   1) Колонки разной высоты при align-items: center — правая карточка
      висела со смещением сверху и снизу, блок выглядел кривым.
   2) Скругление принудительно сбрасывалось в 0 правилом выше по файлу,
      хотя блок «Блог» рядом остаётся скруглённым — рассинхрон.
   3) У swiper-слайда padding 20px, из-за чего картинка справа была уже
      своей колонки (272px против 345px) и казалась мельче левой. */
@media (min-width: 481px) and (max-width: 980px) {
  body.home .product__container {
    align-items: stretch;
  }

  body.home .product__img-container {
    height: auto;
    align-self: stretch;
  }

  body.home .product__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  body.home .product__slider .swiper-slide {
    padding: 0;
    height: auto;
  }

  /* Перебивает border-radius: 0 !important из блока @media (max-width: 980px) */
  body.home .product__img-container,
  body.home .product__img,
  body.home .product__static-media,
  body.home .product__slide-img,
  body.home .product__slider .swiper-slide,
  body.home .product__slider.swiper {
    border-radius: 25px !important;
  }
}

/* Только 769-980: ниже 768 у картинки слайда своё правило (4/5, cover),
   его не трогаем. Натуральный кадр 4672x7008 — ровно 2:3, иначе поля. */
@media (min-width: 769px) and (max-width: 980px) {
  body.home .product__slide-img {
    height: auto;
    aspect-ratio: 2 / 3;
  }
}

/* === «Лук дня» на десктопе: тот же перекос, что был на планшете =====
   Колонки разной высоты (800px против 645px) при align-items: center —
   слайдер центрировался относительно картинки и висел со смещением
   78px сверху и снизу. Тянем колонки к одной высоте, как на планшете.
   Внутренние отступы слайда здесь не трогаем: на десктопе колонка
   широкая, картинка в ней смотрится нормально. */
@media (min-width: 981px) {
  body.home .product__container {
    align-items: stretch;
  }

  body.home .product__img-container {
    height: auto;
    align-self: stretch;
  }

  body.home .product__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* === Планшет-портрет: убираем дубль фото «Лук дня» =================
   Снимок из левой колонки и первый слайд слайдера — это один и тот же
   файл, просто в слайдере он ещё и подписан «Лук дня». На узком экране
   две колонки по ~307px делают карточки товара мелкими и режут кадр,
   поэтому берём мобильный формат: левая колонка скрывается (ровно как
   в блоке <=480px), слайдер занимает всю ширину. Ничего не теряется —
   то же фото остаётся первым слайдом. */
@media (min-width: 481px) and (max-width: 768px) {
  body.home .product__img-container {
    display: none;
  }

  body.home .product__slider {
    flex: 1 1 100%;
  }
}

/* === Баннер на больших планшетах во всю ширину =========================
   iPad в альбомной ориентации (1024-1366px) и iPad Pro вертикально
   получают десктопную вёрстку: баннер с полями по 100px и скруглением.
   Заказчица просила на планшетах баннер во всю ширину экрана, как на
   мобильных. Условие по hover/pointer срабатывает только на сенсорных
   устройствах, поэтому ноутбуки той же ширины остаются без изменений. */
@media (min-width: 981px) and (max-width: 1366px) and (hover: none) and (pointer: coarse) {
  body.home .main__hero {
    margin-left: 0;
    margin-right: 0;
  }

  body.home .hero__video {
    border-radius: 0;
  }
}
