/* ============================================================
   Sepet çekmecesi — ana site portu (13.10.2026, CHANGES 289)
   Mağazanın magaza-app/public/assets/css/shop-catalog.css "Sepet cekmecesi" bloğu (314-511) + shop.css .sh-btn (61-85)
   BİREBİR; tek fark token'lar: mağazada body.forum-light / forum-dark üzerinde, burada .sh-drawer kapsamında (ana sitenin
   forum dışı sayfalarında o sınıflar yok). Koyu tema ana sitenin body.active-dark-mode sınıfıyla.
   Kabuk HTML: includes/hdr-ui.php maHdrSepetCekmece() (footer.php, gövde düzeyi, hidden); davranış assets/js/hdr.js.
   Yükleme: header.php'de async (preload + onload) — render-blocking DEĞİL; kabuk hidden geldiği için CSS gelmeden
   FOUC/CLS yok. Purge pipeline'ına GİRMEZ (elle yönetilir). Yeni FA/BI ikonu yok — ikonlar mağazanın inline SVG'leri.
   ============================================================ */

/* ---------- Token'lar (shop.css 8-46 kopyası, çekmece kapsamı) ---------- */
.sh-drawer, .sh-drawer-backdrop {
    --sh-r-control: 12px; --sh-r-card: 18px; --sh-r-pill: 50px;
    --sh-cta:        #057F75;
    --sh-cta-hover:  #046B63;
    --sh-cta-text:   #FFFFFF;
    --sh-cta-shadow: 0 6px 16px rgba(5, 127, 117, .28);
    --sh-cta-tint:   rgba(6, 154, 142, .10);
    --sh-ease: cubic-bezier(.4, 0, .2, 1);
    --sh-page:         #FFFFFF;
    --sh-surface:      rgba(255, 255, 255, .66);
    --sh-border:       rgba(12, 43, 36, .10);
    --sh-border-input: rgba(12, 43, 36, .18);
    --sh-text:         #0c2b24;
    --sh-text-muted:   #64748b;
    --sh-muted-on-tint: #526077;
}
.active-dark-mode .sh-drawer, .active-dark-mode .sh-drawer-backdrop {
    --sh-cta:          #0FA89B;
    --sh-cta-hover:    #16C0B0;
    --sh-cta-tint:     rgba(22, 192, 176, .14);
    --sh-page:         #10161d;
    --sh-surface:      rgba(255, 255, 255, .055);
    --sh-border:       rgba(255, 255, 255, .10);
    --sh-border-input: rgba(255, 255, 255, .18);
    --sh-text:         #FFFFFF;
    --sh-text-muted:   #9AA3B2;
    --sh-muted-on-tint: var(--sh-text-muted);
}

