/* ============================================================
   Real Led — Altıgen Petek LED Konfigüratörü
   Token sistemi
   ============================================================ */
:root {
  --ink: #131316;
  --anthracite: #2b2e33;
  --anthracite-2: #1c1e22;
  --gray-050: #fafafa;
  --gray-100: #f4f4f6;
  --gray-200: #eceded;
  --gray-300: #dcdde0;
  --gray-400: #b8b9be;
  --gray-500: #8b8d94;
  --white: #ffffff;
  --accent: #e3a83f;
  --accent-soft: #f4d9a4;
  --stage-bg: #0c0c0e;
  --stage-line: rgba(255, 255, 255, 0.16);
  --stage-line-hover: rgba(255, 255, 255, 0.38);
  --stage-fill-hover: rgba(255, 255, 255, 0.06);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --shadow-card: 0 1px 2px rgba(19, 19, 22, 0.04), 0 8px 24px -12px rgba(19, 19, 22, 0.10);
  --font-display: -apple-system, "SF Pro Display", "Segoe UI Semibold", "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, "SF Pro Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* iframe içine gömüldüğünde yatay scrollbar oluşmasın */
html, body { overflow-x: hidden; max-width: 100%; }

body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* ---------- Page / intro ---------- */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 28px 64px;
}

.intro { max-width: 640px; margin-bottom: 36px; }

/* Gerçek logo (assets/logo/logo.png) eklendiğinde otomatik görünür;
   dosya yoksa veya yüklenemezse sessizce gizli kalır ve "Kendin Tasarla"
   başlığı tek başına marka anlatımını üstlenir. */
.intro__logo {
  display: block;
  height: 34px;
  width: auto;
  margin-bottom: 18px;
  opacity: 0;
  visibility: hidden;
}
.intro__logo.is-visible {
  opacity: 1;
  visibility: visible;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}
.intro h1 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 46px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.intro__lead {
  margin: 0 0 6px;
  font-size: 17px;
  color: var(--anthracite);
}
.intro__sub {
  margin: 0;
  font-size: 14.5px;
  color: var(--gray-500);
}

/* ---------- Shell layout ---------- */
.app-shell {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

/* ---------- Stage (design area) — koyu, premium çalışma alanı ---------- */
.stage {
  flex: 1 1 auto;
  min-width: 0;
  background: var(--stage-bg);
  border: 1px solid var(--stage-bg);
  border-radius: var(--radius-lg);
  padding: 20px 20px 24px;
}

.stage__hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}
.stage__hint svg { flex: none; color: rgba(255, 255, 255, 0.5); }

.stage__canvas {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--stage-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px;
  overflow: hidden;
}
.stage__canvas svg { width: 100%; height: auto; display: block; }

/* hexagon cells — seçilmemiş: sönük/arka planda, seçili: parlayan beyaz LED hat */
.hex {
  fill: rgba(255, 255, 255, 0.02);
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1.1;
  cursor: pointer;
  transition: fill 0.16s ease, stroke 0.16s ease, stroke-width 0.16s ease, filter 0.16s ease;
}
.hex:hover {
  stroke: rgba(255, 255, 255, 0.28);
  fill: rgba(255, 255, 255, 0.045);
}
.hex.is-active {
  fill: rgba(255, 255, 255, 0.03);
  stroke: #ffffff;
  stroke-width: 2.1;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.85)) drop-shadow(0 0 7px rgba(255, 255, 255, 0.35));
}
.hex.is-active:hover {
  stroke: #ffffff;
  fill: rgba(255, 255, 255, 0.06);
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 9px rgba(255, 255, 255, 0.45));
}
/* İç ikinci hat istenmiyor: seam elemanı DOM'da kalır (app.js değişmedi) ama görünmez */
.hex-seam {
  fill: none;
  stroke: #ffffff;
  stroke-width: 0.9;
  opacity: 0;
  pointer-events: none;
}
.hex-seam.is-active {
  opacity: 0;
}

.stage__actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

/* Koyu zemin üzerinde buton kontrastı */
.stage .btn--ghost {
  background: var(--white);
  color: var(--ink);
}
.stage .btn--ghost:hover { background: var(--gray-200); }
.stage .btn--outline {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.32);
}
.stage .btn--outline:hover {
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }
.btn--ghost {
  background: var(--ink);
  color: var(--white);
}
.btn--ghost:hover { background: var(--anthracite-2); }
.btn--outline {
  background: transparent;
  color: var(--anthracite);
  border-color: var(--gray-300);
}
.btn--outline:hover { border-color: var(--gray-500); background: var(--gray-100); }
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Panel (stats) ---------- */
.panel {
  flex: 0 0 300px;
  position: sticky;
  top: 24px;
}
.panel__inner {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 26px 24px;
}

.stat { margin-bottom: 22px; }
.stat:last-of-type { margin-bottom: 0; }
.stat--sm { margin-bottom: 0; }

.stat__label {
  margin: 0 0 6px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-500);
}
.stat__value {
  margin: 0;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat__value--sm { font-size: 24px; }
.stat__value--price { color: var(--ink); font-size: 34px; }
.stat__unit {
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-500);
  margin-left: 4px;
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 22px;
  padding: 16px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
}

.panel__divider {
  height: 1px;
  background: var(--gray-200);
  margin: 22px 0;
}

.price-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.price-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--anthracite);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 5px 11px;
}

/* ---------- Panel CTA (Sepete Ekle / PDF Oluştur) ---------- */
.panel__cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}
.btn--block {
  width: 100%;
  justify-content: center;
}
.btn--primary {
  background: var(--ink);
  color: var(--white);
  padding: 13px 18px;
  font-size: 14.5px;
}
.btn--primary:hover { background: var(--anthracite-2); }
.btn--secondary {
  background: transparent;
  color: var(--anthracite);
  border: 1px solid var(--gray-300);
}
.btn--secondary:hover { border-color: var(--gray-500); background: var(--gray-100); }

.btn--whatsapp {
  background: var(--white);
  color: var(--anthracite);
  border: 1px solid var(--gray-300);
}
.btn--whatsapp:hover {
  border-color: var(--gray-500);
  background: var(--gray-100);
}
.btn__icon { flex: none; }
.btn__icon--whatsapp { color: #25D366; }

.panel__toast {
  margin: 12px 0 0;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--anthracite);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
}
.panel__toast--error {
  color: #9a2f27;
  background: #fdecea;
  border-color: #f3c4be;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .app-shell {
    flex-direction: column;
  }
  .panel {
    flex: 1 1 auto;
    width: 100%;
    position: static;
  }
  .page { padding: 32px 16px 48px; }
  .topbar__inner { padding: 16px 16px; }
  .stat__value { font-size: 34px; }
}

@media (max-width: 480px) {
  .stat-row { grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; }
  .stage { padding: 14px 12px 18px; }
  .stage__actions { flex-direction: column; }
  .btn { justify-content: center; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
