:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef3f6;
  --text: #17202a;
  --muted: #66717d;
  --line: #d7dee5;
  --toyota: #d71920;
  --toyota-dark: #9f1117;
  --accent: #027a82;
  --shadow: 0 18px 50px rgba(23, 32, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(90deg, rgba(244, 246, 248, 0.94) 0%, rgba(244, 246, 248, 0.82) 54%, rgba(244, 246, 248, 0.55) 100%),
    url("https://api.c0a7xy-abdullati1-s1-public.model-t.cc.commerce.ondemand.com/medias/services-parts-main.webp?context=bWFzdGVyfGltYWdlc3w0NDgwMHxpbWFnZS93ZWJwfGFEbGhMMmhqWlM4eE1ETTJOekF3TnpneE56YzFPQzl6WlhKMmFXTmxjeTF3WVhKMGN5MXRZV2x1TG5kbFluQXxlZWZkNGRjZGUxMzE4NTBjNGZjMzRjMTAyNWNhMDFiZDNiNjA5YmM3ODViN2JjZTU3MjBhMzU4NjM4NzQ3YzAz") right top / min(54vw, 760px) auto no-repeat,
    var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 32px;
}

.search-workspace {
  display: grid;
  gap: 22px;
  align-content: start;
}

/* Site Header Layout */
.site-header {
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #f0f0f0;
}

/* Top Utility Bar (TopHeaderSlot) */
.top-header-slot {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  height: 40px;
  padding: 0 64px;
  border-bottom: 1px solid #F0F0F0;
  box-sizing: border-box;
  background: #ffffff;
}

.top-nav-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 32px;
}

.top-nav-links a {
  color: #000000;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0;
  transition: color 0.2s ease;
}

.top-nav-links a:hover {
  color: #EB0A1E;
}

.top-brand-logo-container {
  display: flex;
  align-items: center;
  height: 40px;
}

.top-nav-divider {
  background-color: #E5E9EE;
  width: 1px;
  height: 24px;
  margin: 0 24px;
  flex-shrink: 0;
}

.top-nav-img {
  width: 137px;
  height: 30px;
  flex-shrink: 0;
  display: block;
}

/* Main Brand Logo Bar (SiteLogo) */
.main-brand-logo-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 32px;
  height: 56px;
  padding: 0 64px;
  background: transparent;
  box-sizing: border-box;
}

.brand-logo-link {
  display: flex;
  align-items: center;
}

.brand-logo-img {
  max-width: 170px;
  max-height: 62px;
  height: auto;
  object-fit: contain;
}

.styled-line {
  background-color: #EB0A1E;
  height: 8px;
  flex-grow: 1;
  border-radius: 0;
}

.brand-tagline {
  color: #EB0A1E;
  font-weight: 700;
  font-size: 18px;
  line-height: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Category Navigation Bar */
.category-nav-bar {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 24px;
  height: 52px;
  padding: 0 64px;
  background: transparent;
  overflow-x: auto;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #e0e0e0;
  scrollbar-width: none; /* Hide scrollbar for clean design */
}

.category-nav-bar::-webkit-scrollbar {
  display: none;
}

.category-nav-item {
  color: #000000;
  font-size: 15px;
  font-weight: 600;
  padding: 16px 0;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease;
}

.category-nav-item:hover {
  color: #EB0A1E;
}

/* Page Title Section */
.page-title-section {
  margin-bottom: 24px;
}

.page-subtitle {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-top: 12px;
  margin-bottom: 0;
  max-width: 850px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 4.25rem);
  line-height: 1;
  letter-spacing: 0;
  max-width: 760px;
}

h2 {
  margin-bottom: 0;
  font-size: 1.05rem;
}

.search-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--shadow);
  width: 100%;
  padding: 20px;
}


.search-panel label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-row input {
  min-width: 0;
  height: 56px;
  border: 1px solid #b8c2cc;
  border-radius: 8px;
  padding: 0 16px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.search-row input:focus {
  border-color: var(--toyota);
  box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.14);
}

.search-row button,
.quick-queries button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.search-row button {
  min-width: 132px;
  height: 56px;
  padding: 0 22px;
  background: var(--toyota);
  color: white;
  font-weight: 800;
}

.search-row button:disabled {
  cursor: wait;
  background: #9ca3af;
}

