﻿/* =====================================================
   HOME SUBSCRIPTION — PALOMA
   ===================================================== */

.home-subscription {
  position: relative;
  min-height: 820px;
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #1B1A18;
}

.home-subscription__bg {
  /* Extended beyond section so parallax never reveals the dark bg.
     JS moves this ±200px — total travel 400px, all invisible outside section. */
  position: absolute;
  top: -400px;
  left: 0;
  right: 0;
  bottom: -400px;
  will-change: transform;
  background:
    linear-gradient(rgba(27, 26, 24, 0.54), rgba(27, 26, 24, 0.54)),
    url("images/paloma/hero/subscription-bg-2.jpg") center 40% / cover no-repeat;
}

.home-subscription__card {
  position: relative;
  z-index: 2;
  width: min(640px, calc(100% - 48px));
  aspect-ratio: 1 / 0.82;         /* почти квадрат, но чуть ниже */
  min-height: 0;
  /* меньше вертикальных полей → заголовок выше, цитата ниже */
  padding: clamp(30px, 3.4vw, 50px) clamp(40px, 5vw, 72px);
  background: #FFFFFF;
  border-radius: 16px;
  color: #1B1A18;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;    /* контент от верха, отступы — авто-маргинами */
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 28px 80px rgba(27, 26, 24, 0.14);
  opacity: 0;
  transform: translateY(28px);
}

