/* Ortak temel stiller. Renk ve fontlar her template'in stil.css dosyasındaki
   değişkenlerden gelir: --zemin --kart --yazi --yazi-soft --ana --ana-koyu
   --ana-yazi --cizgi --radius --font-baslik --font-govde --golge */

/* Hareket eğrileri (Emil Kowalski): hazır CSS eğrileri zayıf kalır */
:root {
  --ease-out: cubic-bezier(.23, 1, .32, 1);       /* açılan / giren şeyler */
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);   /* ekranda yer değiştiren şeyler */
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);    /* yandan açılan panel (iOS hissi) */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--zemin);
  color: var(--yazi);
  font-family: var(--font-govde);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.kilitli { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-baslik); line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

/* Tarayıcının hazır parçaları da tasarımın parçası (Impeccable) */
::selection { background: var(--ana); color: var(--ana-yazi); }
body { caret-color: var(--ana); accent-color: var(--ana); }
a { text-underline-offset: .22em; text-decoration-thickness: 1.5px; }
[hidden] { display: none !important; }

.kap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.ikon { width: 1.25em; height: 1.25em; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--ana); outline-offset: 3px; border-radius: 6px; }
html { scroll-padding-top: 90px; }

/* ---------- Butonlar (temel) ---------- */
.buton {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .9em 1.5em; border: 0; border-radius: 999px;
  background: var(--ana); color: var(--ana-yazi);
  font-weight: 700; text-decoration: none; line-height: 1.1;
  transition: transform .16s var(--ease-out), background-color .15s ease, box-shadow .16s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .buton:hover { background: var(--ana-koyu); }
}
.buton:active { transform: scale(.97); }
.buton.genis { width: 100%; }
.buton-wa { background: #25D366; color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .buton-wa:hover { background: #1EB257; }
}
.buton:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Demo bandı ---------- */
.demo-bant {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4em 1em;
  padding: .55em 16px; background: #1F1A17; color: #F5EDE6;
  font-size: 14px; text-align: center;
}
.demo-bant a {
  display: inline-flex; align-items: center; gap: .35em;
  color: #FFD27A; font-weight: 700; text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .demo-bant a:hover { text-decoration: underline; }
}
.demo-bant .ikon { width: 1em; height: 1em; }

