:root {
  --ink: #18212b;
  --muted: #6b7280;
  --line: #e6e9ee;
  --bg: #f6f7f9;
  --card: #fff;
  --accent: #e11d2e;
  --dark: #111827;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

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

.wrap {
  width: min(1180px, 92%);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -1px;
}

.nav nav {
  display: flex;
  gap: 24px;
  color: #4b5563;
  font-weight: 700;
}

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

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 45vh;
  padding: 70px 0;
  color: #fff;
  background: linear-gradient(135deg, #151b25, #252e3c);
}

.hero-inner {
  position: relative;
  display: grid;
  place-items: center;
  width: min(92vw, 980px);
  margin: 0 auto;
  text-align: center;
}

.hero-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  background: #111827b8;
  border: 1px solid #ffffff80;
  border-radius: 50%;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-control:hover {
  background: var(--accent);
}

.hero-control:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.hero-control-previous {
  left: 12px;
}

.hero-control-next {
  right: 12px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.5px;
}

h1 {
  max-width: 760px;
  margin: 14px 0;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.02;
}

.hero p {
  max-width: 650px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.6;
}

.hero-badge {
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  font-size: 30px;
  text-align: center;
  color: #111827;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 20px 50px #0005;
}

.hero-badge strong {
  font-size: 14px;
}

.search-card {
  margin-top: -30px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 15px 45px #1111;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto auto;
  gap: 12px;
  align-items: end;
}

.filters label {
  font-size: 12px;
  font-weight: 800;
  color: #4b5563;
}

.filters input,
.filters select {
  width: 100%;
  height: 45px;
  margin-top: 7px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid #d8dde5;
  border-radius: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 45px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.btn.secondary {
  background: #eef0f4;
  color: #374151;
}

.catalogue {
  padding: 55px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 7px 0 0;
  font-size: 32px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 5px 20px #111107;
}

.image-box {
  position: relative;
  display: grid;
  place-items: center;
  height: 250px;
  background: #f1f3f6;
}

.image-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tire-placeholder {
  font-size: 110px;
  color: #c7cbd2;
}

.stock {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
  color: #166534;
  background: #dcfce7;
  border-radius: 999px;
}

.stock.out {
  color: #991b1b;
  background: #fee2e2;
}

.card-body {
  padding: 20px;
}

.brand {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

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

.size {
  color: #374151;
  font-weight: 800;
}

.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
  color: #4b5563;
  font-size: 12px;
}

.specs span {
  padding: 6px 8px;
  background: #f4f5f7;
  border-radius: 7px;
}

.features {
  min-height: 38px;
  font-size: 13px;
  color: #6b7280;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 15px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

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

.price-row span {
  font-size: 12px;
  color: #6b7280;
}

.empty {
  padding: 50px;
  text-align: center;
  background: #fff;
  border: 1px dashed #cfd4dc;
  border-radius: 16px;
}

footer {
  padding: 40px 0;
  color: #7a8490;
  font-size: 13px;
}

.admin {
  min-height: 100vh;
}

.adminbar {
  background: #111827;
  color: #fff;
}

.adminbar .nav {
  height: 64px;
}

.adminbar a {
  color: #fff;
}

.panel {
  padding: 35px 0;
}

.panel-card {
  margin-bottom: 20px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.form-grid label {
  font-size: 12px;
  font-weight: 800;
  color: #4b5563;
}

.form-grid input,
.form-grid textarea {
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid #d8dde5;
  border-radius: 9px;
}

.form-grid textarea {
  min-height: 80px;
}

.full {
  grid-column: 1 / -1;
}

.table-wrap {
  overflow: auto;
}

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

.admin-table th,
.admin-table td {
  padding: 12px;
  font-size: 13px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.thumb {
  width: 55px;
  height: 45px;
  object-fit: contain;
  background: #f3f4f6;
  border-radius: 7px;
}

.danger {
  color: #991b1b;
  background: #fee2e2;
}

.notice {
  margin-bottom: 15px;
  padding: 12px 14px;
  color: #166534;
  background: #ecfdf5;
  border-radius: 10px;
}

.error {
  color: #991b1b;
  background: #fef2f2;
}

.login {
  display: grid;
  place-items: center;
  min-height: 100vh;
  background: #111827;
}

.login-box {
  width: min(420px, 92%);
  padding: 30px;
  background: #fff;
  border-radius: 18px;
}

.login-box h1 {
  color: #111827;
  font-size: 32px;
}

.login-box input {
  width: 100%;
  height: 46px;
  margin: 7px 0 15px;
  padding: 0 12px;
  border: 1px solid #d8dde5;
  border-radius: 9px;
}

.login-box .btn {
  width: 100%;
}

@media (max-width: 900px) {
  .filters {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .hero-badge {
    display: none;
  }

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

@media (max-width: 600px) {
  .filters,
  .grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .nav nav {
    gap: 12px;
  }

  .hero {
    padding: 32px 0;
  }

  .hero-control {
    width: 40px;
    height: 40px;
    font-size: 30px;
  }

  .hero-control-previous {
    left: 8px;
  }

  .hero-control-next {
    right: 8px;
  }

  .search-card {
    margin-top: -18px;
  }

  .full {
    grid-column: auto;
  }
}
