﻿* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: #f5f1e7;
  color: #202024;
  font-family: "Manrope", sans-serif;
}

.ust-menu {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: #0b0b0c;
  color: #fff;
  border-bottom: 1px solid #333;
}

.marka {
  display: flex;
  align-items: center;
  gap: 10px;
}

.marka-isaret {
  width: 32px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 3px 16px 16px 3px;
  background: #c5a059;
  font-weight: 800;
}

.menu-linkleri {
  display: flex;
  gap: 24px;
}

.menu-linkleri a {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
}

.teklif-buton {
  padding: 10px 20px;
  border: 2px solid #c5a059;
  background: transparent;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.urun-sayfa {
  padding: 24px;
}

.urun-detay {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  height: calc(100vh - 150px);
}

.medya-bolumu {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100%;
}

.ucboyut-alani {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #171717;
  border: 1px solid #333;
  border-radius: 8px;
}

.yukleme-katmani {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.7);
  z-index: 10;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

.yukleme-katmani.gizli {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.yukleme-karti {
  text-align: center;
  color: #fff;
}

.yukleme-halka {
  width: 50px;
  height: 50px;
  border: 3px solid #c5a059;
  border-top-color: transparent;
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 1s linear infinite;
}

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

.sahne-etiketi {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255,255,255,0.95);
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  z-index: 5;
}

.sahne-etiketi strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}

#ucboyutKanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.sahne-araclari {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 5;
}

.ikon-buton {
  width: 40px;
  height: 40px;
  border: 1px solid #555;
  background: rgba(50,50,50,0.8);
  color: #c5a059;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.ikon-buton:hover {
  background: rgba(50,50,50,1);
  border-color: #c5a059;
}

.urun-panel {
  overflow-y: auto;
  max-height: 100vh;
  padding: 16px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding-right: 8px;
}

.urun-panel h2 {
  margin: 0 0 16px;
  font-size: 1.2rem;
  font-weight: 700;
}

.kontrol-grubu {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.kontrol-grubu h3 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kontrol-grubu label {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
  gap: 6px;
}

.kontrol-grubu span {
  font-size: 0.85rem;
  color: #666;
}

.kontrol-grubu select,
.kontrol-grubu input[type="color"] {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.85rem;
  background: #f9f9f9;
}

.kontrol-grubu select:focus {
  outline: none;
  border-color: #c5a059;
}

.checkbox {
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 8px;
}

.checkbox input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #c5a059;
}

.parca-etiket {
  display: block;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 6px;
}

.renk-secici {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.renk-ornek {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #bbb;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15), 0 1px 3px rgba(0,0,0,0.25);
}

.renk-ornek:hover {
  transform: scale(1.12);
  border-color: #c5a059;
}

.renk-ornek.aktif {
  border-color: #c5a059;
  box-shadow: 0 0 0 3px rgba(197,160,89,0.45), inset 0 0 0 1px rgba(255,255,255,0.15);
}

.malzeme-secici {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.malzeme-ornek {
  padding: 8px 14px;
  border: 1px solid #ccc;
  border-radius: 20px;
  background: #f9f9f9;
  color: #333;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.malzeme-ornek:hover {
  border-color: #c5a059;
  color: #c5a059;
}

.malzeme-ornek.aktif {
  background: #c5a059;
  border-color: #c5a059;
  color: #fff;
  font-weight: 700;
}

.urun-galeri {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.urun-galeri h3 {
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
}

.galeri-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.galeri-kart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border: 2px solid #eee;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: all 0.25s ease;
}

.galeri-kart:hover {
  border-color: #c5a059;
  transform: translateY(-2px);
}

.galeri-kart.aktif {
  border-color: #c5a059;
  box-shadow: 0 0 0 2px rgba(197,160,89,0.3);
}

.galeri-onizleme {
  position: relative;
  width: 100%;
  height: 70px;
  border-radius: 4px;
  display: block;
  border: 1px solid rgba(0,0,0,0.15);
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0.10) 0px,
    rgba(255,255,255,0.10) 2px,
    rgba(0,0,0,0.06) 2px,
    rgba(0,0,0,0.06) 5px
  );
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}

.galeri-onizleme::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 14px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #d4af37, #f0d886, #d4af37);
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.galeri-etiket {
  font-size: 0.75rem;
  color: #555;
  text-align: center;
}

