/*
 * FV Erpel Bestellshop – Frontend
 *
 * Grundsätze:
 * 1. Schriften werden vom Theme geerbt (font: inherit), damit der Shop
 *    optisch zur Startseite passt, ohne eigene Fonts zu laden.
 * 2. Alle Farben, Radien und Abstände hängen an CSS-Variablen. Die
 *    Akzentfarbe und die maximale Breite lassen sich in den Plugin-
 *    Einstellungen setzen und werden als Inline-Style auf .fvshop gesetzt.
 * 3. Jedes Element im Shop ist border-box – verhindert die klassischen
 *    Überlagerungen, wenn ein Theme das global anders setzt.
 */

.fvshop,
.fvshop *,
.fvshop *::before,
.fvshop *::after {
	box-sizing: border-box;
}

.fvshop {
	/* --- Design-Tokens (per Inline-Style überschreibbar) --- */
	--fvshop-primary: #a00000;
	--fvshop-primary-dark: #7a0000;
	--fvshop-primary-soft: rgba(160, 0, 0, 0.08);
	--fvshop-ink: #17181a;
	--fvshop-muted: #6b6f76;
	--fvshop-line: #e3e5e8;
	--fvshop-surface: #ffffff;
	--fvshop-surface-alt: #f6f7f8;
	--fvshop-radius: 10px;
	--fvshop-radius-sm: 6px;
	--fvshop-shadow: 0 1px 2px rgba(16, 18, 20, 0.05), 0 8px 24px rgba(16, 18, 20, 0.06);
	--fvshop-shadow-lift: 0 4px 12px rgba(16, 18, 20, 0.10), 0 18px 40px rgba(16, 18, 20, 0.12);
	--fvshop-max: 1200px;
	--fvshop-gap: clamp(16px, 2.2vw, 26px);

	/* Abstand für sticky-Elemente unter einem festen Theme-Header. */
	--fvshop-sticky-top: 96px;

	/* Ebenen – bewusst zentral, damit sich nichts gegenseitig überdeckt. */
	--fvshop-z-sticky: 20;
	--fvshop-z-modal: 100000;

	max-width: var(--fvshop-max);
	margin-inline: auto;
	padding-inline: clamp(0px, 2vw, 16px);
	color: var(--fvshop-ink);
	font: inherit;
	line-height: 1.55;
	/* Verhindert, dass lange Artikelnamen aus Karten herauslaufen. */
	overflow-wrap: anywhere;
}

.fvshop img {
	max-width: 100%;
	height: auto;
}

/* Fallback, falls das Theme diese Standardklasse nicht mitbringt. */
.fvshop .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------------------ */
/* Kopfbereich (Hero)                                                   */
/* ------------------------------------------------------------------ */

/* Randlos über die volle Fensterbreite, obwohl der Shortcode im
   zentrierten Inhaltscontainer des Themes steckt. */
/* Basiswerte für den Moment vor dem Skriptstart. Die exakten Maße setzt
   anschließend applyBleed() in shop.js — 100vw enthält den Scrollbalken und
   unterstellt einen exakt mittig sitzenden Theme-Container. */
.fvshop-bleed {
	margin-inline: calc(50% - 50vw);
	width: 100vw;
	max-width: 100vw;
}

.fvshop-hero {
	position: relative;
	margin-bottom: clamp(28px, 5vw, 52px);
	min-height: min(var(--fvshop-hero-height, 520px), 78vh);
	display: flex;
	align-items: center;
	overflow: hidden;
	background: #14161a;
	isolation: isolate;
}

/* Verhindert den waagerechten Scrollbalken, den 100vw sonst durch die
   Breite des Scrollbalkens erzeugt. "clip" statt "hidden", weil hidden
   position:sticky im Dokument unbrauchbar machen würde. */
@supports selector(html:has(*)) {
	html:has(.fvshop-bleed) {
		overflow-x: clip;
	}
}

.fvshop-hero__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 30%;
	z-index: -3;
}

/* Dunkler Verlauf, damit die Schrift auf jedem Bild lesbar bleibt. */
.fvshop-hero__veil {
	position: absolute;
	inset: 0;
	z-index: -2;
	background:
		linear-gradient(90deg, rgba(10, 11, 13, 0.92) 0%, rgba(10, 11, 13, 0.72) 45%, rgba(10, 11, 13, 0.35) 100%),
		linear-gradient(0deg, rgba(10, 11, 13, 0.55) 0%, rgba(10, 11, 13, 0.15) 60%);
}

/* Roter Diagonalkeil rechts – wie auf der Startseite. */
.fvshop-hero__accent {
	position: absolute;
	inset: 0 0 0 auto;
	width: 58%;
	z-index: -1;
	background: linear-gradient(135deg, transparent 0%, var(--fvshop-primary-veil, rgba(160, 0, 0, 0.62)) 65%);
	clip-path: polygon(42% 0, 100% 0, 100% 100%, 18% 100%);
	pointer-events: none;
}

.fvshop-hero__inner {
	position: relative;
	width: 100%;
	max-width: var(--fvshop-max);
	margin-inline: auto;
	padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 48px);
}

