/* =========================
   ROOT VARIABLES
========================= */
:root {
  --bg-main: radial-gradient(circle at top, #2b0a3d, #0b0614 70%);
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-blur: rgba(11, 6, 20, 0.85);

  --gradient-main: linear-gradient(90deg, #ff00cc, #8f00ff);
  --gradient-hover: linear-gradient(90deg, #ff00cc, #ff6600);

  --text-main: #fff;
  --text-muted: rgba(255,255,255,.7);

  --radius-lg: 20px;
  --radius-xl: 36px;
  --radius-pill: 999px;

  --transition: .3s ease;
}

/* =========================
   RESET
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html, body {
  max-width: 100%;
  overflow-x: hidden; /* Запрещает горизонтальную прокрутку */
  position: relative;
}
img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

body {
  overflow-x: hidden; /* Запрещает горизонтальный скролл, если что-то вылезло */
  width: 100%;
}
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Inter, Arial, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
}
button, .close {
  outline: none !important;  /* Убираем стандартный контур фокуса */
  box-shadow: none !important; /* Убираем тени при фокусе */
}
age-modal {
    display: none; /* скрыто по умолчанию */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.age-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    width: 80%;
    max-width: 400px;
}

.age-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

button {
    padding: 10px 20px;
    background-color: #3406b3;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    margin-top: 20px;
}

button:hover {
    background-color: #3406b3;
}


/* =========================
   HEADER
========================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  gap: 16px;

  padding: 16px 40px;
  background: var(--bg-blur);
  backdrop-filter: blur(12px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(90deg,#c084fc,#f0abfc);
  -webkit-background-clip: text;
  color: transparent;
}

.logo img {
  height: 40px;
}

nav {
  margin-left: auto;
  display: flex;
  gap: 12px;
}

nav a {
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--gradient-main);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

nav a:hover {
  background: var(--gradient-hover);
  transform: translateY(-2px);
}

.telegram-btn {
  display: flex;
  align-items: center;
  gap: 8px;
}

.telegram-icon {
  width: 18px;
  height: 18px;
}

/* =========================
   BURGER
========================= */
.burger {
  display: none;
  margin-left: auto;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.burger span {
  width: 24px;
  height: 2px;
  background: #fff;
}

/* =========================
   MAIN OFFSET
========================= */
.hero,
#catalog,
.delivery {
  padding-top: 120px;
}

/* =========================
   HERO
========================= */
.hero {
  min-height: 100vh;
  padding-bottom: 80px;
  display: flex;
  justify-content: center;
  text-align: center;
}

.hero-content {
  max-width: 900px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.hero-image {
  width: 360px;
  aspect-ratio: 1 / 1;
  padding: 28px;

  background: rgba(255,255,255,.08);
  backdrop-filter: blur(28px);
  border-radius: var(--radius-xl);

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow:
    0 30px 80px rgba(5, 21, 167, 0.35),
    inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero h1 {
  font-family: 'Bebas Neue', cursive;
  font-size: 96px;
  margin: 0;
}

.hero p {
  font-size: 26px;
  max-width: 720px;
  line-height: 1.6;
  opacity: .9;
}

.btn {
  padding: 16px 36px;
  border-radius: var(--radius-pill);
  background: var(--gradient-main);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.btn:hover {
  transform: translateY(-3px);
}

/* =========================
   CATALOG
========================= */
#catalog {
  padding-bottom: 120px;
}

#catalog h2 {
  text-align: center;
  font-size: 56px;
  margin-bottom: 60px;
}

.categories {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-height: 500px; /* Ограничиваем высоту, чтобы прокрутка появилась */
  padding-right: 10px; /* Чтобы прокрутка не перекрывала элементы */
   margin-bottom: 20px; /* Отступ снизу для кнопки */
}

.card {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(255,0,200,.25), #000);
  transition: transform var(--transition);
}

.card:hover {
  transform: translateY(-6px) scale(1.03);
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.btn {
  display: block;
  margin: 0 auto;
  padding: 12px 30px;
  background-color: #4CAF50;
  color: white;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #45a049;
}

/* =========================
   MODAL WINDOW (PRODUCTS)
========================= */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  background: rgba(0, 0, 0, 0.85); /* полупрозрачный фон */
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-content {
  background: #1b0d2a;
  padding: 32px;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  color: #fff;
  text-align: center;
  height: 600px; /* Можно увеличить высоту, раз товаров много */
  max-height: 90vh; /* Чтобы не вылезало за пределы экрана телефона */
  
  display: flex;
  flex-direction: column; /* Элементы идут друг за другом сверху вниз */
  position: relative;
  overflow: hidden;
}

.modal-content h3 {
  font-size: 28px;
  margin-bottom: 20px;
}
#modalTitle {
  font-size: 24px;
  margin-bottom: 20px;
  background-color: #1b0d2a;
  position: sticky;
  top: 0;
  z-index: 10; /* Увеличь, чтобы точно быть сверху */
  backface-visibility: hidden; /* Заставляет браузер создать отдельный слой отрисовки */
  transform: translateZ(0);
}

/* Стили для списка товаров */
#productList {
  max-height: 300px; /* Ограничиваем высоту блока с товарами */
  overflow-y: auto; /* Включаем вертикальную прокрутку */
  margin-bottom: 80px; /* Отступ снизу для кнопки */
  padding-right: 10px;
  flex-grow: 1; /* Заставляем список занимать доступное пространство */
  text-align: left; /* Выравнивание товаров по левому краю */
}
/* Настраиваем ширину скроллбара */
#productList::-webkit-scrollbar {
  width: 6px; /* Тонкая полоска */
}

/* Настраиваем "дорожку" (фон скролла) */
#productList::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1); /* Полупрозрачный фон */
  border-radius: 4px;
}

