/* Layout: Bike grid */

.bike-grid__header {
	text-align: center;
}

.bike-grid__list {
	display: grid;
	gap: var(--space-l);
	margin: 0;
	padding: 0;
	list-style: none;
	grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
}

/*
 * auto-fit stretches whatever is there across the full container, so one or two
 * cards turn into banners. Cap the track width instead of the list — capping
 * the list does nothing, it already sits inside .container.
 *
 * A type only appears once its info block is filled in, so a three-type shop
 * can legitimately render two cards for a while.
 */
.bike-grid__list[data-count="1"],
.bike-grid__list[data-count="2"] {
	grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 30rem));
	justify-content: center;
}

.bike-card {
	display: flex;
	height: 100%;
	flex-direction: column;
	padding: clamp(var(--space-m), 1rem + 2vw, var(--space-l));
	background: var(--color-bg);
	border-radius: var(--radius-l);
}

.bike-card__title {
	margin-bottom: 0;
	font-size: var(--text-xl);
}

.bike-card__subtitle {
	margin-bottom: var(--space-m);
	font-size: var(--text-sm);
	font-weight: 700;
}

.bike-card__media {
	margin-bottom: var(--space-m);
}

.bike-card__image {
	width: 100%;
	height: auto;
	object-fit: contain;
}

/* Price headline: "ab 29 CHF pro Tag" on one baseline. */
.bike-card__price {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 0.3em;
	margin-bottom: var(--space-3xs);
	flex-wrap: wrap;
}

.bike-card__price-prefix,
.bike-card__price-unit {
	font-size: var(--text-sm);
	font-weight: 600;
}

.bike-card__price-value {
	font-size: var(--text-xl);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.bike-card__price-note,
.bike-card__min {
	margin-bottom: var(--space-3xs);
	font-size: var(--text-sm);
	font-weight: 600;
	text-align: center;
}

.bike-card__min {
	margin-bottom: var(--space-l);
}

.bike-card__text {
	margin-bottom: var(--space-m);
}

/* Collapsible detail lists — native <details>, so they work without JS. */
.bike-card__details {
	border-top: 1px solid var(--color-text);
}

.bike-card__details:last-of-type {
	border-bottom: 1px solid var(--color-text);
}

.bike-card__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-s);
	padding-block: var(--space-2xs);
	cursor: pointer;
	font-size: var(--text-sm);
	font-weight: 700;
	list-style: none;
}

.bike-card__summary::-webkit-details-marker {
	display: none;
}

/* Chevron, rotated when open. */
.bike-card__icon {
	flex: 0 0 auto;
	width: 0.7em;
	height: 0.7em;
	border-right: 2px solid currentcolor;
	border-bottom: 2px solid currentcolor;
	transform: translateY(-0.2em) rotate(45deg);
	transition: transform var(--transition);
}

.bike-card__details[open] .bike-card__icon {
	transform: translateY(0.1em) rotate(-135deg);
}

.bike-card__panel {
	padding-bottom: var(--space-m);
	font-size: var(--text-sm);
}

.bike-card__pairs {
	display: grid;
	gap: 0.15em;
	margin: 0;
}

.bike-card__pair {
	display: grid;
	grid-template-columns: minmax(7rem, 40%) 1fr;
	gap: var(--space-2xs);
}

.bike-card__pair dt {
	color: var(--color-muted);
}

.bike-card__pair dd {
	margin: 0;
}

.bike-card__lines {
	margin: 0;
	padding-left: 1.1em;
}

.bike-card__lines li + li {
	margin-top: 0.15em;
}

/* Pushes the button to the bottom so cards of different length line up. */
.bike-card__action {
	margin: auto 0 0;
	padding-top: var(--space-l);
	text-align: center;
}