.quick-queries {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.quick-queries button {
  padding: 9px 12px;
  background: var(--surface-2);
  color: #33404c;
  font-size: 0.9rem;
}

.quick-queries button:hover {
  background: #dfe8ee;
}



/* Search Spinner */
.hidden {
  display: none !important;
}

.search-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 0;
}

.spinner-ring {
  width: 52px;
  height: 52px;
  border: 5px solid rgba(215, 25, 32, 0.15);
  border-top-color: var(--toyota);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner-label {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.results-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-heading span {
  color: var(--muted);
  font-size: 0.9rem;
}

.results-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.result-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 4px 16px rgba(23, 32, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.result-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(23, 32, 42, 0.13);
}

.vehicle-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 68%; /* ~3:2 aspect ratio */
  background: #f0f2f5;
  overflow: hidden;
}

.vehicle-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: opacity 0.3s ease;
}

.hover-img {
  opacity: 0;
}

.vehicle-image-wrapper:hover .hover-img {
  opacity: 1;
}

.vehicle-image-wrapper:hover .primary-img {
  opacity: 0;
}

.no-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(to bottom, #cfd5d8 0%, #f6f8f9 50%, #cfd5d8 100%);
}

.no-image-svg {
  width: 90px;
  height: 60px;
  fill: #9eaab0;
  display: block;
}

.no-image-placeholder span {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #7f8c93;
  letter-spacing: -0.01em;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 14px 16px 12px;
  gap: 6px;
}

.result-card h3 {
  margin: 0 0 2px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 8px 16px;
  margin-top: 12px;
}

.meta-grid span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.meta-grid strong {
  display: block;
  overflow-wrap: anywhere;
}

.notes {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.buy-now-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: var(--toyota);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.buy-now-btn:hover {
  background: var(--toyota-dark);
}

.fallback-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  border-radius: 6px;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 12px;
}

.fallback-banner svg {
  flex-shrink: 0;
}

.empty-state {
  border: 1px dashed #b8c2cc;
  border-radius: 8px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}



@media (max-width: 850px) {
  body {
    background:
      linear-gradient(rgba(244, 246, 248, 0.92), rgba(244, 246, 248, 0.92)),
      url("https://api.c0a7xy-abdullati1-s1-public.model-t.cc.commerce.ondemand.com/medias/services-parts-main.webp?context=bWFzdGVyfGltYWdlc3w0NDgwMHxpbWFnZS93ZWJwfGFEbGhMMmhqWlM4eE1ETTJOekF3TnpneE56YzFPQzl6WlhKMmFXTmxjeTF3WVhKMGN5MXRZV2x1TG5kbFluQXxlZWZkNGRjZGUxMzE4NTBjNGZjMzRjMTAyNWNhMDFiZDNiNjA5YmM3ODViN2JjZTU3MjBhMzU4NjM4NzQ3YzAz") center top / 100% auto no-repeat,
      var(--bg);
  }

  .app-shell {
    width: min(100% - 20px, 720px);
    padding-top: 10px;
  }

  .top-header-slot {
    padding: 0 20px;
    height: 36px;
  }

  .top-nav-links a {
    height: 36px;
  }

  .top-nav-divider {
    height: 20px;
    margin: 0 16px;
  }

  .top-nav-img {
    width: 110px;
    height: 24px;
  }

  .main-brand-logo-bar {
    padding: 0 20px;
    height: 46px;
    gap: 12px;
  }

  .brand-logo-img {
    max-height: 38px;
  }

  .brand-tagline {
    font-size: 0.95rem;
  }

  .styled-line {
    margin: 0 10px;
    height: 4px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .search-row button {
    width: 100%;
  }

  .results-list {
    grid-template-columns: 1fr;
  }
}



.price-badge {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}

.original-price {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: line-through;
}

.discounted-price {
  font-size: 1.25rem;
  color: var(--toyota-dark);
  font-weight: 800;
}

.promo-badge {
  display: inline-block;
  padding: 2px 6px;
  background: var(--toyota);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.stock-status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
}

.stock-status.in-stock {
  background: #e6f6ee;
  color: #1b8755;
}

.stock-status.low-stock {
  background: #fff8eb;
  color: #c07d00;
}

.stock-status.out-of-stock {
  background: #fdf2f2;
  color: #e02424;
}

/* Highlight matching search tokens in UAT responses */
.search-results-highlight {
  font-style: normal;
  background: rgba(255, 235, 59, 0.25);
  border-radius: 2px;
  padding: 0 2px;
}

