/* --- Базовые стили --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  color: #333;
  background: #f9f9f9;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Шапка --- */
.header {
  background: #fff;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #2c3e50;
  font-weight: bold;
  font-size: 24px;
}

/* --- Меню для ПК (горизонтальное) --- */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
}

.main-nav a {
  color: #333;
  font-weight: 500;
  transition: color 0.2s;
}

.main-nav a:hover {
  color: #007bff;
}

/* --- Гамбургер (только мобильные) --- */
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  padding: 8px;
  z-index: 102;
  display: none; /* Скрыт на ПК */
}

/* --- Выезжающее меню (справа налево) --- */
.nav-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
  padding: 80px 20px 20px;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 101;
  overflow-y: auto;
}

.nav-menu.active {
  transform: translateX(0);
}

.nav-menu ul {
  list-style: none;
}

.nav-menu a {
  display: block;
  padding: 14px 0;
  color: #333;
  font-size: 18px;
  border-bottom: 1px solid #eee;
}

.nav-menu a:hover {
  color: #007bff;
}

/* --- Действия в шапке (телефон, кнопка) --- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.phone, .btn {
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: #007bff;
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 500;
}

.btn-sm {
  background: #eee;
  color: #333;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 14px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 18px;
  background: #007bff;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
}

.btn-lg:hover {
  background: #0056b3;
}

/* --- Главный баннер (всегда 100vh) --- */
.hero-banner {
  width: 100%;
  height: 100vh;
  min-height: 500px;
  position: relative;
  overflow: hidden;
  display: block;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-image.loaded {
  opacity: 1;
}

/* --- Акции --- */
.promotions {
  padding-top: 20px;
  padding-bottom: 40px;
}

.promotions h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 28px;
}

.promo-timer {
  text-align: center;
  margin-bottom: 40px;
  font-size: 22px;
  font-weight: bold;
  color: #d32f2f;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.card-img-wrapper {
  padding-top: 66.67%; /* 3:2 соотношение */
  position: relative;
  background: #fafafa;
}

.card-img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.price-block {
  padding: 20px;
}

.price-block h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.old-price {
  text-decoration: line-through;
  color: #999;
  font-size: 14px;
  margin-right: 8px;
}

.new-price {
  font-size: 20px;
  color: #e53935;
  font-weight: bold;
}

.discount {
  font-size: 13px;
  color: #e53935;
  margin-left: 8px;
}

/* --- Карусель популярных товаров --- */
.popular-products {
  padding: 60px 0;
}

.popular-products h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 28px;
}

.carousel-wrapper {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 20px;
  will-change: transform;
}

.product-card {
  min-width: 280px;
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.pc-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #fafafa;
  overflow: hidden;
}

.pc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card h3 {
  margin: 12px 0 8px;
  font-size: 18px;
}

.product-card .price {
  color: #e53935;
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 12px;
}

.arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
  color: #333;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.prev-btn {
  left: 12px;
}

.next-btn {
  right: 12px;
}

.arrow-btn:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* --- Контакты --- */
.contacts {
  padding: 60px 0;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-photo-block {
  width: 100%;
}

.contact-street-img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  display: block;
}

.cta-block h3 {
  margin-bottom: 10px;
}

.cta-block p {
  margin-bottom: 20px;
  color: #555;
}

/* --- Footer --- */
.footer {
  background: #222;
  color: #ccc;
  padding: 40px 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: #aaa;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #fff;
}

/* --- Адаптив (планшеты и мобильные) --- */
@media (max-width: 768px) {
  .header-content {
    justify-content: flex-start;
  }

  .main-nav {
    display: none; /* Скрываем обычное меню на мобильных */
  }

  .hamburger {
    display: block; /* Показываем гамбургер на мобильных */
  }

  .header-actions {
    order: -1; /* На мобильных кнопки/телефон ставим ближе к гамбургеру */
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .promo-timer {
    font-size: 18px;
  }
}
.hero-image {
  width: 100%;
  max-width: 100%;       /* ГЛАВНОЕ: не даст картинке быть больше экрана */
  height: auto;          /* высота подстроится автоматически, чтобы не исказить пропорции */
  display: block;        /* убирает лишние отступы снизу у картинки */
}
/* Усиляем хедер: чётче отделяем от остального */
.header {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); /* чуть плотнее, чем раньше */
  border-bottom: 1px solid rgba(0,0,0,0.05); /* тонкая линия снизу */
}

/* Логотип: добавим акцент на слове «люстр» */
.logo-text {
  position: relative;
}
.logo-text::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #e53935; /* фирменный красный */
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.logo:hover .logo-text::after {
  transform: scaleX(1);
}

/* Гамбургер: делаем его заметнее */
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  padding: 8px 12px;
  z-index: 102;
  display: none; /* скрыт на ПК */
  border-radius: 6px;
  transition: background 0.2s, transform 0.2s;
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  }
  .hamburger:hover {
    background: #fff;
    transform: rotate(2deg);
  }
}

