/**
 * Mini-cart drawer (BUILD-B). Scope: .pwa-drawer* — tema token'ları (main.css :root).
 * Yalnız paid gate açık/admin iken enqueue edilir (public + kapalı → yüklenmez).
 * Header rozeti (.nav-cart) BUILD-A inline stilinde; burada çakışma yok.
 */

/* backdrop */
.pwa-drawer-backdrop {
	position: fixed; inset: 0; z-index: 900;
	background: rgba(6, 5, 9, .62);
	backdrop-filter: blur(3px);
	opacity: 0; animation: pwa-drawer-fade .18s ease forwards;
}
.pwa-drawer-backdrop[hidden] { display: none; }

/* drawer panel — sağdan */
.pwa-drawer {
	position: fixed; top: 0; right: 0; z-index: 910;
	width: min(400px, 92vw); height: 100%;
	display: flex; flex-direction: column;
	background: var(--panel, #15151b);
	border-left: 1px solid var(--line-n, #26262f);
	box-shadow: -24px 0 60px -20px rgba(0, 0, 0, .7);
	transform: translateX(100%);
	animation: pwa-drawer-in .24s cubic-bezier(.22, .61, .36, 1) forwards;
	font-family: var(--f);
}
.pwa-drawer[hidden] { display: none; }

@keyframes pwa-drawer-fade { to { opacity: 1; } }
@keyframes pwa-drawer-in { to { transform: translateX(0); } }

/* head */
.pwa-drawer-head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 20px 22px 16px; border-bottom: 1px solid var(--line-n, #26262f);
}
.pwa-drawer-title { margin: 0; font-size: 18px; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.pwa-drawer-x {
	background: none; border: 0; color: var(--tx-mut, #9d95b2); cursor: pointer;
	font-size: 26px; line-height: 1; padding: 2px 8px; border-radius: 8px; font-family: var(--f);
}
.pwa-drawer-x:hover { color: #fff; background: rgba(255, 255, 255, .06); }

/* body (scroll) */
.pwa-drawer-body { flex: 1; overflow-y: auto; padding: 8px 22px; }

.pwa-drawer-empty { color: var(--tx-dim, #6f6884); font-size: 14px; text-align: center; padding: 40px 6px; }
.pwa-drawer-empty .btn { margin-top: 16px; }

.pwa-drawer-item {
	display: flex; align-items: center; gap: 12px;
	padding: 14px 0; border-top: 1px solid var(--line-n, #26262f);
}
.pwa-drawer-item:first-child { border-top: 0; }
.pwa-drawer-item-name { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; color: var(--tx, #efeaf6); }
.pwa-drawer-item-price { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--tx, #efeaf6); }
.pwa-drawer-item-rm {
	background: none; border: 0; color: var(--tx-dim, #6f6884); cursor: pointer;
	font-size: 19px; line-height: 1; padding: 2px 6px; border-radius: 6px; font-family: var(--f);
}
.pwa-drawer-item-rm:hover { color: #f0a0a0; background: rgba(200, 60, 60, .12); }

/* upsell */
.pwa-drawer-upsell {
	display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
	margin: 14px 0 4px; padding: 12px 14px; border-radius: 12px;
	background: linear-gradient(90deg, rgba(124, 78, 163, .16), transparent);
	border: 1px solid var(--line-n, #26262f);
	font-size: 13px; color: var(--tx-mut, #9d95b2);
}
.pwa-drawer-upsell[hidden] { display: none; }

/* foot */
.pwa-drawer-foot { padding: 16px 22px 22px; border-top: 1px solid var(--line-n, #26262f); }
.pwa-drawer-foot[hidden] { display: none; }
.pwa-drawer-sub {
	display: flex; align-items: baseline; justify-content: space-between;
	font-weight: 800; font-size: 16px; color: #fff; margin-bottom: 4px;
}
.pwa-drawer-sub span:last-child { font-variant-numeric: tabular-nums; }
.pwa-drawer-note { font-size: 11.5px; color: var(--tx-dim, #6f6884); margin: 0 0 14px; }
.pwa-drawer-foot .btn.block { width: 100%; justify-content: center; }
.pwa-drawer-clear {
	display: block; width: 100%; margin-top: 10px; padding: 8px;
	background: none; border: 0; color: var(--tx-dim, #6f6884);
	font-size: 12.5px; cursor: pointer; font-family: var(--f); border-radius: 8px;
}
.pwa-drawer-clear:hover { color: #f0a0a0; }

/* body scroll kilidi (drawer açıkken) */
body.pwa-drawer-open { overflow: hidden; }

/* mobil */
@media (max-width: 560px) {
	.pwa-drawer { width: 100vw; border-left: 0; }
	.pwa-drawer-head, .pwa-drawer-body, .pwa-drawer-foot { padding-left: 18px; padding-right: 18px; }
}

/* hareket duyarlılığı */
@media (prefers-reduced-motion: reduce) {
	.pwa-drawer, .pwa-drawer-backdrop { animation-duration: .001ms; }
}

/* Adet kontrolü (ADET-FARKINDA) */
.pwa-drawer-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pwa-drawer-item-sub { font-size: 11.5px; color: var(--tx-dim, #6f6884); }
.pwa-qty { display: inline-flex; align-items: center; gap: 4px; }
.pwa-qty-btn { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line-n, #26262f); background: var(--panel-2, #191920); color: var(--tx, #efeaf6); cursor: pointer; font-size: 15px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; font-family: inherit; }
.pwa-qty-btn:hover:not(:disabled) { border-color: var(--purple-l, #7c4ea3); color: #fff; }
.pwa-qty-btn:disabled { opacity: .4; cursor: default; }
.pwa-qty-n { min-width: 18px; text-align: center; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 700; }
