:root {
  --toyota-red: #eb0a1e;
  --toyota-ink: #2f2f2f;
  --toyota-muted: #7b7b7b;
  --toyota-line: #333333;
  --toyota-line-soft: #d8d8d8;
  --toyota-surface: #ffffff;
}

/* Toyota Hero Carousel */
.hero-carousel {
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
}

.hero-carousel__viewport {
  position: relative;
  aspect-ratio: 1600 / 680;
  min-height: 220px;
}

.hero-banner {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 320ms ease, visibility 320ms ease;
}

.hero-banner.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-carousel__pagination {
  position: absolute;
  right: 0;
  bottom: 18px;
  left: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.hero-carousel__dot {
  width: 26px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.hero-carousel__dot.is-active {
  background: var(--toyota-red);
  transform: scaleX(1.1);
}

/* Toyota Car Showcase Section */
.car-showcase {
  padding: 54px 0 78px;
  background: #ffffff;
}

.car-showcase__inner {
  width: min(1120px, calc(100vw - 48px));
  margin: 0 auto;
}

.car-showcase__title {
  margin: 0;
  text-align: center;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--toyota-ink);
}

.car-showcase__tabs {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  align-items: end;
  border-bottom: 1px solid var(--toyota-line);
}

.car-showcase__tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 12px 12px;
  border: 0;
  background: transparent;
  color: var(--toyota-ink);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  cursor: pointer;
}

.car-showcase__tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: transparent;
}

.car-showcase__tab.is-active::after {
  background: var(--toyota-red);
}

.car-showcase__tab-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #9dc3ff 0%, #2b6fdd 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.car-showcase__tab:not(.is-active) .car-showcase__tab-dot {
  opacity: 0.6;
}

.car-showcase__grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 44px;
  row-gap: 54px;
}

/* Vehicle Item (Toyota Style) */
.vehicle-item {
  min-width: 0;
}

.vehicle-item.is-hidden {
  display: none;
}

.vehicle-item__content {
  text-align: center;
}

.vehicle-item__flag {
  min-height: 20px;
  margin-bottom: 18px;
  color: var(--toyota-red);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
}

.vehicle-item__media {
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vehicle-item__media img {
  width: 100%;
  max-width: 210px;
  max-height: 118px;
  object-fit: contain;
}

.vehicle-item__name {
  margin: 18px 0 8px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--toyota-ink);
}

.vehicle-item__price {
  margin: 0;
  color: var(--toyota-muted);
  font-size: 0.8rem;
  font-weight: 400;
}

.car-showcase__footer {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}

.car-showcase__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 146px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid #8f8f8f;
  background: #ffffff;
  color: #505050;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.car-showcase__button:hover {
  border-color: var(--toyota-red);
  color: var(--toyota-red);
  transform: translateY(-1px);
}

/* Mobile View Switch */
.car-showcase__view-switch {
  display: none;
}

/* Responsive */
@media (max-width: 980px) {
  .car-showcase__tabs {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .car-showcase__tabs::-webkit-scrollbar {
    display: none;
  }

  .car-showcase__tab {
    flex: 0 0 auto;
    min-width: 154px;
  }

  .car-showcase__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 28px;
  }
}

@media (max-width: 720px) {
  .hero-carousel__viewport {
    min-height: 180px;
  }

  .car-showcase {
    padding-top: 38px;
    padding-bottom: 56px;
  }

  .car-showcase__tabs {
    margin-top: 24px;
  }

  .car-showcase__view-switch {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
  }

  .car-showcase__view-button {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #c8c8c8;
    border-radius: 999px;
    background: #ffffff;
    color: #8b8b8b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
  }

  .car-showcase__view-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
  }

  .car-showcase__view-button.is-active {
    border-color: var(--toyota-red);
    background: rgba(235, 10, 30, 0.06);
    color: var(--toyota-red);
  }

  .car-showcase__tab {
    min-height: 48px;
    min-width: 136px;
    padding-bottom: 10px;
    font-size: 0.85rem;
  }

  .car-showcase__grid {
    margin-top: 34px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
    row-gap: 36px;
  }

  .car-showcase[data-mobile-view="list"] .car-showcase__grid {
    grid-template-columns: 1fr;
    row-gap: 24px;
  }

  .car-showcase[data-mobile-view="list"] .vehicle-item {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    column-gap: 18px;
    align-items: center;
  }

  .car-showcase[data-mobile-view="list"] .vehicle-item__media {
    min-height: 0;
    justify-content: flex-start;
  }

  .car-showcase[data-mobile-view="list"] .vehicle-item__container {
    max-width: 160px;
    max-height: 88px;
  }

  .car-showcase[data-mobile-view="list"] .vehicle-item__content {
    text-align: left;
  }

  .car-showcase[data-mobile-view="list"] .vehicle-item__flag {
    min-height: 0;
    margin-bottom: 8px;
    text-align: left;
  }

  .car-showcase[data-mobile-view="list"] .vehicle-item__name {
    margin-top: 0;
    margin-bottom: 10px;
  }
}