/* Jahreszahl als Konturschrift hinter der Überschrift. */
.fvshop-hero__year {
	position: absolute;
	top: clamp(6px, 2vw, 22px);
	left: clamp(18px, 5vw, 46px);
	font-family: var(--fvshop-hero-font, inherit);
	font-size: clamp(64px, 10vw, 128px);
	font-weight: 900;
	line-height: 1;
	letter-spacing: 0.02em;
	color: transparent;
	-webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.18);
	pointer-events: none;
	user-select: none;
}

.fvshop-hero__content {
	position: relative;
	max-width: min(760px, 100%);
	color: #fff;
}

.fvshop-hero__title {
	font-family: var(--fvshop-hero-font, inherit);
	font-size: clamp(1.9rem, 1rem + 3.6vw, 3.9rem);
	font-weight: 900;
	line-height: 0.98;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	margin: 0 0 14px;
	color: #fff;
	/* Der Shop-Container erlaubt Umbrüche innerhalb von Wörtern, damit lange
	   Artikelnamen nicht aus den Karten laufen. In der Schlagzeile wäre das
	   fatal ("VEREINSS / HOP") — hier also ausdrücklich zurücksetzen. */
	overflow-wrap: normal;
	word-break: normal;
	hyphens: none;
	text-wrap: balance;
}

.fvshop-hero__line {
	display: block;
}

.fvshop-hero__line--accent {
	color: var(--fvshop-primary);
}

.fvshop-hero__eyebrow {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: #fff;
	margin: 0 0 10px;
}

.fvshop-hero__text {
	font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.1rem);
	color: rgba(255, 255, 255, 0.88);
	margin: 0 0 22px;
	max-width: 46ch;
	overflow-wrap: normal;
}

.fvshop-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
}

.fvshop-hero__actions .fvshop-btn {
	padding: 13px 26px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

@media (max-width: 720px) {
	.fvshop-hero {
		min-height: min(var(--fvshop-hero-height, 520px), 62vh);
	}

	.fvshop-hero__accent {
		width: 100%;
		clip-path: polygon(58% 0, 100% 0, 100% 100%, 100% 100%);
		opacity: 0.85;
	}

	.fvshop-hero__content {
		max-width: none;
	}

	.fvshop-hero__actions .fvshop-btn {
		flex: 1 1 auto;
	}
}

@media (max-width: 560px) {
	.fvshop-hero__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.fvshop-hero__actions .fvshop-btn {
		width: 100%;
	}
}

/* ------------------------------------------------------------------ */
/* Typografie – gleiche Sprache wie die Startseite                      */
/* ------------------------------------------------------------------ */

.fvshop-eyebrow {
	display: block;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--fvshop-primary);
	margin: 0 0 6px;
}

.fvshop-section-title {
	font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2.25rem);
	font-weight: 800;
	line-height: 1.15;
	margin: 0 0 8px;
	color: var(--fvshop-ink);
}

.fvshop-section-text {
	color: var(--fvshop-muted);
	margin: 0;
	max-width: 62ch;
}

.fvshop-section {
	margin-bottom: clamp(28px, 5vw, 52px);
}

.fvshop-section__head {
	margin-bottom: clamp(16px, 2.5vw, 26px);
}

/* ------------------------------------------------------------------ */
/* Werkzeugleiste                                                       */
/* ------------------------------------------------------------------ */

.fvshop-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	padding-bottom: 14px;
	margin-bottom: clamp(16px, 2.5vw, 24px);
	border-bottom: 1px solid var(--fvshop-line);
}

.fvshop-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	flex: 1 1 auto;
	min-width: 0;
}

.fvshop-chip {
	appearance: none;
	border: 1px solid var(--fvshop-line);
	background: var(--fvshop-surface);
	color: var(--fvshop-ink);
	font: inherit;
	font-size: 0.88rem;
	line-height: 1.2;
	padding: 8px 14px;
	border-radius: 999px;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.fvshop-chip:hover {
	border-color: var(--fvshop-primary);
	color: var(--fvshop-primary);
}

.fvshop-chip[aria-pressed="true"] {
	background: var(--fvshop-primary);
	border-color: var(--fvshop-primary);
	color: #fff;
}

.fvshop-toolbar__right {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
	margin-left: auto;
}

.fvshop-count {
	color: var(--fvshop-muted);
	font-size: 0.88rem;
	white-space: nowrap;
}

.fvshop-select {
	font: inherit;
	font-size: 0.9rem;
	padding: 8px 12px;
	border: 1px solid var(--fvshop-line);
	border-radius: var(--fvshop-radius-sm);
	background: var(--fvshop-surface);
	color: var(--fvshop-ink);
	max-width: 100%;
}

/* ------------------------------------------------------------------ */
/* Produktraster                                                        */
/* ------------------------------------------------------------------ */

/* Feste Spaltenzahl statt auto-fill: So stehen auf dem Desktop verlässlich
   drei Artikel nebeneinander, unabhängig von der Breite des Theme-Containers. */
.fvshop-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--fvshop-gap);
	align-items: stretch;
}

