/* ======================================================================
   Şasi / VIN sorgulama sayfası (/sasi-no-ile-sorgula)

   Direction-D tema diline göre yazıldı: krem sayfa zemini, koyu navy hero
   bandı, beyaz kartlar (r=18px), --f-display başlıklar, --f-mono etiketler.
   Eski sürümdeki sabit mavi hex'ler (#101f3c, #6a7d99, #566b8a …) token'lara
   çevrildi — tema renk değiştirdiğinde bu sayfa da takip eder.

   JS bağımlılıkları (chassis-lookup-page.js) — DEĞİŞTİRİLEMEZ:
     .pv-vin-tab / [data-tab-target] + .is-active   → activateTab()
     .pv-vin-tab-panel / [data-tab-panel] + hidden  → activateTab()
     .pv-vin-status + .is-error / .is-success       → setStatus()
     .pv-vin-result-* , .pv-vin-spec-* , .search-button ,
     .pv-vin-tertiary-button , .pv-cf-warning       → innerHTML ile üretilir
   ====================================================================== */
@layer features {

/* Sayfa zemini — anasayfayla aynı krem. */
.html-chassis-lookup-page body { background: var(--pv-cream); }

.chassis-lookup-page { margin: 0 0 var(--pv-space-9); }
.chassis-lookup-page .page-body { margin: 0; }

/* ── HERO ─────────────────────────────────────────────────────────── */
.pv-vin-hero {
  position: relative;
  overflow: hidden;
  margin: var(--pv-space-6) 0 var(--pv-space-7);
  padding: 40px 36px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--d-navy) 0%, var(--d-navy-2) 58%, var(--pv-ink) 100%);
  color: var(--pv-color-white);
  text-align: center;
}
.pv-vin-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 20%, rgb(243 124 32 / 20%), transparent 55%);
}
.pv-vin-hero > * { position: relative; }

.pv-vin-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 11px;
  border-radius: var(--r-pill, 999px);
  background: rgb(243 124 32 / 20%);
  color: var(--pv-orange);
  font-family: var(--f-mono);
  font-size: 10px; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase;
}
.pv-vin-eyebrow .pv-live-dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--pv-orange);
}

.pv-vin-hero h1 {
  margin: 14px auto 0;
  max-width: 20ch;
  color: var(--pv-color-white);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.pv-vin-hero h1 em { color: var(--pv-orange); font-style: normal; }

.pv-vin-hero p {
  margin: 12px auto 0;
  max-width: 62ch;
  color: rgb(255 255 255 / 72%);
  font-size: var(--pv-text-base);
  line-height: 1.55;
}

.pv-vin-hero-facts {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 34px;
}
.pv-vin-hero-facts li { display: grid; gap: 2px; }
.pv-vin-hero-fact-v {
  font-family: var(--f-display); font-weight: 700; font-size: 20px;
  letter-spacing: -0.02em; color: var(--pv-color-white);
}
.pv-vin-hero-fact-l {
  font-family: var(--f-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; color: rgb(255 255 255 / 55%);
}

/* ── Sorgu kartı ──────────────────────────────────────────────────── */
.pv-chassis-lookup { width: min(880px, 100%); margin: 0 auto; }

.pv-vin-query-card {
  border: 1px solid var(--pv-line);
  border-radius: 18px;
  background: var(--pv-color-white);
  box-shadow: 0 12px 30px rgb(20 17 14 / 7%);
  overflow: hidden;
}

/* Sekmeler — segmented pill, alt çizgi yerine dolgu. */
.pv-vin-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px;
  background: var(--pv-cream-2);
  border-bottom: 1px solid var(--pv-line);
}
.pv-vin-tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--pv-muted);
  font-family: var(--f-display);
  font-size: var(--pv-text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.pv-vin-tab:hover { color: var(--pv-ink); }
.pv-vin-tab.is-active {
  background: var(--pv-color-white);
  border-color: var(--pv-line);
  color: var(--pv-ink);
  box-shadow: 0 2px 6px rgb(20 17 14 / 8%);
}
.pv-vin-tab.is-active svg { color: var(--pv-orange); }

.pv-vin-tab-panel { padding: 24px; }
.pv-vin-tab-panel[hidden] { display: none; }

.pv-vin-field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--pv-ink);
  font-family: var(--f-display);
  font-size: var(--pv-text-sm);
  font-weight: 600;
}