.home-subscription.is-visible .home-subscription__card {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-subscription__giraffe {
  position: absolute;
  right: 22px;
  bottom: 0;
  width: clamp(139px, 14.6vw, 223px);
  height: auto;
  max-height: 62%;
  z-index: 3;
  display: block;
  object-fit: contain;
  object-position: bottom right;
  background: transparent !important;
  mix-blend-mode: multiply;
  pointer-events: none;
  user-select: none;
  opacity: 0.88;
}

.home-subscription__giraffe.is-hidden {
  display: none;
}

.home-subscription__mark,
.home-subscription__title,
.home-subscription__text,
.home-subscription__link,
.home-subscription__note {
  position: relative;
  z-index: 4;
}

.home-subscription__mark {
  color: #1B1A18;
  font-size: 30px;
  line-height: 1;
  margin-top: 0;            /* заголовок — у верха карточки */
  margin-bottom: 24px;
}

.home-subscription__title {
  margin: 0 0 26px;
  font-family: var(--font-display, var(--font-serif, Georgia, serif));
  font-size: clamp(34px, 3.2vw, 48px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.08;
  color: #E7385A;
}

.home-subscription__text {
  max-width: 440px;
  /* нижний отступ убран — авто-маржины ссылки и цитаты центрируют кнопку ровно
     посередине между текстом сверху и цитатой снизу */
  margin: clamp(14px, 2.4vw, 28px) auto 0;
  font-family: var(--font-sans, inherit);
  font-size: 13.5px;
  line-height: 1.55;
  font-weight: 400;
  color: #1B1A18;
  text-align: center;
}

.home-subscription__link {
  display: inline-block;
  margin-top: auto;          /* кнопка — в середину между текстом и цитатой */
  margin-bottom: 0;
  color: #E7385A;
  font-family: var(--font-display, var(--font-serif, Georgia, serif));
  font-size: 18px;
  font-style: italic;
  text-decoration: underline;
  text-underline-offset: 6px;
  transition: color 0.3s ease, transform 0.3s ease;
}

.home-subscription__link:hover {
  color: #1B1A18; /* при наведении — заметно другой, тёмный цвет */
  transform: translateY(-1px);
}

.home-subscription__link:focus-visible {
  outline: 2px solid #E7385A;
  outline-offset: 4px;
}

.home-subscription__note {
  margin: auto auto 0;        /* прижата к низу карточки, как на референсе */
  max-width: 280px;
  font-family: var(--font-sans, inherit);
  font-size: 13px;
  line-height: 1.3;
  color: rgba(27, 26, 24, 0.48);
}

@media (max-width: 768px) {
  .home-subscription {
    min-height: auto;
    padding: 64px 16px;
  }

  .home-subscription__card {
    width: 100%;
    min-height: 520px;
    padding: 64px 24px 42px;
  }

  .home-subscription__title {
    font-size: 36px;
  }

  .home-subscription__text {
    font-size: 16px;
    margin-bottom: 0;
  }

  .home-subscription__giraffe {
    right: 14px;
    bottom: 0;
    width: 137px;
    max-height: 58%;
  }
}

@media (max-width: 480px) {
  .home-subscription__giraffe {
    width: 104px;
    right: 10px;
    bottom: 0;
    max-height: 53%;
  }
}

@media (max-width: 390px) {
  .home-subscription__giraffe {
    width: 88px;
    right: 8px;
    bottom: 0;
    max-height: 48%;
  }
}

/* =====================================================
   HOME CATEGORIES — EDITORIAL ROW
   ===================================================== */

.home-categories {
  background: var(--color-bg, #FFFFFF);
  color: #1B1A18;
  padding: 84px 24px 92px;
  overflow: hidden;
  max-width: 100%;
}

.home-categories__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 44px;
  max-width: var(--container, 1400px);
  margin-left: auto;
  margin-right: auto;
}

.home-categories__title {
  margin: 0 0 26px;
  font-family: var(--font-display, var(--font-serif, Georgia, serif));
  font-size: clamp(30px, 2.9vw, 45px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.04;
  color: #1B1A18;
}

.home-categories__subtitle {
  max-width: 760px;
  margin: 0;
  font-family: var(--font-sans, inherit);
  font-size: 18px;
  line-height: 1.45;
  color: #1B1A18;
}

.home-categories__all {
  margin-top: 70px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding-bottom: 7px;
  font-family: var(--sans);
  font-size: 12px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1B1A18;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color 0.3s ease, transform 0.3s ease;
}

.home-categories__all:hover {
  opacity: 0.6;
}

.home-categories__all:focus-visible {
  outline: 2px solid #1B1A18;
  outline-offset: 4px;
}

.home-categories__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  max-width: var(--container, 1400px);
  margin: 0 auto;
}

.home-categories__item {
  display: block;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  opacity: 0;
  transform: translateY(28px);
}

.home-categories.is-visible .home-categories__item {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-categories.is-visible .home-categories__item:nth-child(1) {
  transition-delay: 0.04s;
}

.home-categories.is-visible .home-categories__item:nth-child(2) {
  transition-delay: 0.1s;
}

.home-categories.is-visible .home-categories__item:nth-child(3) {
  transition-delay: 0.16s;
}

.home-categories.is-visible .home-categories__item:nth-child(4) {
  transition-delay: 0.22s;
}

.home-categories.is-visible .home-categories__item:nth-child(5) {
  transition-delay: 0.28s;
}

.home-categories.is-visible .home-categories__item:nth-child(6) {
  transition-delay: 0.34s;
}

.home-categories__photo {
  width: 100%;
  height: clamp(280px, 24vw, 420px);
  display: block;
  overflow: hidden;
  background-color: #FFFFFF;
  background-size: cover;
  background-position: center top;
  filter: saturate(0.96) contrast(1.02);
  transition:
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.7s ease;
}

/* Roses — peonies + viburnum, Paloma uniform */
.home-categories__photo--roses {
  background-image:
    linear-gradient(to bottom, rgba(27, 26, 24, 0.04) 0%, rgba(27, 26, 24, 0.18) 100%),
    url("images/paloma/catalog/bouquet-01.jpg");
  background-position: center 20%;
}

/* Chrysanthemums — protea and hydrangea mix */
.home-categories__photo--chrysanthemums {
  background-image:
    linear-gradient(to bottom, rgba(27, 26, 24, 0.04) 0%, rgba(27, 26, 24, 0.18) 100%),
    url("images/paloma/catalog/bouquet-03.jpg");
  background-position: center 30%;
}

/* Сборные букеты — colorful Paloma-ribbon bouquet */
.home-categories__photo--bouquets {
  background-image:
    linear-gradient(to bottom, rgba(27, 26, 24, 0.04) 0%, rgba(27, 26, 24, 0.18) 100%),
    url("images/paloma/catalog/bouquet-02.jpg");
  background-position: center 25%;
}

/* Монобукеты — white ranunculus + freesia, moody */
.home-categories__photo--mono {
  background-image:
    linear-gradient(to bottom, rgba(27, 26, 24, 0.06) 0%, rgba(27, 26, 24, 0.22) 100%),
    url("images/paloma/catalog/bouquet-04.jpg");
  background-position: center 15%;
}

/* Композиции — large editorial dark-background bouquet */
.home-categories__photo--compositions {
  background-image:
    linear-gradient(to bottom, rgba(27, 26, 24, 0.04) 0%, rgba(27, 26, 24, 0.18) 100%),
    url("images/paloma/catalog/bouquet-06.jpg");
  background-position: center 20%;
}

/* Аксессуары — premium Seletti vase */
.home-categories__photo--accessories {
  background-image:
    linear-gradient(to bottom, rgba(27, 26, 24, 0.04) 0%, rgba(27, 26, 24, 0.18) 100%),
    url("images/paloma/vases/vase-01.jpg");
  background-position: center center;
}

.home-categories__item span {
  display: block;
  margin-top: 16px;
  font-family: var(--font-display, var(--font-serif, Georgia, serif));
  font-size: clamp(20px, 1.5vw, 26px);
  font-style: italic;
  line-height: 1.15;
  color: #1B1A18;
}

.home-categories__item:hover .home-categories__photo {
  transform: scale(1.018);
  filter: saturate(1.04) contrast(1.04);
}

.home-categories__item:hover span {
  opacity: 0.72;
}

@media (max-width: 1024px) {
  .home-categories__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .home-categories__photo {
    height: 340px;
  }
}

@media (max-width: 768px) {
  .home-categories {
    padding: 62px 16px 72px;
  }

  .home-categories__head {
    display: block;
    margin-bottom: 32px;
  }

  .home-categories__title {
    font-size: clamp(40px, 10vw, 56px);
    margin-bottom: 18px;
  }

  .home-categories__subtitle {
    font-size: 15px;
    line-height: 1.45;
  }

  .home-categories__all {
    display: inline-block;
    margin-top: 22px;
    font-size: 19px;
  }

  .home-categories__grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    max-width: none;
    margin: 0;
  }

  .home-categories__item {
    flex: 0 0 76vw;
    scroll-snap-align: start;
  }

  .home-categories__photo {
    height: 340px;
  }

  .home-categories__item span {
    font-size: 22px;
    margin-top: 12px;
  }
}

@media (max-width: 480px) {
  .home-categories__item {
    flex-basis: 82vw;
  }

  .home-categories__photo {
    height: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-subscription__card,
  .home-categories__item,
  .home-categories__photo,
  .home-subscription__link {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }

  .home-categories__item:hover .home-categories__photo {
    transform: none;
  }
}

/* =====================================================
   HOME — РОЗОВЫЙ HOVER ДЛЯ ВСЕХ КНОПОК (#E7385A)
   Заскоплено на body.is-home, чтобы не задеть другие страницы.
   ===================================================== */

/* hero «Выбрать букет» — на ховере прозрачный фон, белая обводка и текст */
body.is-home .paloma-cover__cta:hover {
  background: transparent;
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

/* карточки витрины — «В корзину», «Подробнее» и стрелки карусели */
body.is-home .product-card__btn--cart:hover,
body.is-home .product-card__btn--cart:focus-visible,
body.is-home .product-card__btn--detail:hover,
body.is-home .product-card__btn--detail:focus-visible,
body.is-home .home-product-card__more:hover,
body.is-home .home-product-card__more:focus-visible,
body.is-home .home-showcase__arrow:hover,
body.is-home .home-showcase__arrow:focus-visible {
  background: #E7385A;
  border-color: #E7385A;
  color: #FFFFFF;
}

/* текстовые ссылки-кнопки */
body.is-home .home-showcase__catalog-link:hover,
body.is-home .home-categories__all-link:hover,
body.is-home .home-categories__all:hover,
body.is-home .home-blog__all-link:hover,
body.is-home .home-about-scene__link:hover {
  color: #E7385A;
  opacity: 1;
}

/* Скруглённые углы (12px) — как у кнопки в первом блоке главной:
   карточки товаров (витрина/допы), категории, статьи блога и кнопки «Подробнее» */
body.is-home .home-product-card__media,
body.is-home .home-categories__photo,
body.is-home .home-article-card__media,
body.is-home .home-product-card__more,
body.is-home .product-card__btn {
  border-radius: 12px;
}

/* Внутренние слои (img/фон/плейсхолдер) скругляем тоже — при hover-зуме
   overflow:hidden не всегда обрезает трансформируемого ребёнка по радиусу */
body.is-home .home-product-card__media img,
body.is-home .home-product-card__placeholder,
body.is-home .home-article-card__photo,
body.is-home .home-article-card__placeholder {
  border-radius: inherit;
}

/* ============================================================
   PALOMA НА ЭНГЕЛЬСА — редакционный блок с фото-карточками
   (замена горизонтального скролла: плотно, с фото, без пустот)
   ============================================================ */
.home-place {
  padding: clamp(56px, 8vw, 116px) clamp(16px, 4vw, 56px);
  background: #FFFFFF;
}

.home-place__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.home-place__head {
  max-width: 640px;
  margin: 0 auto clamp(40px, 5vw, 68px);
  text-align: center;
}

.home-place__eyebrow {
  margin: 0 0 14px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(27, 26, 24, 0.5);
}

.home-place__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-style: normal;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 1.02;
  color: #1B1A18;
}

.home-place__lead {
  margin: clamp(16px, 2vw, 24px) auto 0;
  max-width: 520px;
  font-family: var(--sans);
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.6;
  color: rgba(27, 26, 24, 0.68);
}

.home-place__actions {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(18px, 2.4vw, 30px);
  margin-top: clamp(20px, 2.4vw, 30px);
}

.home-place__head .home-place__actions {
  justify-content: center;
}

.home-place__link {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #1B1A18;
  text-decoration: none;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(27, 26, 24, 0.32);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.home-place__link:hover {
  color: #E7385A;
  border-color: #E7385A;
}

/* Сетка фото-карточек */
.home-place__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 24px);
}

.home-place-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.home-place-card__media {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 3 / 3.7;
  background: #f3efe6;
}

.home-place-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-place-card:hover .home-place-card__media img {
  transform: scale(1.05);
}

.home-place-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 2px 0;
}

.home-place-card__kicker {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #E7385A;
}

.home-place-card__name {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.2;
  color: #1B1A18;
}

.home-place-card__text {
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(27, 26, 24, 0.6);
}

.home-place-card__more {
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #1B1A18;
  transition: color 0.3s ease;
}

.home-place-card:hover .home-place-card__more {
  color: #E7385A;
}

/* Тёмная CTA-полоса внизу */
.home-place__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(40px, 5vw, 72px);
  padding: clamp(28px, 4vw, 48px);
  border-radius: 16px;
  background: #1B1A18;
  color: #FBF6E8;
}

.home-place__cta-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-style: normal;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.05;
  color: #FBF6E8;
}

.home-place__cta-text {
  margin: 10px 0 0;
  max-width: 440px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: rgba(251, 246, 232, 0.7);
}

.home-place__cta .home-place__link {
  color: #FBF6E8;
  border-color: rgba(251, 246, 232, 0.4);
}

.home-place__cta .home-place__link:hover {
  color: #E7385A;
  border-color: #E7385A;
}

@media (max-width: 900px) {
  .home-place__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 520px) {
  .home-place__grid {
    grid-template-columns: 1fr;
  }

  .home-place__cta {
    flex-direction: column;
    align-items: flex-start;
  }
}
