/* Legend Auto Sales inspired theme — clean white, black CTAs, minimal red */

.legend-theme {
  --legend-black: #111111;
  --legend-gray: #6b7280;
  --legend-line: #e8eaee;
  --legend-soft: #f4f5f7;
  --legend-radius: 16px;
  color: var(--legend-black);
}

/* Topbar */
.legend-topbar {
  background: #fff;
  color: var(--legend-gray);
  border-bottom: 1px solid var(--legend-line);
  font-size: 13px;
  font-weight: 600;
}

.legend-topbar i {
  color: var(--legend-black);
  margin-right: 6px;
}

.legend-topbar a {
  color: var(--legend-black);
}

/* Header */
.legend-header {
  background: #fff;
  box-shadow: 0 1px 0 var(--legend-line);
  backdrop-filter: none;
}

.legend-header .nav {
  height: 78px;
}

.legend-logo {
  display: flex;
  align-items: center;
  min-width: 140px;
}

.legend-logo .logo-img {
  max-height: 46px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.legend-logo .logo-img.is-hidden {
  display: none;
}

.legend-logo .logo-text {
  display: none;
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -0.04em;
  color: var(--legend-black);
}

.legend-logo .logo-text span {
  color: var(--primary);
}

.legend-logo.show-text .logo-text {
  display: block;
}

.legend-menu a {
  color: var(--legend-black);
  font-weight: 600;
  font-size: 15px;
  opacity: 1;
  letter-spacing: -0.02em;
}

.legend-menu a:hover {
  color: var(--legend-black);
}

.legend-menu a.active {
  color: var(--legend-black);
  font-weight: 800;
}

.legend-nav-actions .btn {
  border-radius: 999px;
  padding: 11px 20px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: none;
  transform: none;
}

.legend-btn-dark {
  background: var(--legend-black) !important;
  color: #fff !important;
}

.legend-btn-dark:hover {
  background: #2a2a2a !important;
  transform: none;
}

.legend-btn-outline {
  background: #fff !important;
  color: var(--legend-black) !important;
  border: 1.5px solid var(--legend-black) !important;
  box-shadow: none !important;
}

.legend-mobile-btn {
  color: var(--legend-black);
}

/* Mobile header + VDP */
@media (max-width: 991px) {
  .legend-topbar {
    display: none;
  }

  .legend-header .nav {
    height: 64px;
  }

  .legend-logo .logo-img {
    max-height: 38px;
    max-width: 140px;
  }

  .legend-theme .menu {
    background: #fff;
    color: var(--legend-black);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
  }

  .legend-theme .menu a {
    color: var(--legend-black);
    border-bottom-color: var(--legend-line);
  }
}

/* Buttons global override */
.legend-theme .btn {
  border-radius: 999px;
  font-weight: 700;
  box-shadow: none;
}

.legend-theme .btn:hover {
  transform: translateY(-1px);
}

.legend-theme .btn.dark,
.legend-theme .vehicle-body .btn {
  background: var(--legend-black);
  color: #fff;
}

.legend-theme .vehicle-body .btn:hover {
  background: #2a2a2a;
}

/* Hero */
.legend-theme .hero-dealer {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.2)),
    url('https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?q=80&w=2200') center/cover;
  min-height: 620px;
}

.legend-theme .hero h1 {
  font-weight: 800;
  letter-spacing: -2px;
}

.legend-theme .eyebrow {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: 0.08em;
}

.legend-theme .page-hero {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.35)),
    url('https://images.unsplash.com/photo-1542362567-b07e54358753?q=80&w=1800') center/cover;
  padding: 72px 0;
}

.legend-theme .page-hero h1 {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -1px;
}

/* Search panel */
.legend-theme .search-box {
  border: 1px solid var(--legend-line);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(17, 17, 17, 0.06);
}

.legend-theme .search-box .btn {
  background: var(--legend-black);
}

/* Cards */
.legend-theme .vehicle-card {
  border: 1px solid var(--legend-line);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(17, 17, 17, 0.05);
}

.legend-theme .vehicle-card::after {
  display: none;
}

.legend-theme .vehicle-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(17, 17, 17, 0.08);
}

.legend-theme .vehicle-body h3 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.legend-theme .price {
  color: var(--legend-black);
  font-size: 26px;
  font-weight: 800;
}

.legend-theme .badge {
  background: var(--legend-black);
}

.legend-theme .stat-card strong {
  color: var(--legend-black);
}

.legend-theme .section.gray {
  background: var(--legend-soft);
}

.legend-theme .filters,
.legend-theme .step,
.legend-theme .empty-shop {
  border: 1px solid var(--legend-line);
}