.pv-vin-panel-note {
  margin: 0 0 14px;
  color: var(--pv-muted);
  font-size: var(--pv-text-sm);
  line-height: 1.5;
}

.pv-vin-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 10px;
}
/* VIN alanı mono — 17 haneli kod okunurken karakterler hizalı dursun. */
.pv-vin-input-row .pv-vin-input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1.5px solid var(--pv-line);
  border-radius: 12px;
  background: var(--pv-cream);
  color: var(--pv-ink);
  font-family: var(--f-mono);
  font-size: var(--pv-text-base);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.pv-vin-input-row .pv-vin-input::placeholder {
  color: var(--pv-muted-2);
  letter-spacing: 0.1em;
}
.pv-vin-input-row .pv-vin-input:focus {
  outline: 0;
  background: var(--pv-color-white);
  border-color: var(--pv-orange);
  box-shadow: 0 0 0 3px rgb(243 124 32 / 18%);
}

.pv-vin-help {
  margin: 12px 0 0;
  color: var(--pv-muted);
  font-size: var(--pv-text-xs);
  line-height: 1.5;
}
.pv-vin-help strong { color: var(--pv-ink); font-weight: 600; }

/* ── Fotoğraf yükleme paneli ──────────────────────────────────────── */
.pv-vin-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
}

.pv-vin-file-input {
  position: absolute;
  width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap;
}

.pv-vin-file-picker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 8px 12px;
  border: 1.5px dashed var(--pv-line);
  border-radius: 12px;
  background: var(--pv-cream);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.pv-vin-file-picker:hover { border-color: var(--pv-orange-tint-2); background: var(--pv-color-white); }
.pv-vin-file-picker:focus-within {
  border-color: var(--pv-orange);
  background: var(--pv-color-white);
  box-shadow: 0 0 0 3px rgb(243 124 32 / 16%);
}

.pv-vin-file-trigger {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--r-pill, 999px);
  background: var(--pv-orange-tint);
  color: var(--pv-orange-700);
  font-family: var(--f-display);
  font-size: var(--pv-text-xs);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background .15s ease;
}
.pv-vin-file-trigger:hover { background: var(--pv-orange-tint-2); }

.pv-vin-file-meta { min-width: 0; display: grid; gap: 2px; }
.pv-vin-file-name {
  display: block; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--pv-ink);
  font-size: var(--pv-text-sm);
  font-weight: 600;
}
.pv-vin-file-hint {
  color: var(--pv-muted-2);
  font-family: var(--f-mono);
  font-size: var(--pv-text-2xs);
  line-height: 1.25;
}

/* ── Kırpma çalışma alanı ─────────────────────────────────────────── */
.pv-vin-crop-workspace {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--pv-line);
  border-radius: 14px;
  background: var(--pv-cream);
}
.pv-vin-crop-canvas-wrap {
  width: 100%;
  height: min(48vw, 380px);
  min-height: 230px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--pv-ink);
}
.pv-vin-crop-canvas-wrap img { display: block; max-width: 100%; }

.pv-vin-crop-toolbar { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.pv-vin-tool-btn {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--pv-line);
  border-radius: var(--r-pill, 999px);
  background: var(--pv-color-white);
  color: var(--pv-ink);
  font-family: var(--f-display);
  font-size: var(--pv-text-xs);
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.pv-vin-tool-btn:hover { border-color: var(--pv-orange); color: var(--pv-orange); }

.pv-vin-ocr-actions { margin-top: 14px; display: grid; }

/* ── Ortak buton yüzeyleri ────────────────────────────────────────── */
/* .search-button ve .pv-vin-tertiary-button JS tarafından da (sonuç kartında)
   üretiliyor; d-btn sınıfı orada YOK, o yüzden görünüm burada tanımlanır. */
.pv-vin-result .search-button,
.pv-chassis-lookup .search-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--pv-orange);
  color: var(--pv-color-white);
  font-family: var(--f-display);
  font-size: var(--pv-text-sm);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 16px rgb(243 124 32 / 28%);
  transition: background .15s ease;
}
.pv-vin-result .search-button:hover,
.pv-chassis-lookup .search-button:hover { background: var(--pv-orange-600); }

