/**
 * Expandable Product Cards — products.css
 *
 * Photo height is driven by CSS flex-stretch — it always matches
 * the info column height. No JS height calculation needed.
 */

/* ── Accessibility ────────────────────────────────────────────────── */
.epp-sr-only {
	position: absolute !important;
	width: 1px !important; height: 1px !important;
	padding: 0 !important; margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0,0,0,0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ── Grid ────────────────────────────────────────────────────────── */
.epp-products-grid {
	display: block;
	margin: 0; padding: 0; list-style: none;
}

.epp-products-grid .epp-product-card + .epp-product-card {
	margin-top: 6px;
}

/* ── Card shell ──────────────────────────────────────────────────── */
.epp-product-card {
	display: block;
	cursor: pointer;
	outline: none;
	user-select: none;
	-webkit-user-select: none;
}

.epp-product-card:focus-visible {
	outline: 2px solid rgba(255,255,255,0.5);
	outline-offset: 2px;
}

/* ── Inner flex row ──────────────────────────────────────────────── */
.epp-card-inner {
	display: flex;
	flex-direction: row;
	align-items: stretch; /* photo height always equals info height */
}

/* ── Photo column 2/3 ────────────────────────────────────────────── */
.epp-card-photo {
	flex: 0 0 66.666%;
	position: relative;
	overflow: hidden; /* clips the zoom scale transform */
	/* min-height managed by JS:
	   - collapsed : unset → photo height = info content height (flex stretch)
	   - expanded  : set to natural image height → reveals full image */
	transition: min-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.epp-card-photo-bg {
	position: absolute;
	top: 0; right: 0; bottom: 0; left: 0;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	transform: scale(1);
	transform-origin: center center;
	transition: transform 0.65s ease;
	will-change: transform;
}

/* Zoom on expand */
.epp-product-card.expanded .epp-card-photo-bg {
	transform: scale(1.04);
}

/* ── Info column 1/3 ─────────────────────────────────────────────── */
.epp-card-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 32px 28px 28px;
	background: #1a1a1a; /* overridden by inline style */
	box-sizing: border-box;
	min-height: 240px; /* enough room for title + description */
}

/* ── Always visible: title + description ─────────────────────────── */
.epp-card-always {
	flex: 0 0 auto;
}

.epp-product-title {
	margin: 0 0 14px;
	font-size: 28px;   /* overridden by inline style */
	font-weight: 700;
	line-height: 1.15;
	color: #ffffff;    /* overridden by inline style */
	letter-spacing: 0.01em;
	text-transform: uppercase;
}

.epp-description {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.65;
	color: rgba(255,255,255,0.75); /* overridden by inline style */
}

/* ── Expandable details ───────────────────────────────────────────── */
.epp-card-details {
	overflow: hidden;
	max-height: 0;
	opacity: 0;
	margin-top: 0;
	transition:
		max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
		opacity    0.4s ease,
		margin-top 0.4s ease;
}

.epp-product-card.expanded .epp-card-details {
	max-height: 1200px;
	opacity: 1;
	margin-top: 24px;
}

/* ── Features list ────────────────────────────────────────────────── */
.epp-features-list {
	margin: 0 0 20px;
	padding: 0;
}

.epp-feature-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 8px 0;
	border-bottom: 1px solid rgba(255,255,255,0.12);
	/* font-family and color overridden by inline style per row */
}

.epp-feature-row:first-child {
	border-top: 1px solid rgba(255,255,255,0.12);
}

.epp-feature-row dt {
	font-size: 0.88rem;
	font-weight: 400;
	opacity: 0.7;
}

.epp-feature-row dd {
	font-size: 0.9rem;
	font-weight: 700;
	margin: 0;
	text-align: right;
}

/* ── MORE INFO button ─────────────────────────────────────────────── */
.epp-btn-more {
	display: inline-block;
	padding: 11px 26px;
	background: transparent; /* overridden by inline style */
	color: #ffffff;
	text-decoration: none;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	border: 1px solid rgba(255,255,255,0.5);
	margin-bottom: 18px;
	transition: background 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}

.epp-btn-more:hover,
.epp-btn-more:focus {
	opacity: 0.85;
	border-color: #ffffff;
	color: #ffffff;
}

/* ── Price ────────────────────────────────────────────────────────── */
.epp-price {
	margin: 0;
	font-size: 1.4rem;
	font-weight: 700;
	color: #ffffff;
	letter-spacing: 0.02em;
}

/* ── No products ──────────────────────────────────────────────────── */
.epp-no-products {
	color: #888;
	font-style: italic;
}

/* ── MOBILE (< 768px) ─────────────────────────────────────────────── */
@media (max-width: 767px) {
	.epp-card-inner {
		flex-direction: column;
	}

	.epp-card-photo {
		flex: none;
		width: 100%;
		min-height: 220px;
		/* On mobile the photo is above the info panel.
		   We set a fixed height here; it grows when expanded
		   because the CSS rule below is driven by the card class. */
		height: 220px;
		transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
	}

	.epp-product-card.expanded .epp-card-photo {
		height: 360px;
	}

	.epp-card-info {
		padding: 22px 18px 18px;
	}

	.epp-product-title {
		font-size: 1.2rem !important;
	}
}
