:root {
  --bg-base: #0a0a0b;
  --bg-card: #131316;
  --bg-soft: #0f0f11;
  --border-subtle: #1f1f22;
  --border-strong: #2a2a2e;
  --text-primary: #fafafa;
  --text-secondary: #c5c5c8;
  --text-muted: #8a8a8f;
  --text-faint: #6a6a6f;
  --brand-start: #E63946;
  --brand-end: #F77F00;
  --brand-orange: #F77F00;
  --whatsapp: #25D366;
  --brand-gradient: linear-gradient(135deg, #E63946 0%, #F77F00 100%);
  --radius-sm: 4px;
  --radius-md: 7px;
  --radius-lg: 10px;
  --radius-xl: 12px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-base);
  color: var(--text-secondary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  line-height: 1.5;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

input, select {
  font-family: inherit;
  outline: none;
}

input::placeholder {
  color: var(--text-faint);
}

select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-base);
}

.topnav-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
}

.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-md);
  background: var(--brand-gradient);
  color: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.main-nav {
  display: flex;
  gap: 24px;
  font-size: 13px;
}

.main-nav a {
  color: var(--text-muted);
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--text-primary);
  font-weight: 500;
}

.menu-icon {
  display: none;
  font-size: 22px;
  color: var(--text-primary);
  background: none;
  border: none;
  padding: 0;
}

.hero {
  padding: 48px 22px 32px;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(230, 57, 70, 0.08);
  border: 1px solid rgba(230, 57, 70, 0.3);
  border-radius: 999px;
  font-size: 12px;
  color: var(--brand-orange);
  margin-bottom: 16px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-start);
}

.hero h1 {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--text-primary);
}

.hero p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 24px;
}

.search-bar {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 6px;
  max-width: 620px;
  margin: 0 auto;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
}

.search-bar .search-input {
  position: relative;
}

.search-bar .search-input i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--text-faint);
}

.search-bar input[type="text"] {
  width: 100%;
  padding: 0 12px 0 34px;
  height: 36px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
}

.search-bar select {
  height: 36px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 0 8px;
  font-size: 14px;
}

.btn-primary {
  background: var(--brand-gradient);
  color: var(--text-primary);
  border: none;
  padding: 0 22px;
  height: 36px;
  font-weight: 500;
  border-radius: var(--radius-md);
  font-size: 14px;
}

.btn-primary.full {
  width: 100%;
  padding: 12px;
  height: auto;
  border-radius: 8px;
  font-size: 13px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
}

.jpj-notice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  margin-top: 14px;
  background: rgba(247, 127, 0, 0.06);
  border: 1px solid rgba(247, 127, 0, 0.2);
  border-radius: 6px;
  font-size: 11px;
  color: var(--brand-orange);
  max-width: 620px;
}

.jpj-notice i {
  font-size: 13px;
  flex-shrink: 0;
}

.jpj-notice strong {
  font-weight: 500;
  color: var(--brand-orange);
}

.chip {
  padding: 5px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 18px 22px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border-subtle);
}

.trust-item {
  text-align: center;
  padding: 0 8px;
  border-right: 1px solid var(--border-subtle);
}

.trust-item:last-child {
  border-right: none;
}

.trust-item i {
  font-size: 20px;
  color: var(--brand-orange);
}

.trust-item .trust-title {
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
  color: var(--text-primary);
}

.trust-item .trust-sub {
  font-size: 11px;
  color: var(--text-faint);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 26px 22px 14px;
}

.section-header h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 500;
  color: var(--text-primary);
}

.section-header .sub {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.sort-control select {
  height: 32px;
  padding: 0 8px;
  font-size: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  border-radius: 6px;
}

.list-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 22px;
  padding: 0 22px 28px;
}

.filter-sidebar {
  font-size: 13px;
  color: var(--text-secondary);
}

.filter-group {
  margin-bottom: 20px;
}

.filter-label {
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
  accent-color: var(--brand-start);
}

.filter-group input[type="range"] {
  width: 100%;
  accent-color: var(--brand-start);
}

.filter-group input[type="text"] {
  height: 30px;
  font-size: 12px;
  padding: 0 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  border-radius: 5px;
  width: 50%;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-faint);
}

.year-inputs {
  display: flex;
  gap: 6px;
}

.car-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.car-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  transition: border-color 0.15s;
}

.car-card:hover {
  border-color: var(--border-strong);
}

.car-image {
  position: relative;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.car-image svg {
  width: 85%;
  height: 85%;
}

.grade-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 9px;
  background: var(--brand-gradient);
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.rare-badge {
  position: absolute;
  top: 8px;
  left: 82px;
  padding: 3px 9px;
  background: var(--text-primary);
  color: var(--bg-base);
  font-size: 10px;
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.photo-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--text-primary);
  font-size: 10px;
  border-radius: 3px;
}

.car-info {
  padding: 12px 14px;
}

.car-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.car-title-row h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.car-year {
  font-size: 11px;
  color: var(--text-faint);
}

.car-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.car-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.price-jpy {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.price-myr {
  font-size: 11px;
  color: var(--brand-orange);
}

.btn-card {
  padding: 5px 12px;
  font-size: 11px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--brand-start);
  border-radius: 5px;
}

.view-more-wrap {
  text-align: center;
  padding: 0 0 28px;
}

.btn-secondary {
  padding: 10px 26px;
  font-size: 13px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
}

.whatsapp-fab {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 56px;
  height: 56px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  z-index: 100;
  transition: transform 0.15s;
}

.whatsapp-fab:hover {
  transform: scale(1.06);
}

