/* Ekmaş AR — 3D ürün önizleme stilleri */
:root {
    --bg1: #f7f9fc; --bg2: #dfe5ee;
    --panel: rgba(255,255,255,.92); --panel-b: rgba(15,23,42,.08);
    --metin: #0f172a; --soluk: #64748b; --vurgu: #16a34a; --vurgu-k: #15803d;
    --golge: 0 10px 30px rgba(15,23,42,.14);
}
:root[data-tema="koyu"] {
    --bg1: #1e293b; --bg2: #0b1220;
    --panel: rgba(17,24,39,.92); --panel-b: rgba(255,255,255,.1);
    --metin: #f1f5f9; --soluk: #94a3b8; --golge: 0 10px 30px rgba(0,0,0,.5);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--metin); }
body { background: radial-gradient(ellipse at 50% 35%, var(--bg1), var(--bg2)); transition: background .3s; }
body[data-zemin="beyaz"]  { background: #fff; }
body[data-zemin="gri"]    { background: #cfd5dd; }
body[data-zemin="siyah"]  { background: #0a0a0a; }

model-viewer { position: fixed; inset: 0; width: 100%; height: 100%; --poster-color: transparent; --progress-bar-color: transparent; outline: none; }
model-viewer::part(default-progress-bar) { display: none; }

/* Üst çubuk */
.ust { position: fixed; top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px; padding-right: 100px; display: flex; justify-content: space-between; align-items: center; gap: 8px; z-index: 20; pointer-events: none; }
.ust > * { pointer-events: auto; }
.marka { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--panel-b); border-radius: 999px; padding: 8px 14px; box-shadow: var(--golge); font-weight: 700; font-size: 14px; backdrop-filter: blur(8px); }
.marka small { color: var(--soluk); font-weight: 500; }
.araclar { display: flex; gap: 8px; }
.dugme { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--panel-b); background: var(--panel); color: var(--metin); display: grid; place-items: center; cursor: pointer; box-shadow: var(--golge); backdrop-filter: blur(8px); transition: transform .12s, background .2s; }
.dugme:hover { transform: translateY(-1px); }
.dugme:active { transform: scale(.95); }
.dugme.aktif { background: var(--vurgu); color: #fff; border-color: transparent; }
.dugme svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Ayar paneli */
.kapat-ust { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 21; }
.panel { position: fixed; top: calc(max(12px, env(safe-area-inset-top)) + 54px); right: 12px; width: min(340px, calc(100vw - 24px)); max-height: calc(100vh - 170px); overflow: auto; background: var(--panel); border: 1px solid var(--panel-b); border-radius: 16px; box-shadow: var(--golge); backdrop-filter: blur(10px); padding: 16px; z-index: 30; transform-origin: top right; transition: opacity .18s, transform .18s; }
.panel[hidden] { display: block; opacity: 0; transform: scale(.96); pointer-events: none; visibility: hidden; }
.panel h3 { margin: 0 0 12px; font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.panel h3 button { all: unset; cursor: pointer; color: var(--soluk); font-size: 22px; line-height: 1; padding: 0 4px; }
.grup { margin-bottom: 14px; }
.grup > label, .etiket { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--soluk); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.grup output { color: var(--metin); text-transform: none; letter-spacing: 0; }
.panel input[type=range] { width: 100%; accent-color: var(--vurgu); }
.panel select { width: 100%; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--panel-b); background: transparent; color: var(--metin); font-size: 14px; }
.panel select option { color: #0f172a; }
.segment { display: flex; gap: 6px; flex-wrap: wrap; }
.segment button { flex: 1 1 auto; padding: 8px 10px; font-size: 13px; border-radius: 10px; border: 1px solid var(--panel-b); background: transparent; color: var(--metin); cursor: pointer; }
.segment button.aktif { background: var(--vurgu); border-color: var(--vurgu); color: #fff; }
.segment button.mavi { background: #2563eb; border-color: #2563eb; color: #fff; }
.kapat-alt { width: 100%; margin-top: 8px; padding: 10px; border-radius: 10px; border: 0; background: var(--metin); color: var(--bg1); cursor: pointer; font-size: 14px; font-weight: 600; }
.renkler { display: flex; gap: 8px; }
.renkler button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--panel-b); cursor: pointer; padding: 0; }
.renkler button.aktif { outline: 2px solid var(--vurgu); outline-offset: 2px; }
.anahtar { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 6px 0; }
.anahtar input { width: 20px; height: 20px; accent-color: var(--vurgu); }
.olcu { background: var(--panel-b); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.6; }
.olcu b { font-variant-numeric: tabular-nums; }
.sifirla { width: 100%; margin-top: 4px; padding: 10px; border-radius: 10px; border: 1px solid var(--panel-b); background: transparent; color: var(--metin); cursor: pointer; font-size: 14px; }

/* Alt alan */
.alt { position: fixed; left: 12px; right: 12px; bottom: max(20px, calc(12px + env(safe-area-inset-bottom))); display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 20; pointer-events: none; }
.alt > * { pointer-events: auto; }
.ipucu { background: var(--panel); border: 1px solid var(--panel-b); color: var(--soluk); font-size: 12px; padding: 6px 12px; border-radius: 999px; box-shadow: var(--golge); transition: opacity .6s; }
.ipucu.gizli { opacity: 0; }
#ar-button { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 62px; z-index: 21; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; color: #fff; cursor: pointer; background: linear-gradient(135deg, var(--vurgu), var(--vurgu-k)); box-shadow: 0 6px 18px rgba(22,163,74,.45); display: grid; place-items: center; }
#ar-button svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#ar-button:active { transform: scale(.95); }
.ar-yok { background: var(--panel); border: 1px solid var(--panel-b); color: var(--soluk); font-size: 13px; padding: 10px 14px; border-radius: 12px; text-align: center; max-width: 440px; box-shadow: var(--golge); }
.ar-yok button { all: unset; cursor: pointer; color: var(--vurgu); font-weight: 600; text-decoration: underline; }

/* Yükleniyor / hata */
.yukleme { position: fixed; inset: 0; display: grid; place-items: center; z-index: 40; background: radial-gradient(ellipse at 50% 35%, var(--bg1), var(--bg2)); transition: opacity .4s, visibility .4s; }
.yukleme.bitti { opacity: 0; visibility: hidden; }
.yukleme .kutu { width: min(260px, 70vw); text-align: center; }
.kup { width: 54px; height: 54px; margin: 0 auto 18px; animation: don 2.4s linear infinite; }
.kup svg { width: 100%; height: 100%; fill: none; stroke: var(--vurgu); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
@keyframes don { to { transform: rotateY(360deg); } }
.cubuk { height: 6px; border-radius: 6px; background: var(--panel-b); overflow: hidden; }
.cubuk i { display: block; height: 100%; width: 0; background: var(--vurgu); transition: width .2s; }
.yukleme p { color: var(--soluk); font-size: 13px; margin: 10px 0 0; }
.hata { color: #dc2626 !important; font-weight: 600; }

.bildirim { position: fixed; left: 50%; top: 70px; transform: translate(-50%, -10px); background: #0f172a; color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 13px; opacity: 0; transition: .25s; z-index: 60; pointer-events: none; }
.bildirim.goster { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 480px) { .marka small { display: none; } }
