/* --- ОСНОВНЫЕ ПЕРЕМЕННЫЕ --- */
:root {
  --accent: #00d2ff;
  --bg-dark: #050505;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

body {
  background: radial-gradient(circle at top right, #1a1a2e, #000);
  color: white;
  overflow-x: hidden;
}

/* --- HEADER (GLASSMORPHISM) --- */
.glass-header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  gap: 20px;
  /* Твои текущие стили... */
  min-height: 70px; /* Меняем height на min-height */
  height: auto; /* Разрешаем шапке расти вниз на мобилках */
  flex-wrap: wrap; /* Позволяем элементам переноситься на новую строку */
  padding: 10px 5%;
  height: auto; /* Позволяет шапке растягиваться */
  min-height: 70px; /* Базовая высота для десктопа */
  padding: 10px 5%; /* Уменьшаем отступы */
  flex-wrap: wrap; /* Элементы переносятся, а не слипаются */
  gap: 10px; /* Расстояние между лого, поиском и меню */
}

.logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--accent);
  text-shadow: 0 0 15px rgba(0, 210, 255, 0.5);
  flex-shrink: 0;
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 5px 15px;
  transition: all 0.3s ease;
  width: 250px;
  flex-shrink: 0;
}

.search-box:focus-within {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
  width: 280px;
}

.search-box input {
  background: transparent;
  border: none;
  color: white;
  outline: none;
  width: 100%;
  padding: 8px 0;
  font-size: 14px;
}

.main-nav a {
  color: white;
  text-decoration: none;
  margin: 0 15px;
  font-size: 14px;
  opacity: 0.7;
  transition: 0.3s;
}

.main-nav a:hover {
  opacity: 1;
  color: var(--accent);
}

/* --- HERO SECTION --- */
.hero {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero-content h1 {
  /* Минимум 2rem, максимум 5rem, оптимально 8% от ширины экрана */
  font-size: clamp(1.8rem, 6vw, 4rem);
  line-height: 1.2;
  margin-bottom: 15px;
}

.subtitle {
  font-size: clamp(0.9rem, 3vw, 1.2rem);
  letter-spacing: 2px;
}

/* --- КНОПКИ --- */
.btn-glow {
  padding: 15px 40px;
  background: var(--accent);
  border: none;
  border-radius: 50px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
  transition: 0.3s;
}

.btn-glow:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.btn-outline {
  padding: 15px 40px;
  background: transparent;
  border: 1px solid var(--glass-border);
  color: white;
  border-radius: 50px;
  margin-left: 20px;
  cursor: pointer;
  transition: 0.3s;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* --- МАГАЗИН И ТОВАРЫ --- */

/* Разрешаем скролл для всей страницы */
body {
  overflow-y: auto;
  min-height: 100vh;
}

/* Если у тебя есть специальный контейнер для товаров */
.products-section {
  padding-bottom: 50px; /* Запас места снизу */
}

.shop {
  padding: 100px 5%;
}

.grid {
  display: grid;
  /* Это «магия» оптимизации: карточки не меньше 280px, остальное пространство делится поровну */
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  padding: 20px 0;
}

.product-card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 40px 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
  min-height: 420px;
  will-change: transform; /* Подготовка видеокарты к анимации */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backface-visibility: hidden;
}

.product-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.price {
  font-size: 24px;
  color: var(--accent);
  font-weight: bold;
  margin: 15px 0;
}

/* --- КОРЗИНА И МОДАЛКИ --- */
.cart-panel {
  position: fixed;
  top: 0;
  right: -450px;
  width: 400px;
  height: 100vh;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--glass-border);
  z-index: 3000;
  padding: 30px;
  transition: 0.5s cubic-bezier(0.7, 0, 0.3, 1);
  width: 100% !important; /* На телефоне корзина на весь экран */
  max-width: 400px; /* На ПК остается компактной */
  display: flex;
  flex-direction: column;
}

.cart-panel.active {
  right: 0;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5000;
}

.auth-content {
  position: relative;
  width: 350px;
  padding: 40px;
  border-radius: 20px;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(15px);
}

.auth-title {
  margin-bottom: 20px;
  color: var(--accent);
  line-height: normal;
}

/* --- ФИКС ГЛАЗКОВ В ПОЛЯХ ПАРОЛЯ --- */
.auth-group {
  position: relative !important;
  width: 100% !important;
  margin-bottom: -1px !important;
}

.spec-input {
  width: 100% !important;
  padding: 12px 45px 12px 15px !important; /* Отступ справа для глазика */
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: white;
  border-radius: 8px;
  outline: none;
  transition: 0.3s;
  margin-bottom: 6px;
}

.spec-input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
}

.password-toggle {
  position: absolute !important;
  right: 15px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: var(--accent) !important;
  cursor: pointer !important;
  z-index: 10 !important;
  font-size: 16px !important;
  opacity: 0.6;
  transition: 0.3s;
}

.password-toggle:hover {
  opacity: 1;
}

.close-panel {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 32px;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: 0.3s;
  line-height: 1;
}

.close-panel:hover {
  color: var(--accent);
  transform: rotate(90deg);
}

/* --- СЕКЦИЯ "О НАС" --- */
.info-blocks {
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 100px 5%;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.info-card {
  flex: 1;
  min-width: 300px;
  padding: 50px 30px;
  text-align: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  transition: all 0.4s ease;
}

.info-card:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-10px);
  border-color: var(--accent);
}

.info-card h3 {
  font-size: 28px;
  margin-bottom: 15px;
  background: linear-gradient(90deg, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- КНОПКА В КОРЗИНЕ --- */
.btn-pay {
  width: 100%;
  margin-top: 20px;
  padding: 15px;
  background: var(--accent);
  color: #050505;
  border: none;
  border-radius: 10px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 210, 255, 0.3);
}

.btn-pay:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 210, 255, 0.5);
}

/* --- УВЕДОМЛЕНИЯ --- */
#notification-container {
  position: fixed;
  top: 85px;
  right: 20px;
  z-index: 10000;
}

.toast {
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  color: white;
  padding: 15px 25px;
  border-radius: 12px;
  margin-bottom: 10px;
  border-left: 4px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.4s ease forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* --- FOOTER --- */
.main-footer {
  background: rgba(5, 5, 10, 0.95);
  padding: 39px 5% 20px;
  border-top: 1px solid var(--glass-border);
  margin-top: 24px;
  line-height: 2;
}

.footer-bottom {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
  scroll-behavior: smooth;
  text-align: center;
}

.footer-slogan {
  margin: 2px;
  padding: 2px;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
  scroll-behavior: smooth;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-socials a {
  color: white;
  font-size: 22px;
  margin-right: 20px;
  opacity: 0.6;
  transition: 0.3s;
}

.footer-socials a:hover {
  color: var(--accent);
  opacity: 1;
}

.footer-links {
  display: flex;
  gap: 80px;
}

.f-col a {
  display: block;
  color: white;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 12px;
  opacity: 0.6;
  transition: 0.3s;
}

.f-col a:hover {
  opacity: 1;
  color: var(--accent);
  padding-left: 5px;
}

@media (max-width: 768px) {
  .glass-header {
    height: auto; /* Шапка будет подстраиваться под контент */
    padding: 10px;
    justify-content: center;
  }
  .search-box {
    width: 100%; /* Поиск растянется на весь телефон */
    order: 3;
  }
  .main-nav {
    order: 2;
    font-size: 12px;
  }
  .hero-content h1 {
    font-size: 2.5rem; /* Уменьшаем заголовок, чтобы он влез */
  }
}

.hidden {
  display: none !important;
}
