/**
 * Header-Warenkorb des Zubehör-Shops (auf allen Seiten geladen, deshalb eigene,
 * kleine Datei). Button mit Zähler rechts neben dem Menü, Dropdown mit Mini-Cart
 * im Theme-Look (Karten-Rahmen, Markengrün, Remixicon-Subset).
 */
.dbz-hcart {
	position: relative;
	display: flex;
	align-items: center;
	margin-left: 12px;
}
.dbz-hcart__btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--color-text-dark, #383e42);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.dbz-hcart__btn:hover,
.dbz-hcart__btn[aria-expanded="true"] {
	background: var(--color-gray-light, #f3f4f2);
	color: var(--color-brand-green, #64b331);
}
.dbz-hcart__btn i {
	font-size: 24px;
	line-height: 1;
}
.dbz-hcart__count {
	position: absolute;
	top: 3px;
	right: 1px;
	min-width: 19px;
	height: 19px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--color-brand-green, #64b331);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 19px;
	text-align: center;
	box-sizing: border-box;
}
.dbz-hcart__count.is-empty {
	display: none;
}
.dbz-hcart__panel {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 1000;
	width: 360px;
	max-width: calc(100vw - 2.5rem);
	padding: 16px;
	border: 1px solid var(--color-gray-divider, #e2e5df);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 14px 40px rgba(20, 22, 24, 0.14);
}
.dbz-hcart__panel[hidden] {
	display: none;
}
.dbz-hcart__title {
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 700;
	color: var(--color-text-dark, #383e42);
}

/* Mini-Cart-Liste (auch im Dropdown per Fragments neu gerendert). Schutz gegen
   Woos Widget-CSS (floated Bilder 32 px, absoluter Entfernen-Link, rotes ×). */
.dbz-mc__list {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 320px;
	overflow-x: hidden;
	overflow-y: auto;
}
.dbz-mc__item {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) auto;
	min-width: 0;
	gap: 10px;
	align-items: center;
	position: static;
	padding: 10px 0 !important;
	margin: 0;
	border-bottom: 1px solid var(--color-gray-divider, #e2e5df);
}
.dbz-mc__thumb {
	width: 56px;
	height: 56px;
}
.dbz-mc__thumb a {
	display: block;
}
.dbz-mc__item img,
.dbz-mc__thumb img {
	display: block !important;
	float: none !important;
	width: 56px !important;
	height: 56px !important;
	margin: 0 !important;
	object-fit: contain;
	border: 1px solid var(--color-gray-divider, #e2e5df);
	border-radius: 8px;
	background: #fff;
	box-shadow: none;
}
.dbz-mc__name {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--color-text-dark, #383e42);
	text-decoration: none;
}
.dbz-mc__name:hover {
	color: var(--color-brand-green, #64b331);
}
.dbz-mc__item .variation {
	margin: 2px 0 0;
	font-size: 12px;
	color: var(--color-text-muted, #6b7280);
}
.dbz-mc__item .variation dt,
.dbz-mc__item .variation dd {
	display: inline;
	margin: 0;
}
.dbz-mc__item .variation dd p {
	display: inline;
	margin: 0;
}
.dbz-mc__qty {
	display: block;
	margin-top: 2px;
	font-size: 13px;
	color: var(--color-text-muted, #6b7280);
}
.dbz-mc__qty .woocommerce-Price-amount {
	color: var(--color-text-dark, #383e42);
	font-weight: 600;
}
.dbz-mc__item .remove,
.dbz-mc__remove {
	position: static !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 999px;
	color: var(--color-text-muted, #6b7280) !important;
	text-decoration: none;
	font-size: 18px;
	font-weight: 400;
	line-height: 1;
}
.dbz-mc__item .remove:hover,
.dbz-mc__remove:hover {
	background: var(--color-gray-light, #f3f4f2);
	color: #c0392b !important;
}
.dbz-mc__total {
	display: flex;
	justify-content: space-between;
	margin: 12px 0 0;
	font-size: 15px;
	color: var(--color-text-dark, #383e42);
}
.dbz-mc__total .woocommerce-Price-amount {
	font-weight: 700;
}
.dbz-mc__note {
	margin: 2px 0 12px;
	font-size: 12px;
	color: var(--color-text-muted, #6b7280);
}
.dbz-mc__buttons {
	display: grid;
	gap: 8px;
}
.dbz-mc__buttons .dbz-mc__btn {
	justify-content: center;
	width: 100%;
	box-sizing: border-box;
}
/* Button-Grundform selbst setzen: die Theme-.btn-Basis ist nicht auf jeder Seite
   geladen, im Header-Warenkorb sahen Buttons sonst wie grün hinterlegter Text aus. */
.dbz-hcart .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 18px;
	border-radius: 8px;
	border: 1px solid transparent;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.dbz-hcart .btn--sm {
	padding: 8px 14px;
	font-size: 13px;
}
.dbz-hcart .btn--outline {
	background: #fff;
	border-color: var(--color-gray-divider, #e2e5df);
}
.dbz-hcart .btn--outline:hover {
	border-color: var(--color-brand-green, #64b331);
}

/* CI: Weiß auf Grün (Theme-.btn--primary setzt die Textfarbe nicht überall). */
.dbz-hcart .btn--primary,
.dbz-mc__buttons .dbz-mc__btn.checkout,
.dbz-mc__empty .btn--primary {
	color: #fff !important;
	background-color: var(--color-brand-green, #64b331);
}
.dbz-hcart .btn--primary:hover,
.dbz-mc__buttons .dbz-mc__btn.checkout:hover {
	color: #fff !important;
	background-color: var(--color-brand-green-hover, #5a9e2b);
}
.dbz-mc__buttons .btn--outline {
	color: var(--color-text-dark, #383e42);
}
.dbz-mc__empty {
	text-align: center;
	padding: 8px 0 4px;
}
.dbz-mc__empty i {
	font-size: 34px;
	color: var(--color-gray-divider, #e2e5df);
}
.dbz-mc__empty p {
	margin: 6px 0 12px;
	color: var(--color-text-muted, #6b7280);
}

/* Mobil: Button vor dem Hamburger, Panel unter der Kopfzeile in voller Breite. */
@media (max-width: 1023px) {
	.dbz-hcart {
		order: 5;
		margin-left: auto;
		margin-right: 4px;
	}
	.dbz-hcart__panel {
		position: fixed;
		top: auto;
		left: 1.25rem;
		right: 1.25rem;
		width: auto;
		max-width: none;
		margin-top: 8px;
	}
}

/* Mobil: Burger und Warenkorb zusammen rechts (Theme verteilt Logo, Burger und
   Warenkorb per space-between, der Burger landete mittig neben dem Logo). */
@media (max-width: 1023px) {
	.nav-inner .site-logo {
		margin-right: auto;
	}
	.nav-inner .menu-toggle {
		margin-left: 8px;
	}
	.nav-inner .dbz-hcart {
		margin-left: 6px;
	}
}
