/* Vivid Weinkiste – Warenkorb-Slider */
#vwk {
	--vwk-accent: #AD5630;
	--vwk-accent-dark: #8A4223;
	--vwk-ink: #333333;
	--vwk-muted: #5C5C5C;
	--vwk-line: #E6E1DA;
	--vwk-line-soft: #EFEAE3;
	--vwk-cream: #F7F3EE;
	--vwk-crate: #8C6A4F;
	--vwk-ok: #3F6B4A;
	--vwk-width: 440px;

	position: fixed;
	inset: 0;
	z-index: 99999;
	visibility: hidden;
	pointer-events: none;
	transition: visibility 0s linear .3s;
	font-family: inherit;
	color: var(--vwk-ink);
	font-size: 15px;
	line-height: 1.4;
}
#vwk.is-open {
	visibility: visible;
	pointer-events: auto;
	transition: visibility 0s;
}
html.vwk-lock { overflow: hidden; }

#vwk *, #vwk *::before, #vwk *::after { box-sizing: border-box; }

/* Theme-Buttons neutralisieren */
#vwk button {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	font-family: inherit;
}
#vwk button:focus-visible,
#vwk a:focus-visible {
	outline: 2px solid var(--vwk-accent);
	outline-offset: 2px;
}
#vwk a { color: inherit; text-decoration: none; }

#vwk .vwk-overlay {
	position: absolute;
	inset: 0;
	background: rgba(28, 22, 16, .45);
	opacity: 0;
	transition: opacity .25s ease;
}
#vwk.is-open .vwk-overlay { opacity: 1; }

.vwk-panel {
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	height: 100dvh;
	width: var(--vwk-width);
	max-width: 100vw;
	background: #fff;
	box-shadow: -12px 0 32px rgba(0, 0, 0, .12);
	transform: translateX(100%);
	transition: transform .3s ease;
}
#vwk.is-open .vwk-panel { transform: none; }

.vwk-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
	transition: opacity .15s;
}
#vwk.is-loading .vwk-inner { opacity: .6; pointer-events: none; }

/* Kopf */
.vwk-head {
	flex-shrink: 0;
	height: 68px;
	padding: 0 12px 0 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid var(--vwk-line);
}
.vwk-head-title { display: flex; align-items: baseline; gap: 10px; }
#vwk .vwk-title { margin: 0; font-size: 21px; font-weight: 500; line-height: 1.2; color: var(--vwk-ink); }
.vwk-count { font-size: 14px; color: var(--vwk-muted); }
#vwk .vwk-close {
	width: 44px; height: 44px;
	display: flex; align-items: center; justify-content: center;
	color: var(--vwk-ink);
}

/* Kiste */
.vwk-crate {
	flex-shrink: 0;
	padding: 18px 24px;
	background: var(--vwk-cream);
	display: flex;
	align-items: center;
	gap: 14px;
}
.vwk-crate-box {
	flex-shrink: 0;
	display: grid;
	grid-template-columns: repeat(3, 16px);
	gap: 4px;
	padding: 6px;
	border: 2px solid var(--vwk-crate);
	background: #fff;
}
.vwk-slot { height: 30px; display: flex; align-items: flex-end; justify-content: center; }
.vwk-slot svg { fill: #E3DCD3; transition: fill .3s ease; }
.vwk-slot.is-filled svg { fill: var(--vwk-accent); }
.vwk-crate.is-full .vwk-slot.is-filled svg { fill: var(--vwk-ok); }
.vwk-crate-title { font-size: 16px; font-weight: 500; }
.vwk-crate-hint { font-size: 14px; color: var(--vwk-muted); }

/* Liste */
.vwk-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }

.vwk-empty { padding: 40px 24px 16px; text-align: center; }
.vwk-empty-title { font-size: 17px; font-weight: 500; margin-bottom: 6px; }
.vwk-empty-text { font-size: 14px; color: var(--vwk-muted); }

