/* Kívánom – Sticky Kosárba Gomb – frontend stílusok */

#kvn-sac-bar,
#kvn-sac-fab,
#kvn-sac-sheet-trigger,
#kvn-sac-sheet,
#kvn-sac-sheet-overlay {
	box-sizing: border-box;
	font-family: inherit;
}

#kvn-sac-bar *,
#kvn-sac-fab *,
#kvn-sac-sheet-trigger *,
#kvn-sac-sheet * {
	box-sizing: border-box;
}

/* ---------- Láthatósági szabályok (asztali / mobil) ---------- */
@media (max-width: 782px) {
	.kvn-show-desktop-only {
		display: none !important;
	}
}
@media (min-width: 783px) {
	.kvn-show-mobile-only {
		display: none !important;
	}
}

/* ---------- Közös pozicionálás – sáv, FAB és bottom sheet kioldó egyaránt használja ---------- */
.kvn-sac-pos-top-left,
.kvn-sac-pos-top-center,
.kvn-sac-pos-top-right,
.kvn-sac-pos-bottom-left,
.kvn-sac-pos-bottom-center,
.kvn-sac-pos-bottom-right {
	position: fixed;
	z-index: 9990;
}

.kvn-sac-pos-top-left {
	top: var(--kvn-pos-offset, 16px);
	left: var(--kvn-pos-offset, 16px);
	right: auto;
	bottom: auto;
}

.kvn-sac-pos-top-center {
	top: var(--kvn-pos-offset, 16px);
	left: 0;
	right: 0;
	bottom: auto;
}

.kvn-sac-pos-top-right {
	top: var(--kvn-pos-offset, 16px);
	right: var(--kvn-pos-offset, 16px);
	left: auto;
	bottom: auto;
}

.kvn-sac-pos-bottom-left {
	bottom: var(--kvn-pos-offset, 16px);
	left: var(--kvn-pos-offset, 16px);
	right: auto;
	top: auto;
}

.kvn-sac-pos-bottom-center {
	bottom: var(--kvn-pos-offset, 16px);
	left: 0;
	right: 0;
	top: auto;
}

.kvn-sac-pos-bottom-right {
	bottom: var(--kvn-pos-offset, 16px);
	right: var(--kvn-pos-offset, 16px);
	left: auto;
	top: auto;
}

/* Csúszó megjelenés iránya (fentről vagy lentről) – csak a sávnál és a sheet kioldónál */
.kvn-sac-dir-top.kvn-sac-bar,
.kvn-sac-dir-top.kvn-sac-sheet-trigger {
	transform: translateY(-120%);
}

.kvn-sac-dir-bottom.kvn-sac-bar,
.kvn-sac-dir-bottom.kvn-sac-sheet-trigger {
	transform: translateY(120%);
}

.kvn-sac-bar.kvn-sac-visible,
.kvn-sac-sheet-trigger.kvn-sac-visible {
	transform: translateY(0) !important;
}

