/* Grillnurk Child — Home / контент главной (Фаза 3).
 * Секции: hero, «Подберём по случаю» (сценарии), баннер Hot Grill, trust.
 * Грузится только на is_front_page(). Зависит от tokens.css + shell.css. */

/* Full-bleed: снять контейнер/паддинги GP на главной, секции сами держат ширину. */
.home #page,
.home #content.site-content,
.home .site-content {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}
.home .site-content { display: block !important; }
.gn-home { color: var(--gn-text); }
.gn-home > section { width: 100%; }

.gn-hero__inner,
.gn-scn__inner,
.gn-trust__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 56px) 24px;
}

.gn-h2 {
  margin: 0;
  font-family: var(--gn-font-head);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.1;
  color: var(--gn-text);
}
.gn-accent { color: var(--gn-acc); }

/* Кнопки */
.gn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: var(--gn-r-btn);
  font-family: var(--gn-font-body);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}
.gn-btn--solid { background: var(--gn-acc); color: #fff; }
.gn-btn--solid:hover { background: var(--gn-acc-d); color: #fff; }
.gn-btn--ghost { background: transparent; border-color: var(--gn-border-2); color: var(--gn-text); }
.gn-btn--ghost:hover { border-color: var(--gn-acc); color: var(--gn-acc); }

/* ========================= HERO ========================= */
.gn-hero { background: var(--gn-bg); }
.gn-hero__inner { display: flex; flex-wrap: wrap; gap: 44px; align-items: center; }
.gn-hero__text { flex: 1 1 380px; }
.gn-hero__media { flex: 1 1 380px; }

.gn-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  background: var(--gn-pill);
  color: var(--gn-text-3);
  border-radius: var(--gn-r-pill);
  font-size: 13px;
  font-weight: 600;
}
.gn-hero__title {
  margin: 18px 0 16px;
  font-family: var(--gn-font-head);
  font-weight: 700;
  font-size: clamp(32px, 4.6vw, 58px);
  line-height: 1.05;
  color: var(--gn-text);
}
.gn-hero__sub { margin: 0 0 24px; max-width: 46ch; font-size: 17px; color: var(--gn-text-2); }
.gn-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.gn-hero__stats { display: flex; flex-wrap: wrap; gap: 22px; }
.gn-hero__stat { font-size: 14px; font-weight: 600; color: var(--gn-text-3); }

.gn-hero__photo {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 28px;
  overflow: hidden;
  background: radial-gradient(120% 120% at 30% 20%, var(--gn-ph-1), var(--gn-ph-2));
  box-shadow: var(--gn-sh-hero);
}
.gn-hero__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 8px 14px;
  background: #fff;
  color: var(--gn-text);
  border-radius: var(--gn-r-pill);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 18px -8px rgba(60, 40, 20, 0.4);
  animation: gnFloat 6s ease-in-out infinite;
}
.gn-hero__glass {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  text-decoration: none;
  color: var(--gn-text);
}
.gn-hero__glass-k { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gn-acc); }
.gn-hero__glass-t { font-family: var(--gn-font-head); font-weight: 600; font-size: 16px; }
.gn-hero__glass-p { font-family: var(--gn-font-head); font-weight: 700; font-size: 15px; color: var(--gn-acc); }
/* Hero-фото = миниатюра случайного товара (по образцу --promo-img) */
.gn-hero__photo.has-img { background-image: var(--hero-img); background-size: cover; background-position: center; }

@keyframes gnFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ==================== СЦЕНАРИИ ==================== */
.gn-scn { background: var(--gn-bg); }
.gn-scn__head { margin-bottom: 24px; }
.gn-scn__sub { margin: 8px 0 0; color: var(--gn-text-2); }
.gn-scn__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 880px) { .gn-scn__grid { grid-template-columns: 1fr; } }