.vwk-line {
	padding: 16px 24px;
	display: flex;
	gap: 14px;
	border-bottom: 1px solid var(--vwk-line-soft);
}
.vwk-thumb {
	width: 64px; height: 86px;
	flex-shrink: 0;
	background: var(--vwk-cream);
	display: flex; align-items: center; justify-content: center;
	overflow: hidden;
}
#vwk .vwk-thumb img { width: 100%; height: 100%; object-fit: contain; margin: 0; }
.vwk-line-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vwk-line-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.vwk-name { font-size: 15px; font-weight: 500; line-height: 1.3; }
#vwk a.vwk-name:hover { color: var(--vwk-accent); }
#vwk .vwk-remove {
	width: 32px; height: 32px;
	margin: -6px -8px 0 0;
	flex-shrink: 0;
	display: flex; align-items: center; justify-content: center;
	color: var(--vwk-muted);
}
#vwk .vwk-remove:hover { color: var(--vwk-ink); }
.vwk-meta { font-size: 13px; color: var(--vwk-muted); }
.vwk-unit { font-size: 12px; color: var(--vwk-muted); }
.vwk-unit .vwk-sep { margin: 0 2px; }
.vwk-line-bottom { margin-top: 6px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.vwk-stepper { display: flex; align-items: center; border: 1px solid #D6CFC6; }
#vwk .vwk-stepper button {
	width: 40px; height: 40px;
	display: flex; align-items: center; justify-content: center;
	font-size: 18px;
	color: var(--vwk-ink);
}
#vwk .vwk-stepper button:hover { background: var(--vwk-cream); }
.vwk-qty-val { min-width: 32px; text-align: center; font-size: 15px; font-weight: 500; }
.vwk-line-total { font-size: 16px; font-weight: 500; white-space: nowrap; }

/* Empfehlungen */
.vwk-recs { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 10px; }
.vwk-recs-title { font-size: 15px; font-weight: 500; margin-bottom: 2px; }
.vwk-rec { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--vwk-line-soft); }
.vwk-rec-thumb {
	width: 40px; height: 54px;
	flex-shrink: 0;
	background: var(--vwk-cream);
	display: flex; align-items: center; justify-content: center;
	overflow: hidden;
}
#vwk .vwk-rec-thumb img { width: 100%; height: 100%; object-fit: contain; margin: 0; }
.vwk-rec-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vwk-rec-name { font-size: 14px; line-height: 1.3; }
.vwk-rec-price { font-size: 13px; color: var(--vwk-muted); }
.vwk-rec-price del { opacity: .7; }
#vwk .vwk-rec-add {
	height: 44px;
	padding: 0 14px;
	flex-shrink: 0;
	display: flex; align-items: center;
	border: 1px solid var(--vwk-accent);
	color: var(--vwk-accent);
	background: #fff;
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
}
#vwk .vwk-rec-add:hover { background: var(--vwk-accent); color: #fff; }

/* Fuß */
.vwk-foot {
	flex-shrink: 0;
	padding: 16px 24px 18px;
	border-top: 1px solid var(--vwk-line);
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #fff;
}
.vwk-ship { display: flex; flex-direction: column; gap: 7px; }
.vwk-ship-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.vwk-ship.is-free .vwk-ship-title { color: var(--vwk-ok); }
.vwk-ship-bar { height: 6px; background: var(--vwk-line-soft); }
.vwk-ship-bar span { display: block; height: 6px; background: var(--vwk-accent); transition: width .4s ease; }
.vwk-ship.is-free .vwk-ship-bar span { background: var(--vwk-ok); }
.vwk-ship-hint { font-size: 12px; color: var(--vwk-muted); }

.vwk-totals { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.vwk-row { display: flex; justify-content: space-between; gap: 12px; }
.vwk-row > span:first-child { color: var(--vwk-muted); }
.vwk-row-total { margin-top: 4px; font-size: 18px; font-weight: 600; }
.vwk-row-total > span:first-child { color: var(--vwk-ink); }
.vwk-tax { font-size: 12px; color: var(--vwk-muted); text-align: right; }

#vwk .vwk-checkout {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 54px;
	width: 100%;
	background: var(--vwk-accent);
	color: #fff;
	font-size: 17px;
	font-weight: 500;
	text-align: center;
}
#vwk a.vwk-checkout:hover { background: var(--vwk-accent-dark); color: #fff; }
#vwk .vwk-checkout.is-disabled { background: #DDD6CE; color: #4D4D4D; cursor: not-allowed; }
.vwk-blocked { margin-top: -6px; font-size: 12px; color: var(--vwk-muted); text-align: center; }

#vwk .vwk-cartlink { font-size: 14px; text-align: center; text-decoration: underline; color: var(--vwk-accent); }

.vwk-trust {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 4px 18px;
	font-size: 12px;
	color: var(--vwk-muted);
	text-align: center;
}

/* Mobil */
@media (max-width: 480px) {
	.vwk-head { padding-left: 18px; }
	.vwk-crate, .vwk-line, .vwk-recs, .vwk-foot { padding-left: 18px; padding-right: 18px; }
	.vwk-foot { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
	#vwk, .vwk-panel, .vwk-overlay, .vwk-ship-bar span, .vwk-slot svg { transition: none !important; }
}
