/* ==================================================
   Кракен — стили магазина компьютерной техники
   ================================================== */

:root {
  --deep-0: #050b18;
  --deep-1: #080f1e;
  --deep-2: #0e1a30;
  --deep-3: #14243f;
  --deep-4: #1c3255;
  --line: rgba(0, 217, 180, 0.14);
  --line-2: rgba(232, 240, 247, 0.08);
  --line-3: rgba(232, 240, 247, 0.14);

  --teal: #00d9b4;
  --teal-soft: #4de8cc;
  --teal-dim: rgba(0, 217, 180, 0.14);
  --purple: #7c3aed;
  --amber: #ffb042;
  --red: #ff5d6c;

  --text: #e8f0f7;
  --muted: #8b9bb4;
  --muted-2: #5a6b85;

  --radius: 12px;
  --radius-lg: 20px;

  --font: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--deep-1);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1100px 800px at 10% -10%, rgba(0, 217, 180, 0.08), transparent 60%),
    radial-gradient(900px 700px at 100% 30%, rgba(124, 58, 237, 0.06), transparent 60%),
    radial-gradient(1400px 900px at 50% 110%, rgba(0, 217, 180, 0.04), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--teal-soft); }

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 .6em;
}

h1 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: 800px; }

/* ==================================================
   Верхняя полоска
   ================================================== */
.topbar {
  background: var(--deep-0);
  border-bottom: 1px solid var(--line-2);
  font-size: 0.82rem;
  color: var(--muted-2);
  font-family: var(--font-mono);
}
.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 24px;
  gap: 20px;
  flex-wrap: wrap;
}
.topbar a { color: var(--muted); }
.topbar a:hover { color: var(--teal); }

/* ==================================================
   Шапка
   ================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 15, 30, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 76px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--teal);
  font-weight: 800;
  flex-shrink: 0;
}
.logo__mark { width: 34px; height: 34px; }
.logo__text {
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 1rem;
}

.nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.93rem;
  position: relative;
  padding: 6px 0;
}
.nav a:hover { color: var(--text); }
.nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--teal);
  transition: right .2s ease;
}
.nav a:hover::after { right: 0; }

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(232, 240, 247, 0.06);
  color: var(--text);
  border: 1px solid var(--line-2);
  cursor: pointer;
  transition: all .18s ease;
}
.cart-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-dim);
}
.cart-btn__count {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  background: var(--teal);
  color: var(--deep-0);
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--deep-1);
}

/* ==================================================
   Кнопки
   ================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .18s ease;
  font-family: inherit;
  white-space: nowrap;
}
.btn--primary {
  background: var(--teal);
  color: var(--deep-0);
}
.btn--primary:hover {
  background: var(--teal-soft);
  color: var(--deep-0);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -8px rgba(0, 217, 180, 0.5);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-3);
}
.btn--ghost:hover {
  border-color: var(--teal);
  color: var(--teal);
}
.btn--sm { padding: 10px 20px; font-size: 0.87rem; }

.link-arrow {
  color: var(--teal);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}
.link-arrow:hover { color: var(--teal-soft); }

/* ==================================================
   Hero
   ================================================== */
.hero {
  padding: 70px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1.05fr 1fr; gap: 60px; }
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--teal-dim);
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  border: 1px solid var(--line);
  margin-bottom: 22px;
}
.badge--amber {
  background: rgba(255, 176, 66, 0.14);
  color: var(--amber);
  border-color: rgba(255, 176, 66, 0.3);
}

.hero__lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 34px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 46px;
}
.hero__stats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  border-top: 1px solid var(--line-2);
  padding-top: 28px;
}
@media (min-width: 700px) {
  .hero__stats { grid-template-columns: repeat(4, 1fr); }
}
.hero__stats strong {
  display: block;
  font-size: 1.5rem;
  color: var(--teal);
  font-weight: 800;
  margin-bottom: 4px;
}
.hero__stats span {
  font-size: 0.83rem;
  color: var(--muted-2);
}

.hero__visual img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: 0 40px 90px -30px rgba(0, 217, 180, 0.25);
}

/* ==================================================
   Секции
   ================================================== */
.section { padding: 90px 0; }
.section--dark { background: var(--deep-0); }

.section__head {
  max-width: 720px;
  margin-bottom: 48px;
}
.section__head p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}
.section__head--row {
  max-width: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  flex-wrap: wrap;
}
.section__head--row > div { max-width: 640px; }

/* ==================================================
   Категории
   ================================================== */
.cats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 700px) { .cats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1050px) { .cats { grid-template-columns: repeat(6, 1fr); } }

.cat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 26px 22px;
  background: linear-gradient(160deg, var(--deep-3), var(--deep-2));
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  transition: all .2s ease;
  color: var(--text);
  min-height: 170px;
}
.cat:hover {
  border-color: var(--teal);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -20px rgba(0, 217, 180, 0.4);
  color: var(--text);
}
.cat svg {
  width: 36px;
  height: 36px;
  color: var(--teal);
  margin-bottom: 18px;
}
.cat__name {
  display: block;
  font-weight: 800;
  font-size: 1.02rem;
  margin-bottom: 4px;
  color: var(--text);
}
.cat__note {
  font-size: 0.82rem;
  color: var(--muted-2);
  font-family: var(--font-mono);
}

/* ==================================================
   Товары
   ================================================== */
