:root {
  --bg: #07090d;
  --bg-soft: #121821;
  --panel: #111822;
  --panel-strong: #171f2b;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f7f9ff;
  --muted: #a3afc2;
  --primary: #e21d2d;
  --primary-dark: #b91122;
  --accent: #ffb84d;
  --shadow: 0 28px 60px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  background:
    radial-gradient(circle at top, rgba(226, 29, 45, 0.18), transparent 20%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.promo-bar {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--line);
}

.promo-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
  min-height: 42px;
  color: var(--muted);
  font-size: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 9, 13, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 86px;
}

.brand {
  font-size: clamp(2rem, 2vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  color: #fff;
}

.brand-mark {
  display: inline-block;
  color: var(--primary);
  margin-left: 4px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

.main-nav a {
  transition: color 0.2s ease;
}

.main-nav a:hover,
.ghost-link:hover,
.text-link:hover {
  color: #fff;
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 250px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0 12px;
}

.search-box span {
  color: var(--muted);
  font-size: 1.2rem;
}

.search-box input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  outline: none;
  padding: 12px 6px 12px 0;
}

.search-box input::placeholder {
  color: var(--muted);
}

.ghost-link {
  color: var(--muted);
  font-size: 14px;
}

.cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: var(--shadow);
}

.cart-pill strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  font-size: 12px;
}

.hero-section {
  padding: 64px 0 24px;
}

.hero-shell {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-copy {
  max-width: 620px;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(226, 29, 45, 0.12);
  border: 1px solid rgba(226, 29, 45, 0.45);
  color: #ffd7dc;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero-copy h1 {
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
  margin-bottom: 18px;
}

.hero-copy p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 26px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.primary-btn,
.secondary-btn,
.buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 14px 22px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn,
.buy-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: var(--shadow);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  color: var(--text);
}

.primary-btn:hover,
.secondary-btn:hover,
.buy-btn:hover {
  transform: translateY(-2px);
}

.hero-stats {
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-stats strong {
  font-size: 1.5rem;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.8rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.device-card {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 1 / 0.88;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid var(--line);
  padding: 15px;
  box-shadow: var(--shadow);
}

.device-glow {
  position: absolute;
  right: 12%;
  top: 12%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226, 29, 45, 0.32), transparent 66%);
  filter: blur(12px);
}

.device-card img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
}

.feature-strip {
  padding: 10px 0 4px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.02);
}

.feature-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(226, 29, 45, 0.12);
  font-size: 22px;
}

.feature-item strong {
  display: block;
  margin-bottom: 4px;
}

.feature-item small {
  color: var(--muted);
}

.categories-section,
.products-section {
  padding: 64px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-tag {
  display: inline-block;
  margin-bottom: 8px;
  color: #ffb7be;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-head h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: -0.05em;
}

.text-link {
  color: var(--muted);
  font-weight: 600;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,0.02);
  color: var(--text);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-card.active,
.category-card:hover {
  border-color: rgba(226, 29, 45, 0.7);
  background: rgba(226, 29, 45, 0.08);
  transform: translateY(-2px);
}

.category-card .icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(226, 29, 45, 0.12);
  font-size: 2rem;
}

.category-card strong {
  font-size: 1.1rem;
}

.category-card small {
  color: var(--muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.product-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,0.02);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(226, 29, 45, 0.7);
}

.product-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  background: var(--primary);
  color: #fff;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.product-image {
  height: 250px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--line);
}

.product-body {
  padding: 18px 18px 20px;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}

.category-label {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
}

.stars {
  color: var(--accent);
  letter-spacing: 1px;
}

.product-body h3 {
  font-size: 1.12rem;
  margin-bottom: 10px;
}

.product-body p {
  min-height: 72px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.92rem;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.price-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.price-wrap strong {
  font-size: 1.5rem;
  color: var(--primary);
}

.price-wrap small {
  color: var(--muted);
}

.buy-btn {
  border: none;
  cursor: pointer;
  padding: 11px 16px;
}

.site-footer {
  background: rgba(11, 11, 14, 0.98);
  border-top: 1px solid var(--line);
  padding: 52px 0 28px;
}

.footer-shell {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 26px;
  margin-bottom: 24px;
}

.footer-brand {
  margin-bottom: 14px;
}

.site-footer p,
.site-footer li,
.site-footer a {
  color: var(--muted);
}

.site-footer h4 {
  margin-bottom: 14px;
  color: #fff;
}

.site-footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.copy-right {
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  padding-top: 18px;
}

.alert {
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
  border: 1px solid transparent;
}

.alert.error {
  background: rgba(226, 29, 45, 0.08);
  border-color: rgba(226, 29, 45, 0.35);
  color: #ffdfe4;
}

@media (max-width: 980px) {
  .nav-shell {
    flex-wrap: wrap;
    justify-content: center;
    padding: 14px 0;
  }

  .main-nav {
    order: 3;
  }

  .hero-shell,
  .feature-grid,
  .category-grid,
  .product-grid,
  .footer-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .promo-inner,
  .nav-tools,
  .hero-actions,
  .section-head,
  .product-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .search-box {
    min-width: 100%;
  }

  .feature-grid,
  .category-grid,
  .product-grid,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 2.7rem;
  }
}