/* Die Spaltenzahl kommt aus den Einstellungen. Auf mittleren Bildschirmen
   wird sie serverseitig auf höchstens drei gedeckelt (--fvshop-cols-md). */
@media (min-width: 900px) {
	.fvshop-grid {
		grid-template-columns: repeat(var(--fvshop-cols-md, 3), minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {
	.fvshop-grid {
		grid-template-columns: repeat(var(--fvshop-cols, 4), minmax(0, 1fr));
	}
}

.fvshop-card {
	display: flex;
	flex-direction: column;
	background: var(--fvshop-surface);
	border: 1px solid var(--fvshop-line);
	border-radius: var(--fvshop-radius);
	overflow: hidden;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
	min-width: 0;
}

.fvshop-card:hover,
.fvshop-card:focus-within {
	transform: translateY(-3px);
	border-color: transparent;
	box-shadow: var(--fvshop-shadow-lift);
}

.fvshop-card__media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	background: var(--fvshop-surface-alt);
	border: 0;
	padding: 0;
	cursor: pointer;
	overflow: hidden;
}

.fvshop-card__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 0.3s ease;
	display: block;
}

.fvshop-card:hover .fvshop-card__media img {
	transform: scale(1.04);
}

.fvshop-card__media--empty {
	display: grid;
	place-items: center;
	color: var(--fvshop-muted);
	font-size: 0.8rem;
}

.fvshop-card__flag {
	position: absolute;
	top: 10px;
	left: 10px;
	background: var(--fvshop-primary);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 4px 9px;
	border-radius: 999px;
	pointer-events: none;
}

.fvshop-card__incart {
	position: absolute;
	top: 10px;
	right: 10px;
	background: #1d6b2c;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	padding: 4px 9px;
	border-radius: 999px;
	pointer-events: none;
}

.fvshop-card__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px 14px 16px;
	flex: 1 1 auto;
	min-width: 0;
}

.fvshop-card__brand {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--fvshop-muted);
}

.fvshop-card__title {
	font-size: clamp(0.88rem, 0.82rem + 0.2vw, 0.98rem);
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
	color: var(--fvshop-ink);
	/* Titel auf drei Zeilen begrenzen, damit die Karten gleich hoch bleiben. */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.fvshop-card__meta {
	font-size: 0.82rem;
	color: var(--fvshop-muted);
	margin: 0;
}

.fvshop-card__foot {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 10px;
	margin-top: auto;
	padding-top: 12px;
	flex-wrap: wrap;
}

.fvshop-card__price {
	font-size: 1.12rem;
	font-weight: 800;
	color: var(--fvshop-primary);
	white-space: nowrap;
	line-height: 1.2;
}

.fvshop-card__price small {
	display: block;
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--fvshop-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

/* ------------------------------------------------------------------ */
/* Buttons                                                              */
/* ------------------------------------------------------------------ */

.fvshop-btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 4px 8px;
	font: inherit;
	font-size: 0.92rem;
	font-weight: 700;
	line-height: 1.25;
	padding: 11px 16px;
	border-radius: var(--fvshop-radius-sm);
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	/* Ohne diese vier Zeilen schiebt ein langer Beschriftungstext den Button
	   aus seinem Container heraus — Theme-Buttonstile setzen häufig nowrap. */
	white-space: normal;
	overflow-wrap: break-word;
	text-align: center;
	max-width: 100%;
	min-width: 0;
}

.fvshop-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.fvshop-btn--primary {
	background: var(--fvshop-primary);
	color: #fff;
}

.fvshop-btn--primary:hover:not(:disabled) {
	background: var(--fvshop-primary-dark);
	color: #fff;
}

.fvshop-btn--ghost {
	background: transparent;
	border-color: var(--fvshop-line);
	color: var(--fvshop-ink);
}

.fvshop-btn--ghost:hover:not(:disabled) {
	border-color: var(--fvshop-primary);
	color: var(--fvshop-primary);
}

.fvshop-btn--dark {
	background: #24262a;
	color: #fff;
}

.fvshop-btn--dark:hover:not(:disabled) {
	background: #000;
	color: #fff;
}

/* Erhöhte Spezifität, damit Theme-Buttonregeln die Breite nicht überschreiben. */
.fvshop .fvshop-btn--block {
	display: flex;
	width: 100%;
}

.fvshop-btn--outline {
	background: transparent;
	border-color: rgba(255, 255, 255, 0.75);
	color: #fff;
}

.fvshop-btn--outline:hover:not(:disabled) {
	background: #fff;
	border-color: #fff;
	color: var(--fvshop-ink);
}

.fvshop-btn--sm {
	padding: 8px 14px;
	font-size: 0.85rem;
}

/* ------------------------------------------------------------------ */
/* Modal (Artikeldetail, Bild, Captcha, Bestätigung)                    */
/* ------------------------------------------------------------------ */

.fvshop-modal {
	position: fixed;
	inset: 0;
	z-index: var(--fvshop-z-modal);
	display: none;
	background: rgba(12, 13, 15, 0.72);
	padding: clamp(10px, 3vw, 36px);
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.fvshop-modal.is-open {
	display: flex;
	align-items: flex-start;
	justify-content: center;
}

@media (min-height: 640px) {
	.fvshop-modal.is-open {
		align-items: center;
	}
}

.fvshop-modal__box {
	position: relative;
	background: var(--fvshop-surface);
	border-radius: var(--fvshop-radius);
	box-shadow: var(--fvshop-shadow-lift);
	width: 100%;
	max-width: 820px;
	/* Kein max-height mit overflow:hidden – der Dialog darf im Overlay
	   mitscrollen. Das verhindert abgeschnittene Inhalte auf kleinen Displays. */
	margin: auto;
}

.fvshop-modal__box--narrow {
	max-width: 460px;
}

.fvshop-modal__box--wide {
	max-width: 900px;
}

.fvshop-modal__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: var(--fvshop-ink);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.fvshop-modal__close:hover {
	background: #fff;
	color: var(--fvshop-primary);
}

/* Sperrt das Scrollen der Seite, solange ein Dialog offen ist. */
body.fvshop-modal-open {
	overflow: hidden;
}

/* --- Artikeldetail --- */

.fvshop-detail {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0;
}

@media (min-width: 720px) {
	.fvshop-detail {
		grid-template-columns: minmax(0, 44%) minmax(0, 56%);
	}
}

.fvshop-detail__media {
	background: var(--fvshop-surface-alt);
	aspect-ratio: 1 / 1;
	display: grid;
	place-items: center;
	overflow: hidden;
	border-radius: var(--fvshop-radius) var(--fvshop-radius) 0 0;
}

@media (min-width: 720px) {
	.fvshop-detail__media {
		border-radius: var(--fvshop-radius) 0 0 var(--fvshop-radius);
		aspect-ratio: auto;
		height: 100%;
		min-height: 380px;
	}
}

.fvshop-detail__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	cursor: zoom-in;
}

.fvshop-detail__body {
	padding: clamp(18px, 3vw, 28px);
	min-width: 0;
}

.fvshop-detail__brand {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--fvshop-muted);
	margin: 0 0 4px;
}

