/* wp-content/plugins/ceca-widgets/widgets/product-hero/product-hero.css */
/* Product Hero (Figma 2654:2758): bordered 745×495 cover box (contained)
   left, 526px info column right — 30/40 title, 18/30 description clamped
   with a white fade + "Show full description" toggle, 40px price, and a
   full-width teal Buy now pill (radius 300, 40px high). */

.ceca-prh {
	--ceca-prh-buy: #5fafc4;
	--ceca-prh-buy-color: #000;
	--ceca-prh-lines: 5;

	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
	align-items: start;
}

/* Columns (user, 2026-10-06): 50/50 up to 1440px; wider, a third empty
   spacer column (40/40/20) keeps the title / price / button from running
   too wide — or two columns. Shares are fr ratios set under Style → Layout. */
@media (min-width: 1025px) {
	.ceca-prh {
		grid-template-columns: minmax(0, var(--ceca-prh-std-img, 50fr)) minmax(0, var(--ceca-prh-std-info, 50fr));
	}
}

@media (min-width: 1441px) {
	.ceca-prh.ceca-prh--wide-spacer {
		grid-template-columns: minmax(0, var(--ceca-prh-w-img, 40fr)) minmax(0, var(--ceca-prh-w-info, 40fr)) minmax(0, var(--ceca-prh-w-spacer, 20fr));
	}

	.ceca-prh.ceca-prh--wide-two {
		grid-template-columns: minmax(0, var(--ceca-prh-w-img, 50fr)) minmax(0, var(--ceca-prh-w-info, 50fr));
	}
}

.ceca-prh__media {
	border: 1px solid #e3e3e3;
	background: #fff;
	/* Portrait, matching the generated cover's proportions — publication
	   covers are upright documents (user: the landscape box looked odd). */
	aspect-ratio: 307 / 420;
}

.ceca-prh__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.ceca-prh .ceca-prh__title {
	margin: 8px 0 0;
	font-size: 30px;
	line-height: 40px;
	font-weight: 700;
	color: #000;
}

/* --- description clamp + fade ------------------------------------------- */

.ceca-prh__desc {
	margin-top: 14px;
}

.ceca-prh__desc-inner {
	position: relative;
	font-size: 18px;
	line-height: 30px;
	color: #000;
	overflow: hidden;
	/* Clamp to whole lines of whatever line height the Style tab sets. */
	max-height: calc(var(--ceca-prh-lines) * var(--ceca-prh-lh, 30px));
}

.ceca-prh__desc-inner p {
	margin: 0 0 14px;
}

.ceca-prh__desc[data-clamped='1'] .ceca-prh__desc-inner::after {
	content: '';
	position: absolute;
	inset: auto 0 0 0;
	height: 45px;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 85%);
	pointer-events: none;
}

.ceca-prh__desc.is-open .ceca-prh__desc-inner {
	max-height: none;
}

.ceca-prh__desc.is-open .ceca-prh__desc-inner::after {
	display: none;
}

.ceca-prh .ceca-prh__desc-toggle,
.ceca-prh .ceca-prh__desc-toggle:hover,
.ceca-prh .ceca-prh__desc-toggle:focus {
	margin-top: 6px;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	font-size: 16px;
	line-height: 30px;
	color: #000;
	text-decoration: underline;
	text-underline-position: from-font;
	cursor: pointer;
}

.ceca-prh__desc-less,
.ceca-prh__desc.is-open .ceca-prh__desc-more {
	display: none;
}

.ceca-prh__desc.is-open .ceca-prh__desc-less {
	display: inline;
}

/* Short descriptions (JS unclamps): no fade, no toggle. */
.ceca-prh__desc[data-clamped='0'] .ceca-prh__desc-inner {
	max-height: none;
}

.ceca-prh__desc[data-clamped='0'] .ceca-prh__desc-toggle {
	display: none;
}

/* --- price + buy ---------------------------------------------------------- */

.ceca-prh .ceca-prh__price {
	margin: 24px 0 0;
	font-size: 40px;
	line-height: 40px;
	font-weight: 700;
	color: #000;
}

.ceca-prh__price-line {
	display: block;
	font-size: 22px;
	line-height: 34px;
	font-weight: 400;
}

.ceca-prh__price .woocommerce-Price-amount {
	color: inherit;
	font-weight: 700;
}

.ceca-prh .ceca-prh__buy,
.ceca-prh .ceca-prh__buy:hover,
.ceca-prh .ceca-prh__buy:focus {
	display: block;
	width: 100%;
	margin-top: 24px;
	min-height: 40px;
	padding: 5px 20px;
	border: 0;
	border-radius: 300px;
	background: var(--ceca-prh-buy);
	color: var(--ceca-prh-buy-color);
	font-size: 18px;
	line-height: 30px;
	font-weight: 700;
	cursor: pointer;
	transition: filter 0.2s ease;
}

.ceca-prh .ceca-prh__buy:hover,
.ceca-prh .ceca-prh__buy:focus {
	filter: brightness(0.92);
}

.ceca-prh__empty {
	padding: 24px;
	background: #f7f7f7;
	border: 1px dashed #c4c4c4;
	border-radius: 8px;
	font-size: 14px;
	color: #666;
}

/* The generated/photo cover fills the hero's landscape media box — the box
   keeps its own border and 745:495 aspect. */
.ceca-prh .ceca-cover {
	height: 100%;
	aspect-ratio: auto;
	border: 0;
}