/* ---------- 1) Sticky Add-to-cart sáv ---------- */
.kvn-sac-bar {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
	background: var(--kvn-bar-bg, #1b1b1f) !important;
	color: var(--kvn-bar-text, #fff);
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.18);
	transition: transform 0.25s ease, opacity 0.25s ease;
	opacity: 0;
	pointer-events: none;
	width: var(--kvn-el-width, 100%);
	min-height: var(--kvn-el-height, auto);
	margin-left: auto;
	margin-right: auto;
	border-radius: 10px;
}

.kvn-sac-bar.kvn-sac-visible {
	opacity: 1;
	pointer-events: auto;
}

.kvn-sac-bar__image img {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
}

.kvn-sac-bar__info {
	flex: 1;
	min-width: 0;
}

.kvn-sac-bar__title {
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--kvn-bar-text, #fff);
}

.kvn-sac-bar__price {
	font-size: 13px;
	opacity: 0.85;
	color: var(--kvn-bar-text, #fff);
}

.kvn-sac-bar__price ins {
	text-decoration: none;
}

.kvn-sac-bar__button,
.kvn-sac-sheet-trigger__button {
	flex-shrink: 0;
	cursor: pointer;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 600;
	transition: transform 0.15s ease, opacity 0.15s ease;
	/* A host téma/WooCommerce globális gomb-stílusait felülírjuk, hogy tömör kitöltésű,
	   a beállított színű gomb jelenjen meg körvonal helyett. */
	background-color: var(--kvn-bar-btn-bg, #ff2d78) !important;
	background-image: none !important;
	color: var(--kvn-bar-btn-text, #fff) !important;
	border: 0 !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	text-shadow: none !important;
	outline: none !important;
}

.kvn-sac-sheet-trigger__button {
	background-color: var(--kvn-sheet-trigger-btn-bg, #ff2d78) !important;
	color: var(--kvn-sheet-trigger-btn-text, #fff) !important;
}

.kvn-sac-bar__button:hover,
.kvn-sac-sheet-trigger__button:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

/* ---------- 2) Floating Action Button (FAB) ---------- */
.kvn-sac-fab {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	padding: 14px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
	opacity: 0;
	transform: scale(0.6);
	pointer-events: none;
	transition: transform 0.2s ease, opacity 0.2s ease;
	background-color: var(--kvn-fab-bg, #ff2d78) !important;
	background-image: none !important;
	color: var(--kvn-fab-icon, #fff) !important;
	border: 0 !important;
	border-radius: 999px !important;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25) !important;
	outline: none !important;
}

.kvn-sac-fab.kvn-sac-visible {
	opacity: 1;
	transform: scale(1) !important;
	pointer-events: auto;
}

.kvn-sac-fab__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--kvn-fab-icon, #fff);
}

.kvn-sac-fab__label {
	font-size: 13px;
	font-weight: 600;
	padding-right: 4px;
	white-space: nowrap;
	color: var(--kvn-fab-icon, #fff);
}

.kvn-sac-fab--pulse::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: var(--kvn-fab-bg, #ff2d78);
	opacity: 0.55;
	animation: kvn-sac-pulse 1.8s ease-out infinite;
	z-index: -1;
}

@keyframes kvn-sac-pulse {
	0% {
		transform: scale(1);
		opacity: 0.5;
	}
	100% {
		transform: scale(1.7);
		opacity: 0;
	}
}

/* ---------- 3) Bottom sheet / drawer kioldó sáv ---------- */
.kvn-sac-sheet-trigger {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
	background: var(--kvn-sheet-trigger-bg, #1b1b1f) !important;
	color: var(--kvn-sheet-trigger-text, #fff);
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.18);
	transition: transform 0.25s ease, opacity 0.25s ease;
	opacity: 0;
	pointer-events: none;
	width: var(--kvn-el-width, 100%);
	min-height: var(--kvn-el-height, auto);
	margin-left: auto;
	margin-right: auto;
	border-radius: 10px;
}

.kvn-sac-sheet-trigger.kvn-sac-visible {
	opacity: 1;
	pointer-events: auto;
}

.kvn-sac-sheet-trigger .kvn-sac-bar__title,
.kvn-sac-sheet-trigger .kvn-sac-bar__price {
	color: var(--kvn-sheet-trigger-text, #fff);
}

/* A bottom sheet panel maga mindig alul, teljes szélességben nyílik – ez UX szempontból fix. */
.kvn-sac-sheet-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 9995;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease;
}

.kvn-sac-sheet-overlay.kvn-sac-open {
	opacity: 1;
	visibility: visible;
}

.kvn-sac-sheet {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9996;
	max-height: 85vh;
	overflow-y: auto;
	background: var(--kvn-sheet-bg, #fff);
	border-radius: 18px 18px 0 0;
	padding: 8px 20px 24px;
	transform: translateY(100%);
	transition: transform 0.3s ease;
	box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
}

.kvn-sac-sheet.kvn-sac-open {
	transform: translateY(0);
}

.kvn-sac-sheet__handle {
	width: 40px;
	height: 4px;
	border-radius: 999px;
	background: var(--kvn-sheet-handle, #ccc);
	margin: 10px auto;
	cursor: pointer;
}

.kvn-sac-sheet__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 12px;
}

.kvn-sac-sheet__close {
	border: none;
	background: transparent;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: inherit;
}

.kvn-sac-sheet__body form.cart {
	margin: 0;
}

.kvn-sac-sheet__body {
	padding-bottom: 8px;
}

/* Rövid kiemelés, amikor a FAB/sáv a valódi form-hoz (vagy gombhoz) görget (sheet nélküli esetben) */
.kvn-sac-highlight {
	animation: kvn-sac-highlight-flash 1.2s ease;
}

@keyframes kvn-sac-highlight-flash {
	0% {
		box-shadow: 0 0 0 0 rgba(255, 45, 120, 0.5);
	}
	50% {
		box-shadow: 0 0 0 8px rgba(255, 45, 120, 0.15);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(255, 45, 120, 0);
	}
}
