/* Sepet sayfası + sepet çekmecesi + ödeme sayfası ortak stilleri — Faz E (2026-10-22). Görsel dil docs/E-ticaret/DESIGN.md
   (8px ölçek, 12/16/24 yarıçap, hap düğme, katmanlı gölge, 44px giriş, 3px odak halkası); RENK TEMADAN: --dtk-cart-primary
   (= var(--bronze)), metin --ink. Sabit renk yalnız nötr gri + durum (başarı/uyarı/hata). Hareket 160–280 ms, reduced-motion'da yok. */

:root {
  --ct-ink: var(--ink, #1f2328);
  --ct-text: #3d434b;
  --ct-muted: #6b7280;
  --ct-line: #e7e8ea;
  --ct-line-2: #d4d6da;
  --ct-soft: #f6f7f8;
  --ct-ok: #15803d;
  --ct-warn: #b45309;
  --ct-err: #b91c1c;
  --ct-r: 12px; --ct-r-lg: 16px; --ct-r-xl: 24px;
  --ct-sh-1: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --ct-sh-2: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --ct-ease: cubic-bezier(.2,.7,.2,1);
  --ct-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ---------- Düğmeler ---------- */
.dtk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1.5px solid transparent; font: 700 15px/1 var(--ct-font); text-decoration: none; cursor: pointer; transition: background .16s, color .16s, border-color .16s, box-shadow .16s, transform .16s var(--ct-ease); }
.dtk-btn--primary { background: var(--dtk-cart-primary); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--dtk-cart-primary) 28%, transparent); }
.dtk-btn--primary:hover { filter: brightness(.94); color: #fff; transform: translateY(-1px); }
.dtk-btn--primary:active { transform: none; }
.dtk-btn--ghost { background: #fff; color: var(--ct-ink); border-color: var(--ct-line-2); }
.dtk-btn--ghost:hover { border-color: var(--ct-ink); color: var(--ct-ink); }
.dtk-btn--block { width: 100%; }
.dtk-btn[disabled], .dtk-btn.is-busy { opacity: .6; cursor: progress; transform: none; }
.dtk-cl :focus-visible, .dtk-drawer :focus-visible, .dtk-co :focus-visible { outline: 3px solid color-mix(in srgb, var(--dtk-cart-primary) 45%, transparent); outline-offset: 2px; border-radius: 8px; }

/* ---------- Sepet satırları (partials/cart-lines.php) ---------- */
.dtk-cl { font-family: var(--ct-font); color: var(--ct-text); }
.dtk-cl__notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 14px; border-radius: var(--ct-r); background: #fffbeb; color: #78350f; font-size: 14px; border: 1px solid #fde68a; }
.dtk-cl__empty { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 56px 20px; }
.dtk-cl__empty-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--ct-soft); color: var(--ct-muted); font-size: 30px; }
.dtk-cl__empty p { margin: 0; font-size: 16px; color: var(--ct-text); }
.dtk-cl__ship { padding: 14px 16px; border-radius: var(--ct-r); background: color-mix(in srgb, var(--dtk-cart-primary) 7%, #fff); margin-bottom: 8px; }
.dtk-cl__ship p { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; font-size: 14px; color: var(--ct-ink); }
.dtk-cl__ship.is-done p { color: var(--ct-ok); }
.dtk-cl__bar { display: block; height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--dtk-cart-primary) 14%, #fff); overflow: hidden; }
.dtk-cl__bar > span { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--dtk-cart-primary); transform-origin: left center; transition: transform .5s var(--ct-ease); }
.dtk-cl__ship.is-done .dtk-cl__bar > span { background: var(--ct-ok); }
.dtk-cl__list { list-style: none; margin: 0; padding: 0; }
.dtk-cl__item { position: relative; display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 14px; padding: 16px 36px 16px 0; border-bottom: 1px solid var(--ct-line); animation: dtkCtIn .28s var(--ct-ease); }
.dtk-cl__img { width: 80px; height: 80px; border-radius: var(--ct-r); overflow: hidden; background: var(--ct-soft); display: grid; place-items: center; color: var(--ct-line-2); font-size: 24px; }
.dtk-cl__img img { width: 100%; height: 100%; object-fit: cover; }
.dtk-cl__info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dtk-cl__name { font-weight: 600; font-size: 15px; line-height: 1.35; color: var(--ct-ink); text-decoration: none; }
.dtk-cl__name:hover { color: var(--dtk-cart-primary); }
.dtk-cl__variant { font-size: 13px; color: var(--ct-text); }
.dtk-cl__unit { font-size: 13px; color: var(--ct-muted); font-variant-numeric: tabular-nums; }
.dtk-cl__stock { font-size: 12.5px; font-weight: 600; }
.dtk-cl__stock.is-warn { color: var(--ct-warn); }
.dtk-cl__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.dtk-cl__total { font-weight: 800; color: var(--ct-ink); font-size: 15.5px; font-variant-numeric: tabular-nums; }
.dtk-qty { display: inline-flex; align-items: center; height: 40px; border: 1.5px solid var(--ct-line-2); border-radius: 999px; overflow: hidden; background: #fff; margin: 0; }
.dtk-qty button { width: 40px; height: 100%; border: 0; background: transparent; color: var(--ct-ink); font-size: 16px; cursor: pointer; display: grid; place-items: center; transition: background .14s; }
.dtk-qty button:hover:not(:disabled) { background: var(--ct-soft); }
.dtk-qty button:disabled { color: var(--ct-line-2); cursor: not-allowed; }
.dtk-qty output { min-width: 28px; text-align: center; font-weight: 700; font-size: 15px; color: var(--ct-ink); font-variant-numeric: tabular-nums; }
.dtk-cl__remove { position: absolute; top: 14px; right: 0; margin: 0; }
.dtk-cl__remove button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--ct-muted); cursor: pointer; display: grid; place-items: center; transition: background .14s, color .14s; }
.dtk-cl__remove button:hover { background: #fee2e2; color: var(--ct-err); }
.dtk-cl__sum { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; }
.dtk-cl__line { display: flex; justify-content: space-between; font-size: 14.5px; color: var(--ct-text); font-variant-numeric: tabular-nums; }
.dtk-cl__line .is-free { color: var(--ct-ok); font-weight: 700; }
.dtk-cl__line--total { padding-top: 12px; border-top: 1px solid var(--ct-line); font-size: 18px; font-weight: 800; color: var(--ct-ink); margin-bottom: 4px; }
.dtk-cl__trust { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ct-muted); }
.dtk-cl__trust i { color: var(--ct-ok); }
.dtk-cl.is-busy { opacity: .55; pointer-events: none; transition: opacity .16s; }
@keyframes dtkCtIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Sepet sayfası ---------- */
.dtk-cart-page { background: var(--ct-soft); padding: 32px 0 72px; min-height: 60vh; font-family: var(--ct-font); }
.dtk-cart-wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.dtk-cart-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; }
.dtk-cart-head h1 { margin: 0; font-family: var(--ct-font); font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem); font-weight: 800; letter-spacing: -.02em; color: var(--ct-ink); }
.dtk-cart-head__count { color: var(--ct-muted); font-size: 15px; }
.dtk-cl--page:has(.dtk-cl__list) { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.dtk-cl--page .dtk-cl__notice, .dtk-cl--page .dtk-cl__ship { grid-column: 1 / -1; }
.dtk-cl--page .dtk-cl__list { background: #fff; border-radius: var(--ct-r-xl); padding: 4px 24px; box-shadow: var(--ct-sh-1); border: 1px solid var(--ct-line); }
.dtk-cl--page .dtk-cl__item:last-child { border-bottom: 0; }
.dtk-cl--page .dtk-cl__sum { position: sticky; top: calc(var(--ct-top, 0px) + 24px); background: #fff; border-radius: var(--ct-r-xl); padding: 24px; box-shadow: var(--ct-sh-2); border: 1px solid var(--ct-line); }
.dtk-cl--page .dtk-cl__empty { background: #fff; border-radius: var(--ct-r-xl); border: 1px solid var(--ct-line); }
@media (max-width: 860px) {
  .dtk-cl--page:has(.dtk-cl__list) { grid-template-columns: 1fr; }
  .dtk-cl--page .dtk-cl__sum { position: static; }
}
@media (max-width: 640px) {
  .dtk-cart-wrap { padding: 0 16px; }
  .dtk-cl--page .dtk-cl__list { padding: 0 16px; border-radius: var(--ct-r-lg); }
  .dtk-cl__item { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
  .dtk-cl__img { width: 64px; height: 64px; }
}

/* ---------- Çekmece ---------- */
.dtk-drawer { position: fixed; inset: 0; z-index: 2147483000; /* yönetici çubuğunun da üstünde */ font-family: var(--ct-font); }
.dtk-drawer[hidden] { display: none; }
.dtk-drawer__scrim { position: absolute; inset: 0; background: rgba(15,17,21,.45); opacity: 0; transition: opacity .24s var(--ct-ease); }
.dtk-drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: #fff; display: flex; flex-direction: column; box-shadow: -20px 0 50px rgba(0,0,0,.18); transform: translateX(100%); transition: transform .3s var(--ct-ease); outline: none; }
.dtk-drawer.is-open .dtk-drawer__scrim { opacity: 1; }
.dtk-drawer.is-open .dtk-drawer__panel { transform: none; }
.dtk-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--ct-line); }
.dtk-drawer__head h2 { margin: 0; display: flex; align-items: center; gap: 10px; font-family: var(--ct-font); font-size: 18px; font-weight: 800; color: var(--ct-ink); }
.dtk-drawer__head h2 i { color: var(--dtk-cart-primary); }
.dtk-drawer__close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ct-soft); color: var(--ct-ink); cursor: pointer; display: grid; place-items: center; transition: background .14s; }
.dtk-drawer__close:hover { background: var(--ct-line); }
.dtk-drawer__body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px 24px; }
.dtk-drawer .dtk-cl__sum { position: sticky; bottom: -24px; background: #fff; margin: 0 -20px -24px; padding: 16px 20px 20px; border-top: 1px solid var(--ct-line); box-shadow: 0 -10px 24px rgba(0,0,0,.05); }
.dtk-drawer__loading { display: flex; gap: 6px; justify-content: center; padding: 64px 0; }
.dtk-drawer__loading span { width: 8px; height: 8px; border-radius: 50%; background: var(--ct-line-2); animation: dtkCtDot 1s infinite ease-in-out; }
.dtk-drawer__loading span:nth-child(2) { animation-delay: .15s; }
.dtk-drawer__loading span:nth-child(3) { animation-delay: .3s; }
@keyframes dtkCtDot { 0%, 80%, 100% { opacity: .3; transform: scale(.8); } 40% { opacity: 1; transform: none; } }
html.dtk-drawer-open { overflow: hidden; }
@media (max-width: 640px) {
  .dtk-drawer__panel { top: auto; left: 0; width: 100%; max-height: 88vh; border-radius: var(--ct-r-xl) var(--ct-r-xl) 0 0; transform: translateY(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .dtk-cl *, .dtk-drawer *, .dtk-co *, .dtk-btn { transition: none !important; animation: none !important; }
}
