/**
 * Product-specific heading styles (scoped to product components)
 */
.product h2 {
	font-size: var(--font-size-600);
	text-transform: uppercase;
	margin: 0 0 var(--text-spc-500) 0;
	line-height: 1.2;
	display: none;
}

.product h3 {
	font-size: var(--font-size-500);
}

.product h4 {
	font-size: var(--font-size-400);
	text-transform: uppercase;
}

/**
 * Product image styling & Cover Wrap
 */
.product__cover-wrap {
	position: relative;
	width: 100%;
	margin-bottom: 0.65rem;
	border-radius: 4px;
	overflow: hidden;
	background-color: #f5f5f5;
}

.product__image--small {
	display: block;
	width: 100%;
	object-fit: cover;
	transition: transform 0.25s ease;
	margin: 0;
}

.product__info:hover .product__image--small {
	transform: scale(1.02);
}

/**
 * Edition Badge (e.g. English Edition with UK Flag)
 */
.product__badge {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.product__badge--de,
.product__badge--en {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: rgba(17, 17, 17, 0.15);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	color: #ffffff;
	padding: 0.25rem 0.55rem;
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	pointer-events: none;
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.product__badge .product__flag {
	border-radius: 2px;
	object-fit: cover;
	display: block;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.product__badge span {
	color: #ffffff;
	line-height: 1;
}

/* ==========================================================================
   Product Grid and Components
   ========================================================================== */
/**
 * Product grid layout
 * 3 columns on desktop, 2 on tablet, 1 on mobile
 */
.products-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem 1.5rem;
	align-items: stretch;
}

/* Medium screens: 2 columns */
@media (max-width: 899px) and (min-width: 600px) {
	.products-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.75rem 1.25rem;
	}
}

/* Small screens: 1 column */
@media (max-width: 599px) {
	#kuduhear-container {
		padding: 1rem 0;
	}

	.kuduhear-header {
		margin-bottom: 1.25rem;
	}

	.snipcart-checkout {
		margin-bottom: 1rem;
		padding: 0.45rem 0.85rem;
		font-size: 0.9rem;
	}

	.products-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.product {
		max-width: 22rem;
		margin: 0 auto;
		width: 100%;
	}

	.product__cover-wrap {
		margin-bottom: 0.5rem;
	}

	.product__description--short p {
		font-size: 0.9rem;
		line-height: 1.4;
		margin-bottom: 0.35rem;
		min-height: calc(6 * 1.4 * 1em);
	}

	.product__price {
		padding: 0.25rem 0;
	}

	.product__price__value {
		font-size: 1.15rem;
	}

	.product__button {
		margin-top: 0.4rem;
		padding: 0.6rem 1.25rem;
		font-size: 0.9rem;
		max-width: 100%;
	}
}

/**
 * Main container for the Kuduhear products section
 */
#kuduhear-container {
	max-width: 1140px;
	margin: 25px auto 0 auto;
	padding: 0;
}
#kuduhear-container + * {
	margin: 25px auto 0 auto;
}

@media (min-width: 600px) {
	#kuduhear-container {
		margin: 50px auto 0 auto;
	}
	#kuduhear-container + * {
		margin: 50px auto 0 auto;
	}
}

/**
 * Simple header styling - only basic layout
 */
.kuduhear-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
}

.kuduhear-header h2 {
	margin: 0;
}

/**
 * Cart button styling (now outside header)
 */
.snipcart-checkout {
	background-color: var(--buttons-bg);
	color: #fff;
	border: none;
	padding: 0.5rem 1rem;
	cursor: pointer;
	margin-bottom: 1.5rem;
	font-weight: 600;
	border-radius: 4px;
	-webkit-tap-highlight-color: transparent;
}

/**
 * Product container
 * Unified flex column with aligned baseline
 */
.product {
	display: flex;
	flex-direction: column;
	height: 100%;
	position: relative;
}

.product__info,
.product__info:link,
.product__info:visited,
.product__info:hover,
.product__info:active,
.product__info * {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
}

