/**
 * QWALLZ — natív oldalsó kosár (inc/side-cart.php).
 *
 * Minden oldalon töltődik (Elementor-oldalakon is), ezért a DS v1.1 tokeneket
 * tartalék-értékkel használja: a qwallz-tokens.css nélkül is ugyanígy néz ki.
 * Minden szabály a .qwallz-sc alatt — a meglévő oldalstílusokat nem érinti, és
 * az Elementor/Hello gomb-, input-alapstílusait felülírja.
 */

.qwallz-sc {
	--sc-ink: var(--qw-brand-ink, #1F3133);
	--sc-deep: var(--qw-brand-deep, #233F40);
	--sc-brass: var(--qw-brand-brass, #7A6F4F);
	--sc-text: var(--qw-text-primary, #1F3133);
	--sc-muted: var(--qw-text-muted, #5C6A6B);
	--sc-soft: var(--qw-bg-soft, #F6F4F2);
	--sc-line: var(--qw-border-color, #DDD7D2);
	--sc-ok: #2F6B4F;
	--sc-err: #A13A2E;
	--sc-radius: var(--qw-radius-sm, 6px);
	--sc-font: var(--qw-font-body, 'Source Sans Pro', 'Source Sans 3', Arial, sans-serif);
	--sc-pad: 20px;
	position: fixed;
	inset: 0;
	z-index: 100000;
	font-family: var(--sc-font);
	font-size: 16px;
	line-height: 1.45;
	color: var(--sc-text);
	-webkit-font-smoothing: antialiased;
}
.qwallz-sc[hidden] { display: none; }
/* Az oldal (Elementor kit / Hello reset) gomb-alapstílusai ne szivárogjanak be. */
.qwallz-sc button { text-transform: none; letter-spacing: 0; box-shadow: none; line-height: 1.2; }
.qwallz-sc *, .qwallz-sc *::before, .qwallz-sc *::after { box-sizing: border-box; }

.qwallz-sc__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 32, 34, .45);
	opacity: 0;
	transition: opacity .22s ease;
}
.qwallz-sc__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(440px, 100%);
	display: flex;
	flex-direction: column;
	background: #fff;
	box-shadow: -12px 0 40px rgba(31, 49, 51, .16);
	transform: translateX(100%);
	transition: transform .26s cubic-bezier(.2, .7, .2, 1);
	outline: 0;
}
.qwallz-sc.is-open .qwallz-sc__backdrop { opacity: 1; }
.qwallz-sc.is-open .qwallz-sc__panel { transform: none; }
@media (prefers-reduced-motion: reduce) {
	.qwallz-sc__backdrop, .qwallz-sc__panel { transition: none; }
}
html.qwallz-sc-lock, html.qwallz-sc-lock body { overflow: hidden; }

.qwallz-sc__inner {
	display: flex;
	flex-direction: column;
	min-height: 0;
	height: 100%;
}
.qwallz-sc__inner.is-busy { cursor: progress; }
.qwallz-sc__inner.is-busy .qwallz-sc__body { opacity: .6; pointer-events: none; transition: opacity .15s .1s; }
/* A lábléc gombjai frissítés alatt is koppinthatók (a JS megvárja a kérést,
   utána navigál) — csak az összeg halványul, mert még a régi értéket mutatja. */
.qwallz-sc__inner.is-busy .qwallz-sc__total { opacity: .6; transition: opacity .15s .1s; }

/* Gépelés érintőképernyőn (JS: is-typing): a panel a billentyűzet fölötti
   látható területhez igazodik, a ragadós lábléc nem takarja a mezőt. */
.qwallz-sc.is-typing .qwallz-sc__panel {
	top: var(--sc-vv-top, 0px);
	bottom: auto;
	height: var(--sc-vv-h, 100%);
}
.qwallz-sc.is-typing .qwallz-sc__foot { display: none; }

.qwallz-sc__ic { flex: none; width: 20px; height: 20px; }
.qwallz-sc__sr {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap; border: 0;
}

/* --- Fejléc -------------------------------------------------------------- */
.qwallz-sc__head {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 12px 14px var(--sc-pad);
	border-bottom: 1px solid var(--sc-line);
}
.qwallz-sc .qwallz-sc__title {
	margin: 0;
	font-family: var(--sc-font);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	color: var(--sc-text);
}
.qwallz-sc__title span { font-weight: 400; color: var(--sc-muted); }
.qwallz-sc button.qwallz-sc__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--sc-line);
	border-radius: var(--sc-radius);
	background: #fff;
	color: var(--sc-ink);
	cursor: pointer;
}
.qwallz-sc button.qwallz-sc__close:hover { background: var(--sc-soft); }

/* --- Értesítés ------------------------------------------------------------ */
.qwallz-sc__notice {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 12px var(--sc-pad) 0;
	padding: 10px 12px;
	border-radius: var(--sc-radius);
	background: var(--sc-soft);
	font-size: 15px;
}
.qwallz-sc__notice[hidden] { display: none; }
.qwallz-sc__notice.is-error { background: #FBEDEB; color: var(--sc-err); }
.qwallz-sc__notice.is-success { background: #EAF3EE; color: var(--sc-ok); }

/* --- Görgethető rész ------------------------------------------------------ */
.qwallz-sc__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 0 var(--sc-pad) 20px;
}
.qwallz-sc__loading { margin: 24px 0; color: var(--sc-muted); }

.qwallz-sc__items { list-style: none; margin: 0; padding: 0; }
.qwallz-sc__item {
	display: grid;
	grid-template-columns: 84px 1fr auto;
	grid-template-areas: "thumb info line" "thumb row row";
	gap: 0 14px;
	align-items: start;
	margin: 0;
	padding: 18px 0;
	border-bottom: 1px solid var(--sc-line);
}
.qwallz-sc__thumb {
	grid-area: thumb;
	width: 84px;
	aspect-ratio: 1;
	border-radius: var(--sc-radius);
	overflow: hidden;
	background: var(--sc-soft);
}
.qwallz-sc__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; }
.qwallz-sc__info { grid-area: info; min-width: 0; }
.qwallz-sc__name { margin: 0 0 2px; font-size: 16px; font-weight: 600; line-height: 1.3; }
.qwallz-sc__name a { color: var(--sc-text); text-decoration: none; }
.qwallz-sc__name a:hover { text-decoration: underline; }
.qwallz-sc dl.variation {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0 6px;
	margin: 2px 0 0;
	font-size: 14px;
	color: var(--sc-muted);
}
.qwallz-sc dl.variation dt, .qwallz-sc dl.variation dd { margin: 0; padding: 0; font-weight: 400; }
.qwallz-sc dl.variation dd p { margin: 0; }
.qwallz-sc__unit { margin: 2px 0 0; font-size: 14px; color: var(--sc-muted); }
.qwallz-sc__line { grid-area: line; margin: 0; font-weight: 600; white-space: nowrap; text-align: right; }
.qwallz-sc__line del, .qwallz-sc__unit del { opacity: .6; font-weight: 400; }

.qwallz-sc__row {
	grid-area: row;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin-top: 10px;
}
.qwallz-sc__qty {
	display: inline-flex;
	align-items: stretch;
	height: 40px;
	border: 1px solid var(--sc-line);
	border-radius: var(--sc-radius);
	background: #fff;
	overflow: hidden;
}
.qwallz-sc button.qwallz-sc__step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #fff;
	color: var(--sc-ink);
	cursor: pointer;
}
.qwallz-sc button.qwallz-sc__step:hover:not(:disabled) { background: var(--sc-soft); }
.qwallz-sc button.qwallz-sc__step:disabled { color: #B9B3AE; cursor: default; }
.qwallz-sc button.qwallz-sc__step .qwallz-sc__ic { width: 18px; height: 18px; }
.qwallz-sc input.qwallz-sc__input {
	width: 44px;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-left: 1px solid var(--sc-line);
	border-right: 1px solid var(--sc-line);
	border-radius: 0;
	background: #fff;
	box-shadow: none;
	font: inherit;
	font-size: 16px;
	text-align: center;
	color: var(--sc-text);
	-moz-appearance: textfield;
	appearance: textfield;
}
.qwallz-sc input.qwallz-sc__input::-webkit-outer-spin-button,
.qwallz-sc input.qwallz-sc__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qwallz-sc__solo { font-size: 15px; color: var(--sc-muted); }

.qwallz-sc button.qwallz-sc__remove,
.qwallz-sc button.qwallz-sc__link {
	min-height: 0;
	padding: 4px 0;
	border: 0;
	border-radius: 0;
	background: none;
	font: inherit;
	font-size: 14px;
	color: var(--sc-muted);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.qwallz-sc button.qwallz-sc__remove { min-height: 40px; }
.qwallz-sc button.qwallz-sc__remove:hover,
.qwallz-sc button.qwallz-sc__link:hover { color: var(--sc-ink); background: none; }

/* --- Összesítő ------------------------------------------------------------ */
.qwallz-sc__sum { margin: 0; padding: 14px 0 6px; }
.qwallz-sc__sum > div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 4px 0;
}
.qwallz-sc__sum dt, .qwallz-sc__sum dd { margin: 0; padding: 0; font-weight: 400; }
.qwallz-sc__sum dd { text-align: right; white-space: nowrap; }
.qwallz-sc__sum-coupon dd { color: var(--sc-ok); }
.qwallz-sc__sum-coupon .qwallz-sc__link { margin-left: 6px; }
.qwallz-sc__sum-ship dd { color: var(--sc-muted); }
.qwallz-sc__sum-hint {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 2px 0 0;
	font-size: 14px;
	color: var(--sc-muted);
}
.qwallz-sc__sum-hint .qwallz-sc__ic { width: 16px; height: 16px; }

/* --- Kupon ---------------------------------------------------------------- */
.qwallz-sc__coupon { margin: 8px 0 0; border-top: 1px solid var(--sc-line); border-bottom: 1px solid var(--sc-line); }
.qwallz-sc__coupon summary {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	list-style: none;
	cursor: pointer;
	font-weight: 600;
}
.qwallz-sc__coupon summary::-webkit-details-marker { display: none; }
.qwallz-sc__coupon summary span { flex: 1; }
.qwallz-sc__coupon summary .qwallz-sc__ic:last-child { transition: transform .2s; }
.qwallz-sc__coupon[open] summary .qwallz-sc__ic:last-child { transform: rotate(180deg); }
.qwallz-sc__coupon-row { display: flex; gap: 8px; }
.qwallz-sc input[data-sc-coupon] {
	flex: 1;
	min-width: 0;
	height: 44px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid var(--sc-line);
	border-radius: var(--sc-radius);
	background: #fff;
	box-shadow: none;
	font: inherit;
	font-size: 16px;
	color: var(--sc-text);
	text-transform: uppercase;
}
.qwallz-sc input[data-sc-coupon]::placeholder { text-transform: none; color: var(--sc-muted); }
.qwallz-sc__coupon-hint { margin: 6px 0 14px; font-size: 14px; color: var(--sc-muted); }

/* --- Várható kiszállítás --------------------------------------------------- */
.qwallz-sc__delivery { margin-top: 16px; padding: 14px 16px; border-radius: var(--sc-radius); background: var(--sc-soft); }
.qwallz-sc__delivery-line { display: flex; gap: 10px; margin: 0 0 12px; font-size: 15px; }
.qwallz-sc__delivery-line .qwallz-sc__ic { color: var(--sc-brass); margin-top: 1px; }
.qwallz-sc__steps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}
.qwallz-sc__steps li {
	position: relative;
	margin: 0;
	padding: 10px 0 0;
	border-top: 2px solid var(--sc-line);
	font-size: 13px;
	line-height: 1.3;
	color: var(--sc-muted);
}
.qwallz-sc__steps li:first-child { border-top-color: var(--sc-brass); }
.qwallz-sc__steps strong { display: block; font-size: 14px; color: var(--sc-text); }

/* --- Lábléc (ragadós) ------------------------------------------------------ */
.qwallz-sc__foot {
	flex: none;
	padding: 14px var(--sc-pad) calc(16px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--sc-line);
	background: #fff;
}
.qwallz-sc__total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	font-size: 18px;
	font-weight: 600;
}
.qwallz-sc__total strong { font-size: 22px; }
.qwallz-sc__note { margin: 2px 0 0; font-size: 13px; color: var(--sc-muted); text-align: right; }
.qwallz-sc__actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 14px; }