.fvshop-detail__title {
	font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
	font-weight: 800;
	line-height: 1.25;
	margin: 0 0 8px;
	/* Platz für den Schließen-Button oben rechts freihalten. */
	padding-right: 44px;
}

.fvshop-detail__desc {
	color: var(--fvshop-muted);
	font-size: 0.92rem;
	margin: 0 0 16px;
}

.fvshop-field {
	margin-bottom: 16px;
	min-width: 0;
}

.fvshop-field__label {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--fvshop-muted);
	margin-bottom: 8px;
}

.fvshop-sizes {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.fvshop-size {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 54px;
	padding: 9px 12px;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	background: var(--fvshop-surface);
	border: 1px solid var(--fvshop-line);
	border-radius: var(--fvshop-radius-sm);
	color: var(--fvshop-ink);
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.fvshop-size:hover {
	border-color: var(--fvshop-primary);
}

/* Größe liegt mit einer Menge im Warenkorb, ist aber gerade nicht in Bearbeitung. */
.fvshop-size.is-chosen {
	background: var(--fvshop-primary-soft);
	border-color: var(--fvshop-primary);
	color: var(--fvshop-primary);
}

.fvshop-size[aria-pressed="true"] {
	background: var(--fvshop-primary);
	border-color: var(--fvshop-primary);
	color: #fff;
}

/* Mengen-Plakette an der Größenkachel, z. B. „5×". */
.fvshop-size__qty {
	display: inline-block;
	background: var(--fvshop-primary);
	color: #fff;
	border-radius: 999px;
	padding: 1px 7px;
	font-size: 0.72rem;
	font-weight: 800;
	line-height: 1.6;
	white-space: nowrap;
}

.fvshop-size[aria-pressed="true"] .fvshop-size__qty {
	background: #fff;
	color: var(--fvshop-primary);
}

/* Zusatzhinweis in einer Feldbeschriftung („für Größe 140"). */
.fvshop-field__hint {
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: none;
	color: var(--fvshop-muted);
	font-size: 0.78rem;
}

/* Rückmeldung nach dem Hinzufügen einer Position im Artikeldialog. */
.fvshop-added {
	margin: 0 0 14px;
	padding: 9px 12px;
	background: var(--fvshop-primary-soft);
	border: 1px solid var(--fvshop-primary);
	border-radius: var(--fvshop-radius-sm);
	color: var(--fvshop-primary);
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.4;
}

/* ---------------------------------------------------------------- */
/* Gewählte Größen im Artikeldialog                                 */
/* ---------------------------------------------------------------- */

.fvshop-lines {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.fvshop-line {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 8px;
	padding: 7px 10px;
	background: var(--fvshop-surface-alt);
	border: 1px solid var(--fvshop-line);
	border-radius: var(--fvshop-radius-sm);
}

/* Reine Textspalte einer Warenkorbposition im Dialog. */
.fvshop-line__pick {
	min-width: 0;
	color: var(--fvshop-ink);
}

.fvshop-line__size {
	display: block;
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1.3;
}

.fvshop-line__meta {
	display: block;
	font-size: 0.78rem;
	color: var(--fvshop-muted);
	line-height: 1.35;
}

.fvshop-line__total {
	font-size: 0.88rem;
	font-weight: 800;
	white-space: nowrap;
}

.fvshop-line__remove {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	width: 26px;
	height: 26px;
	font-size: 20px;
	line-height: 1;
	color: var(--fvshop-muted);
	cursor: pointer;
	border-radius: 50%;
}

.fvshop-line__remove:hover {
	background: var(--fvshop-surface);
	color: var(--fvshop-primary);
}

.fvshop-line__remove:focus-visible {
	outline: 2px solid var(--fvshop-primary);
	outline-offset: 2px;
}

.fvshop-stepper {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--fvshop-line);
	border-radius: var(--fvshop-radius-sm);
	overflow: hidden;
	background: var(--fvshop-surface);
}

.fvshop-stepper button {
	appearance: none;
	border: 0;
	background: var(--fvshop-surface-alt);
	color: var(--fvshop-ink);
	width: 42px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}

.fvshop-stepper button:hover {
	background: var(--fvshop-primary-soft);
	color: var(--fvshop-primary);
}

.fvshop-stepper input {
	width: 62px;
	border: 0;
	text-align: center;
	font: inherit;
	font-weight: 700;
	padding: 10px 4px;
	background: transparent;
	color: var(--fvshop-ink);
	-moz-appearance: textfield;
}

.fvshop-stepper input::-webkit-outer-spin-button,
.fvshop-stepper input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.fvshop-input {
	width: 100%;
	font: inherit;
	font-size: 0.95rem;
	padding: 10px 12px;
	border: 1px solid var(--fvshop-line);
	border-radius: var(--fvshop-radius-sm);
	background: var(--fvshop-surface);
	color: var(--fvshop-ink);
}

.fvshop-input:focus,
.fvshop-select:focus,
.fvshop-size:focus-visible,
.fvshop-chip:focus-visible,
.fvshop-btn:focus-visible {
	outline: 2px solid var(--fvshop-primary);
	outline-offset: 2px;
}

.fvshop-detail__price {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	border-top: 1px solid var(--fvshop-line);
	padding-top: 14px;
	margin-bottom: 14px;
}

.fvshop-detail__price strong {
	font-size: 1.35rem;
	font-weight: 800;
	color: var(--fvshop-primary);
	white-space: nowrap;
}

.fvshop-detail__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.fvshop-detail__actions .fvshop-btn {
	flex: 1 1 160px;
}

.fvshop-note {
	font-size: 0.82rem;
	color: var(--fvshop-muted);
	margin: 10px 0 0;
}

.fvshop-error {
	display: none;
	background: #fdecec;
	border: 1px solid #f5c2c2;
	color: #8c1c1c;
	border-radius: var(--fvshop-radius-sm);
	padding: 10px 12px;
	font-size: 0.9rem;
	margin-bottom: 14px;
}

.fvshop-error.is-visible {
	display: block;
}

/* ------------------------------------------------------------------ */
/* Warenkorb                                                            */
/* ------------------------------------------------------------------ */

.fvshop-cart {
	background: var(--fvshop-surface);
	border: 1px solid var(--fvshop-line);
	border-radius: var(--fvshop-radius);
	padding: clamp(16px, 2.6vw, 24px);
	box-shadow: var(--fvshop-shadow);
}

.fvshop-cart__empty {
	color: var(--fvshop-muted);
	font-style: italic;
	margin: 0;
}

.fvshop-cart__list {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.fvshop-cart__item {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) auto;
	gap: 12px;
	align-items: center;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--fvshop-line);
}

.fvshop-cart__thumb {
	width: 56px;
	height: 56px;
	object-fit: contain;
	background: var(--fvshop-surface-alt);
	border-radius: var(--fvshop-radius-sm);
}

.fvshop-cart__info {
	min-width: 0;
}

.fvshop-cart__name {
	font-weight: 700;
	font-size: 0.92rem;
	line-height: 1.3;
	margin: 0;
}

.fvshop-cart__variant {
	font-size: 0.82rem;
	color: var(--fvshop-muted);
	margin: 2px 0 0;
}

/* Zeile mit „Ändern" und „Entfernen" unter einer Warenkorbposition. */
.fvshop-cart__buttons {
	margin: 4px 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 0.8rem;
}

.fvshop-cart__side {
	text-align: right;
	white-space: nowrap;
}

.fvshop-cart__line-total {
	font-weight: 800;
	color: var(--fvshop-ink);
	display: block;
}

.fvshop-cart__actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 4px;
}