@media (max-width: 1024px) {
  .urun-detay {
    grid-template-columns: 1fr;
    height: auto;
  }

  .medya-bolumu {
    position: static;
    min-height: 500px;
  }

  .urun-panel {
    max-height: 600px;
  }
}

/* ═══ MODEL SEÇİCİ ═══════════════════════════════════════════ */
.model-secici-bolumu {
  margin-bottom: 20px;
}

.model-kart-kutusu {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #c5a059 #f0f0f0;
}

.model-kart-kutusu::-webkit-scrollbar {
  width: 6px;
}

.model-kart-kutusu::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}

.model-kart-kutusu::-webkit-scrollbar-thumb {
  background: #c5a059;
  border-radius: 3px;
}

.model-kart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.model-kart:hover {
  border-color: #c5a059;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(197,160,89,0.2);
}

.model-kart.aktif {
  border-color: #c5a059;
  background: #fdf8ed;
  box-shadow: 0 0 0 2px rgba(197,160,89,0.3);
}

.model-kart-renk {
  width: 100%;
  height: 36px;
  border-radius: 4px;
  display: block;
  border: 1px solid rgba(0,0,0,0.1);
}

.model-kart-ad {
  font-size: 0.72rem;
  font-weight: 700;
  color: #333;
  line-height: 1.2;
}

.model-kart-aciklama {
  font-size: 0.62rem;
  color: #888;
  line-height: 1.2;
}

/* Sahne / Render Ayar Paneli */
.sahne-ayar-paneli {
  background: #fbfaf7;
  border: 1px solid #e7dcc8;
  border-radius: 8px;
  padding: 12px;
}

