/**
 * Frontend-Styles für Tour Sales Engine.
 * Angelehnt an die bestehende Widget-Optik von berghupfer.de: abgerundete
 * Karten (14px), dezente Border (#e5e8ef), gedämpfter Grauton für Fließtext
 * (#5d6b82), dunkelgrüner Verlauf (#284a37 → #3c6046) als Akzent-/Button-
 * Farbe, Amber (#e8a63c) als Angebots-Akzent. Modern, schlicht - bewusst
 * ohne Emojis.
 */

.tse-card,
.tse-modal,
.tse-lightbox {
	--tse-green-dark: #284a37;
	--tse-green: #3c6046;
	--tse-text: #1d2327;
	--tse-text-soft: #5d6b82;
	--tse-border: #e5e8ef;
	--tse-amber: #e8a63c;
	--tse-amber-bg: rgba(232, 166, 60, 0.14);
	--tse-danger-bg: #fdecec;
	--tse-danger-text: #8b2f2f;
	--tse-radius: 14px;
	--tse-radius-sm: 8px;
}

.tse-card {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	max-width: 820px;
	margin: 32px auto;
	font-family: inherit;
	color: var(--tse-text);
	background: #fff;
	border: 1px solid var(--tse-border);
	border-radius: var(--tse-radius);
	box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
	overflow: hidden;
}

@media (min-width: 768px) {
	.tse-card {
		grid-template-columns: 320px 1fr;
		align-items: stretch;
	}

	.tse-card__content {
		align-items: flex-start;
		text-align: left;
	}

	.tse-card__footer {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		flex-wrap: wrap;
	}
}

.tse-card__media {
	width: 100%;
	background: #f4f2ee;
}

.tse-slideshow {
	position: relative;
	height: 100%;
}

.tse-slideshow__viewport {
	position: relative;
	aspect-ratio: 1 / 1.414;
	overflow: hidden;
	background: #f4f2ee;
}

@media (min-width: 768px) {
	.tse-slideshow__viewport {
		aspect-ratio: auto;
		height: 100%;
	}
}

.tse-slideshow__slide {
	position: absolute;
	inset: 0;
	display: none;
	padding: 0;
	border: none;
	background: none;
	cursor: zoom-in;
	width: 100%;
	height: 100%;
}

.tse-slideshow__slide.is-active {
	display: block;
}

.tse-slideshow__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tse-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	z-index: 2;
}

.tse-card__badge--sale {
	background: var(--tse-amber);
	color: #fff;
}

.tse-slideshow__nav {
	display: flex;
	justify-content: space-between;
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: 10px;
	pointer-events: none;
}

.tse-slideshow__prev,
.tse-slideshow__next {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	pointer-events: auto;
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid var(--tse-border);
	border-radius: 999px;
	width: 40px;
	height: 40px;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: var(--tse-text);
}

.tse-slideshow__prev:hover,
.tse-slideshow__next:hover {
	background: #fff;
}

.tse-card__content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 24px 26px;
	text-align: center;
}

.tse-card__kicker {
	font-size: 0.74rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tse-green);
}

.tse-card__title {
	font-size: 1.35rem;
	font-weight: 700;
	margin: 0;
	line-height: 1.3;
	color: var(--tse-text);
}

.tse-card__text {
	font-size: 0.98rem;
	line-height: 1.6;
	color: var(--tse-text-soft);
	margin: 0;
}

.tse-card__text p {
	margin: 0 0 0.8em;
}

.tse-card__text p:last-child {
	margin-bottom: 0;
}

.tse-card__text ul,
.tse-card__text ol {
	margin: 0 0 0.8em;
	padding-left: 1.2em;
}

.tse-card__text ul:last-child,
.tse-card__text ol:last-child {
	margin-bottom: 0;
}

.tse-card__text li {
	margin-bottom: 0.2em;
}

.tse-card__text a {
	color: var(--tse-green);
	text-decoration: underline;
}

.tse-card__text strong {
	color: var(--tse-text);
}

.tse-card__footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 6px;
	padding-top: 14px;
	border-top: 1px solid var(--tse-border);
	width: 100%;
}

.tse-card__price-group {
	display: inline-flex;
	align-items: baseline;
	gap: 10px;
}

.tse-card__price {
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--tse-text);
}

.tse-card__price--old {
	font-size: 0.95rem;
	font-weight: 400;
	color: var(--tse-text-soft);
	text-decoration: line-through;
}