.whatsapp-fab i {
  font-size: 32px;
  color: var(--whatsapp);
}

.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  border-bottom: 1px solid var(--border-subtle);
}

.detail-topbar .back-icon,
.detail-topbar .share-icon {
  font-size: 18px;
  color: var(--text-primary);
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
}

.lot-id {
  font-size: 12px;
  color: var(--text-muted);
}

.detail-content {
  padding: 18px 22px 28px;
  max-width: 720px;
  margin: 0 auto;
}

.main-photo {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 8px;
}

.main-photo svg {
  width: 80%;
  height: 80%;
}

.thumb-strip {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.thumb {
  min-width: 64px;
  aspect-ratio: 4/3;
  border-radius: 5px;
  cursor: pointer;
  flex-shrink: 0;
}

.thumb.active {
  border: 1px solid var(--brand-orange);
}

.thumb.more {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-primary);
}

.title-block {
  padding: 22px 0 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.title-block h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.title-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 12px;
}

.car-summary {
  font-size: 13px;
  color: var(--text-muted);
}

.price-block {
  text-align: right;
}

.price-block .price-jpy-large {
  font-size: 22px;
  font-weight: 500;
  color: var(--text-primary);
}

.price-block .price-myr-large {
  font-size: 13px;
  color: var(--brand-orange);
  font-weight: 500;
}

.grade-block {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.grade-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 8px;
}

.grade-number {
  font-size: 28px;
  font-weight: 500;
  color: var(--brand-orange);
  line-height: 1;
}

.grade-label {
  font-size: 12px;
  color: var(--text-muted);
}

.inspector-note {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.specs-block {
  padding: 14px 0;
}

.specs-block .filter-label {
  margin-bottom: 8px;
}

.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.spec-row:nth-last-child(-n+2) {
  border-bottom: none;
}

.spec-row .spec-label {
  color: var(--text-muted);
}

.spec-row .spec-value {
  color: var(--text-primary);
}

.action-bar {
  margin-top: 16px;
}

.mobile-bottom-bar {
  display: none;
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--border-subtle);
  padding: 10px 14px;
  z-index: 50;
}

@media (max-width: 768px) {
  .topnav {
    padding: 10px 14px;
  }

  .main-nav {
    display: none;
  }

  .menu-icon {
    display: block;
    cursor: pointer;
  }

  .hero {
    padding: 22px 14px 18px;
  }

  .hero h1 {
    font-size: 19px;
  }

  .hero p {
    font-size: 12px;
    margin-bottom: 14px;
  }

  .search-bar {
    grid-template-columns: 1fr auto;
    padding: 5px;
  }

  .search-bar select {
    display: none;
  }

  .btn-primary {
    padding: 0 14px;
    font-size: 12px;
  }

  .chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    margin-top: 14px;
    padding-bottom: 4px;
  }

  .jpj-notice {
    margin-top: 12px;
    font-size: 10px;
    padding: 6px 10px;
    text-align: left;
  }

  .jpj-notice i {
    font-size: 12px;
  }

  .trust-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 0;
    padding: 14px;
  }

  .trust-item {
    border-right: none;
    padding: 0 4px;
  }

  .trust-item:nth-child(odd) {
    border-right: 1px solid var(--border-subtle);
  }

  .section-header {
    padding: 18px 14px 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .section-header h2 {
    font-size: 16px;
  }

  .section-header .sub {
    font-size: 12px;
  }

  .sort-control {
    font-size: 12px;
  }

  .list-layout {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 0 14px 20px;
  }

  .filter-sidebar {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-subtle);
    overflow-x: auto;
  }

  .filter-group {
    margin: 0;
    flex-shrink: 0;
  }

  .filter-mobile-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
  }

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

  .car-card .car-image {
    aspect-ratio: 16/10;
  }

  .car-info {
    padding: 10px 12px;
  }

  .car-title-row h3 {
    font-size: 13px;
  }

  .car-meta {
    font-size: 10px;
    margin-bottom: 8px;
  }

  .price-jpy {
    font-size: 13px;
  }

  .price-myr {
    font-size: 10px;
  }

  .btn-card {
    display: none;
  }

  .car-footer::after {
    content: "›";
    font-size: 18px;
    color: var(--text-faint);
  }

  .detail-topbar {
    padding: 10px 14px;
  }

  .detail-content {
    padding: 12px 14px 80px;
  }

  .main-photo {
    aspect-ratio: 4/3;
    border-radius: var(--radius-md);
  }

  .title-block {
    padding: 14px 0 12px;
  }

  .title-block h1 {
    font-size: 17px;
  }

  .title-meta-row {
    margin-top: 10px;
  }

  .car-summary {
    font-size: 11px;
    line-height: 1.5;
  }

  .price-block .price-jpy-large {
    font-size: 17px;
  }

  .price-block .price-myr-large {
    font-size: 12px;
  }

  .grade-number {
    font-size: 24px;
  }

  .grade-label {
    font-size: 11px;
  }

  .inspector-note {
    font-size: 11px;
  }

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

  .spec-row:nth-last-child(-n+2) {
    border-bottom: 1px solid var(--border-subtle);
  }

  .spec-row:last-child {
    border-bottom: none;
  }

  .action-bar {
    display: none;
  }

  .mobile-bottom-bar {
    display: block;
  }

  .whatsapp-fab {
    bottom: 76px;
    right: 14px;
    width: 48px;
    height: 48px;
  }

  .whatsapp-fab i {
    font-size: 28px;
  }

  .thumb {
    min-width: 52px;
  }
}