.fvshop-link-btn {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-size: 0.8rem;
	color: var(--fvshop-muted);
	cursor: pointer;
	text-decoration: underline;
}

.fvshop-link-btn:hover {
	color: var(--fvshop-primary);
}

.fvshop-totals {
	border-top: 2px solid var(--fvshop-line);
	padding-top: 12px;
}

.fvshop-totals__row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 0.94rem;
	margin-bottom: 6px;
}

.fvshop-totals__row--grand {
	border-top: 2px solid var(--fvshop-primary);
	margin-top: 10px;
	padding-top: 10px;
	font-size: 1.16rem;
	font-weight: 800;
	color: var(--fvshop-primary);
	margin-bottom: 0;
}

/* Mobile Schnellzugriff: bleibt im Fluss (sticky, nicht fixed),
   überdeckt also niemals den Footer. */
.fvshop-cartbar {
	display: none;
	position: sticky;
	bottom: 0;
	z-index: var(--fvshop-z-sticky);
	margin: 16px calc(-1 * clamp(0px, 2vw, 16px)) 0;
	padding: 10px clamp(12px, 3vw, 16px);
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(8px);
	border-top: 1px solid var(--fvshop-line);
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.fvshop-cartbar.is-visible {
	display: flex;
}

.fvshop-cartbar__sum {
	font-weight: 800;
	color: var(--fvshop-primary);
	white-space: nowrap;
}

.fvshop-cartbar__count {
	display: block;
	font-size: 0.76rem;
	font-weight: 600;
	color: var(--fvshop-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

@media (min-width: 900px) {
	.fvshop-cartbar {
		display: none !important;
	}
}

/* ------------------------------------------------------------------ */
/* Farbband für den Bestellbereich                                      */
/* ------------------------------------------------------------------ */

.fvshop-band {
	position: relative;
	padding-block: clamp(34px, 5.5vw, 72px);
	background:
		linear-gradient(135deg, var(--fvshop-primary-dark) 0%, var(--fvshop-primary) 58%, var(--fvshop-primary-dark) 100%);
	color: #fff;
	overflow: hidden;
}

.fvshop-band__inner {
	position: relative;
	max-width: var(--fvshop-max);
	margin-inline: auto;
	padding-inline: clamp(16px, 4vw, 40px);
}

/* Überschrift und Überzeile stehen direkt auf Rot – hier auf Weiß drehen.
   Die Kästen darunter bleiben weiß, damit Eingabefelder lesbar sind. */
.fvshop-band .fvshop-eyebrow {
	color: rgba(255, 255, 255, 0.82);
}

.fvshop-band .fvshop-section-title {
	color: #fff;
}

.fvshop-band .fvshop-section-text {
	color: rgba(255, 255, 255, 0.86);
}

/* Wichtig: Das Band setzt die Textfarbe auf Weiß. Innerhalb der weißen
   Kästen muss sie wieder auf Dunkel zurück, sonst verschwinden Überschriften
   wie „Persönliche Angaben“ und die Warenkorb-Positionen. */
.fvshop-band .fvshop-panel,
.fvshop-band .fvshop-cart {
	border-color: transparent;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
	color: var(--fvshop-ink);
}

/* Der rote Hauptbutton würde auf dem roten Band an Wirkung verlieren –
   im weißen Kasten steht er weiterhin gut, deshalb nur der Rahmen weg. */
.fvshop-band .fvshop-btn--ghost {
	border-color: var(--fvshop-line);
}

@media print {
	.fvshop-band {
		background: none !important;
		color: inherit !important;
		padding-block: 0 !important;
		margin-inline: 0 !important;
		width: auto !important;
	}
}

/* ------------------------------------------------------------------ */
/* Bestellformular                                                      */
/* ------------------------------------------------------------------ */

.fvshop-form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 14px;
}

.fvshop-form-field label {
	display: block;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--fvshop-muted);
	margin-bottom: 6px;
}

.fvshop-form-field--full {
	grid-column: 1 / -1;
}

.fvshop-checkout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--fvshop-gap);
	align-items: start;
}