.tse-card__price--sale {
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--tse-amber);
	text-decoration: none;
}

.tse-card__buy-button {
	background: linear-gradient(160deg, var(--tse-green-dark), var(--tse-green));
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 12px 26px;
	font-size: 0.96rem;
	font-weight: 600;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.1s ease;
}

.tse-card__buy-button:hover {
	filter: brightness(1.08);
}

.tse-card__buy-button:active {
	transform: translateY(1px);
}

/* Lightbox */

.tse-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
}

.tse-lightbox.is-open {
	display: flex;
}

.tse-lightbox__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.88);
}

.tse-lightbox__image {
	position: relative;
	max-width: 90vw;
	max-height: 90vh;
	object-fit: contain;
	border-radius: var(--tse-radius-sm);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.tse-lightbox__close,
.tse-lightbox__prev,
.tse-lightbox__next {
	position: absolute;
	background: rgba(255, 255, 255, 0.92);
	border: none;
	border-radius: 50%;
	width: 44px;
	height: 44px;
	font-size: 22px;
	cursor: pointer;
	z-index: 1;
	color: var(--tse-text);
}

.tse-lightbox__close {
	top: 20px;
	right: 20px;
}

.tse-lightbox__prev {
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
}

.tse-lightbox__next {
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
}

body.tse-no-scroll {
	overflow: hidden;
}

/* Checkout-Modal */

.tse-modal {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.tse-modal.is-open {
	display: flex;
}

.tse-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.6);
}

.tse-modal__dialog {
	position: relative;
	background: #fff;
	border-radius: var(--tse-radius);
	border: 1px solid var(--tse-border);
	max-width: 480px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	padding: 32px;
	box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
	color: var(--tse-text);
}

.tse-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: var(--tse-text-soft);
}

.tse-modal__title {
	margin: 0 0 20px;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--tse-text);
}

.tse-modal__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.tse-modal__row--narrow {
	grid-template-columns: 1fr 1.4fr;
}

.tse-modal__field {
	margin-bottom: 14px;
}

.tse-modal__field label {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
	font-size: 0.86rem;
	color: var(--tse-text);
}

.tse-modal__field input,
.tse-modal__field select,
.tse-modal__field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--tse-border);
	border-radius: var(--tse-radius-sm);
	font-size: 0.98rem;
	font-family: inherit;
	color: var(--tse-text);
	background: #fff;
	box-sizing: border-box;
	transition: border-color 0.15s ease;
}

.tse-modal__field input:focus,
.tse-modal__field select:focus,
.tse-modal__field textarea:focus {
	outline: none;
	border-color: var(--tse-green);
}

.tse-modal__field select:disabled {
	background: #f4f2ee;
	color: var(--tse-text-soft);
	cursor: not-allowed;
}

.tse-modal__hint {
	display: block;
	font-size: 0.78rem;
	color: var(--tse-text-soft);
	margin-top: 4px;
}

.tse-modal__test-banner {
	background: var(--tse-amber-bg);
	border-left: 3px solid var(--tse-amber);
	border-radius: var(--tse-radius-sm);
	padding: 8px 12px;
	font-size: 0.82rem;
	font-weight: 600;
	color: #7a5411;
	margin: -8px 0 18px;
}

.tse-modal__checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.92rem;
	color: var(--tse-text);
	margin: 8px 0 18px;
}

/*
 * Modifier für lange Checkbox-Texte (z. B. Widerrufs-Zustimmung): die
 * Basisklasse nutzt display:flex + align-items:center, was bei mehrzeilig
 * umbrechendem Text wie eine Zweispalten-Anordnung wirkt (Checkbox mittig
 * neben dem gesamten Textblock statt an dessen erster Zeile). Hier stattdessen
 * normaler Textfluss: die Checkbox sitzt als Inline-Element am Zeilenanfang,
 * nachfolgender Text bricht ganz normal um.
 */
.tse-modal__checkbox--flow {
	display: block;
}

.tse-modal__checkbox--flow input {
	margin-right: 8px;
	vertical-align: text-top;
}

.tse-modal__payment-element {
	margin-bottom: 18px;
}

