:root {
  color-scheme: dark;
  --bg: #0d0f12;
  --panel: #151922;
  --panel-2: #1b202b;
  --line: #2a3140;
  --text: #eef2f8;
  --muted: #9aa4b2;
  --accent: #f36f21;
  --accent-2: #12b981;
  --danger: #ef4444;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

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

main,
.site-header,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.logo {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: .02em;
}

.logo span,
.eyebrow {
  color: var(--accent);
}

.main-nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  flex-wrap: wrap;
}

.main-nav a:hover,
.section-head a,
table a,
.empty a {
  color: var(--accent);
}

.cart-link {
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cart-link b {
  color: var(--accent);
}

.hero {
  position: relative;
  min-height: 430px;
  margin: 28px 0 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #11151b;
}

.hero-banner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.hero-overlay {
  position: relative;
  z-index: 1;
  min-height: 430px;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, rgba(13, 15, 18, .92) 0%, rgba(13, 15, 18, .55) 55%, rgba(13, 15, 18, .15) 100%);
}

.hero-content {
  padding: clamp(28px, 6vw, 72px);
  max-width: 620px;
}

.hero h1 {
  font-size: clamp(42px, 8vw, 88px);
  line-height: 1;
  margin: 0 0 16px;
}

.hero p {
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions,
.section-head,
.row-head,
.cart-summary,
.actions,
.inline-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button,
button,
.ghost,
.danger {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 9px 14px;
  cursor: pointer;
  font: inherit;
}

.button,
button {
  background: var(--accent);
  color: #171006;
  font-weight: 800;
}

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

.danger {
  background: transparent;
  color: #fecaca;
  border-color: rgba(239, 68, 68, .45);
}

button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.section {
  margin: 42px 0;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 16px;
}

h1,
h2,
h3 {
  line-height: 1.15;
}

.category-grid,
.product-grid,
.stats-grid,
.image-admin-grid {
  display: grid;
  gap: 16px;
}

.category-grid {
  grid-template-columns: repeat(5, 1fr);
}

.category-tile,
.product-card,
.filters,
.form-card,
.summary-card,
.auth-box,
.stats-grid a {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.category-tile {
  min-height: 92px;
  display: grid;
  place-items: center;
  padding: 16px;
  font-weight: 800;
}

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

.product-card {
  overflow: hidden;
}

.product-image {
  aspect-ratio: 4 / 3;
  background: #101318;
  display: grid;
  place-items: center;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-body {
  padding: 16px;
}

.muted,
.breadcrumbs,
.site-footer {
  color: var(--muted);
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 12px 0;
}

.price-row strong {
  font-size: 20px;
}

.price-row span {
  color: var(--muted);
  text-decoration: line-through;
}

.price-row.large strong {
  font-size: 32px;
}

.stock {
  font-size: 14px;
  font-weight: 800;
}

.stock.in {
  color: var(--accent-2);
}

.stock.out {
  color: var(--danger);
}

.page-head {
  padding: 28px 0 22px;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

.filters,
.admin-form,
.form-card,
.summary-card,
.auth-box {
  padding: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  margin-bottom: 12px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check input {
  width: auto;
  min-height: auto;
}

.split,
.checkout-grid,
.product-page,
.form-grid {
  display: grid;
  gap: 16px;
}

.split {
  grid-template-columns: 1fr 1fr;
}

.product-page {
  grid-template-columns: 1.05fr .95fr;
  align-items: start;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  cursor: pointer;
}

.gallery img.active,
.gallery img:first-child {
  border-color: var(--accent);
}

.specs {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.specs dt,
.specs dd {
  margin: 0;
  padding: 10px 12px;
  background: var(--panel);
}

.specs dt {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: var(--panel);
}

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

th {
  color: var(--muted);
  font-weight: 600;
}

.cart-summary {
  justify-content: flex-end;
  margin-top: 16px;
}

.checkout-grid {
  grid-template-columns: 1fr 380px;
  align-items: start;
}

.pagination {
  display: flex;
  gap: 8px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.pagination a {
  min-width: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pagination .active {
  background: var(--accent);
  color: #171006;
  border-color: var(--accent);
  font-weight: 800;
}

.flash {
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.flash.success {
  background: rgba(18, 185, 129, .12);
  border-color: rgba(18, 185, 129, .35);
}

.flash.error {
  background: rgba(239, 68, 68, .12);
  border-color: rgba(239, 68, 68, .35);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  margin-top: 54px;
}

.admin-main {
  padding-bottom: 40px;
}

.admin-header {
  width: min(1320px, calc(100% - 32px));
}

.stats-grid {
  grid-template-columns: repeat(4, 1fr);
}

.stats-grid a {
  padding: 22px;
}

.stats-grid b {
  display: block;
  font-size: 34px;
  color: var(--accent);
}

.row-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.form-grid {
  grid-template-columns: repeat(2, 1fr);
}

.image-admin-grid {
  grid-template-columns: repeat(4, 1fr);
  margin: 12px 0;
}

.image-admin-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin-bottom: 8px;
}

.auth-box {
  width: min(420px, 100%);
  margin: 60px auto;
}

.empty {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 44px 0;
}

.feature-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.feature-card h3 {
  margin: 0 0 8px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.brand-tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  font-weight: 800;
  font-size: 18px;
  transition: border-color .15s, color .15s;
}

.brand-tile:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cta-banner {
  margin: 48px 0;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(243, 111, 33, .12), rgba(18, 185, 129, .08)),
    var(--panel);
  text-align: center;
}

.cta-banner h2 {
  margin: 0 0 10px;
}

.cta-banner p {
  margin: 0 0 20px;
  color: var(--muted);
}

.contacts-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 32px;
}

.contacts-info {
  display: grid;
  gap: 16px;
}

.info-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.info-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.info-card p {
  margin: 0;
  color: var(--muted);
}

.info-card a {
  color: var(--accent);
}

.req {
  color: var(--accent);
}

@media (max-width: 900px) {

  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .catalog-layout,
  .product-page,
  .checkout-grid,
  .category-grid,
  .stats-grid,
  .contacts-layout,
  .features,
  .brand-grid {
    grid-template-columns: 1fr;
  }

  .product-grid,
  .image-admin-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-banner {
    max-height: 260px;
  }
}

@media (max-width: 560px) {

  main,
  .site-header,
  .site-footer {
    width: min(100% - 20px, 1180px);
  }

  .product-grid,
  .gallery,
  .form-grid,
  .row-form,
  .split {
    grid-template-columns: 1fr;
  }

  .specs {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 360px;
    padding: 24px;
  }
}

.about-text {
  max-width: 860px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px clamp(20px, 4vw, 40px);
}

.about-text h2 {
  margin: 28px 0 12px;
  font-size: 22px;
}

.about-text h2:first-child {
  margin-top: 0;
}

.about-text p {
  color: var(--muted);
  margin: 0 0 14px;
}

.about-text ul {
  margin: 0 0 14px;
  padding-left: 20px;
  color: var(--text);
  display: grid;
  gap: 8px;
}

.about-text li::marker {
  color: var(--accent);
}