.pv-vin-secondary-button,
.pv-vin-tertiary-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px;
  padding: 0 16px;
  border: 1.5px solid var(--pv-line);
  border-radius: 12px;
  background: var(--pv-color-white);
  color: var(--pv-ink);
  font-family: var(--f-display);
  font-size: var(--pv-text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.pv-vin-secondary-button:hover,
.pv-vin-tertiary-button:hover { border-color: var(--pv-orange); color: var(--pv-orange); }

.pv-vin-result .search-button:disabled,
.pv-chassis-lookup .search-button:disabled,
.pv-vin-secondary-button:disabled,
.pv-vin-tool-btn:disabled,
.pv-vin-tertiary-button:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.pv-vin-file-input:disabled + .pv-vin-file-trigger { opacity: 0.55; cursor: not-allowed; }

/* ── Turnstile / durum / uyarı ────────────────────────────────────── */
.pv-vin-turnstile-row { display: flex; justify-content: center; margin-top: 14px; }

.pv-vin-status {
  min-height: 24px;
  margin: 16px 0 8px;
  text-align: center;
  font-family: var(--f-display);
  font-size: var(--pv-text-sm);
  font-weight: 600;
  color: var(--pv-muted);
}
.pv-vin-status.is-error { color: var(--pv-color-error); }
.pv-vin-status.is-success { color: var(--d-green); }

/* JS ile enjekte edilir (Cloudflare yüklenemedi uyarısı). */
.pv-cf-warning {
  margin-top: 10px;
  padding: 10px 14px;
  border: 1px solid var(--pv-orange-tint-2);
  border-radius: 12px;
  background: var(--pv-orange-tint);
  color: var(--pv-ink);
  font-size: var(--pv-text-xs);
  line-height: 1.5;
  text-align: center;
}

/* ── Sonuç kartı (JS innerHTML) ───────────────────────────────────── */
.pv-vin-result { min-height: 8px; }

.pv-vin-result-card {
  margin-top: 6px;
  display: grid;
  grid-template-columns: minmax(220px, 40%) minmax(0, 1fr);
  border: 1px solid var(--pv-line);
  border-radius: 18px;
  background: var(--pv-color-white);
  box-shadow: 0 12px 30px rgb(20 17 14 / 8%);
  overflow: hidden;
}
.pv-vin-result-card:focus-visible { outline: 2px solid var(--pv-orange); outline-offset: 2px; }

.pv-vin-result-media {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 240px;
  padding: 14px;
  background: var(--pv-cream-2);
}
.pv-vin-result-badge {
  position: absolute; top: 14px; left: 14px;
  z-index: var(--pv-z-raised);
  padding: 4px 10px;
  border-radius: var(--r-pill, 999px);
  background: var(--pv-orange);
  color: var(--pv-color-white);
  font-family: var(--f-mono);
  font-size: 10px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
}
.pv-vin-result-image {
  display: block; width: 100%; height: 100%; min-height: 220px;
  object-fit: contain; object-position: center;
}

.pv-vin-result-content { padding: 24px; display: grid; gap: 12px; align-content: start; }
.pv-vin-result-title {
  margin: 0;
  color: var(--pv-ink);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(20px, 1.9vw, 26px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.pv-vin-result-subtitle {
  margin: -6px 0 0;
  color: var(--pv-muted);
  font-size: var(--pv-text-sm);
  line-height: 1.5;
}

.pv-vin-result-spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  padding: 14px 0;
  border-top: 1px solid var(--pv-line);
  border-bottom: 1px solid var(--pv-line);
}
.pv-vin-spec { min-width: 0; }
.pv-vin-spec-label {
  display: block;
  color: var(--pv-muted-2);
  font-family: var(--f-mono);
  font-size: 10px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
}
.pv-vin-spec-value {
  display: block;
  margin-top: 3px;
  color: var(--pv-ink);
  font-family: var(--f-display);
  font-size: var(--pv-text-sm);
  font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.pv-vin-result-actions { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 10px; }

/* ── Nasıl çalışır (3 adım) ───────────────────────────────────────── */
.pv-vin-steps { width: min(880px, 100%); margin: var(--pv-space-7) auto 0; }
.pv-vin-steps-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  counter-reset: pv-vin-step;
}
.pv-vin-step {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 16px;
  border: 1px solid var(--pv-line);
  border-radius: 14px;
  background: var(--pv-color-white);
}
.pv-vin-step-n {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--pv-orange-tint);
  color: var(--pv-orange-700);
  font-family: var(--f-mono);
  font-size: var(--pv-text-xs);
  font-weight: 700;
}
.pv-vin-step h3 {
  margin: 2px 0 0;
  color: var(--pv-ink);
  font-family: var(--f-display);
  font-size: var(--pv-text-sm);
  font-weight: 600;
  line-height: 1.25;
}
.pv-vin-step p {
  margin: 5px 0 0;
  color: var(--pv-muted);
  font-size: var(--pv-text-xs);
  line-height: 1.5;
}

/* ── SEO kartları ─────────────────────────────────────────────────── */
.pv-seo-grid {
  width: min(1080px, 100%);
  margin: var(--pv-space-8) auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.pv-seo-card {
  padding: 26px;
  border: 1px solid var(--pv-line);
  border-radius: 18px;
  background: var(--pv-color-white);
}
.pv-seo-card h2 {
  margin: 0;
  color: var(--pv-ink);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.pv-seo-card p {
  margin: 12px 0 0;
  color: var(--pv-muted);
  font-size: var(--pv-text-sm);
  line-height: 1.65;
}
.pv-seo-card ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--pv-muted);
}
.pv-seo-card li {
  margin-bottom: 8px;
  font-size: var(--pv-text-sm);
  line-height: 1.55;
}
.pv-seo-card li strong,
.pv-seo-list-locations strong { color: var(--pv-ink); font-weight: 600; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 899.98px) {
  .pv-vin-hero { padding: 30px 20px; margin-top: var(--pv-space-4); }
  .pv-vin-hero-facts { gap: 10px 22px; }
  .pv-vin-input-row { grid-template-columns: 1fr; }
  .pv-vin-upload-row { grid-template-columns: 1fr; }
  .pv-vin-result-card { grid-template-columns: 1fr; }
  .pv-vin-result-image { min-height: 200px; }
  .pv-vin-result-actions { grid-template-columns: 1fr; }
  .pv-vin-steps-list { grid-template-columns: 1fr; }
  .pv-seo-grid { grid-template-columns: 1fr; }
}

@media (max-width: 599.98px) {
  .pv-vin-hero { padding: 24px 16px; border-radius: 14px; }
  .pv-vin-hero h1 { font-size: clamp(23px, 7vw, 30px); }
  .pv-vin-hero p { font-size: var(--pv-text-sm); }
  .pv-vin-hero-facts { gap: 8px 18px; }
  .pv-vin-hero-fact-v { font-size: var(--pv-text-base); }

  .pv-vin-tabs { grid-template-columns: 1fr 1fr; gap: 4px; padding: 6px; }
  .pv-vin-tab { min-height: 42px; font-size: var(--pv-text-xs); gap: 6px; }
  .pv-vin-tab-panel { padding: 18px; }

  .pv-vin-input-row .pv-vin-input { min-height: 48px; font-size: var(--pv-text-sm); letter-spacing: 0.1em; }
  .pv-vin-result .search-button,
  .pv-chassis-lookup .search-button,
  .pv-vin-secondary-button,
  .pv-vin-tertiary-button { min-height: 48px; }

  /* Dosya seçicide etiket + meta alt alta — dar ekranda yan yana sıkışıyordu. */
  .pv-vin-file-picker { grid-template-columns: 1fr; gap: 8px; align-items: start; padding: 12px; }
  .pv-vin-file-trigger { width: fit-content; }

  .pv-vin-crop-canvas-wrap { height: 240px; min-height: 240px; }
  .pv-vin-result-content { padding: 18px; }
  .pv-vin-result-spec-grid { grid-template-columns: 1fr 1fr; }
  .pv-seo-card { padding: 20px; }
}

}
