/* ==========================================================================
   HERO.CSS - Hero баннер (минималистичный современный стиль)
   Размер: ~2 KB | Загрузка: только MainView
   ========================================================================== */

/* Hero Banner - одно большое фото */
.hero-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  z-index: 1;
  /* Резервируем место под баннер, чтобы избежать CLS */
  aspect-ratio: 1920 / 800;
  /* Соотношение сторон для десктопа */
}

@media (max-width: 767px) {
  .hero-banner {
    aspect-ratio: 600 / 800;
    /* Соотношение сторон для мобильных */
    margin-bottom: 5px;
  }
}


.hero-banner picture,
.hero-banner img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.5s ease;
}

.hero-banner:hover img {
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 50%);
}

.hero-content {
  width: 100%;
  padding: 40px;
  text-align: center;
}

.hero-title {
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin: 0 0 8px 0;
}

.hero-subtitle {
  font-size: 13px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0 0 12px 0;
  font-weight: 400;
}

.hero {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  /* Відступи між панелями */
  min-height: 700px;
  margin-bottom: 20px;
}

/* Hero з 3 вертикальними панелями (вертикальна композиція) */
.hero-3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  /* Відступи між панелями */
  min-height: 80vh;
  max-height: 900px;
}

/* Hero с 7 панелями (3 панели сверху + 4 панели снизу) */
.hero-7 {
  grid-template-columns: repeat(4, 1fr);
  min-height: 1200px;
}

/* Первый ряд - 3 панели на всю ширину */
.hero-7 .hero-item:nth-child(1),
.hero-7 .hero-item:nth-child(2),
.hero-7 .hero-item:nth-child(3) {
  /* Каждая занимает 4/3 колонки, чтобы получилось 3 панели */
  grid-column: span 1.333;
}

/* Второй ряд - 4 панели */
.hero-7 .hero-item:nth-child(4),
.hero-7 .hero-item:nth-child(5),
.hero-7 .hero-item:nth-child(6),
.hero-7 .hero-item:nth-child(7) {
  grid-column: span 1;
}

/* АЛЬТЕРНАТИВНЫЙ ПОДХОД: используем подсетку */
.hero-7 {
  grid-template-columns: repeat(12, 1fr);
  /* 12 колонок для гибкости */
  grid-auto-rows: 600px;
}

/* Первый ряд - 3 панели (по 4 колонки каждая = 12/3) */
.hero-7 .hero-item:nth-child(1),
.hero-7 .hero-item:nth-child(2),
.hero-7 .hero-item:nth-child(3) {
  grid-column: span 4;
}

/* Второй ряд - 4 панели (по 3 колонки каждая = 12/4) */
.hero-7 .hero-item:nth-child(4),
.hero-7 .hero-item:nth-child(5),
.hero-7 .hero-item:nth-child(6),
.hero-7 .hero-item:nth-child(7) {
  grid-column: span 3;
}

.hero-item {
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hero-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.hero-item:hover img {
  transform: scale(1.05);
}

/* Темна іконка чату (ліва панель) */
.hero-icon {
  position: absolute;
  bottom: 30px;
  left: 30px;
  width: 48px;
  height: 48px;
  background: rgba(60, 60, 60, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.hero-icon svg {
  color: #fff;
  width: 24px;
  height: 24px;
}

/* Контент по центру (центральна панель Bestsellers) */
.hero-content-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 10;
}

.hero-title-big {
  font-family: var(--font-serif);
  font-size: 72px;
  font-weight: 400;
  color: #fff;
  margin-bottom: 20px;
  letter-spacing: 2px;
  line-height: 1;
}

.hero-btn {
  display: inline-block;
  padding: 14px 32px;
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.hero-btn:hover {
  background: #fff;
  color: #000;
}

/* Жовта плашка -10% (права панель) */
.hero-badge-yellow {
  position: absolute;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #000;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 100px;
  z-index: 10;
}

.hero-badge-discount {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.hero-badge-text {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-badge-yellow svg {
  width: 20px;
  height: 20px;
  margin-top: 4px;
}

/* Контент поверх изображения */
.hero-title {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 400;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.hero-subtitle {
  font-size: 14px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 400;
}

.hero-link {
  color: #fff;
  text-decoration: none;
  display: inline-block;
  margin-top: 16px;
  padding-bottom: 4px;
  border-bottom: 1px solid #fff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: opacity 0.3s ease;
}

.hero-link:hover {
  opacity: 0.8;
  color: #fff !important;
  text-decoration: none;
}

.hero-content {
  position: absolute;
  bottom: 50px;
  /* Отступ снизу */
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  text-align: center;
}

/* Адаптив */
@media (max-width: 991px) {
  .hero {
    grid-template-columns: repeat(2, 1fr);
    min-height: 500px;
  }

  .hero-item:last-child {
    grid-column: 1/-1;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-content {
    padding: 30px;
  }
}

@media (max-width: 767px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 400px;
  }

  .hero-item:last-child {
    grid-column: 1;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-content {
    padding: 24px;
  }

  .hero-subtitle {
    font-size: 12px;
  }
}