/* v2 */
:root {
  --primary: #163c7a;
  --accent: #d73d3d;
  --ink: #102238;
  --subtle: #66778f;
  --surface: #f4f8fe;
  --card: #ffffff;
  --line: #dce6f5;
  --radius: 16px;
  --shadow: 0 12px 35px rgba(10, 35, 80, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Lato", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 0%, #eaf3ff 0%, #ffffff 36%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1180px, 92vw);
  margin: 0 auto;
}

.top-strip {
  background: #09244f;
  color: #d9e6ff;
  font-size: 0.88rem;
}

.top-strip-inner {
  min-height: 38px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-strip nav {
  display: flex;
  gap: 1rem;
}

.main-nav-wrap {
  background: var(--primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 3px 15px rgba(8, 26, 55, 0.22);
}

.main-nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-menu-btn {
  display: none;
  border: 1px solid #d9e7ff;
  background: transparent;
  color: #fff;
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font-weight: 700;
}

.brand {
  font-family: "Sora", sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.menu {
  display: flex;
  gap: 1rem;
  font-weight: 600;
  margin-left: 1.2rem;
  flex-wrap: wrap;
}

.menu-item {
  position: relative;
}

.mega-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: -14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 0.7rem;
  width: 480px;
  background: #fff;
  border: 1px solid #d6e2f6;
  border-radius: 14px;
  box-shadow: 0 16px 28px rgba(8, 34, 79, 0.18);
  padding: 0.8rem;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.mega-menu h4 {
  margin: 0 0 0.4rem;
  color: #163c7a;
}

.mega-menu a {
  display: block;
  color: #35527e;
  margin: 0.24rem 0;
  font-size: 0.9rem;
}

.menu-item.open .mega-menu,
.menu-item:hover .mega-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.post-ad {
  margin-left: auto;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -310px;
  width: 300px;
  height: 100vh;
  background: #fff;
  color: var(--ink);
  z-index: 60;
  padding: 1rem;
  box-shadow: -10px 0 25px rgba(8, 34, 79, 0.15);
  transition: right 0.25s ease;
}

.mobile-drawer.open {
  right: 0;
}

.mobile-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.mobile-drawer-head button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
}

.mobile-drawer a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 0.5rem;
  padding: 0.65rem 0.75rem;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 18, 35, 0.42);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(10, 36, 79, 0.95), rgba(20, 73, 135, 0.83)),
    url("https://images.unsplash.com/photo-1523983388277-336a66bf9bcd?auto=format&fit=crop&w=2100&q=80")
      center/cover;
  transform: scale(1.03);
}

.hero-content {
  position: relative;
  padding: 92px 0 100px;
}

.hero h1 {
  font-family: "Sora", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  margin: 0;
}

.hero p {
  color: #dce9ff;
  margin-top: 0.4rem;
  margin-bottom: 1.5rem;
}

.search-card {
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 1.15rem;
  box-shadow: var(--shadow);
}

.search-tabs {
  display: flex;
  gap: 0.5rem;
}

