/**
 * Header cart — mini-košík v headeru
 */

.zh-header-cart {
	--zh-hc-pink: #e84393;
	--zh-hc-text: #ffffff;
	--zh-hc-muted: rgba(255, 255, 255, 0.75);

	position: relative !important;
	display: inline-flex !important;
	align-items: center;
	gap: 0;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1.15;
	vertical-align: middle;
	z-index: 60;
}

.zh-header-cart__trigger {
	display: inline-flex !important;
	align-items: center;
	gap: 10px;
	margin: 0 !important;
	padding: 4px 0 !important;
	text-decoration: none !important;
	color: var(--zh-hc-text) !important;
}

.zh-header-cart__trigger:hover,
.zh-header-cart__trigger:focus {
	color: var(--zh-hc-text) !important;
	text-decoration: none !important;
	opacity: 0.92;
}

.zh-header-cart__icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	flex: 0 0 auto;
	color: inherit;
}

.zh-header-cart__icon svg {
	display: block;
	width: 22px;
	height: 22px;
}

.zh-header-cart__count {
	position: absolute;
	right: -6px;
	bottom: -4px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--zh-hc-pink) !important;
	color: #fff !important;
	font-family: "DM Sans", Figtree, system-ui, sans-serif !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	line-height: 18px !important;
	text-align: center;
	box-sizing: border-box;
}

.zh-header-cart__count.is-empty {
	display: none !important;
}

.zh-header-cart__text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	min-width: 0;
}

.zh-header-cart__total {
	font-family: "DM Sans", Figtree, system-ui, sans-serif !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	color: inherit !important;
	white-space: nowrap;
}

.zh-header-cart__panel {
	position: absolute;
	top: calc(100% + 2px);
	right: 0;
	width: min(340px, calc(100vw - 24px));
	padding: 16px 16px 14px;
	background: #fff;
	color: #111;
	box-shadow: 0 16px 48px rgba(20, 20, 30, 0.18);
	border: 1px solid #ececf2;
	border-radius: 2px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none !important;
	transform: translateY(6px);
	transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
	z-index: 9999;
	box-sizing: border-box;
}

.zh-header-cart__panel,
.zh-header-cart__panel * {
	pointer-events: none !important;
}

.zh-header-cart__panel::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: -14px;
	height: 14px;
}

.zh-header-cart:hover .zh-header-cart__panel,
.zh-header-cart:focus-within .zh-header-cart__panel,
.zh-header-cart.is-open .zh-header-cart__panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.zh-header-cart:hover .zh-header-cart__panel,
.zh-header-cart:hover .zh-header-cart__panel *,
.zh-header-cart:focus-within .zh-header-cart__panel,
.zh-header-cart:focus-within .zh-header-cart__panel *,
.zh-header-cart.is-open .zh-header-cart__panel,
.zh-header-cart.is-open .zh-header-cart__panel * {
	pointer-events: auto !important;
}

.zh-header-cart__empty {
	margin: 8px 0 4px !important;
	padding: 12px 4px !important;
	font-family: "DM Sans", Figtree, system-ui, sans-serif !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	color: #6b6b80 !important;
	text-align: center;
}

.zh-header-cart__list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	max-height: 320px;
	overflow-x: hidden !important;
	overflow-y: auto !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 14px !important;
}

.zh-header-cart__item {
	display: flex !important;
	align-items: flex-start !important;
	gap: 12px !important;
	margin: 0 !important;
	padding: 0 !important;
}

.zh-header-cart__thumb-link {
	flex: 0 0 56px;
	display: block;
	line-height: 0;
}

.zh-header-cart__thumb {
	width: 56px;
	height: 56px;
	object-fit: contain;
	background: #f7f7f9;
	display: block;
	border-radius: 2px;
}

