/* ==========================================================================
   Grey Enerji — ÜRÜN LABORATUVARI

   Üç bölge: solda ürün seçici, ortada 3B sahne, sağda parça bilgisi.
   Sahne sayfanın yıldızı; iki yan sütun dar ve sakin. Sitenin jetonları
   kullanılıyor — yeni renk, yeni kart dili, cam efekti yok.
   ========================================================================== */

/* --- giriş ------------------------------------------------------------- */
/* Giriş kısa tutuldu: sahne ve araç çubuğu ilk ekranda tamamen görünmeli. */
.plab-bas {
  padding-top: clamp(92px, 11vh, 128px);
  padding-bottom: clamp(16px, 2.2vh, 26px);
}
.plab-bas__ust { color: var(--steel-2); margin-bottom: 12px; }
.plab-bas__baslik {
  font-size: clamp(1.9rem, 3.3vw, 3.2rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--white);
  max-width: 26ch;
}
.plab-bas__alt {
  margin-top: clamp(10px, 1.4vw, 16px);
  color: var(--chalk);
  font-size: clamp(0.95rem, 1.1vw, 1.08rem);
  max-width: 52ch;
}

/* --- kafes ------------------------------------------------------------- */
.plab {
  position: relative;
  border-block: 1px solid var(--hair);
  background: var(--void);
}
.plab__kafes {
  display: grid;
  grid-template-columns: minmax(196px, 17%) minmax(0, 1fr) minmax(250px, 21%);
  height: clamp(470px, calc(89svh - 150px), 880px);
}

/* --- ürün seçici ------------------------------------------------------- */
.plab__ray {
  border-right: 1px solid var(--hair);
  padding: clamp(18px, 2.4vh, 28px) clamp(14px, 1.4vw, 22px);
  overflow-y: auto;
}
.plab__ray-ust { color: var(--steel-2); margin-bottom: 12px; }
.plab__liste { list-style: none; margin: 0; padding: 0; display: grid; }
.plab__urun {
  position: relative;
  display: grid;
  grid-template-columns: 2.4ch minmax(0, 1fr);
  column-gap: 10px;
  width: 100%;
  padding: 11px 0 11px 10px;
  border: 0;
  border-bottom: 1px solid var(--hair);
  background: none;
  text-align: left;
  color: var(--steel-2);
  cursor: pointer;
  transition: color 0.25s var(--ease);
}
.plab__urun::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 2px; height: 0;
  background: var(--live-bright);
  transform: translateY(-50%);
  transition: height 0.35s var(--ease-snap);
}
.plab__urun i {
  grid-row: 1 / span 2;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  padding-top: 2px;
}
.plab__urun b { font-weight: 600; font-size: 0.92rem; line-height: 1.25; letter-spacing: -0.01em; }
.plab__urun span {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-2);
  margin-top: 3px;
}
.plab__urun:hover { color: var(--chalk); }
.plab__urun[aria-pressed='true'] { color: var(--white); }
.plab__urun[aria-pressed='true']::before { height: 64%; }
.plab__urun[aria-pressed='true'] i { color: var(--live-bright); }
.plab__urun--koruma[aria-pressed='true']::before { background: var(--earth); }
.plab__urun:focus-visible { outline: 2px solid var(--live-bright); outline-offset: -2px; }

/* --- sahne ------------------------------------------------------------- */
.plab__sahne {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  /* Çok hafif teknik zemin: ızgara ve merkezde ışık havuzu. CAD ızgarası değil. */
  background:
    radial-gradient(58% 52% at 50% 46%, rgba(31, 127, 212, 0.11), transparent 72%),
    repeating-linear-gradient(to right, rgba(140, 170, 190, 0.045) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(to bottom, rgba(140, 170, 190, 0.045) 0 1px, transparent 1px 72px),
    var(--void);
}
.plab__sahne::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 100% at 50% 45%, transparent 55%, rgba(4, 18, 29, 0.75) 100%);
  z-index: 1;
}
.plab__tuval {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
  outline: none;
  transition: opacity 0.2s var(--ease), transform 0.3s var(--ease);
  z-index: 2;
}
.plab__tuval:active { cursor: grabbing; }
.plab[data-hover-var='true'] .plab__tuval { cursor: pointer; }
.plab[data-gecis='true'] .plab__tuval { opacity: 0; transform: scale(0.985); }

