/* Crea Photo Studio — Sanal Try-On (v0.3)
   3 tema: Aydınlık, Karanlık (default), Ultra Karanlık */
/* Renk paletleri WCAG AA kontrast hedefleyerek seçildi:
   - dark/darker: text üzerinde 4.5:1+, muted üzerinde 3:1+ (büyük metin)
   - light: text üzerinde 7:1+, muted 4.5:1+
   muted-2 sadece çok ufak/yardımcı metinler için, kritik bilgi için kullanılmaz. */
:root,
[data-theme="dark"] {
  --bg: #0e0e10;
  --surface: #18181b;
  --surface-2: #232329;     /* önceki #1f1f23'ten biraz daha açık → daha iyi separation */
  --surface-3: #2c2c33;
  --border: #353540;        /* önceki #2a2a30'dan daha belirgin */
  --border-strong: #4a4a55;
  --text: #f5f5f7;
  --muted: #b8b8c0;         /* önceki #9b9ba3'ten daha açık → 7:1 kontrast */
  --muted-2: #8e8e98;       /* önceki #6c6c75'ten daha açık → 4.5:1 kontrast */
  --primary: #f59e0b;       /* daha açık turuncu (önceki #d97706 dark'ta zayıftı) */
  --primary-2: #fbbf24;
  --accent: #f472b6;        /* önceki #ec4899'dan daha açık */
  --success: #34d399;
  --info: #60a5fa;
  --warning: #fbbf24;
  --danger: #f87171;
  --shadow: 0 4px 16px rgba(0,0,0,0.4);
}

[data-theme="darker"] {
  --bg: #000000;
  --surface: #0d0d10;
  --surface-2: #16161c;
  --surface-3: #20202a;
  --border: #2c2c38;        /* önceki #1e1e24'ten daha belirgin */
  --border-strong: #44444f;
  --text: #f5f5f7;
  --muted: #b0b0bc;         /* önceki #8a8a92'den daha açık */
  --muted-2: #82828d;       /* önceki #5a5a62'den daha açık */
  --primary: #f59e0b;
  --primary-2: #fbbf24;
  --accent: #f472b6;
  --success: #34d399;
  --info: #60a5fa;
  --warning: #fbbf24;
  --danger: #f87171;
  --shadow: 0 4px 20px rgba(0,0,0,0.7);
}

[data-theme="light"] {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #f1f1f3;
  --surface-3: #e4e4e8;
  --border: #c8c8d0;        /* önceki #d4d4d8'den daha belirgin */
  --border-strong: #9090a0;
  --text: #18181b;
  --muted: #52525b;         /* önceki #71717a'dan daha koyu → 7:1 kontrast */
  --muted-2: #71717a;       /* önceki #a1a1aa'dan daha koyu → 4.5:1 kontrast */
  --primary: #c2410c;
  --primary-2: #ea580c;
  --accent: #be185d;
  --success: #059669;
  --info: #2563eb;
  --warning: #ca8a04;
  --danger: #dc2626;
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

.hidden { display: none !important; }

/* TOPBAR */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-wordmark {
  height: 36px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

/* Karanlık temalarda beyaz, aydınlık temada siyah wordmark göster */
.brand-wordmark-light { display: none; }
[data-theme="light"] .brand-wordmark-dark { display: none; }
[data-theme="light"] .brand-wordmark-light { display: block; }

.brand-text {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  padding-left: 14px;
}

.brand h1 { font-size: 16px; font-weight: 600; letter-spacing: 0.2px; }
.brand .tag { color: var(--muted); font-size: 12px; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* MODE SWITCH (Tekli / Batch) */
.mode-switch {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}

.mode-btn {
  padding: 6px 14px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
}

.mode-btn:hover { color: var(--text); }

.mode-btn.active {
  background: var(--primary);
  color: #fff;
}

/* THEME SWITCH (Aydınlık / Karanlık / Ultra) */
.theme-switch {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 1px;
}
.theme-btn {
  width: 32px;
  height: 28px;
  background: transparent;
  border: none;
  color: var(--muted);
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px;
  display: grid;
  place-items: center;
  transition: all 0.15s;
  line-height: 1;
}
.theme-btn:hover { color: var(--text); }
.theme-btn.active {
  background: var(--primary);
  color: #fff;
}

.status {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

/* LAYOUT */
.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-wide { grid-column: 1 / -1; }

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-num {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}

.card-head h2 { font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.card-head .step-sub { color: var(--muted); font-size: 12px; }

/* DROPZONE */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--surface-2);
}

.dropzone:hover, .dropzone.drag {
  border-color: var(--primary);
  background: rgba(217, 119, 6, 0.05);
}

.dropzone-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin: 0 auto 12px;
  display: grid; place-items: center;
  font-size: 24px;
  color: var(--muted);
}

.dropzone p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.link { color: var(--primary-2); text-decoration: underline; }
.muted { color: var(--muted); font-size: 11px; }

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}

.thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
}

