/* =============================================================================
 * focus-wine.css — /product/{wine}/focus/  (templates/single_wine_focus.php)
 *
 * <body class="focus_page wine-focus-page winemaker-page winemaker-focus-page">
 *
 * The page borrows the two winemaker focus classes on purpose: its hero bar
 * and every section under the hero are the markup of the winemaker focus page,
 * and assets/css/winemaker.css already styles all of it under those classes.
 * This file holds only what a WINE adds or changes, scoped to .wine-focus-page:
 *
 *   1. the hero skin   — .focus-hero--wine: the red collage and its ratio
 *   2. the hero cards  — values on one line ("BY TOP RATED", not one word a line)
 *   3. the bar         — three columns: wine | bottle + awards + price | trust
 *   4. the bottle      — the WooCommerce product image standing on the bar
 *
 * Enqueued after winemaker.css (inc/register_focus_endpoint.php), so equal
 * selectors here win.
 * ========================================================================== */

.wine-focus-page {
	--wine-focus-accent:   #A6032F;   /* the collage red — DETAILS, meta line */
	--wine-focus-accent-2: #7E0224;   /* hover */
	--wine-focus-text:     #3B2E26;   /* wine name */
	--wine-focus-muted:    #8A7B6C;   /* style line under the name */
	--wine-focus-price-bg: #B5AA9C;   /* the price box, one step darker than the bar */

	/* The bottle's height. The hero is sized from the viewport width (its
	   aspect-ratio), so the bottle follows the same unit — in the 1440 design
	   it is ~700px tall. */
	--wine-focus-bottle-h: clamp(300px, 48vw, 820px);
	/* How far below the top of the centre column the bottle's foot stands —
	   i.e. how deep it sinks into the bar. The awards start 20px under it. */
	--wine-focus-bottle-sink: 14px;
}


/* --- 1. Hero skin ---------------------------------------------------------- */

/* assets/img/wine_of_the_month_bg.png, 1440 × 1480. Path relative to this file. */
.focus-hero--wine {
	--focus-hero-ratio: 1440 / 1480;
	--focus-hero-bg:    #A6032F;
	background-image: url('../img/wine_of_the_month_bg.png');
}


/* --- 2. Hero cards ----------------------------------------------------------
 *
 * winemaker.css puts one word per line (width: min-content) — right for
 * "GRAPE / HARVEST", wrong for "BY TOP RATED", which the design keeps on one
 * line. Here the value wraps only when it really has to.
 * -------------------------------------------------------------------------- */

.wine-focus-page .focus-hero--wine .focus-hero__card-value {
	width: auto;
	font-size: 22px;
}

.wine-focus-page .focus-hero--wine .focus-hero__card-label {
	font-size: 22px;
}

.wine-focus-page .focus-hero--wine .focus-hero__card-icon {
	width: 14px;
	height: 26px;
}


/* --- 3. The bar -------------------------------------------------------------
 *
 * winemaker.css lays the bar out as flex, space-between, two children. A wine
 * has three: the centre column must sit on the centre of the page whatever
 * the widths of the two sides, hence a 1fr | auto | 1fr grid.
 * -------------------------------------------------------------------------- */

.wine-focus-page .focus-hero__bar .event-hero__wrap {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: end;
	gap: 32px;
	overflow: visible;   /* the bottle rises out of the bar */
}

.wine-focus-page .focus-hero__bar .event-hero__main {
	align-self: center;
}

.wine-focus-page .winemaker-focus__meta {
	color: #590232;
	font-size: 13px;
}

.wine-focus-page .winemaker-focus__name {
	color: #211A15;
	font-weight: 700 !important;
	font-size: 56px;
	line-height: 58px;
}

.wine-focus-page .wine-focus__style {
	color: #6E615B;
	font-size: 32px;
	font-weight: 600;
}

.wine-focus-page .wine-focus__maker {
	margin: 10px 0 0;
	font-family: 'Cormorant Garamond', serif;
	font-style: italic;
	font-weight: 600;
	font-size: 26px;
	line-height: 1.2;
	color: #6B5539;
}

