/* GENEL */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg-page: #f6f7fb;
  --bg-panel: #ffffff;
  --bg-hero: #0a2540;
  --primary: #e53323;
  --primary-dark: #b11f16;
  --primary-soft: #ff5b3b;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border-soft: #e5e7eb;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.22);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-pill: 999px;
  --transition-fast: 0.18s ease-out;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  background: radial-gradient(
      circle at top,
      #0f172a 0,
      #020617 45%,
      #020617 60%
    )
    fixed;
  color: var(--text-main);
}

/* Uygulama konteyneri */

.app {
  min-height: 100vh;
  padding: 24px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ÜST BAR */

.topbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  background: rgba(15, 23, 42, 0.78);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #e5e7eb;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-circle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0, #4ade80, #22c55e 40%, #15803d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #022c22;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.35);
}

.logo-texts {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-title {
  font-weight: 700;
  letter-spacing: 0.03em;
}

.logo-subtitle {
  font-size: 12px;
  opacity: 0.72;
}

.beta-pill {
  font-size: 11px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.6);
  background: linear-gradient(135deg, #facc15, #f97316);
  color: #1f2937;
  font-weight: 600;
}

/* HERO KART */

.hero-card {
  max-width: 1200px;
  margin: 0 auto;
  background: radial-gradient(circle at 0 0, #1d4ed8, #0f172a 55%, #020617);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.6fr);
  gap: 24px;
  align-items: center;
  box-shadow: var(--shadow-soft);
  color: #e5e7eb;
  overflow: hidden;
  position: relative;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 120% -20%,
    rgba(56, 189, 248, 0.45),
    transparent 55%
  );
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-image {
  position: relative;
  z-index: 1;
}

.hero-image img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 8px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-copy h1 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: 0.02em;
}

.hero-copy p {
  margin: 0;
  line-height: 1.5;
  font-size: 14px;
}

.hero-note {
  margin-top: 10px;
  font-size: 13px;
  opacity: 0.85;
}

/* ANA GRID */

.main-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.8fr);
  gap: 20px;
  align-items: flex-start;
}

/* PANELLER */

.panel {
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  padding: 18px 18px 20px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(15, 23, 42, 0.6);
}

.panel-title {
  margin: 0 0 14px;
  font-size: 18px;
}

/* FORM TARAFI */

.search-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

label {
  font-size: 13px;
  color: #374151;
  font-weight: 500;
}

input,
textarea {
  font: inherit;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: #f9fafb;
  color: #111827;
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast), background-color var(--transition-fast),
    transform 0.08s ease-out;
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af;
  font-size: 13px;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(229, 51, 35, 0.35);
  background: #ffffff;
  transform: translateY(-1px);
}

/* BUTONLAR */

.btn {
  border: none;
  cursor: pointer;
  font: inherit;
  border-radius: 999px;
  padding: 9px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast), background-color var(--transition-fast),
    color var(--transition-fast);
}

.btn-primary {
  margin-top: 4px;
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 14px 24px rgba(229, 51, 35, 0.45);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(229, 51, 35, 0.65);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.btn-secondary {
  background: #ffffff;
  color: #111827;
  font-size: 13px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.btn-secondary:hover {
  background: #f3f4f6;
}

.btn-link {
  background: transparent;
  color: #6b7280;
  font-size: 12px;
  padding: 0;
}

.btn-link:hover {
  color: #111827;
}

/* DURUM MESAJI */

.status-message {
  margin-top: 4px;
  font-size: 13px;
  color: #6b7280;
}

/* ARAMA GEÇMİŞİ */

.history-box {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px dashed #e5e7eb;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.history-header h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 170px;
  overflow-y: auto;
  font-size: 12px;
}

.history-list li {
  padding: 5px 0;
  border-bottom: 1px dashed #e5e7eb;
  color: #6b7280;
}

/* SAĞ PANEL – OTOMATİK METİN VE SONUÇLAR */

.auto-text-box {
  margin-bottom: 14px;
}

.auto-text-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.auto-text-header h2 {
  margin: 0;
  font-size: 16px;
}

.auto-textarea {
  margin-top: 6px;
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border-radius: 14px;
  border: 1px dashed #d1d5db;
  background: #f9fafb;
  padding: 10px 11px;
  font-size: 13px;
}

.results-header {
  margin: 10px 0 6px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.results-header h2 {
  margin: 0;
  font-size: 16px;
}

.results-info {
  font-size: 12px;
  color: var(--text-muted);
}

/* TEDARİKÇİ KARTLARI – E-TİCARET STİLİ */

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

/* JS’in oluşturacağı kartlar bu sınıfı kullanmalı: .supplier-card */

.supplier-card {
  position: relative;
  border-radius: 22px;
  padding: 14px 14px 12px;
  background: radial-gradient(
    circle at 0 0,
    #ffedd5 0,
    #f97316 10%,
    #b91c1c 70%
  );
  color: #fef2f2;
  box-shadow: 0 16px 32px rgba(185, 28, 28, 0.55);
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.supplier-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at -10% -20%,
    rgba(255, 255, 255, 0.45),
    transparent 45%
  );
  opacity: 0.9;
  pointer-events: none;
}

.supplier-card-inner {
  position: relative;
  z-index: 1;
}

/* Firma adı */

.supplier-name {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 2px;
}

/* Bilgi satırları */

.supplier-info-row {
  font-size: 13px;
  display: flex;
  gap: 4px;
}

.supplier-label {
  font-weight: 600;
  opacity: 0.9;
  min-width: 64px;
}

.supplier-value {
  opacity: 0.94;
}

/* Web linki */

.supplier-link {
  font-size: 13px;
  color: #fee2e2;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Kart altındaki butonlar */

.supplier-actions {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-chip {
  border-radius: 999px;
  font-size: 12px;
  padding: 5px 10px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.18);
  color: #fef2f2;
  backdrop-filter: blur(6px);
}

.btn-chip span.icon {
  font-size: 13px;
}

/* Farklı chip renkleri */

.btn-call {
  background: rgba(15, 23, 42, 0.38);
}

.btn-whatsapp {
  background: #22c55e;
  color: #022c22;
}

.btn-email {
  background: rgba(15, 23, 42, 0.32);
}

.btn-web {
  background: rgba(15, 23, 42, 0.24);
}

/* FOOTER */

.footer {
  max-width: 1200px;
  margin: 4px auto 0;
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .hero-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-image img {
    max-height: 200px;
  }

  .main-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel {
    padding: 16px 14px 18px;
  }
}

@media (max-width: 600px) {
  .app {
    padding: 14px 10px 22px;
  }

  .topbar {
    padding-inline: 14px;
  }

  .hero-card {
    padding: 14px 14px 18px;
  }

  .results-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