@media (min-width: 900px) {
	.fvshop-checkout {
		grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.85fr);
	}

	.fvshop-checkout__side {
		position: sticky;
		top: var(--fvshop-sticky-top);
	}
}

.fvshop-panel {
	background: var(--fvshop-surface);
	border: 1px solid var(--fvshop-line);
	border-radius: var(--fvshop-radius);
	padding: clamp(16px, 2.6vw, 24px);
}

.fvshop-panel__title {
	font-size: 1.05rem;
	font-weight: 800;
	margin: 0 0 4px;
}

.fvshop-panel__sub {
	color: var(--fvshop-muted);
	font-size: 0.88rem;
	margin: 0 0 18px;
}

.fvshop-message {
	display: none;
	border-radius: var(--fvshop-radius-sm);
	padding: 12px 14px;
	margin-bottom: 18px;
	font-size: 0.94rem;
}

.fvshop-message.is-visible {
	display: block;
}

.fvshop-message--error {
	background: #fdecec;
	border: 1px solid #f5c2c2;
	color: #8c1c1c;
}

.fvshop-message--ok {
	background: #e8f4ea;
	border: 1px solid #c6e3cc;
	color: #1d6b2c;
}

/* ------------------------------------------------------------------ */
/* Bildansicht (Lightbox)                                               */
/* ------------------------------------------------------------------ */

.fvshop-lightbox__inner {
	position: relative;
	max-width: min(1000px, 100%);
	margin: auto;
	text-align: center;
}

.fvshop-lightbox__inner img {
	max-width: 100%;
	max-height: 78vh;
	background: #fff;
	border-radius: var(--fvshop-radius);
	object-fit: contain;
}