/* ---------- Yardımcılar (ana sitenin purged CSS'lerinde yok) ---------- */
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.sh-drawer .sh-icon { flex: none; vertical-align: middle; }
.sh-drawer .sh-linklike { padding: 0; border: 0; background: none; color: var(--sh-cta); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Düğmeler (shop.css .sh-btn, çekmece kapsamı: tema a{} / button{} kurallarını ezer) ---------- */
.sh-drawer .sh-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 10px 24px;
    border: 1px solid transparent; border-radius: var(--sh-r-pill);
    font: 600 15px/1.3 var(--font-secondary, 'Poppins'), sans-serif;
    text-decoration: none; cursor: pointer;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.sh-drawer .sh-btn-sm { min-height: 42px; padding: 8px 16px; font-size: 14px; gap: 6px; }
.sh-drawer .sh-btn-block { width: 100%; }
.sh-drawer .sh-btn-lg { min-height: 56px; font-size: 16px; }
.sh-drawer .sh-btn-primary { background: var(--sh-cta); color: var(--sh-cta-text); box-shadow: var(--sh-cta-shadow); }
.sh-drawer .sh-btn-primary:hover { background: var(--sh-cta-hover); color: var(--sh-cta-text); }
.sh-drawer .sh-btn-secondary {
    background: var(--sh-surface); color: var(--sh-text); border-color: var(--sh-border);
    -webkit-backdrop-filter: blur(10px) saturate(135%); backdrop-filter: blur(10px) saturate(135%);
}
.sh-drawer .sh-btn-secondary:hover { border-color: var(--sh-cta); color: var(--sh-cta); }
.sh-drawer .sh-btn-outline { background: transparent; color: var(--sh-cta); border-color: var(--sh-cta); }
.sh-drawer .sh-btn-outline:hover { background: var(--sh-cta); color: var(--sh-cta-text); }
.sh-drawer .sh-btn .sh-icon { transition: transform .18s ease; }
.sh-drawer .sh-btn-outline:hover .sh-icon, .sh-drawer .sh-btn-primary:hover .sh-icon { transform: translateX(2px); }
.sh-drawer .sh-btn[disabled] { opacity: .45; pointer-events: none; }
.sh-drawer .sh-btn[hidden] { display: none; }

/* ---------- Kabuk: perde + sağdan yüzen cam panel (shop-catalog.css 321-345) ---------- */
/* Çekmece açıkken çerez onay bandı (mc-banner 9998) perdenin (1060) ve panelin (1061) altında kalsın: "Devam Et" örtülmesin */
body.sh-drawer-lock .mc-banner { z-index: 1055; }
.sh-drawer-backdrop {
    position: fixed; inset: 0; z-index: 1060; background: rgba(8, 14, 20, .42);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    opacity: 0; transition: opacity .25s ease;
}
.sh-drawer-backdrop.is-open { opacity: 1; }
.sh-drawer-backdrop[hidden], .sh-drawer[hidden] { display: none; }
.sh-drawer {
    position: fixed; top: 12px; right: 12px; bottom: 12px; z-index: 1061;
    width: min(440px, calc(100vw - 24px)); overflow: hidden;
    border-radius: 24px; border: 1px solid var(--sh-border);
    background: var(--sh-page); color: var(--sh-text);
    box-shadow: 0 24px 60px rgba(8, 14, 20, .28);
    transform: translateX(calc(100% + 24px)); transition: transform .32s var(--sh-ease);
}
.sh-drawer.is-open { transform: none; }
.sh-drawer :focus-visible { outline: 2px solid var(--sh-cta); outline-offset: 2px; }
.sh-drawer:focus { outline: none; } /* açılışta odak panelin kendisinde (hdr.js cekAc) */
.sh-drawer :focus:not(:focus-visible) { outline: none; }
.sh-drawer-inner { display: flex; flex-direction: column; height: 100%; }

.sh-drawer-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 14px 24px; }
.sh-drawer .sh-drawer-title { margin: 0; font: 700 22px/1.2 var(--font-primary, 'DM Sans'), sans-serif; color: var(--sh-text); letter-spacing: -.01em; }
.sh-drawer-count { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: var(--sh-r-pill); background: var(--sh-cta-tint); color: var(--sh-cta); font-size: 12px; font-weight: 700; }
.sh-drawer-close {
    display: inline-flex; align-items: center; justify-content: center; margin-left: auto;
    width: 40px; height: 40px; padding: 0; border-radius: 50%;
    border: 1px solid var(--sh-border); background: var(--sh-surface); color: var(--sh-text); cursor: pointer;
    transition: color .16s ease, border-color .16s ease, transform .16s ease;
}
.sh-drawer-close:hover { color: var(--sh-cta); border-color: var(--sh-cta); transform: rotate(90deg); }
/* İskelet (yalnız ana site): gövde mağazadan gelene kadar; hata hâlinde /sepet/ bağlantısı (hdr.js cekHata) */
.sh-drawer p.sh-drawer-loading { margin: auto 0; padding: 32px; text-align: center; font-size: 14px; line-height: 1.55; color: var(--sh-text-muted); }
.sh-drawer p.sh-drawer-loading a { color: var(--sh-cta); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.sh-drawer p.sh-drawer-added {
    display: flex; align-items: center; gap: 8px; margin: 0 20px 8px; padding: 10px 14px;
    border-radius: 14px; background: var(--sh-cta-tint); color: var(--sh-cta); font-size: 14px; font-weight: 700;
    animation: sh-drawer-pop .35s var(--sh-ease);
}
.sh-drawer p.sh-drawer-notice {
    display: flex; align-items: flex-start; gap: 8px; margin: 0 20px 8px; padding: 10px 14px;
    border-radius: 14px; background: rgba(217, 131, 36, .12); color: #A85F10; font-size: 13px; font-weight: 600; line-height: 1.45;
}
.active-dark-mode .sh-drawer p.sh-drawer-notice { background: rgba(217, 131, 36, .2); color: #F2A65A; }
.sh-drawer p.sh-drawer-notice .sh-icon { flex: none; margin-top: 1px; }
@keyframes sh-drawer-pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* "Geri al" şeridi (satır silinince) */
.sh-undo {
    display: flex; align-items: center; gap: 10px; margin: 0 20px 8px; padding: 8px 8px 8px 14px;
    border-radius: 14px; background: var(--sh-text); color: var(--sh-page);
    animation: sh-drawer-pop .35s var(--sh-ease); transition: opacity .25s ease, transform .25s ease;
}
.sh-undo.is-leaving { opacity: 0; transform: translateY(-6px); }
.sh-drawer p.sh-undo-text { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; margin: 0; font-size: 13px; line-height: 1.35; color: var(--sh-page); }
.sh-undo-text > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sh-undo-text .sh-icon { flex: none; opacity: .75; }
.sh-undo-btn {
    flex: none; height: 32px; padding: 0 14px; border: 0; border-radius: var(--sh-r-pill);
    background: var(--sh-cta); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer;
}
.sh-undo-btn:hover { background: var(--sh-cta-hover); }

/* Boş durum */
.sh-drawer-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: auto 0; padding: 32px 32px 48px; text-align: center; color: var(--sh-text-muted); }
.sh-drawer-empty-ico { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 8px; border-radius: 20px; background: var(--sh-cta-tint); color: var(--sh-cta); }
.sh-drawer .sh-drawer-empty p { margin: 0; font-size: 14px; line-height: 1.55; }
.sh-drawer p.sh-drawer-empty-title { font-size: 17px; font-weight: 700; color: var(--sh-text); }
.sh-drawer-empty .sh-btn { margin-top: 12px; }

/* Satırlar: mini kart */
.sh-drawer-lines { flex: 1; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; margin: 0; padding: 4px 20px 16px; list-style: none; }
.sh-drawer-line {
    display: flex; gap: 12px; padding: 10px; border-radius: 18px;
    border: 1px solid var(--sh-border); background: var(--sh-surface); color: inherit;
}
.sh-drawer-line.is-added { border-color: var(--sh-cta); box-shadow: 0 0 0 1px var(--sh-cta) inset; }
.sh-drawer-line-media { flex: none; align-self: flex-start; width: 72px; overflow: hidden; border-radius: 12px; line-height: 0; }
.sh-drawer-line-media img { display: block; width: 100%; height: auto; }
.sh-drawer-line-body { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.sh-drawer-line-name {
    font-size: 14px; font-weight: 700; line-height: 1.35; color: var(--sh-text); text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sh-drawer-line-name:hover { color: var(--sh-cta); }
.sh-line-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.sh-drawer .sh-line-chips li { padding: 2px 8px; border-radius: 6px; background: var(--sh-cta-tint); color: var(--sh-cta); font-size: 11.5px; font-weight: 600; }
.sh-line-opts summary { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: var(--sh-cta-tint); color: var(--sh-cta); font-size: 11.5px; font-weight: 700; cursor: pointer; list-style: none; }
.sh-line-opts summary::-webkit-details-marker { display: none; }
.sh-line-opts summary .sh-icon { transition: transform .18s ease; }
.sh-line-opts[open] summary .sh-icon { transform: rotate(180deg); }
.sh-drawer .sh-line-opts ul { margin: 6px 0 0; padding: 0; list-style: none; font-size: 12px; line-height: 1.6; color: var(--sh-text-muted); }
.sh-drawer .sh-line-opts li span { font-weight: 700; color: var(--sh-text); }
.sh-drawer-line-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; }
/* Adet seçici: [- 2 +]; adet 1'de eksi çöp kutusuna döner (satırı siler) */
.sh-qty { display: inline-flex; align-items: center; height: 32px; margin: 0; border-radius: var(--sh-r-pill); border: 1px solid var(--sh-border); background: var(--sh-page); }
.sh-qty-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 30px; padding: 0; border: 0; border-radius: var(--sh-r-pill);
    background: none; color: var(--sh-text); cursor: pointer; transition: color .16s ease, background-color .16s ease;
}
.sh-qty-btn:hover { background: var(--sh-cta-tint); color: var(--sh-cta); }
.sh-qty-btn.is-remove:hover { background: rgba(199, 92, 111, .12); color: #C75C6F; }
.sh-qty-btn[disabled] { opacity: .35; cursor: not-allowed; background: none; color: var(--sh-text); }
.sh-qty-value { min-width: 22px; font-size: 13px; font-weight: 700; text-align: center; color: var(--sh-text); font-variant-numeric: tabular-nums; }
.sh-qty.is-busy { opacity: .55; pointer-events: none; }
.sh-drawer-edit { font-size: 12px; font-weight: 700; color: var(--sh-cta); text-decoration: none; }
.sh-drawer-edit:hover { color: var(--sh-cta-hover); text-decoration: underline; }
.sh-drawer-line-price { margin-left: auto; font-size: 15px; font-weight: 700; color: var(--sh-text); white-space: nowrap; }
.sh-drawer p.sh-drawer-line-gone { margin: 0; font-size: 13px; color: var(--sh-text-muted); }

/* Alt özet + eylemler */
.sh-drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--sh-border); background: var(--sh-page); }

