/**
 * Cegléd Térkő – oldalsó kosár.
 */

.ctk-drawer, .ctk-drawer *,
.ctk-drawer-backdrop { box-sizing: border-box; }

.ctk-drawer {
	--ink: #161A19;
	--ink-2: #333B38;
	--muted: #646C68;
	--line: #DDE1DB;
	--sand: #C2A379;
	--sand-lt: #CBAE87;
	--sand-tx: #9A7742;
	--sand-bg: #F6EFE3;
	--mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
	--display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;

	position: fixed;
	top: 0;
	right: 0;
	z-index: 999990;
	width: min(430px, 100%);
	height: 100%;
	height: 100dvh;
	display: flex;
	flex-direction: column;
	background: #fff;
	color: var(--ink);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	line-height: 1.5;
	box-shadow: -18px 0 46px -24px rgba(22, 26, 25, .55);
	transform: translateX(102%);
	transition: transform .28s cubic-bezier(.3, .7, .3, 1);
	visibility: hidden;
}
.ctk-drawer.is-open { transform: none; visibility: visible; }

.ctk-drawer-backdrop {
	position: fixed;
	inset: 0;
	z-index: 999989;
	background: rgba(22, 26, 25, .45);
	opacity: 0;
	transition: opacity .28s ease;
}
.ctk-drawer-backdrop.is-open { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
	.ctk-drawer, .ctk-drawer-backdrop { transition: none; }
}

/* ---------- fejrész ---------- */
.ctk-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px;
	background: var(--sand-bg);
	border-bottom: 1px solid var(--line);
	flex: 0 0 auto;
}
.ctk-drawer__head strong {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--display);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
	font-size: 1.2rem;
}
.ctk-drawer__close {
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	border: 1px solid #C6CCC3;
	border-radius: 50%;
	background: #fff;
	color: var(--ink);
	cursor: pointer;
	flex: 0 0 auto;
}
.ctk-drawer__close:hover { border-color: var(--ink); }

.ctk-drawer__inner {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}

/* ---------- tételek ---------- */
.ctk-drawer__body {
	flex: 1;
	overflow-y: auto;
	padding: 6px 18px;
	-webkit-overflow-scrolling: touch;
}

.ctk-ci {
	display: grid;
	grid-template-columns: 62px 1fr auto;
	gap: 12px;
	padding: 16px 0;
	border-bottom: 1px solid var(--line);
}
.ctk-ci:last-child { border-bottom: 0; }

.ctk-ci__thumb {
	width: 62px;
	height: 62px;
	border-radius: 3px;
	overflow: hidden;
	background: #E7E9E4;
}
.ctk-drawer .ctk-ci__thumb img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	display: block;
}

.ctk-ci__main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ctk-ci__name {
	font-weight: 600;
	font-size: .95rem;
	line-height: 1.25;
	color: var(--ink);
	text-decoration: none;
}
.ctk-ci__name:hover { color: var(--sand-tx); }
.ctk-ci__meta { font-family: var(--mono); font-size: .74rem; color: var(--muted); }

.ctk-ci__qty { display: flex; align-items: center; gap: 8px; }
.ctk-ci__step {
	width: 26px;
	height: 26px;
	display: grid;
	place-items: center;
	border: 1px solid #C6CCC3;
	border-radius: 50%;
	background: #fff;
	color: var(--ink);
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}
.ctk-ci__step:hover { border-color: var(--sand); background: var(--sand); color: #fff; }
.ctk-ci__num {
	min-width: 20px;
	text-align: center;
	font-family: var(--mono);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}
.ctk-ci__unit { font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.ctk-ci__area { font-family: var(--mono); font-size: .74rem; color: var(--sand-tx); }

.ctk-ci__side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: space-between;
	gap: 10px;
}
.ctk-ci__sum { font-weight: 700; white-space: nowrap; font-size: .95rem; }
.ctk-ci__remove {
	background: none;
	border: 0;
	padding: 4px;
	color: var(--muted);
	cursor: pointer;
	line-height: 0;
}
.ctk-ci__remove:hover { color: #A8442C; }

/* ---------- üres állapot ---------- */
.ctk-drawer__empty {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	text-align: center;
	padding: 60px 20px;
	color: var(--muted);
}
.ctk-drawer__empty-icon { color: var(--sand); line-height: 0; }
.ctk-drawer__empty p { margin: 0; }

/* ---------- lábrész ---------- */
.ctk-drawer__foot {
	flex: 0 0 auto;
	border-top: 1px solid var(--line);
	padding: 16px 18px calc(18px + env(safe-area-inset-bottom, 0px));
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: #fff;
}
.ctk-drawer__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	font-family: var(--mono);
	font-size: .82rem;
	color: var(--muted);
}
.ctk-drawer__row b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ctk-drawer__row--fee b { color: var(--sand-tx); }

.ctk-drawer__total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding-top: 10px;
	margin-top: 2px;
	border-top: 1px solid var(--line);
	font-family: var(--display);
	font-weight: 700;
	text-transform: uppercase;
	font-size: 1.15rem;
}
.ctk-drawer__total b { font-size: 1.35rem; }

.ctk-drawer__hint {
	margin: 4px 0 2px;
	padding: 10px 12px;
	background: var(--sand-bg);
	border-radius: 4px;
	font-size: .8rem;
	color: #5A4A31;
	line-height: 1.45;
}
.ctk-drawer__hint--ok { background: #EDF1EA; color: #3F5140; }

.ctk-drawer__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 4px;
	padding: 13px 20px;
	border: 1px solid var(--sand);
	border-radius: 25px;
	background: var(--sand);
	color: #fff;
	text-decoration: none;
	font-family: var(--display);
	font-weight: 700;
	font-size: 1rem;
	letter-spacing: .02em;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.ctk-drawer__btn:hover { background: var(--sand-lt); border-color: var(--sand-lt); color: #fff; }
.ctk-drawer__btn--ghost {
	background: #fff;
	color: var(--ink);
	border-color: #C6CCC3;
	margin-top: 0;
}
.ctk-drawer__btn--ghost:hover { background: #fff; border-color: var(--ink); color: var(--ink); }

/* ---------- a fejléc kosár-számlálója ---------- */
.ctk-cart-badge {
	position: absolute;
	top: -7px;
	right: -7px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 20px;
	background: var(--ctk-sand, #C2A379);
	color: #fff;
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: .68rem;
	font-weight: 600;
	display: grid;
	place-items: center;
	line-height: 1;
	pointer-events: none;
}
.ctk-cart-badge[hidden] { display: none; }

/* a fejléc ikonja lehet <a> vagy gomb – a badge-hez pozicionálás kell */
.ctk-hdr__cart, [data-ctk-cart] { position: relative; }

body.ctk-cart-open { overflow: hidden; }

@media (max-width: 480px) {
	.ctk-drawer { width: 100%; }
	.ctk-ci { grid-template-columns: 52px 1fr auto; gap: 10px; }
	.ctk-ci__thumb { width: 52px; height: 52px; }
}

/* kép nélküli tétel: a kő színe, finom fugarajzzal – nem a Woo szürke ikonja */
.ctk-ci__ph {
	display: block;
	width: 100%;
	height: 100%;
	background-color: var(--ctk-ph, #C6CCC3);
	background-image:
		repeating-linear-gradient(90deg,
			rgba(255,255,255,.22) 0 1px, transparent 1px 21px),
		repeating-linear-gradient(0deg,
			rgba(0,0,0,.14) 0 1px, transparent 1px 15px);
	background-position: 0 0, 10px 0;
}