.wine-focus-page .wine-focus__maker a {
	color: inherit;
	text-decoration: none;
}

.wine-focus-page .wine-focus__maker a:hover,
.wine-focus-page .wine-focus__maker a:focus-visible {
	text-decoration: underline;
}

.wine-focus-page .winemaker-focus__trust {
	justify-self: end;
	align-self: center;
}

/* Centre column: the bottle (absolute, above), the awards, the price. */
.wine-focus-page .wine-focus__center {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding-top: calc(var(--wine-focus-bottle-sink) + 20px);
}

.wine-focus-page .wine-focus__awards {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
	position: relative;
	z-index: 2;
}

.wine-focus-page .wine-focus__award {
	width: 58px;
	height: 58px;
	margin: 0;
	border-radius: 50%;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

.wine-focus-page .wine-focus__award img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wine-focus-page .wine-focus__buy {
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.wine-focus-page .wine-focus__price {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 150px;
	padding: 8px 22px;
	border-radius: 2px;
	background: var(--wine-focus-price-bg);
	font-family: 'Work Sans', sans-serif;
	font-size: 30px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: .02em;
	color: #211A15;
}

/* DETAILS — the winemaker primary button in the wine red. */
.wine-focus-page .winemaker-focus__btn--primary.wine-focus__details {
	min-width: 110px;
	border-color: var(--wine-focus-accent);
	background: var(--wine-focus-accent);
	color: #fff;
}

.wine-focus-page .winemaker-focus__btn--primary.wine-focus__details:hover,
.wine-focus-page .winemaker-focus__btn--primary.wine-focus__details:focus-visible {
	border-color: var(--wine-focus-accent-2);
	background: var(--wine-focus-accent-2);
	color: #fff;
}


/* --- 4. The bottle ----------------------------------------------------------
 *
 * Positioned from the centre column, which sits on the bar: its foot is
 * --wine-focus-bottle-sink below the top of that column, just above the
 * awards, and the rest of it stands up in the collage. pointer-events: none so
 * it never covers a hero card it happens to overlap on a narrow screen.
 * -------------------------------------------------------------------------- */

.wine-focus-page .wine-focus__bottle {
	position: absolute;
	left: 50%;
	bottom: calc(100% - var(--wine-focus-bottle-sink));
	z-index: 1;
	height: var(--wine-focus-bottle-h);
	margin: 0;
	transform: translateX(-50%);
	pointer-events: none;
}

.wine-focus-page .wine-focus__bottle img {
	display: block;
	width: auto;
	height: 100%;
	max-width: none;
	object-fit: contain;
	filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .35));
}


/* --- Responsive ------------------------------------------------------------ */

/* Three or two hero cards across and a shorter picture: a smaller bottle, so
   it stands under the cards instead of over them. */
@media only screen and (max-width: 1200px) {
	.wine-focus-page {
		--wine-focus-bottle-h: clamp(280px, 36vw, 440px);
	}

	.wine-focus-page .focus-hero__bar .event-hero__wrap {
		gap: 20px;
	}

	.wine-focus-page .wine-focus__price {
		min-width: 110px;
		font-size: 24px;
	}
}

/* Stacked bar (winemaker.css turns it into a column at 1024px). The bottle
   leaves the absolute layer and becomes the first thing in the centre column,
   pulled up into the collage; the hero keeps room for it above the bar. */
@media only screen and (max-width: 1024px) {
	.wine-focus-page {
		--wine-focus-bottle-h: 340px;
	}

	.wine-focus-page .focus-hero--wine .focus-hero__top {
		padding-bottom: calc(var(--wine-focus-bottle-h) - 60px);
	}

	.wine-focus-page .focus-hero__bar .event-hero__wrap {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 22px;
	}

	.wine-focus-page .wine-focus__center {
		order: -1;
		padding-top: 0;
	}

	.wine-focus-page .wine-focus__bottle {
		position: relative;
		left: auto;
		bottom: auto;
		transform: none;
		margin-top: calc(-1 * var(--wine-focus-bottle-h) + 60px);
	}

	/* align-self: center of the grid layout would centre them horizontally in
	   a column — back to full width, left-aligned. */
	.wine-focus-page .focus-hero__bar .event-hero__main,
	.wine-focus-page .winemaker-focus__trust {
		justify-self: auto;
		align-self: stretch;
	}

	.wine-focus-page .wine-focus__style {
		font-size: 22px;
	}
}