/* "Öne Çıkanlar" — tıklayınca açılan yatay şerit */
.sh-drawer-recs { flex: none; padding: 4px 20px 12px; }
.sh-drawer-empty + .sh-drawer-recs { border-top: 1px solid var(--sh-border); padding-top: 12px; }
.sh-drawer-recs-toggle {
    display: flex; align-items: center; gap: 6px; padding: 6px 0; list-style: none; cursor: pointer;
    font-size: 14px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--sh-text);
}
.sh-drawer-recs-toggle::-webkit-details-marker { display: none; }
.sh-drawer-recs-caret { transition: transform .2s ease; }
.sh-drawer-recs[open] .sh-drawer-recs-caret { transform: rotate(180deg); }
.sh-drawer-recs-track {
    display: flex; gap: 10px; margin: 8px -20px 0; padding: 0 20px 4px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; scrollbar-width: none;
}
.sh-drawer-recs-track::-webkit-scrollbar { display: none; }
.sh-drawer-rec {
    display: flex; align-items: center; gap: 10px; flex: none; width: 272px; padding: 10px;
    border: 1px solid var(--sh-border); border-radius: 14px; background: var(--sh-surface, rgba(127, 127, 127, .06)); scroll-snap-align: start;
}
.sh-drawer-rec-media { flex: none; width: 56px; line-height: 0; border-radius: 8px; overflow: hidden; }
.sh-drawer-rec-media img { display: block; width: 100%; height: auto; }
.sh-drawer-rec-body { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.sh-drawer-rec-name {
    font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--sh-text); text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sh-drawer-rec-name:hover { color: var(--sh-cta); }
.sh-drawer-rec-price { font-size: 13px; font-weight: 700; color: var(--sh-cta); }
/* "Birlikte al" teklifi: tek kart tam genişlik; teal çerçeve + tint */
.sh-drawer-offer { flex: none; padding: 4px 20px 0; }
.sh-drawer .sh-drawer-offer-kicker { display: flex; align-items: center; gap: 6px; margin: 0; padding: 6px 0; font-size: 14px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--sh-text); }
.sh-drawer-offer-kicker .sh-icon { color: var(--sh-cta); }
.sh-drawer-offer .sh-drawer-rec { width: auto; margin-top: 8px; border-color: var(--sh-cta); background: var(--sh-cta-tint); }
/* --maf-muted mağazada da .ma-forum dışında tanımsızdı (dönüş notu 13.10) → --sh-text-muted */
.sh-drawer-offer .sh-drawer-rec-price del { margin-left: 4px; font-weight: 600; color: var(--sh-text-muted); }
.sh-drawer-rec-save { font-size: 12px; font-weight: 600; color: var(--sh-text-muted); }
.sh-drawer-rec form { margin: 0; flex: none; }
.sh-drawer .sh-drawer-rec-btn { min-height: 36px; padding: 6px 14px; font-size: 13px; flex: none; box-shadow: none; }
.sh-drawer-sum { margin: 0 0 16px; }
.sh-drawer-sum > div { display: flex; justify-content: space-between; align-items: baseline; padding: 3px 0; }
.sh-drawer-sum dt { font-size: 14px; font-weight: 500; color: var(--sh-text-muted); }
.sh-drawer-sum dd { margin: 0; font-size: 14px; font-weight: 600; color: var(--sh-text); }
.sh-drawer-sum dd.is-free { color: var(--sh-cta); font-weight: 700; }
.sh-drawer-sum-total { margin-top: 8px; padding-top: 10px !important; border-top: 1px dashed var(--sh-border); }
.sh-drawer-sum-total dt { font-size: 15px; font-weight: 700; color: var(--sh-text); }
.sh-drawer-sum-total dd { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
body.sh-drawer-lock { overflow: hidden !important; } /* body inline overflow:overlay taşıyor → !important (mağazada da) */
/* Ana sitenin koyu tema ".active-dark-mode ul li" (0,1,2) / "p", "h2" (0,1,1) renk kuralları: etkilenen seçiciler .sh-drawer önekiyle (0,2,x) — yükleme sırasından bağımsız (inceleme 13.10) */
.sh-drawer .sh-line-opts li { color: inherit; }
.sh-line-offer { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--sh-cta); }
.sh-line-offer del { font-weight: 600; color: var(--sh-text-muted); }

/* Mobil: alttan açılan tam ekran sheet (kullanıcı kararı 24.09) — "Devam Et" parmak altında */
@media (max-width: 767.98px) {
    .sh-drawer {
        top: auto; right: 0; bottom: 0; left: 0; width: 100%;
        height: calc(100dvh - 24px); max-height: calc(100vh - 24px);
        border-radius: 22px 22px 0 0; border-width: 1px 0 0;
        transform: translateY(100%);
    }
    .sh-drawer::before { /* tutma çizgisi */
        content: ""; position: absolute; top: 8px; left: 50%; z-index: 2; width: 40px; height: 4px;
        margin-left: -20px; border-radius: 2px; background: var(--sh-border);
    }
    .sh-drawer-head { padding-top: 22px; }
    .sh-drawer-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
    .sh-drawer, .sh-drawer-backdrop, .sh-drawer-close { transition: none; }
    p.sh-drawer-added, .sh-undo { animation: none; transition: none; }
}