.products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 620px) { .products { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 950px) { .products { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .products { grid-template-columns: repeat(4, 1fr); } }

.product {
  position: relative;
  background: linear-gradient(180deg, var(--deep-3), var(--deep-2));
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all .2s ease;
}
.product:hover {
  border-color: var(--teal-dim);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -20px rgba(0, 217, 180, 0.3);
}

.product__badges {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 2;
  display: flex;
  gap: 6px;
}
.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.tag--hot { background: var(--teal); color: var(--deep-0); }
.tag--new { background: var(--purple); color: var(--text); }
.tag--sale { background: var(--amber); color: var(--deep-0); }

.product__media {
  background: var(--deep-1);
  border-bottom: 1px solid var(--line-2);
  overflow: hidden;
}
.product__media img {
  width: 100%;
  transition: transform .4s ease;
}
.product:hover .product__media img { transform: scale(1.04); }

.product__body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.product__cat {
  display: inline-block;
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.product__body h3 { margin-bottom: 10px; font-size: 1.08rem; }
.product__body p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 auto;
  line-height: 1.55;
}
.product__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line-2);
}
.price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.price__old {
  font-size: 0.78rem;
  color: var(--muted-2);
  text-decoration: line-through;
  font-weight: 500;
  margin-bottom: 2px;
}
.price--sale { color: var(--amber); }

/* ==================================================
   Промо-блок сборки
   ================================================== */
.promo {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
  padding: 48px;
  background: linear-gradient(135deg, var(--deep-3), var(--deep-2));
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.promo::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255, 176, 66, 0.15), transparent 70%);
  pointer-events: none;
}
@media (min-width: 850px) {
  .promo { grid-template-columns: 1.2fr 1fr; }
}
.promo__list {
  list-style: none;
  padding: 0;
  margin: 0 0 30px;
  display: grid;
  gap: 10px;
}
.promo__list li {
  padding-left: 26px;
  position: relative;
  color: var(--muted);
}
.promo__list li::before {
  content: '';
  position: absolute;
  left: 0; top: 10px;
  width: 14px; height: 2px;
  background: var(--amber);
}
.promo__visual img {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  border-radius: var(--radius);
}

/* ==================================================
   Преимущества
   ================================================== */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 700px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1050px) { .features { grid-template-columns: repeat(4, 1fr); } }

.feature {
  padding: 32px 28px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: rgba(20, 36, 63, 0.4);
  transition: all .2s ease;
}
.feature:hover {
  border-color: var(--teal-dim);
  background: rgba(20, 36, 63, 0.7);
}
.feature__num {
  font-family: var(--font-mono);
  color: var(--teal);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.feature h3 {
  font-size: 1.05rem;
  margin-bottom: 12px;
}
.feature p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

/* ==================================================
   Проза
   ================================================== */
.prose p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

/* ==================================================
   Отзывы
   ================================================== */
.reviews {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 800px) { .reviews { grid-template-columns: repeat(3, 1fr); } }

.review {
  margin: 0;
  padding: 28px 26px;
  background: rgba(20, 36, 63, 0.4);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  border-left: 3px solid var(--teal);
}
.review__stars {
  color: var(--amber);
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.review p {
  color: var(--text);
  font-size: 0.96rem;
  margin-bottom: 18px;
  line-height: 1.65;
}
.review cite {
  color: var(--muted);
  font-size: 0.83rem;
  font-style: normal;
  font-family: var(--font-mono);
}

/* ==================================================
   Контакты
   ================================================== */
.contacts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 700px) { .contacts { grid-template-columns: repeat(3, 1fr); } }

.contact-card {
  display: block;
  padding: 26px 26px;
  background: rgba(20, 36, 63, 0.4);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  color: var(--text);
  transition: all .2s ease;
}
.contact-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  color: var(--text);
}
.contact-card__label {
  display: block;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.contact-card__value {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.contact-card__hint {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ==================================================
   Подвал
   ================================================== */
.footer {
  padding: 60px 0 24px;
  border-top: 1px solid var(--line-2);
  background: var(--deep-0);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
@media (min-width: 780px) {
  .footer__inner { grid-template-columns: 1.5fr 2fr; }
}
.footer__brand p {
  color: var(--muted-2);
  font-size: 0.9rem;
  margin: 18px 0 0;
  max-width: 320px;
}
.footer__cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.footer__cols h4 { margin-bottom: 16px; }
.footer__cols a {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 5px 0;
  font-weight: 500;
}
.footer__cols a:hover { color: var(--teal); }
.footer__meta {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--line-2);
  color: var(--muted-2);
  font-size: 0.82rem;
  font-family: var(--font-mono);
  gap: 20px;
  flex-wrap: wrap;
}

/* ==================================================
   Всплывашка добавления в корзину
   ================================================== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(140%);
  padding: 14px 24px;
  background: var(--deep-3);
  border: 1px solid var(--teal);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.7);
  z-index: 100;
  transition: transform .35s cubic-bezier(.2, .8, .3, 1);
  pointer-events: none;
  max-width: 90vw;
}
.toast.is-visible { transform: translateX(-50%) translateY(0); }

/* Motion / mobile */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media (max-width: 720px) {
  .nav { gap: 16px; font-size: 0.85rem; }
  .header__inner { gap: 14px; height: 68px; }
  .logo__text { font-size: 0.9rem; }
  .section { padding: 60px 0; }
  .promo { padding: 32px 24px; }
  .topbar__inner { justify-content: center; text-align: center; font-size: 0.75rem; }
}
