:root {
  --bg: #0e0f1a;
  --bg-card: #181a2e;
  --bg-panel: #1f2137;
  --accent: #8b5cf6;
  --accent-hover: #7c3aed;
  --accent-light: #2d2a4a;
  --text: #f1f0fa;
  --text-muted: #9d9eb8;
  --price: #34d399;
  --rent-bg: #f59e0b;
  --rent-hover: #d97706;
  --stars: #fbbf24;
  --border: #2a2c44;
  --shadow: rgba(0, 0, 0, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: opacity 0.4s ease;
}

body.fade-out { opacity: 0; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== ШАПКА ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: rgba(14, 15, 26, 0.95);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
}

nav ul { display: flex; gap: 1.5rem; }
nav a { color: var(--text-muted); font-weight: 500; transition: color 0.3s; }
nav a:hover, nav a.active { color: var(--text); }

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ===== ИКОНКА ВК ===== */
.btn-vk {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.btn-vk svg {
  width: 22px;
  height: 22px;
  fill: var(--text);
}

.btn-vk:hover {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

/* ===== КНОПКИ ===== */
.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.35);
}

.btn-primary svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 500;
  transition: all 0.3s ease;
}
.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

.btn-rent {
  display: inline-block;
  width: 100%;
  padding: 12px 0;
  margin-top: 1rem;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  background-color: var(--rent-bg);
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}
.btn-rent:hover {
  background-color: var(--rent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(245, 158, 11, 0.4);
}

/* ===== КОНТЕЙНЕР ===== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 5%;
  width: 100%;
  flex: 1;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2.5rem;
  font-weight: 700;
}

/* ===== HERO ===== */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 5%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-left h1 {
  font-size: 2.8rem;
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #a78bfa, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-left p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 450px;
}

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-right {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.hero-right h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--accent);
  text-align: center;
}

.bestseller {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}
.bestseller:last-child { border-bottom: none; }

.bestseller-img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.bestseller-img-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
}

.bestseller-info { flex-grow: 1; }
.bestseller-info h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.2rem; }
.bestseller-info .price { font-size: 1rem; }

/* ===== СЕТКА ТОВАРОВ ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.product-card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 16px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(139, 92, 246, 0.2);
}
.product-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  margin-bottom: 1rem;
}
.product-img-placeholder {
  width: 100%;
  height: 180px;
  border-radius: 12px;
  background: var(--bg-panel);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.product-card h3 { font-size: 1.2rem; margin-bottom: 0.4rem; font-weight: 600; }
.product-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.2rem; flex-grow: 1; }
.price-row { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.price { font-size: 1.2rem; font-weight: 700; color: var(--price); }
.status.free { color: var(--price); font-weight: 600; text-transform: uppercase; font-size: 0.8rem; }

/* ===== ПАНЕЛЬ КАТАЛОГА ===== */
.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.category-filters {
  display: flex;
  gap: 0.5rem;
  flex-grow: 1;
  min-width: 0;
}

.cat-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.75rem 1.2rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  min-width: 80px;
  text-align: center;
}

.cat-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.cat-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.3);
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 360px;
  min-width: 220px;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.8rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.search-box input::placeholder {
  color: rgba(157, 158, 184, 0.6);
}

.search-box svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--text-muted);
  pointer-events: none;
}

.sort-select {
  padding: 0.75rem 1.2rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  appearance: none;
  min-width: 200px;
  box-sizing: border-box;
}

.sort-select:focus {
  border-color: var(--accent);
  outline: none;
}

.sort-select option {
  background: var(--bg-card);
  color: var(--text);
}

.no-results {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 3rem 0;
  display: none;
}

/* ===== АККОРДЕОН ===== */
.steps { width: 100%; }

details {
  background: linear-gradient(145deg, var(--bg-card), var(--bg-panel));
  border: 1px solid var(--border);
  border-radius: 20px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  box-shadow: 0 4px 16px var(--shadow);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
details:hover { border-color: rgba(139, 92, 246, 0.4); }
details[open] {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.15);
}

summary {
  padding: 1.6rem 1.8rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.15rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.25s ease;
  border-radius: 20px;
}
summary:hover { background: rgba(139, 92, 246, 0.07); }
summary::-webkit-details-marker { display: none; }

.step-header { display: flex; align-items: center; gap: 1.1rem; }
.step-number {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

summary::after {
  content: '▸';
  font-size: 1.1rem;
  color: var(--accent);
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.3, 1);
  flex-shrink: 0;
}
details[open] summary::after { transform: rotate(90deg); }

details .answer {
  max-height: 0;
  opacity: 0;
  padding: 0 1.8rem 1.8rem;
  color: var(--text-muted);
  line-height: 1.75;
  font-size: 1rem;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.25, 1, 0.3, 1),
              opacity 0.6s ease 0.1s,
              padding-top 0.6s ease,
              padding-bottom 0.6s ease;
}

/* ===== ОТЗЫВЫ ===== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.review-card {
  background: linear-gradient(145deg, var(--bg-card), var(--bg-panel));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 4px 16px var(--shadow);
  transition: transform 0.3s, border-color 0.3s;
}
.review-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.4);
}

.review-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.review-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.review-name { font-weight: 600; font-size: 1.05rem; }
.review-stars { color: var(--stars); font-size: 0.9rem; }
.review-text { color: var(--text-muted); line-height: 1.7; }

/* ===== ПАНЕЛЬ ОПЛАТЫ ===== */
.payment-methods {
  margin-bottom: 2rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.payment-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.payment-icons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.payment-icon {
  padding: 0.75rem 1.2rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 100px;
  justify-content: center;
  border: 1px solid rgba(42, 44, 68, 0.3);
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.03);
}

.payment-icon:hover {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
}

.icon-text {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1;
}

.icon-name {
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0.8;
}

/* ===== ФУТЕР ===== */
footer {
  padding: 2rem 5%;
  text-align: center;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  margin-top: 3rem;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 960px) {
  .catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
  }
  .category-filters { justify-content: center; }
  .search-box, .sort-select { max-width: 100%; }
}

@media (max-width: 768px) {
  nav ul { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-left h1 { font-size: 2.2rem; text-align: center; }
  .hero-left p { text-align: center; margin-left: auto; margin-right: auto; }
  .hero-buttons { justify-content: center; }
  .payment-methods { padding: 1rem; }
  .payment-icon { min-width: 80px; padding: 0.6rem 0.8rem; }
  .icon-name { display: none; }
  .btn-vk { width: 40px; height: 40px; }
  .btn-vk svg { width: 18px; height: 18px; }
  .btn-primary { padding: 0.6rem 1rem; font-size: 0.9rem; }
  .btn-primary svg { width: 16px; height: 16px; }
}