/* Анимация гамбургера в крестик (через JS класс .active на кнопке) */
.hamburger.active span {
  display: block;
  width: 22px;
  height: 2px;
  background: #333;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.hamburger.active span:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.btn-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: #fff;
  padding: 12px 20px; /* чуть крупнее */
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,79,182,0.3);
  transition: all 0.25s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,79,182,0.4);
  background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
}
/* На мобильных: скрываем телефон и кнопку в шапке */
@media (max-width: 768px) {
  .header-actions .phone,
  .header-actions .btn-primary {
    display: none;
  }
}

/* Контейнер CTA внутри мобильного меню */
.mobile-nav-cta {
  padding: 20px;
  border-top: 1px solid #eee;
  margin-top: 24px;
}

.mobile-phone-block {
  margin-bottom: 12px;
}

.mobile-phone {
  display: block;
  text-align: center;
  font-size: 18px;
  color: #333;
  font-weight: 600;
}

.mobile-phone:hover {
  color: #007bff;
}

/* На ПК блок CTA внутри меню не нужен */
@media (min-width: 769px) {
  .mobile-nav-cta {
    display: none;
  }
}
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Разводит элементы по краям */
  width: 100%;
  padding: 0 16px;
  box-sizing: border-box;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #333;
  z-index: 10;
}

.hamburger {
  /* СБРОС СТИЛЕЙ */
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  z-index: 102;
  display: none; /* Скрыт на ПК */
  border-radius: 6px;
  
  /* ГЛАВНОЕ ПРАВИЛО: прижимает элемент к правому краю */
  margin-left: auto; 
  
  /* Опционально: визуальные эффекты */
  transition: background 0.2s, transform 0.2s;
}

/* ПОКАЗ НА МОБИЛЬНЫХ */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Стили для красоты кнопки (фон, тень) */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
  
  .hamburger:hover {
    background: #fff;
    transform: rotate(2deg);
  }
}
.standalone-shadow-img {
  max-width: 100%;
  height: auto;
  display: block;
  
  /* Тень — только у этой картинки */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  
  /* Опционально: скругление, чтобы тень смотрелась аккуратнее */
  border-radius: 4px;
  
  /* Отступ снизу, чтобы тень не «наезжала» на контент ниже */
  margin-bottom: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.logo-img {
  height: 36px;        /* подбери высоту под свой макет */
  width: auto;         /* сохраняет пропорции */
  display: block;
  object-fit: contain;
}

.logo-text {
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1;
}
.close-menu-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: #333;          /* цвет под твой дизайн, можно #fff если фон тёмный */
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-menu-btn:hover {
  color: #007bff;
}
/* Попап: затемнение фона */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: none; /* скрыто по умолчанию */
  justify-content: center;
  align-items: center;
}

/* Окно попапа */
.modal-window {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

/* Кнопка закрытия (крестик) */
.close-modal {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #333;
  line-height: 1;
  padding: 0;
}
.close-modal:hover { color: #d00; }

/* Изображение в попапе */
.modal-img {
  width: 100%;
  height: auto;
  margin-bottom: 16px;
  border-radius: 6px;
}

/* Блок информации */
.modal-info { text-align: left; }
.modal-title { margin: 0 0 12px 0; font-size: 22px; font-weight: 700; }
.modal-desc { color: #555; line-height: 1.6; margin-bottom: 20px; }

/* Список характеристик */
.modal-list { list-style: none; padding: 0; margin: 0; }
.modal-list li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.modal-list li:last-child { border-bottom: none; }

/* Кнопка "Подробнее" */
.detail-btn {
  display: inline-block;
  padding: 10px 16px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}
.detail-btn:hover { background-color: #0056b3; }
/* Показываем попап, когда у него есть класс active */
.modal-overlay.active {
  display: flex !important;
  justify-content: center;
  align-items: center;
}

/* Чтобы фон был полупрозрачным */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Окно внутри попапа */
.modal-window {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  position: relative;
}
/* Контейнер попапа — растягивается на весь экран, центрирует окно */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  backdrop-filter: blur(4px);
  display: none; /* скрыто по умолчанию */
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

/* Показываем попап, когда добавлен класс active */
.modal-overlay.active {
  display: flex;
  opacity: 1;
  visibility: visible;
}

/* Само окно с информацией — адаптивное */
.modal-window {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  position: relative;
  max-width: 600px;       /* на ПК — максимум 600px */
  width: 90%;             /* на мобильном — 90% ширины */
  max-height: 90vh;       /* не выше 90% высоты экрана */
  overflow-y: auto;       /* если контента много — появится прокрутка внутри окна */
  margin: 0 auto;
}

/* Крестик закрытия — фиксируем в углу окна */
.close-modal {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  color: #333;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.close-modal:hover {
  color: #e53935;
}

/* Адаптив: на очень маленьких экранах делаем окно ещё компактнее */
@media (max-width: 480px) {
  .modal-window {
    width: 95%;
    padding: 16px;
    border-radius: 8px;
  }
}
/* Скрываем картинку в попапе */
#modalImg {
  display: none;
}

/* Растягиваем блок с информацией на всю ширину внутри модального окна */
.modal-info {
  width: 100%;
}

/* Опционально: делаем заголовок крупнее и центрируем */
.modal-title {
  text-align: center;
  margin-bottom: 12px;
}