.zh-header-cart__item-body {
	min-width: 0;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.zh-header-cart__item-name {
	font-family: "DM Sans", Figtree, system-ui, sans-serif !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	color: #111 !important;
	line-height: 1.3 !important;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.zh-header-cart__item-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.zh-header-cart__item-qty {
	font-family: "DM Sans", Figtree, system-ui, sans-serif !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	color: #6b6b80 !important;
}

.zh-header-cart__item-price {
	font-family: "DM Sans", Figtree, system-ui, sans-serif !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	color: #111 !important;
	white-space: nowrap;
}

.zh-header-cart__go {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	margin-top: 16px !important;
	padding: 12px 16px !important;
	background: #111 !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 2px !important;
	font-family: "DM Sans", Figtree, system-ui, sans-serif !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	text-decoration: none !important;
	box-sizing: border-box;
	text-align: center;
}

.zh-header-cart__go:hover {
	background: #2d2d5f !important;
	color: #fff !important;
}

.site-header.zh-mh .zh-header-cart {
	--zh-hc-text: #2d2d5f;
	--zh-hc-muted: #6b6b8a;
}

@media (max-width: 700px) {
	.zh-header-cart__text {
		display: none;
	}

	.zh-header-cart:hover .zh-header-cart__panel,
	.zh-header-cart:hover .zh-header-cart__panel *,
	.zh-header-cart:focus-within .zh-header-cart__panel,
	.zh-header-cart:focus-within .zh-header-cart__panel * {
		opacity: 0;
		visibility: hidden;
		pointer-events: none !important;
		transform: translateY(6px);
	}

	.zh-header-cart.is-open .zh-header-cart__panel {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	.zh-header-cart.is-open .zh-header-cart__panel,
	.zh-header-cart.is-open .zh-header-cart__panel * {
		pointer-events: auto !important;
	}

	.zh-header-cart__panel {
		position: fixed;
		top: auto;
		right: 12px;
		left: 12px;
		width: auto;
		bottom: 12px;
		max-height: 70vh;
		z-index: 10060;
	}
}

/* Modal — Přidáno do košíku */
.zh-added-modal[hidden] {
	display: none !important;
}

.zh-added-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
	pointer-events: auto !important;
}

.zh-added-modal__backdrop {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: rgba(20, 20, 30, 0.55);
	backdrop-filter: blur(2px);
}

.zh-added-modal__dialog {
	position: relative;
	z-index: 2;
	width: min(800px, calc(100vw - 32px));
	min-height: 188px;
	background: #fff;
	border-radius: 2px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
	overflow: hidden;
	pointer-events: auto !important;
}

.zh-added-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 22px 28px;
	border-bottom: 1px solid #ececec;
}

.zh-added-modal__title {
	margin: 0 !important;
	font-family: "DM Sans", Figtree, system-ui, sans-serif !important;
	font-size: 1.6rem !important;
	font-weight: 800 !important;
	color: #111 !important;
	line-height: 1.2 !important;
}

.zh-added-modal__close {
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #111;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
}

.zh-added-modal__body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	padding: 24px 28px;
	flex-wrap: nowrap;
	min-height: 140px;
	box-sizing: border-box;
}

.zh-added-modal__product {
	display: flex;
	align-items: center;
	gap: 18px;
	min-width: 0;
	flex: 1 1 auto;
}

.zh-added-modal__thumb-wrap {
	position: relative;
	flex: 0 0 88px;
	width: 88px;
	height: 88px;
}

.zh-added-modal__thumb {
	width: 88px;
	height: 88px;
	object-fit: contain;
	background: #f7f7f9;
	border-radius: 2px;
	display: block;
}

.zh-added-modal__ok {
	position: absolute;
	top: -5px;
	left: -5px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #1f8a4c;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.zh-added-modal__meta {
	min-width: 0;
	flex: 1 1 auto;
}

.zh-added-modal__name {
	margin: 0 0 6px !important;
	font-family: "DM Sans", Figtree, system-ui, sans-serif !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	color: #111 !important;
	line-height: 1.35 !important;
}

.zh-added-modal__qty,
.zh-added-modal__price {
	margin: 0 !important;
	font-family: "DM Sans", Figtree, system-ui, sans-serif !important;
	font-size: 15px !important;
	color: #444 !important;
	line-height: 1.4 !important;
}

.zh-added-modal__price {
	font-weight: 700 !important;
	color: #111 !important;
	margin-top: 4px !important;
}

.zh-added-modal__actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 0 0 220px;
	width: 220px;
}

.zh-added-modal__btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 18px !important;
	border-radius: 2px !important;
	font-family: "DM Sans", Figtree, system-ui, sans-serif !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	text-decoration: none !important;
	cursor: pointer;
	box-sizing: border-box;
	text-align: center;
	width: 100%;
	position: relative;
	z-index: 5;
	pointer-events: auto !important;
	touch-action: manipulation;
}

.zh-added-modal__btn--primary {
	background: #111 !important;
	color: #fff !important;
	border: 1px solid #111 !important;
}

.zh-added-modal__btn--ghost {
	background: #fff !important;
	color: #111 !important;
	border: 1px solid #111 !important;
}

.zh-added-modal__btn--primary:hover {
	background: #2d2d5f !important;
	border-color: #2d2d5f !important;
	color: #fff !important;
}

body.zh-added-modal-open,
body.aiqg-added-modal-open {
	overflow: hidden !important;
}

@media (max-width: 700px) {
	.zh-added-modal__dialog {
		width: min(100%, calc(100vw - 24px));
	}

	.zh-added-modal__body {
		flex-direction: column;
		align-items: stretch;
		flex-wrap: wrap;
		gap: 18px;
		padding: 20px;
	}

	.zh-added-modal__actions {
		width: 100%;
		flex-basis: auto;
		min-width: 0;
	}

	.zh-added-modal__head {
		padding: 18px 20px;
	}

	.zh-added-modal__title {
		font-size: 1.35rem !important;
	}
}