/* Настраиваем "бегунок" (то, что двигается) */
#productList::-webkit-scrollbar-thumb {
  background-color: #c084fc; /* Фиолетовый цвет (как в твоем логотипе) */
  border-radius: 4px;
}

/* Поддержка Firefox (там другие свойства) */
#productList {
  scrollbar-width: thin; /* Тонкий скролл */
  scrollbar-color: #c084fc rgba(255, 255, 255, 0.1); /* Цвет бегунка и фона */
}

/* Стили для каждого товара */
#productList li {
  padding: 8px;
  border-bottom: 1px solid #ddd;
}

.product-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.product-item:last-child {
  border-bottom: none;
}

.product-name {
  font-size: 18px;
  font-weight: 600;
}

.product-price {
  font-size: 18px;
  font-weight: 500;
  color: #ff6600; /* цена оранжевая */
}

/* Кнопка "Связаться с менеджером" */
  .manager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background-color: #5ac8fa;
  color: white;
  font-weight: bold;
  font-size: 18px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  transition: background-color 0.3s ease;
}

.manager-btn:hover {
  background-color: #2b9fd7; /* более темный оттенок при наведении */
}

.manager-icon {
  width: 10px; /* Размер иконки */
  height: 15px;
  margin-right: 30px; /* Отступ между иконкой и текстом */
}

/* Стили для блока с уведомлением */
.availability-info {
  font-size: 14px;
  color: #ffffff; /* Можно выбрать цвет для текста уведомления */
  margin-top: 20px;
  margin-bottom: 65px; /* Отступ снизу для кнопки */
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  text-align: center;
}

/* Кнопка закрыть */
.close {
 position: absolute;
  top: 10px;
  right: 15px;
  z-index: 9999; /* Чтобы была выше заголовка */
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 9999; /* Обеспечиваем, чтобы кнопка была поверх всего */
}

.close:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* =========================
   DELIVERY
========================= */
.delivery {
  padding-bottom: 120px;
}

.delivery h2 {
  text-align: center;
  font-size: 48px;
  margin-bottom: 60px;
}

.delivery-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.delivery-item {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  text-align: center;
}



