:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --text: #10182b;
  --muted: #66708a;
  --primary: #1c5bff;
  --primary-dark: #1648ca;
  --stroke: #dfe6f5;
  --dark: #08162f;
  --container: 1120px;
  --radius: 14px;
  --shadow: 0 12px 30px rgba(9, 29, 73, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "SF Pro Text", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: var(--bg);
}

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

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

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(8px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 1rem;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: 1.2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--primary);
}

.btn {
  background: var(--primary);
  border: 0;
  color: #fff;
  padding: 0.62rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn:hover { 
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.3);
}

.hero {
  margin-top: 1.1rem;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  min-height: 460px;
  display: grid;
  align-items: end;
  box-shadow: var(--shadow);
}

.hero-slider {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(70deg, rgba(3, 15, 41, 0.84), rgba(3, 17, 48, 0.22));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: 2.5rem;
  max-width: 640px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.hero p {
  color: #d6deef;
  max-width: 560px;
}

.search-row {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
}

.search-row input {
  border: 1px solid #d5dff8;
  border-radius: 10px;
  padding: 0.82rem 0.9rem;
  outline: none;
}

section.block {
  margin-top: 2rem;
}

.block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.9rem;
}

.block-title {
  margin: 0;
  font-size: 1.2rem;
}

.category-grid,
.inventory-grid {
  display: grid;
  gap: 1rem;
}

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

.category-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.category-card,
.car-card,
.details-panel,
.spec-box {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover,
.car-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(9, 29, 73, 0.15);
}

.category-card img {
  height: 200px;
  width: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category-card:hover img {
  transform: scale(1.05);
}

.category-card .label {
  padding: 0.8rem 0.9rem;
  font-weight: 600;
}

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

.car-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.car-card:hover img {
  transform: scale(1.05);
}

.car-card-body {
  padding: 0.8rem;
}

.price {
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 700;
}

.meta {
  display: flex;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.details-layout {
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
}

.details-panel img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}

.panel-body {
  padding: 1rem;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.spec-box {
  padding: 0.8rem;
}

.spec-box p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.spec-box h4 {
  margin: 0.35rem 0 0;
}

.footer {
  margin-top: 4rem;
  padding: 4rem 0 1rem;
  background: var(--surface);
  border-top: 1px solid var(--stroke);
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
}

.footer-col h3, 
.footer-col h4 {
  color: var(--text);
  margin: 0 0 1.2rem 0;
}

.footer-col p {
  margin: 0.5rem 0;
  line-height: 1.6;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 0.8rem;
}

.footer-col ul li a {
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--primary);
}

.social-links {
  margin-top: 1.2rem;
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: var(--primary);
  font-weight: 600;
}

.student-details {
  background: var(--bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
}

.student-details h4 {
  margin-bottom: 1rem;
}

.student-details p {
  margin: 0.4rem 0;
  font-size: 0.9rem;
}

.footer-bottom {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--stroke);
  font-size: 0.85rem;
}

@media (max-width: 960px) {
  .category-grid,
  .inventory-grid,
  .details-layout {
    grid-template-columns: 1fr 1fr;
  }
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .nav-wrap { flex-wrap: wrap; padding: 0.7rem 0; }
  .nav-links { order: 3; width: 100%; justify-content: space-around; }
  .hero { min-height: 380px; }
  .hero-content { padding: 1.3rem; }
  .category-grid,
  .inventory-grid,
  .details-layout,
  .spec-grid,
  .footer-content {
    grid-template-columns: 1fr;
  }
  .details-panel img { height: 260px; }
}
}

@media (max-width: 700px) {
  .nav-wrap { flex-wrap: wrap; padding: 0.7rem 0; }
  .nav-links { order: 3; width: 100%; justify-content: space-around; }
  .hero { min-height: 380px; }
  .hero-content { padding: 1.3rem; }
  .category-grid,
  .inventory-grid,
  .details-layout,
  .spec-grid {
    grid-template-columns: 1fr;
  }
  .details-panel img { height: 260px; }
}