.plab__kod {
  position: absolute;
  top: 18px;
  left: 20px;
  z-index: 3;
  margin: 0;
  display: flex;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-2);
}
.plab__kod span { color: var(--live-bright); }
.plab__kod b { font-weight: 400; color: var(--chalk-2); }

/* Yükleme: sade, teknik; spinner değil. */
.plab__yuk {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
.plab[data-yukleniyor='true'] .plab__yuk { opacity: 1; }
.plab__yuk b {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
}
.plab__yuk span { font-size: 0.8125rem; color: var(--steel-2); }
.plab__yuk-bar {
  display: block;
  width: 120px;
  height: 2px;
  margin-top: 8px;
  background: var(--hair-2);
  overflow: hidden;
  position: relative;
}
.plab__yuk-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent, var(--live-bright), transparent);
  transform: translateX(-100%);
  animation: plab-tara 1.1s linear infinite;
}
@keyframes plab-tara { to { transform: translateX(100%); } }

.plab__hata {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  text-align: center;
  color: var(--chalk);
}
.plab__hata[hidden] { display: none; }

/* Fare altındaki parçanın adı — tek etiket, ekranda kalıcı işaret yok. */
.plab__hover {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  padding: 5px 9px;
  background: rgba(3, 14, 23, 0.86);
  border: 1px solid var(--hair-2);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
  transform: translate(14px, 14px);
}
.plab__hover[hidden] { display: none; }

/* Seçili parçaya kılavuz çizgisi */
.plab__kilavuz {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
  overflow: visible;
}
.plab__kilavuz line { stroke: var(--live-bright); stroke-width: 1; opacity: 0.8; }
.plab__kilavuz circle { fill: var(--live-bright); }
.plab__kilavuz:not([data-acik='true']) { display: none; }
.plab__kilavuz-ad {
  position: absolute;
  z-index: 6;
  margin: 0;
  padding: 4px 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
  border-bottom: 1px solid var(--live-bright);
  pointer-events: none;
}
.plab__kilavuz-ad[hidden] { display: none; }

.plab__altyazi {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  margin: 0;
  max-width: min(92%, 560px);
  text-align: center;
  font-size: 0.9rem;
  color: var(--white);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
  text-shadow: 0 1px 12px rgba(4, 18, 29, 0.9);
}
.plab__altyazi[data-acik='true'] { opacity: 1; }

.plab__ipucu {
  position: absolute;
  z-index: 3;
  left: 20px;
  bottom: 84px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-2);
  transition: opacity 0.6s var(--ease);
}
.plab[data-kullanildi='true'] .plab__ipucu { opacity: 0; }

/* Temsili iç yapı notu: bağırmıyor, sorulursa açıklıyor. */
.plab__temsili {
  position: absolute;
  z-index: 7;
  right: 18px;
  top: 14px;
  display: grid;
  justify-items: end;
  gap: 8px;
  max-width: 300px;
}
.plab__temsili[hidden] { display: none; }
.plab__temsili-b {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid var(--hair-2);
  border-radius: 999px;
  background: rgba(3, 14, 23, 0.7);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--chalk-2);
  cursor: pointer;
}
.plab__temsili-b i {
  display: grid;
  place-items: center;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-style: normal;
  font-size: 0.5rem;
  letter-spacing: 0;
}
.plab__temsili-b:hover, .plab__temsili-b[aria-expanded='true'] { color: var(--white); border-color: var(--live-bright); }
.plab__temsili-not {
  margin: 0;
  padding: 10px 12px;
  background: rgba(3, 14, 23, 0.92);
  border: 1px solid var(--hair-2);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--chalk);
}
.plab__temsili-not[hidden] { display: none; }