.fvshop-lightbox__caption {
	color: #fff;
	font-weight: 600;
	margin-top: 12px;
	font-size: 0.95rem;
}

/* ------------------------------------------------------------------ */
/* Sicherheitsabfrage                                                   */
/* ------------------------------------------------------------------ */

.fvshop-captcha {
	padding: clamp(20px, 4vw, 28px);
	text-align: center;
}

.fvshop-captcha__title {
	font-size: 1.15rem;
	font-weight: 800;
	color: var(--fvshop-primary);
	margin: 0 0 6px;
}

.fvshop-captcha__widget {
	display: flex;
	justify-content: center;
	margin: 18px 0 10px;
	min-height: 78px;
	/* reCAPTCHA ist 304px breit – auf schmalen Displays herunterskalieren. */
	overflow: hidden;
}

@media (max-width: 360px) {
	.fvshop-captcha__widget > div {
		transform: scale(0.86);
		transform-origin: top center;
	}
}

.fvshop-captcha__hint {
	font-size: 0.85rem;
	color: var(--fvshop-muted);
	margin: 0 0 14px;
}

.fvshop-captcha__hint.is-error {
	color: var(--fvshop-primary);
	font-weight: 700;
}

/* ------------------------------------------------------------------ */
/* Rechnung / Bestätigung                                               */
/* ------------------------------------------------------------------ */

.fvshop-invoice {
	padding: clamp(18px, 3.5vw, 32px);
}

.fvshop-invoice h2 {
	font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem);
	font-weight: 800;
	margin: 0 0 2px;
	padding-right: 44px;
}

.fvshop-invoice h3 {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0 0 16px;
	color: var(--fvshop-muted);
}

.fvshop-invoice__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 32px;
	justify-content: space-between;
	border-top: 2px solid var(--fvshop-ink);
	border-bottom: 2px solid var(--fvshop-ink);
	padding: 12px 0;
	margin-bottom: 18px;
	font-size: 0.9rem;
}

.fvshop-invoice__meta p {
	margin: 2px 0;
}

.fvshop-invoice__label {
	color: var(--fvshop-muted);
	text-transform: uppercase;
	font-size: 0.68rem;
	letter-spacing: 0.08em;
	margin-bottom: 4px !important;
}

.fvshop-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-bottom: 14px;
}

.fvshop-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.86rem;
	min-width: 520px;
}

.fvshop-table th,
.fvshop-table td {
	padding: 8px 6px;
	text-align: left;
	border-bottom: 1px solid var(--fvshop-line);
	vertical-align: top;
}

.fvshop-table thead th {
	border-bottom: 2px solid var(--fvshop-ink);
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--fvshop-muted);
	white-space: nowrap;
}

.fvshop-table .num {
	text-align: center;
	width: 34px;
}

.fvshop-table .right {
	text-align: right;
	white-space: nowrap;
}

.fvshop-invoice__totals {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 18px;
	font-size: 0.94rem;
}

.fvshop-invoice__totals td {
	padding: 5px 0;
}

.fvshop-invoice__totals td:last-child {
	text-align: right;
	white-space: nowrap;
}

.fvshop-invoice__totals tr.grand td {
	border-top: 2px solid var(--fvshop-ink);
	font-weight: 800;
	font-size: 1.1rem;
	padding-top: 10px;
}

.fvshop-payment {
	background: var(--fvshop-surface-alt);
	border: 1px solid var(--fvshop-line);
	border-radius: var(--fvshop-radius-sm);
	padding: 14px 16px;
	font-size: 0.92rem;
	margin-bottom: 18px;
}

.fvshop-payment p {
	margin: 4px 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 10px;
}

.fvshop-payment strong {
	flex: 0 0 auto;
	min-width: 150px;
}

.fvshop-invoice__actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	flex-wrap: wrap;
}

.fvshop-mailhint {
	background: #e8f4ea;
	border: 1px solid #c6e3cc;
	color: #1d6b2c;
	border-radius: var(--fvshop-radius-sm);
	padding: 10px 14px;
	font-size: 0.9rem;
	margin-bottom: 16px;
}

/* ------------------------------------------------------------------ */
/* Geschlossener Shop                                                   */
/* ------------------------------------------------------------------ */

.fvshop-closed {
	border: 1px solid var(--fvshop-line);
	border-top: 4px solid var(--fvshop-primary);
	border-radius: var(--fvshop-radius);
	background: var(--fvshop-surface);
	box-shadow: var(--fvshop-shadow);
	padding: clamp(24px, 5vw, 48px);
	text-align: center;
	max-width: 720px;
	margin-inline: auto;
}

.fvshop-closed__badge {
	display: inline-block;
	background: var(--fvshop-primary-soft);
	color: var(--fvshop-primary);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	padding: 6px 14px;
	border-radius: 999px;
	margin-bottom: 14px;
}

.fvshop-closed__title {
	font-size: clamp(1.3rem, 1.1rem + 1vw, 1.9rem);
	font-weight: 800;
	line-height: 1.2;
	margin: 0 0 12px;
}