/*
 * Bestellzusammenfassung unmittelbar vor dem Kauf-Button. Bewusst optisch
 * hervorgehoben (Hintergrund + Border, nicht nur normaler Fließtext) - die
 * gesetzliche Vorgabe (§ 312j Abs. 2 BGB) verlangt eine "klare und
 * hervorgehobene" Darstellung, ein unauffälliger Absatz reicht nicht.
 */
.tse-modal__summary {
	display: flex;
	flex-direction: column;
	gap: 4px;
	background: #f4f2ee;
	border: 1px solid var(--tse-border);
	border-radius: 10px;
	padding: 14px 16px;
	margin-bottom: 16px;
}

.tse-modal__summary-label {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--tse-text-soft);
}

.tse-modal__summary-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.tse-modal__summary-title {
	font-size: 0.96rem;
	font-weight: 700;
	color: var(--tse-text);
}

.tse-modal__summary-price {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--tse-text);
	white-space: nowrap;
}

.tse-modal__summary-hint {
	font-size: 0.78rem;
	line-height: 1.5;
	color: var(--tse-text-soft);
}

.tse-modal__legal {
	font-size: 0.78rem;
	color: var(--tse-text-soft);
	line-height: 1.5;
	margin-bottom: 18px;
}

.tse-modal__error {
	background: var(--tse-danger-bg);
	color: var(--tse-danger-text);
	border-radius: var(--tse-radius-sm);
	padding: 10px 12px;
	font-size: 0.9rem;
	margin-bottom: 16px;
}

.tse-modal__submit {
	width: 100%;
	background: linear-gradient(160deg, var(--tse-green-dark), var(--tse-green));
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 14px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: filter 0.15s ease;
}

.tse-modal__submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.tse-modal__submit:hover:not(:disabled) {
	filter: brightness(1.08);
}

@media (max-width: 480px) {
	.tse-modal__row,
	.tse-modal__row--narrow {
		grid-template-columns: 1fr;
	}
}

/**
 * Shop-Grid-Übersicht ([tour_shop]-Shortcode).
 */

.tse-shop {
	--tse-green-dark: #284a37;
	--tse-green: #3c6046;
	--tse-text: #1d2327;
	--tse-text-soft: #5d6b82;
	--tse-border: #e5e8ef;
	--tse-amber: #e8a63c;
	max-width: 1160px;
	margin: 24px auto;
	font-family: inherit;
	color: var(--tse-text);
}

.tse-shop__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 22px;
}

.tse-shop__tab {
	display: inline-block;
	padding: 7px 16px;
	border: 1px solid var(--tse-border);
	border-radius: 999px;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--tse-text-soft);
	text-decoration: none;
	background: #fff;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tse-shop__tab:hover {
	border-color: var(--tse-green);
	color: var(--tse-green);
}

.tse-shop__tab.is-active {
	background: var(--tse-green-dark);
	border-color: var(--tse-green-dark);
	color: #fff;
}

.tse-shop__empty {
	color: var(--tse-text-soft);
	font-size: 0.98rem;
}

.tse-shop__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}

@media (min-width: 640px) {
	.tse-shop__grid {
		grid-template-columns: repeat(var(--tse-shop-columns, 3), 1fr);
	}
}

.tse-shop__tile {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--tse-border);
	border-radius: 14px;
	background: #fff;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tse-shop__tile:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.09);
}

.tse-shop__tile-media {
	position: relative;
	aspect-ratio: 1 / 1.414;
	background: #f4f2ee;
}

.tse-shop__tile-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tse-shop__tile-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	background: var(--tse-amber);
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 4px 9px;
	border-radius: 999px;
}

.tse-shop__tile-body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px 16px 16px;
}

.tse-shop__tile-title {
	font-size: 0.98rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--tse-text);
}

.tse-shop__tile-price {
	font-size: 0.92rem;
	font-weight: 700;
	color: var(--tse-text);
}

.tse-shop__tile-price del {
	font-weight: 400;
	color: var(--tse-text-soft);
	margin-right: 6px;
}

.tse-shop__tile-price ins {
	text-decoration: none;
	color: var(--tse-amber);
}

.tse-shop__pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	margin-top: 28px;
}

.tse-shop__page-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
	border: 1px solid var(--tse-border);
	border-radius: 8px;
	font-size: 0.86rem;
	font-weight: 600;
	color: var(--tse-text-soft);
	text-decoration: none;
}

.tse-shop__page-link.is-active {
	background: var(--tse-green-dark);
	border-color: var(--tse-green-dark);
	color: #fff;
}