.thumb img { width: 100%; height: 100%; object-fit: cover; }

.thumb-remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.75);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.thumb-remove:hover { background: var(--danger); }

/* FILTER BAR v2 (chip + foto preview) */
.filter-bar-v2 {
  background: var(--surface-2);
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 8px;
  align-items: center;
}

.filter-row-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.filter-chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.filter-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px 8px 3px 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  transition: all 0.15s;
}

.filter-chip:hover {
  border-color: var(--primary);
  color: var(--text);
}

.filter-chip.active {
  border-color: var(--primary);
  background: rgba(217, 119, 6, 0.18);
  color: var(--primary-2);
}

.filter-chip-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.filter-reset-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  align-self: flex-start;
  transition: all 0.15s;
}

.filter-reset-btn:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.empty-state {
  text-align: center;
  padding: 24px 12px;
  color: var(--muted);
  font-size: 12px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 10px;
}

/* MANNEQUIN TABS (Hazır / Özel) */
.mannequin-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.mannequin-tab {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.mannequin-tab:hover { color: var(--text); }
.mannequin-tab.active {
  background: var(--primary);
  color: #fff;
}
.mannequin-tab-content { display: block; }
.mannequin-tab-content.hidden { display: none; }

.custom-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(217, 119, 6, 0.08);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.btn-secondary-style {
  background: linear-gradient(135deg, #4527a0, #1e3a8a) !important;
  margin-top: 4px;
}
.custom-grid-title {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-top: 8px;
}

/* MODEL GRID */
.model-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
  padding: 2px;
}

.model-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  color: var(--text);
}

.model-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.model-card.selected {
  border-color: var(--primary);
  background: rgba(217, 119, 6, 0.12);
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.3);
}

.model-card.batch-selected {
  border-color: var(--accent);
  background: rgba(236, 72, 153, 0.12);
}

.model-img {
  aspect-ratio: 3/4;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.model-img img,
.theme-preview img,
.camera-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.camera-preview {
  aspect-ratio: 3/4;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  margin-bottom: 4px;
}

.model-card.selected .model-img::after,
.model-card.batch-selected .model-img::after {
  content: '✓';
  position: absolute;
  top: 4px; right: 4px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid; place-items: center;
  font-size: 11px;
  font-weight: 700;
}

.model-card.batch-selected .model-img::after { background: var(--accent); }

.model-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 2px 4px;
}

.model-meta strong { font-size: 11px; }
.model-meta span { font-size: 9px; color: var(--muted); }

/* THEME TABS + GRID */
.theme-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 8px;
}