.qwallz-sc a.qwallz-sc__btn,
.qwallz-sc button.qwallz-sc__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 16px;
	border: 1px solid var(--sc-ink);
	border-radius: var(--sc-radius);
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	transition: background-color .16s ease, color .16s ease;
}
.qwallz-sc .qwallz-sc__btn--primary { background: var(--sc-ink); color: #fff; }
.qwallz-sc .qwallz-sc__btn--primary:hover { background: var(--sc-deep); color: #fff; }
.qwallz-sc .qwallz-sc__btn--ghost { background: #fff; color: var(--sc-ink); }
.qwallz-sc .qwallz-sc__btn--ghost:hover { background: var(--sc-soft); color: var(--sc-ink); }
.qwallz-sc button.qwallz-sc__btn { min-height: 44px; }
.qwallz-sc a.qwallz-sc__btn { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.qwallz-sc a.qwallz-sc__btn:active { transform: translateY(1px); }

/* Betöltés: a koppintás után azonnal látszik, hogy a következő oldal jön. */
.qwallz-sc a.qwallz-sc__btn.is-loading { position: relative; gap: 10px; cursor: progress; }
.qwallz-sc a.qwallz-sc__btn--primary.is-loading { background: var(--sc-deep); }
.qwallz-sc a.qwallz-sc__btn.is-loading::before {
	content: "";
	flex: none;
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: qwallz-sc-spin .7s linear infinite;
}
@keyframes qwallz-sc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
	.qwallz-sc a.qwallz-sc__btn.is-loading::before { animation-duration: 2s; }
}

/* --- Üres kosár ------------------------------------------------------------ */
.qwallz-sc__empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; }
.qwallz-sc__empty p { margin: 0 0 8px; color: var(--sc-muted); max-width: 30ch; }
.qwallz-sc__empty .qwallz-sc__empty-title { margin: 0; font-size: 18px; font-weight: 600; color: var(--sc-text); }
.qwallz-sc__empty-ic { display: inline-flex; padding: 14px; margin-bottom: 8px; border-radius: 50%; background: var(--sc-soft); color: var(--sc-brass); }
.qwallz-sc__empty-ic .qwallz-sc__ic { width: 28px; height: 28px; }
.qwallz-sc__empty .qwallz-sc__btn { margin-top: 8px; padding: 0 24px; }

/* --- Fókusz --------------------------------------------------------------- */
.qwallz-sc a:focus-visible,
.qwallz-sc button:focus-visible,
.qwallz-sc input:focus-visible,
.qwallz-sc summary:focus-visible {
	outline: 2px solid var(--sc-brass);
	outline-offset: 2px;
}
.qwallz-sc input:focus-visible { outline-offset: -2px; }

@media (max-width: 380px) {
	.qwallz-sc { --sc-pad: 16px; }
	.qwallz-sc__item { grid-template-columns: 64px 1fr auto; }
	.qwallz-sc__thumb { width: 64px; }
	.qwallz-sc__actions { grid-template-columns: 1fr; }
	.qwallz-sc__actions .qwallz-sc__btn--primary { order: -1; }
}