.gn-scn-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: clamp(300px, 30vw, 380px);
  padding: 26px;
  border-radius: 24px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(155deg, var(--tone, #7E2D26), rgba(20, 15, 12, 0.86));
  box-shadow: var(--gn-sh-card);
  transition: transform 0.2s ease;
}
.gn-scn-card:hover { transform: translateY(-3px); }
/* Фон-фото товара + цветной оверлей тона поверх (текст читаем). Порядок слоёв:
 * градиент-тон (сверху) → фото (снизу). color-mix даёт тону прозрачность; если
 * браузер его не знает — вся background-image невалидна и падаем на базовую
 * заливку .gn-scn-card (фото не покажется, текст останется читаем на тоне). */
.gn-scn-card.has-img {
  background-image:
    linear-gradient(155deg,
      color-mix(in srgb, var(--tone, #7E2D26) 84%, transparent),
      color-mix(in srgb, #140f0c 80%, transparent)),
    var(--scn-img);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.gn-scn-card__count {
  position: absolute;
  top: 26px;
  right: 26px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--gn-r-pill);
  font-size: 12px;
  font-weight: 600;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.gn-scn-card__title { margin: 14px 0 6px; font-family: var(--gn-font-head); font-weight: 600; font-size: 24px; color: #fff; }
.gn-scn-card__title-link { color: #fff; text-decoration: none; }
.gn-scn-card__title-link:hover,
.gn-scn-card__title-link:focus-visible { text-decoration: underline; }
.gn-scn-card__sub { margin: 0; font-size: 14px; line-height: 1.35; color: rgba(255, 255, 255, 0.86); }
.gn-scn-card__chips { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
/* Строка товара = ссылка на товар (вся строка кликабельна, hover-подсветка). */
.gn-chip {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 14px;
  text-decoration: none;
  color: #fff;
  transition: background 0.15s ease;
}
a.gn-chip:hover,
a.gn-chip:focus-visible { background: rgba(255, 255, 255, 0.14); border-bottom-color: transparent; }
.gn-chip__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.92; }
.gn-chip__price { font-family: var(--gn-font-head); font-weight: 600; white-space: nowrap; }
.gn-scn-card .gn-chip__price,
.gn-scn-card .gn-chip__price .amount,
.gn-scn-card .gn-chip__price del,
.gn-scn-card .gn-chip__price ins { color: #fff; text-decoration-color: rgba(255,255,255,.6); }
.gn-scn-card__more { margin-top: 16px; font-weight: 600; align-self: flex-start; color: #fff; text-decoration: none; }
.gn-scn-card__more:hover,
.gn-scn-card__more:focus-visible { text-decoration: underline; }

/* ==================== БАННЕР HOT GRILL ==================== */
.gn-promo { padding: clamp(20px, 3vw, 40px) 24px; background: var(--gn-bg); }
.gn-promo__inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  border-radius: 26px;
  overflow: hidden;
  background: var(--gn-dark-btn);
}
.gn-promo.has-img .gn-promo__inner {
  background-image: linear-gradient(105deg, rgba(28, 23, 19, 0.94), rgba(28, 23, 19, 0.35)), var(--promo-img);
  background-size: cover;
  background-position: center;
}
.gn-promo__body { position: relative; max-width: 560px; padding: clamp(28px, 4vw, 52px); color: var(--gn-on-dark); }
.gn-promo__badge { display: inline-block; padding: 6px 14px; background: var(--gn-acc); color: #fff; border-radius: var(--gn-r-pill); font-weight: 700; font-size: 14px; }
.gn-promo__badge--kicker { background: rgba(217, 72, 28, 0.92); }
.gn-promo__title { margin: 16px 0 12px; color: #fff; }
.gn-promo__price { margin-bottom: 18px; font-family: var(--gn-font-head); font-weight: 700; font-size: 26px; color: #fff; }
.gn-promo__price .amount { color: #fff; }
.gn-promo__price del { margin-left: 8px; font-weight: 400; opacity: 0.6; }
.gn-promo__facts { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 22px; }
.gn-promo__fact { display: flex; flex-direction: column; }
.gn-promo__fact span { font-size: 12px; color: var(--gn-on-dark-2); }
.gn-promo__fact strong { font-family: var(--gn-font-head); font-size: 16px; color: #fff; }

/* ==================== TRUST ==================== */
.gn-trust { background: var(--gn-bg); }
.gn-trust__inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 768px) { .gn-trust__inner { grid-template-columns: 1fr; } }
.gn-trust__card { padding: 24px; background: var(--gn-card); border: 1px solid var(--gn-border); border-radius: 18px; }
.gn-trust__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: var(--gn-warm-pink);
  color: var(--gn-acc-d);
}
.gn-trust__title { margin: 0 0 8px; font-family: var(--gn-font-head); font-weight: 600; font-size: 18px; color: var(--gn-text); }
.gn-trust__text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--gn-text-2); }

/* ==================== reduced motion ==================== */
@media (prefers-reduced-motion: reduce) {
  .gn-hero__badge { animation: none; }
  .gn-scn-card { transition: none; }
}