.theme-tab {
  flex: 1;
  padding: 6px 10px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.theme-tab:hover { color: var(--text); }
.theme-tab.active {
  background: var(--primary);
  color: #fff;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.theme-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text);
}

.theme-card:hover { border-color: var(--primary); }
.theme-card.selected {
  border-color: var(--primary);
  background: rgba(217, 119, 6, 0.12);
}

.theme-card.batch-selected {
  border-color: var(--accent);
  background: rgba(236, 72, 153, 0.12);
}

.theme-preview {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.theme-card strong { font-size: 13px; padding: 0 4px; line-height: 1.3; }
.theme-card span { font-size: 11px; color: var(--muted); padding: 0 4px; line-height: 1.3; }

/* CAMERA GRID */
.camera-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.camera-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  color: var(--text);
}

.camera-card:hover { border-color: var(--primary); }
.camera-card.selected {
  border-color: var(--primary);
  background: rgba(217, 119, 6, 0.12);
}

.camera-card.batch-selected {
  border-color: var(--accent);
  background: rgba(236, 72, 153, 0.12);
}

.camera-icon {
  font-size: 20px;
  color: var(--primary-2);
  line-height: 1;
}

.camera-card.selected .camera-icon { color: var(--primary); }
.camera-card.batch-selected .camera-icon { color: var(--accent); }

.camera-name { font-size: 12px; font-weight: 600; }
.camera-vibe { font-size: 10px; color: var(--muted); line-height: 1.3; }

/* AI PROVIDER */
.provider-select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

.provider-select:hover { border-color: var(--border-strong); }
.provider-select:focus { outline: none; border-color: var(--primary); }

.provider-info {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 8px;
  padding: 10px;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-top: 8px;
  font-size: 11px;
}

.info-tag {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  white-space: nowrap;
}

.info-tag strong { color: var(--text); }

.info-quality strong { color: var(--success); }
.info-speed strong { color: var(--info); }

.info-notes {
  color: var(--muted);
  font-size: 11px;
  align-self: center;
  line-height: 1.3;
}

/* SHAPE TABS + RESOLUTIONS */
.shape-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 8px;
}

.shape-tab {
  flex: 1;
  padding: 8px 10px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.shape-tab:hover { color: var(--text); }
.shape-tab.active {
  background: var(--primary);
  color: #fff;
}

/* Aspect ratio ikonları — gerçek oranlı CSS-render dikdörtgenler */
.ar-icon {
  display: inline-block;
  background: currentColor;
  vertical-align: -2px;
  border-radius: 1px;
  margin-right: 4px;
}
.ar-icon.ar-square   { width: 14px; height: 14px; }   /* 1:1 */
.ar-icon.ar-social   { width: 11px; height: 14px; }   /* 4:5 dikey */
.ar-icon.ar-vertical { width: 8px;  height: 14px; }   /* 9:16 daha dikey */

.resolution-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.resolution-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.resolution-item:hover { border-color: var(--primary); }
.resolution-item.selected {
  border-color: var(--primary);
  background: rgba(217, 119, 6, 0.12);
}

.res-info { display: flex; flex-direction: column; gap: 2px; }
.res-info strong { font-size: 13px; }
.res-info span { font-size: 11px; color: var(--muted); }

.res-multiplier {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--muted);
}

.resolution-item.selected .res-multiplier {
  background: var(--primary);
  color: #fff;
}

.res-multiplier.std { background: var(--success); color: #fff; }
.res-multiplier.high { background: var(--warning); color: #fff; }
.res-multiplier.ultra { background: var(--danger); color: #fff; }

/* OPT GROUPS */
.opt-group { border: none; }
.opt-group legend { font-size: 11px; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.legend-sub { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted-2); margin-left: 4px; }

/* GARMENT TYPE + COMPLEMENT */
.complement-group { margin-top: 8px; }
.garment-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.garment-type-grid label { cursor: pointer; display: block; }
.garment-type-grid input { display: none; }
.garment-type-grid input:checked + .chip {
  border-color: var(--primary);
  background: rgba(217, 119, 6, 0.15);
  color: var(--primary-2);
}
.complement-hint {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted-2);
  line-height: 1.4;
}

/* === ADIM 6: RENK VARYASYONU === */
.cv-source-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 12px;
}
.cv-source-tab {
  flex: 1;
  padding: 8px 14px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
}
.cv-source-tab:hover { color: var(--text); }
.cv-source-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.cv-source-controls,
.cv-color-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.cv-select-all {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}
.cv-select-all input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}
.cv-selected-count {
  font-size: 12px;
  color: var(--muted-2);
  background: var(--surface-2);
  padding: 4px 10px;
  border-radius: 6px;
}