@media only screen and (max-width: 860px) {
	.wine-focus-page .focus-hero--wine .focus-hero__card-label,
	.wine-focus-page .focus-hero--wine .focus-hero__card-value {
		font-size: 18px;
	}
}

@media only screen and (max-width: 560px) {
	.wine-focus-page {
		--wine-focus-bottle-h: 280px;
	}

	.wine-focus-page .wine-focus__award {
		width: 46px;
		height: 46px;
	}

	.wine-focus-page .wine-focus__price {
		min-width: 0;
		padding: 8px 16px;
		font-size: 20px;
	}
}


/* =============================================================================
 * The two placeholder sections under Selected by — empty for now.
 * ========================================================================== */

/* --- Past Month ------------------------------------------------------------ */

.wine-focus-past {
	background: #F2F0EC;
	padding: 100px 0 220px;
}

.wine-focus-past__title {
	margin: 0 0 80px;
	font-family: 'Cormorant Garamond', serif !important;
	font-style: italic;
	font-weight: 500;
	font-size: 34px !important;   /* beats style.css's `h2 { … !important }` */
	line-height: 1.2;
	letter-spacing: .08em;
	color: #8A765C;
}

.wine-focus-past__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

.wine-focus-past__tile {
	aspect-ratio: 172 / 187;
	background: #E9E5DE;
}


/* --- Season wine ----------------------------------------------------------- */

.wine-focus-season {
	padding: 110px 0 60px;   /* on the section, not the wrap: .content_wrap has its own padding */
	background: #8A0233;
	color: #fff;
}

.wine-focus-season__wrap {
	display: flex;
	flex-direction: column;
	min-height: 620px;
}

.wine-focus-season__title {
	margin: 0;
	font-family: 'Cormorant Garamond', serif !important;
	font-style: italic;
	font-weight: 500;
	font-size: 64px !important;
	line-height: 1.1;
	color: #fff;
}

.wine-focus-season__badges {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin: auto 0 0;
	padding: 0;
	list-style: none;
}

.wine-focus-season__badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: #5A0B36;
	text-align: center;
	line-height: 1;
}

.wine-focus-season__badge.is-active {
	box-shadow: 0 0 0 3px #8A0233, 0 0 0 5px #fff;
}

.wine-focus-season__badge-brand {
	font-family: 'Work Sans', sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.wine-focus-season__badge-text {
	max-width: 40px;
	margin-top: 2px;
	font-family: 'Cormorant Garamond', serif;
	font-style: italic;
	font-size: 9px;
	line-height: 1;
	text-transform: lowercase;
	opacity: .85;
}

@media only screen and (max-width: 860px) {
	.wine-focus-past {
		padding: 60px 0 100px;
	}

	.wine-focus-past__title {
		margin-bottom: 40px;
		font-size: 28px !important;
	}

	.wine-focus-season {
		padding: 60px 0 40px;
	}

	.wine-focus-season__wrap {
		min-height: 380px;
	}

	.wine-focus-season__title {
		font-size: 44px !important;
	}
}

@media only screen and (max-width: 560px) {
	.wine-focus-past__grid {
		grid-template-columns: 1fr;
	}

	.wine-focus-season__badge {
		width: 50px;
		height: 50px;
	}
}


/* "Selected by" right under the hero: 64px above it (winemaker.css gives
 * .winemaker-page .event-selected only 24px, borrowed from the winemaker
 * focus layout). Wine focus page only. */
.wine-focus-page .wine-focus .event-selected {
    padding-top: 64px;
    padding-bottom: 64px;   /* was 16px (winemaker.css) */
}