/* =========================
   FOOTER
========================= */
.footer {
  background: #0b0614;
  padding: 80px 20px 40px;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.footer-logo {
  font-size: 32px;
  font-weight: 900;
}

.footer-desc {
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-col h4 {
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s ease, transform 0.3s ease; /* Добавляем анимацию */
}
.footer-col a:hover {
  color: #5ac8fa;  /* Подсветка на цвет Telegram */
  transform: scale(1.1);  /* Легкое увеличение */
}

/* =========================
   FOOTER LIST STYLES
========================= */
.footer-col ul li {
  position: relative;
  padding-left: 30px; /* Отступ слева для точки */
  font-size: 16px;
  color: var(--text-muted); /* Цвет текста */
}

/* Добавляем точку перед каждым элементом */
.footer-col ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%); /* Центрируем точку по вертикали */
  width: 8px; /* Размер точки */
  height: 8px; /* Размер точки */
  border-radius: 50%; /* Делаем точку круглой */
  background-color: #5ac8fa; /* Оранжевая точка (можно заменить на любой цвет) */
}

/* =========================
   ANIMATION FOR BUTTONS
========================= */
.footer .footer-col a {
  position: relative;
  display: inline-block;
  padding: 5px;
  transition: transform 0.3s ease, color 0.3s ease;
}

/* Мелкая анимация для ссылок */
.footer-col a::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: #5ac8fa; /* Цвет подсветки */
  bottom: -5px;
  left: 0;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

/* Анимация при наведении на ссылку */
.footer-col a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  font-size: 14px;
}

/* =========================
   MODALS
========================= */
.modal,
.age-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-content,
.age-box {
  background: #1b0d2a;
  padding: 32px;
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 90%;
  text-align: center;
}

/* =========================
   MOBILE
========================= */
/* =========================
   MOBILE FIXES
========================= */
@media (max-width: 768px) {
  nav {
    display: none;
  }
#catalog .categories {
    max-height: none; /* Убираем ограничение высоты */
    overflow: visible; /* Убираем скрытие элементов */
    display: grid; /* Убедимся, что грид остался */
  }
  .burger {
    display: flex;
  }

  nav.active {
    display: flex;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 24px;
    background: rgba(11,6,20,.97);
    gap: 16px;
  }

  .hero h1 {
    font-size: 64px;
  }

  .hero p {
    font-size: 20px;
  }

  /* =========================
     Категории (улучшение адаптивности)
  ========================= */
  #catalog .categories {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* Уменьшаем минимальную ширину для мобильных */
  }

  /* =========================
     Модальное окно и его элементы (на мобильных)
  ========================= */
  .modal-content {
    padding: 20px;
  }

  .product-name, .product-price {
    font-size: 16px;
  }

  .modal-content h3 {
    font-size: 24px;
  }

  .manager-btn {
    padding: 10px 20px;
    font-size: 16px;
  }

  .close {
    font-size: 12px;
  }

  /* =========================
     Footer (на мобильных)
  ========================= */
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }

  .footer-logo {
    font-size: 28px;
  }

  .footer-col h4 {
    font-size: 16px;
  }

  .footer-col a {
    font-size: 14px;
  }
}

/* Для еще меньших экранов, например, мобильных телефонов с шириной менее 480px */
@media (max-width: 480px) {
  .modal-content {
    padding: 16px;
  }

  .product-name, .product-price {
    font-size: 14px;
  }

  .modal-content h3 {
    font-size: 20px;
  }

  .manager-btn {
    font-size: 14px;
    padding: 8px 16px;
  }

  .close {
    font-size: 12px;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
  }

  .footer-logo {
    font-size: 24px;
  }

  .footer-col h4 {
    font-size: 14px;
  }

  .footer-col a {
    font-size: 12px;
  }
}