.cv-source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  min-height: 80px;
}
.cv-source-grid .empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 24px;
  font-size: 13px;
}
.cv-source-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: all 0.15s;
}
.cv-source-thumb:hover { border-color: var(--primary); }
.cv-source-thumb.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.4);
}
.cv-source-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cv-source-thumb-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  display: grid;
  place-items: center;
  font-size: 14px;
  color: #fff;
  pointer-events: none;
}
.cv-source-thumb.selected .cv-source-thumb-check {
  background: var(--primary);
}

/* Color grid: 16 chip + custom */
.cv-color-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
}
.cv-color-chip {
  cursor: pointer;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
  color: var(--text);
}
.cv-color-chip:hover { border-color: var(--primary); transform: translateY(-1px); }
.cv-color-chip.selected {
  border-color: var(--primary);
  background: rgba(245, 158, 11, 0.1);
}
.cv-color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
}
.cv-color-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
}
.cv-color-chip.selected .cv-color-name { color: var(--primary-2); font-weight: 600; }

.cv-custom-colors {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.cv-custom-title {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
}
.cv-custom-inputs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.cv-custom-input {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}
.cv-custom-input:focus {
  outline: none;
  border-color: var(--primary);
}
.cv-custom-input.has-value {
  border-color: var(--primary);
  background: rgba(245, 158, 11, 0.05);
}

.cv-summary {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.cv-formula {
  font-size: 13px;
  color: var(--muted);
}

/* Collage toggle (paylaşımlı) */
.collage-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.collage-toggle:hover { border-color: var(--primary); background: var(--surface-3); }
.collage-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
  flex-shrink: 0;
}
.collage-toggle-text { font-size: 13px; color: var(--text); }
.collage-hint { color: var(--muted); font-weight: normal; font-size: 11px; }

/* Mobile responsive — Adım 6 */
@media (max-width: 720px) {
  .cv-color-grid { grid-template-columns: repeat(4, 1fr); }
  .cv-custom-inputs { grid-template-columns: 1fr; }
  .cv-source-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 420px) {
  .cv-color-grid { grid-template-columns: repeat(3, 1fr); }
  .cv-source-grid { grid-template-columns: repeat(2, 1fr); }
}

/* E-COMMERCE HAZIR SETLER */
.ecommerce-pack-group {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(244, 114, 182, 0.05));
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px;
}
.ecommerce-pack-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.ecommerce-pack-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  color: var(--text);
}
.ecommerce-pack-card:hover {
  border-color: var(--primary);
  background: var(--surface-3);
  transform: translateY(-1px);
}
.ecommerce-pack-card.selected {
  border-color: var(--primary);
  background: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}
.ecommerce-pack-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.ecommerce-pack-text { flex: 1; min-width: 0; }
.ecommerce-pack-name { font-size: 14px; font-weight: 600; color: var(--text); }
.ecommerce-pack-card.selected .ecommerce-pack-name { color: var(--primary-2); }
.ecommerce-pack-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ecommerce-pack-shots {
  font-size: 10px;
  color: var(--muted-2);
  background: var(--surface-2);
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ecommerce-pack-card.selected .ecommerce-pack-shots {
  background: var(--primary);
  color: #fff;
}
.ecommerce-pack-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.4;
}

/* Devre dışı bölümler — pack seçili iken */
.opt-group.disabled-by-pack {
  opacity: 0.4;
  pointer-events: none;
  position: relative;
}
.opt-group.disabled-by-pack::after {
  content: '⚡ Hazır set aktif';
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  color: var(--primary-2);
  background: var(--surface-2);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--primary);
}

/* POSE + FRAMING (chip grids, paylaşımlı stil) */
.pose-grid, .framing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.pose-chip, .framing-chip {
  cursor: pointer;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text);
  min-height: 64px;
}
.pose-chip:hover, .framing-chip:hover {
  border-color: var(--primary);
  background: var(--surface-3);
}
.pose-chip.selected, .framing-chip.selected {
  border-color: var(--primary);
  background: rgba(245, 158, 11, 0.15);
}
.pose-chip strong, .framing-chip strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.pose-chip.selected strong, .framing-chip.selected strong { color: var(--primary-2); }
.pose-chip span, .framing-chip span {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}
.pose-chip.selected span, .framing-chip.selected span { color: var(--text); }