/* --- araç çubuğu: az ve anlamlı ---------------------------------------- */
.plab__arac {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  background: rgba(3, 14, 23, 0.82);
  border: 1px solid var(--hair-2);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  max-width: calc(100% - 24px);
}
.plab__b {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--chalk-2);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.plab__b svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; flex: none; }
.plab__b:hover:not(:disabled) { color: var(--white); background: rgba(140, 170, 190, 0.08); }
.plab__b[aria-pressed='true'] { color: var(--void); background: var(--live-bright); }
.plab__b[aria-pressed='true'] svg { stroke: var(--void); }
.plab__b:disabled { opacity: 0.38; cursor: default; }
.plab__b:focus-visible { outline: 2px solid var(--live-bright); outline-offset: 2px; }
.plab__b[hidden] { display: none; }
.plab__b--ozel { color: var(--white); border-color: var(--hair-2); }
.plab__b--ozel[data-ton='toprak'][aria-pressed='true'] { background: var(--earth-bright); }
.plab__b--ozel[data-ton='ariza'] { border-color: rgba(232, 88, 74, 0.45); }
.plab__b--ozel[data-ton='ariza'][aria-pressed='true'] { background: var(--fault-bright); }
.plab__b--sade { color: var(--steel-2); }
.plab__ozel { display: contents; }

.plab__kaydir {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-2);
}
.plab__kaydir[hidden] { display: none; }
.plab__kaydir input {
  -webkit-appearance: none;
  appearance: none;
  width: clamp(64px, 7vw, 110px);
  height: 2px;
  background: linear-gradient(to right, var(--live-bright) var(--dolu, 0%), var(--hair-2) var(--dolu, 0%));
  cursor: pointer;
}
.plab__kaydir input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--live-bright);
}
.plab__kaydir input::-moz-range-thumb {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--live-bright);
}
.plab__kaydir input:focus-visible { outline: 2px solid var(--live-bright); outline-offset: 6px; }

/* --- bilgi paneli ------------------------------------------------------ */
.plab__panel {
  position: relative;
  border-left: 1px solid var(--hair);
  padding: clamp(18px, 2.4vh, 28px) clamp(16px, 1.6vw, 26px);
  overflow-y: auto;
}
.plab__panel-ad {
  margin-top: 8px;
  font-size: clamp(1.15rem, 1.5vw, 1.45rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--white);
}
.plab__panel-amac { margin-top: 10px; font-size: 0.86rem; line-height: 1.6; color: var(--steel-2); }
.plab__parcalar-ust { margin-top: 22px; margin-bottom: 8px; color: var(--steel-2); }
.plab__parcalar { list-style: none; margin: 0; padding: 0; display: grid; }
.plab__parcalar button {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--hair);
  background: none;
  text-align: left;
  color: var(--chalk);
  font-size: 0.84rem;
  cursor: pointer;
  transition: color 0.2s var(--ease), padding-left 0.3s var(--ease-snap);
}
.plab__parcalar button span {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel-2);
  flex: none;
}
.plab__parcalar button:hover,
.plab__parcalar button[data-hover='true'] { color: var(--white); padding-left: 4px; }
.plab__parcalar button[aria-pressed='true'] { color: var(--live-bright); }
.plab__parcalar button:focus-visible { outline: 2px solid var(--live-bright); outline-offset: 2px; }
.plab__panel-link { margin-top: 18px; }

.plab__parca { position: relative; }
.plab__parca[hidden] { display: none; }
.plab__urun-bilgi[hidden] { display: none; }
.plab__kapat {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--hair-2);
  border-radius: 50%;
  background: none;
  color: var(--chalk-2);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.plab__kapat:hover { color: var(--white); border-color: var(--live-bright); }
.plab__parca > .t-label { color: var(--live-bright); }
.plab__parca-ad {
  margin-top: 8px;
  padding-right: 34px;
  font-size: clamp(1.25rem, 1.7vw, 1.6rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--white);
}
.plab__parca-temsili {
  display: inline-block;
  margin-top: 10px;
  padding: 2px 8px;
  border: 1px solid var(--hair-2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-2);
}
.plab__parca-temsili[hidden] { display: none; }
.plab__parca { padding-bottom: 6px; margin-bottom: 4px; }
.plab__dl { margin: 18px 0 0; display: grid; gap: 14px; }
.plab__dl div { display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid var(--hair); }
.plab__dl dd { margin: 0; font-size: 0.9rem; line-height: 1.5; color: var(--chalk-2); }
.plab__parca-acik { margin-top: 16px; font-size: 0.86rem; line-height: 1.6; color: var(--steel-2); }