.fvshop-closed__text {
	color: var(--fvshop-muted);
	margin: 0 auto 20px;
	max-width: 52ch;
}

.fvshop-closed__schedule {
	background: var(--fvshop-surface-alt);
	border-radius: var(--fvshop-radius-sm);
	padding: 16px 18px;
	margin: 0 auto;
	max-width: 52ch;
}

.fvshop-closed__schedule p {
	margin: 0 0 6px;
	font-size: 0.96rem;
}

.fvshop-closed__schedule p:first-child {
	font-weight: 700;
	color: var(--fvshop-ink);
}

.fvshop-closed__schedule p:last-child {
	margin-bottom: 0;
	color: var(--fvshop-muted);
}

.fvshop-closed__countdown {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	margin: 22px 0 0;
	padding: 14px 26px;
	border-radius: var(--fvshop-radius-sm);
	background: var(--fvshop-primary);
	color: #fff;
	line-height: 1.1;
}

.fvshop-closed__countdown strong {
	font-size: 2.1rem;
	font-weight: 900;
}

.fvshop-closed__countdown span {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 0.85;
}

/* Hinweis auf den Bestellschluss, solange der Shop geöffnet ist. */
.fvshop-deadline {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--fvshop-primary-soft);
	border-left: 4px solid var(--fvshop-primary);
	border-radius: var(--fvshop-radius-sm);
	padding: 11px 16px;
	margin: 0 0 18px;
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--fvshop-primary-dark);
}

/* ------------------------------------------------------------------ */
/* Leerzustand                                                          */
/* ------------------------------------------------------------------ */

.fvshop-empty {
	border: 1px dashed var(--fvshop-line);
	border-radius: var(--fvshop-radius);
	padding: clamp(24px, 6vw, 48px);
	text-align: center;
	color: var(--fvshop-muted);
}

/* ------------------------------------------------------------------ */
/* Kleine Displays                                                      */
/* ------------------------------------------------------------------ */

@media (max-width: 480px) {
	.fvshop-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
	}

	/* Einspaltig wären quadratische Bilder unnötig hoch — flacheres Format. */
	.fvshop-card__media {
		aspect-ratio: 4 / 3;
	}
}

@media (max-width: 560px) {

	.fvshop-card__body {
		padding: 12px 12px 14px;
	}

	.fvshop-card__title {
		font-size: 0.9rem;
	}

	.fvshop-card__foot {
		flex-direction: column;
		align-items: stretch;
	}

	.fvshop-card__foot .fvshop-btn {
		width: 100%;
	}

	.fvshop-toolbar__right {
		width: 100%;
		margin-left: 0;
		justify-content: space-between;
	}

	.fvshop-cart__item {
		grid-template-columns: 44px minmax(0, 1fr) auto;
		gap: 10px;
	}

	.fvshop-cart__thumb {
		width: 44px;
		height: 44px;
	}

	.fvshop-size {
		min-width: 48px;
		padding: 8px 10px;
	}

	.fvshop-line {
		padding: 6px 8px;
		gap: 6px;
	}

	.fvshop-line__total {
		font-size: 0.82rem;
	}

	.fvshop-invoice__actions .fvshop-btn {
		width: 100%;
	}
}

/* ------------------------------------------------------------------ */
/* Druck – nur die Rechnung                                             */
/* ------------------------------------------------------------------ */

@media print {
	@page {
		margin: 12mm;
	}

	html,
	body {
		margin: 0 !important;
		padding: 0 !important;
		height: auto !important;
		background: #fff !important;
		overflow: visible !important;
	}

	/* Der Rechnungsdialog wird vor dem Druck per JS direkt an <body>
	   gehängt. Dadurch greift diese Regel zuverlässig auf alle übrigen
	   obersten Elemente – kein Theme-Container kann mehr einen Versatz
	   oder leere Folgeseiten erzeugen. */
	body.fvshop-printing > *:not(#fvshop-success) {
		display: none !important;
	}

	#fvshop-success {
		display: block !important;
		position: static !important;
		inset: auto !important;
		width: 100% !important;
		height: auto !important;
		max-height: none !important;
		margin: 0 !important;
		padding: 0 !important;
		background: none !important;
		overflow: visible !important;
	}

	#fvshop-success .fvshop-modal__box {
		max-width: 100% !important;
		width: 100% !important;
		margin: 0 !important;
		box-shadow: none !important;
		border-radius: 0 !important;
	}

	.fvshop-invoice {
		padding: 0 !important;
	}

	.fvshop-table-wrap {
		overflow: visible !important;
	}

	.fvshop-table {
		min-width: 0 !important;
	}

	.fvshop-invoice__actions,
	.fvshop-mailhint,
	.fvshop-hero,
	.fvshop-modal__close {
		display: none !important;
	}

	.fvshop-table tr,
	.fvshop-invoice__totals tr,
	.fvshop-payment {
		page-break-inside: avoid;
		break-inside: avoid;
	}
}

/* ------------------------------------------------------------------ */
/* Reduzierte Bewegung                                                  */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.fvshop *,
	.fvshop *::before,
	.fvshop *::after {
		transition: none !important;
		animation: none !important;
	}
}
