:root {
  --bg: #071019;
  --bg-soft: #102235;
  --surface: rgba(10, 19, 29, 0.78);
  --surface-strong: rgba(13, 25, 39, 0.95);
  --text: #eff8ff;
  --muted: #a9bfd5;
  --accent: #ff6f3f;
  --accent-2: #1dd9b7;
  --line: rgba(255, 255, 255, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at 12% 0%, #1c3c58 0%, transparent 36%),
              radial-gradient(circle at 90% -10%, #61361f 0%, transparent 32%),
              radial-gradient(circle at 80% 100%, #1b3550 0%, transparent 25%),
              linear-gradient(130deg, var(--bg) 0%, #04070c 100%);
  font-family: 'Manrope', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 4px 4px;
}

.topbar-contact {
  background: #1a2347;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 0.55rem 1rem;
  font-size: 0.92rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  flex-wrap: wrap;
}

.topbar-item {
  white-space: nowrap;
}

.topbar-item a {
  color: #fff;
  text-decoration: underline;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 10px 18px;
  background: #fff;
  border-bottom: 1px solid rgba(26, 35, 71, 0.12);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.topbar-logo img {
  height: 48px;
  width: auto;
  display: block;
}

.topbar-nav {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.topbar-nav a,
.topbar-nav a {
  color: #1a2347;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
  font-weight: 600;
}

.topbar-nav a:hover,
.link:hover {
  color: #32488e;
}

.link {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact-card .contact-link {
  color: #8efee7;
  font-weight: 700;
}

.contact-card .contact-link:hover {
  color: #d6fff7;
}

.topbar-inline-form {
  display: inline;
}

.topbar-nav-btn {
  border: 0;
  background: transparent;
  color: #1a2347;
  font-weight: 600;
  padding: 0;
  font-size: 1rem;
  cursor: pointer;
}

.topbar-nav-btn:hover {
  color: #32488e;
}

.topbar-nav-btn.is-danger {
  color: #d9534f;
}

main {
  width: min(1180px, 92vw);
  margin: 36px auto 46px;
  flex: 1 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.catalog-head,
.product-card,
.product-page,
.checkout-form,
.admin-head,
.stats-row article,
.table-wrap,
.checkout-lines,
.empty-state {
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.34);
}

.tag {
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  margin-bottom: 10px;
}

h1,
h2,
h3 {
  margin: 0 0 10px;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 0.98;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.5px;
}

p {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), #f18f2a);
  color: #1a0e03;
  box-shadow: 0 10px 22px rgba(255, 111, 63, 0.28);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.cart-chip {
  background: #0f1f30;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 700;
}

.user-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
}

.auth-wrap {
  display: grid;
  gap: 16px;
  max-width: 680px;
  margin: 0 auto;
}

.kpi {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.kpi strong {
  display: block;
  font-size: 1.6rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 28px 0 14px;
}

.services-strip,
.portfolio-block,
.trust-grid article,
.compare-block,
.expertise-block {
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.34);
  margin-top: 18px;
}

.services-strip ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
}

.services-strip li {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.18);
}

.portfolio-slider {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.portfolio-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.portfolio-track::-webkit-scrollbar {
  display: none;
}

.portfolio-item {
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.portfolio-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
}

.portfolio-item h3 {
  margin: 8px 0 0;
  font-size: 0.95rem;
}

.slider-nav {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mini-stats div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.15);
}

.mini-stats strong {
  display: block;
  font-size: 1.5rem;
}

.mini-stats span {
  color: var(--muted);
  font-size: 0.9rem;
}

.quotes {
  display: grid;
  gap: 10px;
}

.quotes blockquote {
  margin: 0;
  border-left: 3px solid var(--accent-2);
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 0 10px 10px 0;
}

.quotes cite {
  display: block;
  margin-top: 6px;
  color: var(--accent-2);
  font-style: normal;
}

.compare-block,
.expertise-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: center;
}

.compare-block img,
.expertise-block img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.compare-block ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 16px;
}

.products-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.catalog-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 20px;
}

.catalog-controls label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.catalog-controls select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(8, 17, 27, 0.92);
  color: var(--text);
  padding: 11px;
}

.catalog-controls select:focus {
  outline: 2px solid rgba(29, 217, 183, 0.35);
  border-color: rgba(29, 217, 183, 0.5);
}

.product-card {
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(29, 217, 183, 0.45);
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.45);
}

.product-card img,
.product-page img {
  width: 100%;
  border-radius: 14px;
  object-fit: cover;
  aspect-ratio: 5/4;
  margin-bottom: 14px;
}

.product-meta h3 {
  font-size: 1.14rem;
}

.product-row {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.badges {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.badges span {
  background: rgba(0, 210, 184, 0.15);
  color: #6ff7e5;
  border: 1px solid rgba(0, 210, 184, 0.35);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.7rem;
}

.product-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.price-xl {
  color: var(--text);
  font-size: 2rem;
  font-weight: 800;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.checkout-form {
  display: grid;
  gap: 10px;
}

input,
textarea {
  width: 100%;
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(8, 17, 27, 0.92);
  color: var(--text);
  padding: 12px;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(29, 217, 183, 0.35);
  border-color: rgba(29, 217, 183, 0.5);
}

.feedback {
  min-height: 18px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stats-row strong {
  font-size: 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
}

.footer-modern {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 16, 24, 0.92), rgba(4, 10, 16, 0.96));
  padding: 26px 20px;
}

.footer-top {
  width: min(1180px, 92vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 18px;
  align-items: center;
}

.footer-brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-logo {
  width: 96px;
  height: auto;
}

.footer-contact {
  display: grid;
  gap: 4px;
}

.footer-contact span,
.footer-contact a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: flex-end;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.03);
}

.footer-bottom {
  text-align: center;
  color: var(--muted);
  margin: 14px 0 0;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: revealUp 0.7s ease forwards;
}

.reveal:nth-child(2) { animation-delay: 0.1s; }
.reveal:nth-child(3) { animation-delay: 0.2s; }
.reveal:nth-child(4) { animation-delay: 0.3s; }

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero,
  .services-strip ul,
  .compare-block,
  .expertise-block,
  .trust-grid,
  .products-grid,
  .product-page,
  .checkout-grid,
  .stats-row {
    grid-template-columns: 1fr;
  }

  .catalog-controls {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .topbar-contact {
    display: none;
  }

  .topbar-nav {
    gap: 10px 14px;
  }
}