.ayar-butonlari {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ayar-range {
  width: 100%;
  accent-color: #c5a059;
  margin: 4px 0 12px;
}

/* ═══ DOKU KAPLAMA SEÇİCİ ═══ */
.doku-secici {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.doku-ornek {
  width: 52px;
  height: 52px;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  padding: 2px;
  background: #f0ede5;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.doku-ornek:hover {
  border-color: #c5a059;
  transform: scale(1.08);
}

.doku-ornek.aktif {
  border-color: #c5a059;
  box-shadow: 0 0 0 2px rgba(197,160,89,0.3);
}

.doku-onizleme {
  width: 44px;
  height: 34px;
  object-fit: cover;
  border-radius: 3px;
}

.doku-yok-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 34px;
  background: #e8e4dc;
  color: #999;
  font-size: 16px;
  border-radius: 3px;
}

.doku-ad {
  font-size: 8px;
  color: #666;
  margin-top: 1px;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 48px;
}

/* ═══ DOKU AYAR GRUBU ═══ */
.doku-ayar-grubu {
  margin-top: 4px;
  padding: 6px 8px;
  background: #f0ede5;
  border-radius: 6px;
  border: 1px solid #e0dbd0;
}

.doku-ayar-grubu .parca-etiket.mini {
  font-size: 10px;
  color: #777;
  margin-bottom: 0;
  margin-top: 4px;
}

.doku-ayar-grubu .ayar-range {
  margin-bottom: 2px;
}

/* ═══ DOKU AYAR SATIRI ═══ */
.doku-ayar-satir {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.doku-ayar-satir .parca-etiket.mini {
  min-width: 90px;
  flex-shrink: 0;
}

.doku-ayar-satir .ayar-range {
  flex: 1;
  margin-bottom: 0;
}

/* ═══ SAYISAL GİRİŞ ALANI ═══ */
.doku-sayisal-giris {
  width: 56px;
  padding: 3px 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 11px;
  text-align: center;
  background: #fff;
  color: #333;
  font-family: "Manrope", sans-serif;
  -moz-appearance: textfield;
  appearance: textfield;
}

.doku-sayisal-giris::-webkit-inner-spin-button,
.doku-sayisal-giris::-webkit-outer-spin-button {
  opacity: 1;
  height: 24px;
}

.doku-sayisal-giris:focus {
  border-color: #c5a059;
  outline: none;
  box-shadow: 0 0 0 2px rgba(197,160,89,0.2);
}

/* ═══ HDR SEÇİCİ ═══ */
.hdr-secici {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.hdr-ornek {
  width: 60px;
  height: 48px;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  padding: 2px;
  background: #f0ede5;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hdr-ornek:hover {
  border-color: #c5a059;
}

.hdr-ornek.aktif {
  border-color: #c5a059;
  box-shadow: 0 0 0 2px rgba(197,160,89,0.3);
}

.hdr-onizleme {
  width: 54px;
  height: 30px;
  border-radius: 3px;
}

.hdr-ad {
  font-size: 8px;
  color: #666;
  margin-top: 1px;
  text-align: center;
  line-height: 1;
}

.hdr-yukle-etiket {
  display: block;
  margin: 4px 0 8px;
  padding: 6px 10px;
  background: #f0ede5;
  border: 1px dashed #c5a059;
  border-radius: 6px;
  font-size: 11px;
  color: #8a7050;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.hdr-yukle-etiket:hover {
  background: #e8e0d0;
  border-color: #a08040;
}

/* ═══ ZEMİN RENK GRUBU ═══ */
.zemin-renk-grubu {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.zemin-renk-piksel {
  width: 36px;
  height: 28px;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  background: none;
}

.zemin-renk-piksel::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.zemin-renk-piksel::-webkit-color-swatch {
  border: none;
  border-radius: 2px;
}

.zemin-renk-deger {
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  color: #666;
}

/* ═══ KATLANABİLİR BÖLÜM BAŞLIK BUTONU ═══ */
.bolum-baslik {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 0;
  margin: 0 0 8px;
  border: none;
  background: transparent;
  color: #333;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: "Manrope", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  text-align: left;
  transition: color 0.2s ease;
}

.bolum-baslik:hover {
  color: #c5a059;
}

.bolum-baslik:focus-visible {
  outline: 2px solid #c5a059;
  outline-offset: 2px;
  border-radius: 3px;
}

/* Açık/kapalı ok işareti */
.bolum-baslik::after {
  content: "▾";
  font-size: 0.7rem;
  color: #999;
  transition: transform 0.25s ease;
  flex-shrink: 0;
  margin-left: 8px;
}

.kontrol-grubu.kapali .bolum-baslik::after,
.urun-galeri.kapali .bolum-baslik::after {
  transform: rotate(-90deg);
}

/* Katlanmış grupta h3/header dışındaki tüm çocukları gizle */
.kontrol-grubu.kapali > *:not(.bolum-baslik),
.urun-galeri.kapali > *:not(.bolum-baslik) {
  display: none !important;
}

/* ═══ MODEL RENK/KAPLAMA TOGGLE ═══ */
.model-toggle-bolumu {
  background: #fbfaf7;
  border: 1px solid #e7dcc8;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.toggle-checkbox {
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 6px;
}

.toggle-checkbox input {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #c5a059;
}

.toggle-checkbox span strong {
  font-size: 0.9rem;
  color: #333;
}

.toggle-yardimci-metin {
  margin: 0;
  font-size: 0.72rem;
  color: #999;
  line-height: 1.3;
  padding-left: 30px;
}

/* ═══ PASİF MODEL AYAR GRUPLARI ═══ */
.model-ayarlari-pasif {
  opacity: 0.55;
  filter: grayscale(30%);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.model-ayarlari-pasif:hover {
  opacity: 0.7;
}

/* Pasif durumda etkileşimli kontroller için görsel ipucu */
.model-ayarlari-pasif button:disabled,
.model-ayarlari-pasif select:disabled,
.model-ayarlari-pasif input:disabled,
.model-ayarlari-pasif .renk-ornek,
.model-ayarlari-pasif .malzeme-ornek,
.model-ayarlari-pasif .doku-ornek,
.model-ayarlari-pasif .galeri-kart {
  cursor: not-allowed;
}

/* h3 içermeyen gruplar (GLB yükleme gibi) için katlanabilir yapma */
.kontrol-grubu:not(.kapali) > .bolum-baslik + * {
  display: unset;
}

/* ═══ SEÇİLEN PARÇA BİLGİSİ ═══ */
.secilen-parca-bilgisi {
  margin: 8px 0 0 30px;
  font-size: 0.8rem;
  color: #555;
  line-height: 1.4;
  min-height: 1.2em;
  transition: color 0.3s ease;
}

.secilen-parca-bilgisi.vurgulu {
  color: #c5a059;
  font-weight: 600;
}