@media (orientation: landscape) {
  .modal {
    align-items: flex-start; /* Позволяем контенту начинаться сверху, если он большой */
    padding: 10px;
  }

  .modal-content {
    height: auto; /* Убираем фиксированную высоту! */
    max-height: 95vh; /* Модалка не должна быть выше экрана */
    width: 90%;
    max-width: 550px;
    padding: 15px 30px; /* Уменьшаем внутренние отступы, чтобы сэкономить место */
    display: flex;
    flex-direction: column;
  }

  /* Уменьшаем отступы заголовка, чтобы список товаров был больше */
  #modalTitle {
    font-size: 22px;
    margin-bottom: 10px;
    padding: 5px;
  }

  #productList {
    max-height: 40vh; /* Ограничиваем список, чтобы кнопка снизу влезла в экран */
    margin-bottom: 10px;
  }

  .availability-info {
    display: none; /* В ландшафте инфо-блок лучше скрыть, чтобы не занимать место */
  }

  .manager-btn {
    padding: 8px 16px;
    font-size: 14px;
    position: relative; /* Гарантируем, что она в потоке */
    bottom: 0;
    transform: none;
    left: 0;
    width: auto;
    align-self: center;
  }

  .close {
    top: 5px;
    right: 10px;
  }
}
@media (max-width: 280px) {

  /* ===== HEADER ===== */
  header {
    padding: 10px 12px;
  }

  .logo {
    font-size: 18px;
  }

  .logo img {
    height: 26px;
  }

  /* ===== HERO ===== */
  .hero {
    padding-top: 100px;
    padding-bottom: 40px;
  }

  .hero h1 {
    font-size: 36px;
    letter-spacing: 1px;
  }

  .hero p {
    font-size: 14px;
    line-height: 1.4;
  }

  .hero-image {
    width: 180px;
    padding: 12px;
    border-radius: 20px;
  }

  /* ===== BUTTONS ===== */
  .btn,
  .manager-btn {
    font-size: 12px;
    padding: 8px 14px;
  }

  /* ===== CATALOG ===== */
  #catalog h2 {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .categories {
    grid-template-columns: 1fr;
    gap: 12px;
    max-height: none;
    padding-right: 0;
  }

  .card {
    border-radius: 14px;
  }

  /* ===== MODAL ===== */
  .modal-content {
    padding: 14px;
    height: auto;
    max-height: 90vh;
  }

  #modalTitle {
    font-size: 18px;
    padding: 6px;
  }

  #productList {
    font-size: 12px;
    max-height: 45vh;
  }

  .product-name,
  .product-price {
    font-size: 12px;
  }

  .close {
    font-size: 12px;
    top: 10px;
    right: 10px;
  }

  /* ===== DELIVERY ===== */
  .delivery h2 {
    font-size: 26px;
  }

  .delivery-item {
    padding: 16px;
    font-size: 14px;
  }

  /* ===== FOOTER ===== */
  .footer {
    padding: 40px 12px 20px;
  }

  .footer-logo {
    font-size: 20px;
  }

  .footer-col h4 {
    font-size: 14px;
  }

  .footer-col a,
  .footer-col li {
    font-size: 12px;
  }

  .footer-bottom {
    font-size: 11px;
    gap: 10px;
  }
}

@media (max-width: 290px) {
  header {
    padding: 10px 8px !important; /* Минимальные отступы по бокам */
    gap: 8px;
  }
  
  .logo {
    font-size: 16px; /* Еще немного уменьшаем текст лого */
  }

  .logo img {
    height: 22px; /* Уменьшаем саму иконку */
  }
}

@media (max-width: 290px) {
  .categories {
    grid-template-columns: 1fr !important; /* Строго одна колонка */
    padding-left: 5px;
    padding-right: 5px;
  }

  .card {
    width: 100%; /* Карточка не должна быть шире экрана */
  }
}

@media (max-width: 290px) {
  .modal-content {
    padding: 12px !important; /* Резко уменьшаем внутренние поля */
    width: 95%; /* Чуть больше ширины */
  }
  
  .product-item {
    gap: 5px;
  }

  .product-name {
    font-size: 13px; /* Крошечный шрифт для крошечного экрана */
  }
}

@media (max-width: 480px) {
  #catalog h2 {
    font-size: 32px !important; /* Уменьшаем с 56px до разумных 32px */
    line-height: 1.2;
    word-wrap: break-word; /* Позволяем перенос, если слово очень длинное */
    padding: 0 10px;
  }
}

/* Специально для супер-узких экранов как на скриншоте */
@media (max-width: 290px) {
  #catalog h2 {
    font-size: 24px !important; 
  }
}

@media (max-width: 320px) {
  header {
    padding: 10px 15px !important; /* Уменьшаем боковые отступы */
  }
  
  .logo {
    font-size: 18px !important;
  }
}

@media (max-width: 320px) {
  .categories {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 10px !important;
    max-height: none !important; /* Убираем лимит высоты, о котором говорили в начале */
  }

  .card {
    width: 100% !important; /* Карточка на всю ширину экрана */
    max-width: 260px; /* Чтобы не была слишком огромной */
    aspect-ratio: 1 / 1;
  }
}

