/* ============================================================================
   HMi Shop-Flyout — WooCommerce-Mini-Cart Popover
   ----------------------------------------------------------------------------
   Panel ist per Default versteckt (hidden-Attribut). JS togglet .is-open,
   wenn der Cart-Icon-Button im Megamenü geklickt wird. Positioning: fixed
   rechts oben unter dem Megamenü (--hmi-subnav-offset nutzen wir nicht,
   weil das für Sub-Nav ist; wir nehmen einen eigenen Header-Offset-Wert).
   ============================================================================ */

.hmi-shop-flyout {
	position: fixed;
	top: 72px; /* Höhe Megamenü-Header */
	right: 1rem;
	width: 22rem;
	max-width: calc(100vw - 2rem);
	z-index: 45; /* über Backdrop, unter Mobile-Overlay (50) */
	background: #ffffff;
	border-radius: 0.75rem;
	border: 1px solid rgba(0, 0, 0, 0.06);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
	overflow: hidden;
	font-family: 'Ubuntu', sans-serif;
	font-size: 14px;
	color: #0F131F;
	opacity: 0;
	transform: translateY(-8px);
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.hmi-shop-flyout[hidden] {
	display: none !important;
}
.hmi-shop-flyout.is-open {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
	.hmi-shop-flyout { transition: none; }
}

/* Heading */
.hmi-shop-flyout-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem 1rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.hmi-shop-flyout-title {
	font-weight: 500;
	font-size: 14px;
}
.hmi-shop-flyout-count {
	color: #5b6273;
	font-weight: 400;
}
.hmi-shop-flyout-close {
	background: none;
	border: 0;
	padding: 0.25rem;
	color: #5b6273;
	cursor: pointer;
	border-radius: 4px;
	transition: color 0.15s ease, background-color 0.15s ease;
}
.hmi-shop-flyout-close:hover,
.hmi-shop-flyout-close:focus-visible {
	color: #0F131F;
	background-color: rgba(0, 0, 0, 0.04);
	outline: none;
}

/* Items */
.hmi-shop-flyout-items {
	list-style: none;
	margin: 0;
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	max-height: 24rem;
	overflow-y: auto;
}
.hmi-shop-flyout-item {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
}
.hmi-shop-flyout-item-thumb {
	flex-shrink: 0;
	width: 3rem;
	height: 3rem;
	border-radius: 0.5rem;
	background: rgba(0, 112, 120, 0.08);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	color: #007078;
}
.hmi-shop-flyout-item-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.hmi-shop-flyout-item-body {
	flex: 1 1 auto;
	min-width: 0;
}
.hmi-shop-flyout-item-name {
	margin: 0 0 0.125rem 0;
	font-weight: 500;
	font-size: 14px;
	color: #0F131F;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.hmi-shop-flyout-item-meta {
	margin: 0 0 0.125rem 0;
	font-size: 12px;
	color: #5b6273;
}
.hmi-shop-flyout-item-price {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: #0F131F;
}
.hmi-shop-flyout-item-remove {
	flex-shrink: 0;
	padding: 0.25rem;
	color: #9ca3af;
	border-radius: 4px;
	text-decoration: none !important;
	transition: color 0.15s ease, background-color 0.15s ease;
}
.hmi-shop-flyout-item-remove:hover,
.hmi-shop-flyout-item-remove:focus-visible {
	color: #dc2626;
	background-color: rgba(220, 38, 38, 0.08);
	outline: none;
}

/* Empty state */
.hmi-shop-flyout-empty {
	padding: 2rem 1rem;
	text-align: center;
	color: #5b6273;
}
.hmi-shop-flyout-empty svg {
	color: #c3c4c7;
	margin: 0 auto 0.5rem;
}
.hmi-shop-flyout-empty p {
	margin: 0;
	font-size: 14px;
}

/* Footer (Subtotal + CTA) */
.hmi-shop-flyout-footer {
	padding: 0.75rem 1rem 1rem;
	background: #FDFCFA; /* sand-50 aus HMi-Palette */
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.hmi-shop-flyout-subtotal {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.75rem;
	font-size: 14px;
}
.hmi-shop-flyout-subtotal span {
	color: #5b6273;
}
.hmi-shop-flyout-subtotal strong {
	font-size: 16px;
	color: #0F131F;
}
.hmi-shop-flyout-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.375rem;
	width: 100%;
	padding: 0.625rem 1rem;
	border-radius: 0.5rem;
	background: #007078; /* hmi-teal-500 */
	color: #ffffff !important;
	font-weight: 500;
	font-size: 14px;
	text-decoration: none !important;
	transition: background-color 0.2s ease;
}
.hmi-shop-flyout-cta:hover,
.hmi-shop-flyout-cta:focus-visible {
	background: #005a60;
	outline: none;
}