/* PRESET BAR */
.preset-bar {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Top variant — yatay tek satır, header altında full-width (sadece seç + yükle + sil) */
.preset-bar-top {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  padding: 10px 24px;
  flex-wrap: wrap;
}
.preset-bar-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.preset-bar-top .preset-select {
  flex: 1 1 240px;
  max-width: 360px;
}
.preset-bar-hint {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
  white-space: nowrap;
}
.preset-bar-hint strong { color: var(--primary-2); }

/* Save bar (Adım 5'in başında — sadece kaydet) */
.preset-save-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  padding: 12px 14px;
}
.preset-save-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.preset-save-bar .preset-name-input {
  flex: 1;
}
.preset-divider {
  color: var(--border-strong);
  font-size: 16px;
  margin: 0 4px;
}

.preset-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.preset-select { flex: 1; min-width: 0; }
.preset-name-input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}
.preset-name-input:focus {
  outline: none;
  border-color: var(--primary);
}
.preset-btn {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.15s;
}
.preset-btn:hover { border-color: var(--primary); color: var(--primary-2); }
.preset-btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.preset-btn-primary:hover { background: var(--primary-2); border-color: var(--primary-2); color: #fff; }
.preset-btn-danger { color: var(--danger); }
.preset-btn-danger:hover { border-color: var(--danger); color: #fff; background: var(--danger); }
.preset-hint {
  font-size: 11px;
  color: var(--muted-2);
  line-height: 1.4;
  margin-top: 2px;
}

.opt-grid { display: grid; gap: 6px; }
.count-grid { grid-template-columns: repeat(3, 1fr); }

.opt-grid label { cursor: pointer; display: block; }
.opt-grid input { display: none; }

.chip {
  display: block;
  text-align: center;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 12px;
  color: var(--text);
  transition: all 0.15s;
}
.chip:hover { border-color: var(--primary); background: var(--surface-3); }

.opt-grid input:checked + .chip {
  border-color: var(--primary);
  background: rgba(245, 158, 11, 0.15);
  color: var(--primary-2);
  font-weight: 600;
}

/* WATERMARK INFO */
.watermark-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.info-icon {
  flex-shrink: 0;
  color: var(--info);
  font-weight: 700;
  font-size: 14px;
}

.watermark-info strong { color: var(--text); }

/* SUMMARY + COST */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
  padding: 14px;
  background: var(--surface-2);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.sum-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sum-label { font-size: 9px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.5px; font-weight: 600; }
.sum-val { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cost-box {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.1), rgba(236, 72, 153, 0.1));
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cost-formula {
  font-size: 11px;
  color: var(--muted);
  font-family: 'SF Mono', Consolas, monospace;
}

.cost-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.cost-label { font-size: 10px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.5px; }
.cost-amount {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
}

.btn-primary:hover:not(:disabled) { transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

/* PREVIEW */
.preview { margin-top: 8px; }
.preview h3 { font-size: 14px; margin-bottom: 12px; color: var(--muted); }

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.result-card {
  aspect-ratio: 3/4;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.result-loading {
  width: 100%; height: 100%;
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface) 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.result-placeholder {
  text-align: center;
  color: var(--muted);
  padding: 16px;
  font-size: 11px;
  line-height: 1.5;
}

.result-placeholder strong { color: var(--text); display: block; margin-bottom: 4px; }
.result-placeholder small { display: inline-block; margin-top: 6px; padding: 3px 8px; background: var(--surface-3); border-radius: 6px; color: var(--accent); }

/* RESULT CARD — clickable */
.result-card.has-image {
  cursor: zoom-in;
  transition: transform 0.15s, box-shadow 0.15s;
}
.result-card.has-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.result-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 30%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 8px 10px;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.result-card.has-image:hover .result-card-overlay {
  opacity: 1;
}
.result-card-overlay .quick-dl {
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(6px);
}
.result-card-overlay .quick-dl:hover {
  background: var(--primary);
  border-color: var(--primary);
}
.result-card-overlay .zoom-hint {
  color: #fff;
  font-size: 11px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  display: grid;
  place-items: center;
  z-index: 1000;
  padding: 60px 24px 100px;
  cursor: zoom-out;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.18s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-img {
  max-width: min(90vw, 1400px);
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  cursor: default;
  user-select: none;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 26px;
  font-weight: 300;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.lightbox-actions {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: default;
}

.lightbox-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lightbox-prev,
.lightbox-next {
  width: 44px;
  height: 44px;
  font-size: 22px;
  padding: 0;
  display: grid;
  place-items: center;
}

.lightbox-prev:hover:not(:disabled),
.lightbox-next:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.lightbox-prev:disabled,
.lightbox-next:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.lightbox-download {
  padding: 11px 22px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.3);
}

.lightbox-download:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 10px 26px rgba(217, 119, 6, 0.45);
}

.lightbox-download .dl-icon {
  font-size: 16px;
}

.lightbox-info {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  cursor: default;
  backdrop-filter: blur(8px);
}

/* FOOTER */
.footnote {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}
.footer-logo {
  max-width: 180px;
  max-height: 40px;
  object-fit: contain;
  opacity: 0.7;
}
.footer-logo-light { display: none; }
[data-theme="light"] .footer-logo-dark { display: none; }
[data-theme="light"] .footer-logo-light { display: block; }
.footer-text {
  text-align: center;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: repeat(4, 1fr); }
  .theme-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 820px) {
  /* Tablet ve küçük desktop */
  .pose-grid, .framing-grid { grid-template-columns: repeat(3, 1fr); }
  .preset-bar-hint { display: none; }   /* dar ekranda hint metni gizle */
}

@media (max-width: 720px) {
  /* Mobil: layout 1 kolon, font'lar ufalt, chip'ler 2 kolon */
  .layout { padding: 12px; gap: 12px; }
  .card { padding: 16px; gap: 12px; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }

  /* Topbar: brand + diğerleri alt alta, brand-text gizle (logo yeterli) */
  .topbar {
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .brand-text { display: none; }
  .brand-wordmark { height: 28px; }
  .topbar-right {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Preset bar: yatay → tek satır wrap, hint zaten gizli */
  .preset-bar-top {
    padding: 10px 14px;
    gap: 6px;
  }
  .preset-bar-top .preset-select {
    flex: 1 1 100%;
    max-width: none;
  }
  .preset-save-bar {
    flex-wrap: wrap;
    padding: 10px;
  }
  .preset-save-bar .preset-name-input {
    flex: 1 1 100%;
  }

  /* Filter, model, theme, camera, pose, framing, garment hep 2 kolon */
  .filter-bar { grid-template-columns: 1fr 1fr; gap: 6px; }
  .model-grid { grid-template-columns: repeat(2, 1fr); }
  .theme-grid { grid-template-columns: repeat(2, 1fr); }
  .camera-grid { grid-template-columns: repeat(2, 1fr); }
  .pose-grid, .framing-grid { grid-template-columns: repeat(2, 1fr); }
  .garment-type-grid { grid-template-columns: 1fr; }   /* tek kolon, tüm metin sığar */

  /* Cost ve count daha kompakt */
  .cost-box { flex-direction: column; align-items: flex-start; gap: 8px; }
  .cost-total { align-items: flex-start; }
  .count-grid { grid-template-columns: repeat(3, 1fr); }

  /* Step header daha küçük */
  .card-head h2 { font-size: 16px; }
  .step-sub { font-size: 12px; }

  /* Aspect ratio shape tab'ları kompakt */
  .shape-tabs { gap: 4px; }
  .shape-tab { padding: 6px 8px; font-size: 12px; }
}

@media (max-width: 420px) {
  /* Çok küçük telefon */
  .pose-grid, .framing-grid, .garment-type-grid { grid-template-columns: 1fr; }
  .model-grid, .theme-grid, .camera-grid { grid-template-columns: 1fr; }
}