/* ---------- Yüzen butonlar ---------- */
.wa-yuzen, .sepet-yuzen {
  position: fixed; right: 20px; z-index: 40;
  display: grid; place-items: center;
  width: 60px; height: 60px; border-radius: 50%; border: 0;
  box-shadow: 0 10px 25px -8px rgba(0,0,0,.35);
  transition: transform .2s var(--ease-out), scale .16s var(--ease-out);
}
.wa-yuzen:active, .sepet-yuzen:active { scale: .92; }
.wa-yuzen { bottom: 20px; background: #25D366; color: #fff; }
.wa-yuzen .ikon { width: 30px; height: 30px; }
@media (hover: hover) and (pointer: fine) {
  .wa-yuzen:hover, .sepet-yuzen:hover { transform: scale(1.07); }
}
.sepet-yuzen { bottom: 92px; background: var(--ana); color: var(--ana-yazi); }
.sepet-yuzen .ikon { width: 26px; height: 26px; }
.sepet-sayi {
  position: absolute; top: -4px; right: -4px; min-width: 24px; height: 24px; padding: 0 6px;
  border-radius: 12px; background: var(--yazi); color: var(--zemin);
  font-size: 13px; font-weight: 800; line-height: 24px; text-align: center;
}
.sepet-yuzen.zipla { animation: zipla .45s var(--ease-out); }
@keyframes zipla { 40% { transform: scale(1.18); } 70% { transform: scale(.95); } }

/* ---------- Dialog ortak ---------- */
dialog { border: 0; padding: 0; color: var(--yazi); background: var(--kart); }
dialog::backdrop { background: rgba(20, 14, 10, .55); backdrop-filter: blur(2px); animation: sol .25s ease; }
@keyframes sol { from { opacity: 0; } }
dialog .kapat {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: transparent;
  transition: background-color .15s ease, scale .16s var(--ease-out);
}
dialog .kapat:active { scale: .92; }
@media (hover: hover) and (pointer: fine) {
  dialog .kapat:hover { background: var(--cizgi); }
}

/* ---------- Sepet paneli (sağdan çekmece) ---------- */
.sepet-panel[open] {
  display: flex; flex-direction: column;
  position: fixed; inset: 0 0 0 auto; margin: 0;
  width: min(420px, 100%); max-width: 100%; height: 100%; max-height: 100%;
  animation: sagdan .4s var(--ease-drawer);
}
@keyframes sagdan { from { transform: translateX(100%); } }
.sepet-ust { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--cizgi); }
.sepet-ust h3 { display: flex; align-items: center; gap: .5em; font-size: 1.3rem; }
.sepet-liste { flex: 1; overflow-y: auto; padding: 8px 20px; scrollbar-width: thin; scrollbar-color: var(--cizgi) transparent; }
.sepet-bos { padding: 40px 0; text-align: center; color: var(--yazi-soft); }
.sepet-kalem {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center;
  padding: 14px 0; border-bottom: 1px dashed var(--cizgi);
}
.sepet-kalem-bilgi { grid-column: 1 / -1; display: flex; flex-direction: column; }
.sepet-kalem-bilgi strong { font-size: .98rem; line-height: 1.3; }
.sepet-kalem-bilgi small { color: var(--yazi-soft); }
.sepet-kalem-fiyat { font-weight: 800; justify-self: end; font-variant-numeric: tabular-nums; }
.adet { display: inline-flex; justify-self: start; align-items: center; border: 1.5px solid var(--cizgi); border-radius: 999px; }
.adet button { width: 40px; height: 40px; border: 0; background: transparent; font-size: 1.1rem; font-weight: 700; border-radius: 50%; transition: background-color .15s ease, scale .16s var(--ease-out); }
.adet button:active { scale: .9; }
@media (hover: hover) and (pointer: fine) {
  .adet button:hover { background: var(--cizgi); }
}
.adet span { min-width: 26px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.sepet-alt { padding: 18px 20px 22px; border-top: 1px solid var(--cizgi); display: grid; gap: 12px; }
.sepet-toplam { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.1rem; }
.sepet-toplam strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.sepet-not { font-size: 13px; color: var(--yazi-soft); text-align: center; }

/* ---------- Demo penceresi ---------- */
.demo-modal[open] {
  display: grid; gap: 14px; justify-items: center; text-align: center;
  width: min(440px, calc(100% - 32px)); padding: 32px 26px 26px;
  border-radius: 24px; box-shadow: var(--golge);
  animation: belir-modal .3s var(--ease-out);
}
@keyframes belir-modal { from { transform: translateY(8px) scale(.96); opacity: 0; } }
.demo-modal .kapat { position: absolute; top: 10px; right: 10px; }
.demo-modal h3 { font-size: 1.35rem; }
.demo-modal p { color: var(--yazi-soft); font-size: .95rem; }
.demo-modal-ikon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #25D366; color: #fff; }
.demo-modal-ikon .ikon { width: 34px; height: 34px; }
.wa-balon {
  justify-self: stretch; text-align: left; white-space: pre-wrap;
  max-height: 260px; overflow-y: auto; scrollbar-width: thin;
  padding: 12px 14px; border-radius: 12px 12px 4px 12px;
  background: #DCF8C6; color: #1B2B1E; font-size: 14px; line-height: 1.5;
  box-shadow: 0 1px 1px rgba(0,0,0,.1);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Görünce belir ---------- */
/* Sadece JS çalışıyorsa gizle (html.js); JS yoksa içerik hep görünür.
   transform yerine "translate" + animation: kartların kendi hover hareketiyle çakışmaz.
   Aynı anda görünen öğeler site.js'te 60ms arayla sırayla gelir. */
.js .belir:not(.gorundu) { opacity: 0; }
.js .belir.gorundu { animation: belir-gir .6s var(--ease-out) backwards; }
@keyframes belir-gir { from { opacity: 0; translate: 0 14px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .belir:not(.gorundu) { opacity: 1; }
}