.search-tab {
  border: 1px solid var(--line);
  background: #f4f8ff;
  border-radius: 10px;
  font-weight: 700;
  color: #35527e;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}

.search-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.search-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

select,
.btn-search {
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 0.95rem;
  padding: 0.65rem 0.8rem;
}

.btn-search {
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

main section {
  margin-top: 2.6rem;
}

h2 {
  font-family: "Sora", sans-serif;
  margin: 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-head a {
  color: var(--primary);
  font-weight: 700;
}

.split-sell h2 {
  margin-bottom: 1rem;
}

.split-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.sell-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
}

.sell-card ul {
  margin: 0.8rem 0;
  padding-left: 1.1rem;
}

.sell-card li {
  margin-bottom: 0.35rem;
}

.emphasized {
  background: #0f3269;
  color: #fff;
}

.ghost-btn,
.solid-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

.ghost-btn {
  background: #eaf2ff;
  color: var(--primary);
}

.solid-btn {
  background: #fff;
  color: #123a77;
}

.chip-row {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.chip {
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  color: #3a567f;
}

.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.tile-grid,
.offer-grid,
.listing-grid,
.brands-grid,
.store-grid,
.editorial-grid {
  display: grid;
  gap: 0.8rem;
}

.tile-grid,
.offer-grid,
.store-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tile,
.offer,
.store-item,
.brands-grid a,
.editorial-grid article {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 0.95rem;
  font-weight: 700;
  transition: 0.2s ease;
}

.skeleton-card {
  min-height: 74px;
  border-radius: 12px;
  background: linear-gradient(90deg, #eff5ff 25%, #f8fbff 50%, #eff5ff 75%);
  background-size: 220% 100%;
  animation: shimmer 1.2s infinite;
}

.skeleton-car {
  min-height: 260px;
}

.tile:hover,
.offer:hover,
.store-item:hover,
.brands-grid a:hover,
.editorial-grid article:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(22, 60, 122, 0.12);
}

.offer {
  min-height: 76px;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
}

.listing-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.carousel-shell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.carousel-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  width: 100%;
  transition: transform 0.45s ease;
}

.carousel-track.sliding-next {
  animation: slideLeft 0.45s ease;
}

.carousel-track.sliding-prev {
  animation: slideRight 0.45s ease;
}

.carousel-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: #294d88;
  background: #fff;
  cursor: pointer;
  font-size: 1.1rem;
}

.carousel-btn:hover {
  background: #ebf3ff;
}

.car-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(17, 48, 90, 0.09);
  position: relative;
}

.car-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.car-card h3,
.car-card p {
  margin: 0;
  padding-inline: 0.9rem;
}

.car-card h3 {
  margin-top: 0.75rem;
  margin-bottom: 0.28rem;
  font-size: 1rem;
  min-height: 2.45rem;
}

.price {
  color: #14914f;
  font-weight: 800;
}

.meta {
  color: var(--subtle);
  padding-bottom: 0.95rem;
  margin-top: 0.2rem;
}

.badge {
  position: absolute;
  left: 0.65rem;
  top: 0.65rem;
  background: #ffeddf;
  color: #b0520f;
  font-size: 0.7rem;
  border-radius: 999px;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
}

.brands-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.brands-grid a {
  text-align: center;
}

.comparisons .compare-box {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, #eff5ff 0%, #ffffff 100%);
  padding: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.compare-box h3 {
  margin: 0;
}

.editorial-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.editorial-grid p {
  color: var(--subtle);
  margin-bottom: 0;
}

footer {
  margin-top: 3rem;
  background: #081e42;
  color: #c7d9ff;
  padding: 2rem 0 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.footer-grid h4 {
  color: #fff;
}

.footer-grid a {
  display: block;
  margin: 0.35rem 0;
}

.copyright {
  text-align: center;
  color: #8aa3d8;
  margin-top: 1.2rem;
}

.hidden {
  display: none;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: rise 0.7s ease forwards;
}

.reveal:nth-of-type(2) {
  animation-delay: 0.08s;
}

.reveal:nth-of-type(3) {
  animation-delay: 0.16s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideLeft {
  from {
    transform: translateX(3.5%);
    opacity: 0.8;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideRight {
  from {
    transform: translateX(-3.5%);
    opacity: 0.8;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

@media (max-width: 1024px) {
  .menu {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .mega-menu {
    display: none;
  }

  .search-grid {
    grid-template-columns: 1fr 1fr;
  }

  .listing-grid,
  .carousel-track,
  .tile-grid,
  .offer-grid,
  .store-grid,
  .brands-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .editorial-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .main-nav {
    min-height: 64px;
  }

  .post-ad {
    display: none;
  }

  .top-strip {
    display: none;
  }

  .hero-content {
    padding: 62px 0 72px;
  }

  .search-grid,
  .split-grid,
  .listing-grid,
  .carousel-track,
  .tile-grid,
  .offer-grid,
  .store-grid,
  .brands-grid,
  .editorial-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .carousel-shell {
    align-items: stretch;
    flex-direction: column;
  }

  .carousel-btn {
    width: 100%;
    border-radius: 10px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