/* --- sayfa sonu bağlantıları ------------------------------------------ */
.plab-araclar { padding-block: clamp(22px, 3vw, 34px); }
.plab-araclar__in { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(14px, 3vw, 36px); }
.plab-araclar__in .t-label { color: var(--steel-2); }

/* --- ürün sayfasındaki köprü ------------------------------------------- */
.mbtn--lab { text-decoration: none; }

/* ==========================================================================
   TABLET
   ========================================================================== */
@media (max-width: 1180px) and (min-width: 901px) {
  .plab__kafes { grid-template-columns: minmax(170px, 19%) minmax(0, 1fr) minmax(230px, 25%); }
  .plab__kaydir input { width: 64px; }
  .plab__b span { display: none; }
  .plab__b { padding: 0 11px; }
  .plab__b--ozel span { display: inline; }
}

/* ==========================================================================
   MOBİL — seçici üstte, sahne büyük, kontroller altta, parça bilgisi alttan
   açılan sayfa
   ========================================================================== */
@media (max-width: 900px) {
  .plab-bas { padding-top: clamp(92px, 12vh, 120px); }
  .plab__kafes { display: flex; flex-direction: column; height: auto; }

  .plab__ray { border-right: 0; border-bottom: 1px solid var(--hair); padding: 0; overflow: visible; }
  .plab__ray-ust { display: none; }
  .plab__liste {
    position: relative; /* seçili ürünü kaydırmak için offsetLeft buna göre */
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 0 var(--gutter);
  }
  .plab__liste::-webkit-scrollbar { display: none; }
  .plab__liste li { flex: none; scroll-snap-align: start; }
  .plab__urun {
    display: flex;
    align-items: baseline;
    gap: 7px;
    padding: 14px 14px 12px;
    border-bottom: 0;
  }
  .plab__urun::before { left: 14px; right: 14px; top: auto; bottom: 0; width: auto; height: 2px; transform: none; opacity: 0; }
  .plab__urun[aria-pressed='true']::before { height: 2px; opacity: 1; }
  .plab__urun span { display: none; }
  .plab__urun b { font-size: 0.86rem; white-space: nowrap; }

  .plab__sahne { height: clamp(380px, 64svh, 560px); }
  .plab__ipucu { display: none; }
  .plab__kod { top: 12px; left: 14px; }
  .plab__temsili { top: 10px; right: 10px; }
  .plab__altyazi { top: auto; bottom: 74px; font-size: 0.84rem; }

  .plab__arac {
    left: 8px;
    right: 8px;
    bottom: 10px;
    transform: none;
    max-width: none;
    overflow-x: auto;
    scrollbar-width: none;
    justify-content: flex-start;
  }
  .plab__arac::-webkit-scrollbar { display: none; }
  .plab__b { height: 38px; padding: 0 12px; }
  .plab__kaydir { display: none; }

  .plab__panel { border-left: 0; padding: 22px var(--gutter) 30px; overflow: visible; }

  /* Parça seçilince bilgi alttan açılır; sahne görünür kalır. */
  .plab__parca {
    position: fixed;
    z-index: 70;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 46svh;
    overflow-y: auto;
    padding: 22px var(--gutter) calc(22px + env(safe-area-inset-bottom));
    background: rgba(4, 18, 29, 0.97);
    border-top: 1px solid var(--hair-2);
    box-shadow: 0 -20px 50px -20px rgba(0, 0, 0, 0.9);
    animation: plab-yuksel 0.32s var(--ease-snap);
    margin: 0;
  }
  .plab__parca[hidden] { display: none; }
  .plab__urun-bilgi[hidden] { display: block; }
  .plab__kapat { top: 14px; right: var(--gutter); width: 40px; height: 40px; }
  .plab__kilavuz, .plab__kilavuz-ad { display: none !important; }
}
@keyframes plab-yuksel { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .plab__tuval, .plab__urun::before, .plab__parca { transition: none; animation: none; }
  .plab__yuk-bar::after { animation-duration: 2.4s; }
}