.legend-theme .title-wrap h2,
.legend-theme .vdp-highlights h2,
.legend-theme .vdp-info h2,
.legend-theme .vdp-details h2 {
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* Vehicle detail page — Legend layout */
.legend-theme .vdp-legend {
  padding-top: 28px;
  padding-bottom: 20px;
}

.legend-theme .vdp-top {
  gap: 40px;
}

.legend-theme .vdp-gallery-main {
  border: 1px solid var(--legend-line);
}

.legend-theme .vdp-counter {
  top: 18px;
  right: 18px;
  left: auto;
  background: rgba(17, 17, 17, 0.72);
  font-weight: 700;
}

.legend-theme .vdp-nav {
  width: 42px;
  height: 42px;
  border: 1px solid var(--legend-line);
}

.legend-theme .vdp-summary h1 {
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: clamp(30px, 3.5vw, 44px);
}

.legend-theme .vdp-meta {
  font-size: 15px;
  color: var(--legend-gray);
}

.legend-theme .vdp-location i {
  color: var(--legend-black);
}

.legend-theme .vdp-btn-dark {
  background: var(--legend-black) !important;
  border-radius: 999px;
  font-weight: 700;
}

.legend-theme .vdp-btn-light {
  border-radius: 999px;
  border-color: var(--legend-black) !important;
  font-weight: 700;
}

.legend-theme .vdp-price-box strong {
  color: var(--legend-black);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.legend-theme .vdp-highlight-card {
  border-radius: 18px;
  border-color: var(--legend-line);
  padding: 32px 24px;
}

.legend-theme .vdp-highlight-card i {
  color: var(--legend-black);
}

.legend-theme .vdp-tag {
  border-color: var(--legend-black);
  border-radius: 999px;
  font-size: 14px;
}

.legend-theme .vdp-spec-item {
  border-radius: 16px;
  border-color: var(--legend-line);
}

.legend-theme .vdp-spec-item i {
  background: var(--legend-soft);
  color: var(--legend-black);
}

.legend-theme .vdp-link-card {
  border-radius: 18px;
  border-color: var(--legend-line);
}

.legend-theme .vdp-link-card i:first-child {
  color: var(--legend-black);
}

.legend-theme .vdp-tab {
  border-radius: 999px;
  border-color: var(--legend-line);
  font-size: 14px;
}

.legend-theme .vdp-tab.active {
  background: #e9eaee;
  border-color: #d5d8de;
  color: var(--legend-black);
}

.legend-theme .vdp-option-list li {
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.legend-theme .vdp-option-list i {
  color: var(--legend-black);
  font-size: 12px;
}

/* Footer */
.legend-theme .footer {
  background: #0c0c0c;
}

.legend-theme .footer .logo {
  color: #fff;
}

/* WhatsApp */
.legend-theme .whatsapp {
  background: #25d366;
}

@media (max-width: 640px) {
  .legend-theme .legend-nav-actions {
    display: none;
  }
}

/* Shop live search overlay */
.shop-search-backdrop[hidden],
.shop-search-panel[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.shop-search-mobile-btn {
  display: none;
  background: transparent;
  border: 0;
  color: var(--legend-black);
  font-size: 20px;
  padding: 8px;
  cursor: pointer;
}

body.shop-search-open {
  overflow: hidden;
}

.shop-search-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.55);
  z-index: 10000;
}

.shop-search-panel {
  position: fixed;
  inset: 0;
  z-index: 10001;
  flex-direction: column;
  pointer-events: none;
}

.shop-search-panel:not([hidden]) {
  display: flex;
  pointer-events: auto;
}

.shop-search-top {
  background: #fff;
  border-bottom: 1px solid var(--legend-line);
  padding: 14px 0;
  flex-shrink: 0;
}

.shop-search-top-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.shop-search-logo .logo-img {
  max-height: 40px;
}

.shop-search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid #2563eb;
  border-radius: 10px;
  padding: 10px 14px;
  background: #fff;
  min-width: 0;
}

.shop-search-field i {
  color: #6b7280;
  flex-shrink: 0;
}

.shop-search-field input {
  border: 0;
  outline: none;
  flex: 1;
  font: inherit;
  font-size: 16px;
  min-width: 0;
  background: transparent;
}

.shop-search-clear {
  border: 0;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.shop-search-cancel {
  border: 0;
  background: transparent;
  font-weight: 600;
  font-size: 15px;
  color: var(--legend-black);
  cursor: pointer;
  white-space: nowrap;
}

.shop-search-body {
  background: #fff;
  flex: 1;
  overflow-y: auto;
  padding: 0 0 24px;
}

.shop-search-results-box {
  padding-top: 8px;
}

.shop-search-results-title {
  font-size: 13px;
  font-weight: 700;
  color: #6b7280;
  margin: 12px 0 8px;
  letter-spacing: 0.02em;
}

.shop-search-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.shop-search-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--legend-line);
  color: var(--legend-black);
  text-decoration: none;
  transition: background 0.15s;
}

.shop-search-item:hover {
  background: #f4f5f7;
}

.shop-search-item mark {
  background: #bfdbfe;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

.shop-search-thumb {
  width: 56px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #eee;
}

.shop-search-thumb--icon {
  display: grid;
  place-items: center;
  color: #111;
  font-size: 18px;
}

.shop-search-label {
  flex: 1;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
}

.shop-search-price {
  font-weight: 700;
  font-size: 14px;
  color: #111;
  flex-shrink: 0;
}

.shop-search-empty,
.shop-search-hint {
  color: #6b7280;
  font-size: 14px;
  padding: 16px 8px;
}

@media (max-width: 991px) {
  .shop-search-mobile-btn {
    display: block;
  }

  .shop-search-logo {
    display: none;
  }

  .shop-search-cancel {
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .shop-search-top-inner {
    gap: 10px;
  }

  .shop-search-field {
    padding: 8px 12px;
  }

  .shop-search-field input {
    font-size: 16px;
  }

  .shop-search-thumb {
    width: 48px;
    height: 36px;
  }

  .shop-search-label {
    font-size: 14px;
  }

  .shop-search-price {
    font-size: 12px;
  }
}