.product__info {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	padding: 0;
	margin: 0;
	border: none;
	background-color: transparent;
	text-align: left;
	font-family: inherit;
	font-size: inherit;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.product__info:focus-visible {
	outline: 2px solid #000;
	outline-offset: 3px;
	border-radius: 4px;
}

.product__info--nohover:hover {
	cursor: default;
}

/**
 * Description area with 6-lines baseline standard
 */
.product__description--short {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	justify-content: space-between;
}

.product__description--short p {
	margin: 0 0 0.5rem 0;
	font-size: 0.95rem;
	line-height: 1.45;
	color: #2c2c2c;
}

.product__description__more {
	text-transform: uppercase;
	font-size: var(--font-size-300);
}

.product__description__more::after {
	margin-left: 0.5ch;
	content: ">";
}

/**
 * Product price container - tight & aligned
 */
.product__price {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin-top: auto;
	padding: 0.35rem 0;
	text-align: center;
}

/**
 * Price value
 */
.product__price__value {
	font-size: 1.25rem;
	font-weight: 700;
}

/**
 * Tax information text
 */
.product__price__taxes {
	font-size: 0.75rem;
	color: #666;
	line-height: 1.2;
}

/**
 * Add to basket button - clean, tight & consistent
 */
.product__button {
	margin: 0.5rem auto 0;
	padding: 0.65rem 1.5rem;
	background-color: var(--buttons-bg);
	color: #fff;
	cursor: pointer;
	font-size: 0.95rem;
	font-weight: 600;
	transition:
		background-color 0.2s ease,
		transform 0.1s ease;
	width: 100%;
	max-width: 16rem;
	display: block;
	text-align: center;
	border: none;
	border-radius: 4px;
	-webkit-tap-highlight-color: transparent;
	-webkit-appearance: none;
	appearance: none;
	outline: none;
	box-shadow: none;
}

.product__button:hover {
	background-color: var(--buttons-bg-hover);
}

.product__button:active {
	transform: scale(0.98);
}

.product__button:focus {
	outline: none;
	box-shadow: none;
}

.product__button:focus-visible {
	outline: 2px solid #000;
	outline-offset: 2px;
}

.product__price--popover {
	grid-column: 1 / -1;
}

/**
 * Product Hover Preview Overlay (Stationen & Highlights)
 */
.product__hover-preview {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(18, 20, 24, 0.94);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	padding: 1.15rem;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
		visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	border-radius: 4px;
	pointer-events: none;
	box-sizing: border-box;
	text-align: left;
	z-index: 5;
}

@media (hover: hover) {
	.product__info:hover .product__hover-preview,
	.product__info:focus-visible .product__hover-preview {
		opacity: 1;
		visibility: visible;
	}
}

.product__hover-content {
	display: flex;
	flex-direction: column;
	height: 100%;
	justify-content: space-between;
}

.product__hover-duration {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: #e2e8f0;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	margin-bottom: 0.5rem;
}

.product__hover-duration svg {
	stroke: #60a5fa;
	flex-shrink: 0;
}

.product__hover-heading {
	color: #ffffff;
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 0.4rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	padding-bottom: 0.25rem;
}

.product__hover-tracks {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.product__hover-tracks li {
	color: #cbd5e1;
	font-size: 0.8rem;
	line-height: 1.25;
	position: relative;
	padding-left: 0.75rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.product__hover-tracks li::before {
	content: "•";
	position: absolute;
	left: 0;
	color: #60a5fa;
}

.product__hover-tracks li.product__hover-more {
	font-style: italic;
	color: #94a3b8;
	font-size: 0.75rem;
}
.product__hover-tracks li.product__hover-more::before {
	content: "";
}

.product__hover-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 0.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	color: #ffffff;
	font-size: 0.75rem;
	font-weight: 600;
}

.product__hover-cta svg {
	stroke: #60a5fa;
	fill: #60a5fa;
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

.product__info:hover .product__hover-cta svg {
	transform: translateX(3px);
}

/**
 * Snipcart Checkout - Digital Goods Statutory Withdrawal Waiver (§ 356 Abs. 5 BGB)
 */
.snipcart-digital-goods-waiver {
	margin-bottom: 1.25rem;
	padding: 0.875rem 1rem;
	background-color: rgba(0, 0, 0, 0.03);
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
}

.snipcart-digital-goods-waiver .snipcart-form__field-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.625rem;
}

.snipcart-digital-goods-waiver .snipcart-form__label--checkbox {
	display: block !important;
	font-size: 0.8125rem !important;
	line-height: 1.45 !important;
	color: #333333 !important;
	cursor: pointer;
	margin: 0 !important;
	padding: 0 !important;
}

.snipcart-digital-goods-waiver .snipcart-form__label--checkbox a {
	display: inline !important;
	color: inherit !important;
	text-decoration: underline !important;
	text-underline-offset: 2px !important;
	font-weight: 500 !important;
	margin: 0 !important;
	padding: 0 !important;
	white-space: normal !important;
}

.snipcart-digital-goods-waiver .snipcart-form__label--checkbox a:hover,
.snipcart-digital-goods-waiver .snipcart-form__label--checkbox a:focus {
	color: #000000 !important;
	text-decoration: underline !important;
}

.snipcart-digital-goods-waiver .snipcart-error-message,
.snipcart-digital-goods-waiver .kuduhear-waiver-error-msg {
	margin-top: 0.375rem;
	font-size: 0.75rem;
	color: #b91c1c;
	font-weight: 600;
}

.kuduhear-continue-shopping {
	margin-top: 0.75rem;
	width: 100%;
	padding: 0.75rem 1.25rem;
	border: 1px solid var(--buttons-bg, #3a292a);
	border-radius: 4px;
	background-color: transparent;
	color: var(--buttons-bg-hover, #3a292a);
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	transition:
		background-color 0.2s ease,
		color 0.2s ease;
}

.kuduhear-continue-shopping:hover,
.kuduhear-continue-shopping:focus-visible {
	background-color: var(--buttons-bg-hover, #3a292a);
	color: #fff;
}
