/* Uncommon Hours — portfolio components
 * Layout, widths, global padding, and typography all come from the Frost theme
 * now (constrained <main> / post-content; .alignwide for wide elements). This
 * file only styles the bespoke components — cards, wine list, specs, CTA.
 * ------------------------------------------------------------------------- */

.uh-portfolio, .uh-producer-grid {
	--uh-accent: #a1023d;
	--uh-accent-dark: #7d022f;
	--uh-muted: #6b6b6b;
	--uh-line: #e7e2da;
}

/* Single producer/wine pages: default the content column to the theme's WIDE
   width instead of the 640px reading column. .alignfull still spans full. */
main.uh-portfolio > :not(.alignfull):not(.alignleft):not(.alignright) {
	max-width: var(--wp--style--global--wide-size, 1200px);
	margin-inline: auto;
}

/* Metadata line (people · place · AVA) */
.uh-meta {
	font-size: 0.82rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--uh-muted);
	margin: 0.35rem 0 0;
}

/* ---- Producer grid + cards ------------------------------------------ */
.uh-producer-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr); /* three across when maximized */
	gap: clamp(1.5rem, 3vw, 2.5rem);
	margin-block: clamp(1.5rem, 4vw, 2.75rem);
}
@media (max-width: 900px) { .uh-producer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .uh-producer-grid { grid-template-columns: 1fr; } }
.uh-card { display: flex; flex-direction: column; }
.uh-card__media {
	display: block; aspect-ratio: 4 / 3; overflow: hidden;
	background: #f3efe9; border: 1px solid var(--uh-line);
}
.uh-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.uh-card__media:hover img { transform: scale(1.03); }
.uh-card__placeholder {
	display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
	font-size: 3.25rem; color: #cfc6b8;
}
.uh-card__body { padding-top: 1rem; }
.uh-card__title { margin: 0; font-size: 1.3rem; }
.uh-card__title a { color: inherit; text-decoration: none; }
.uh-card__title a:hover { text-decoration: underline; }
.uh-card__desc { margin: 0.6rem 0 0.85rem; }

.uh-more {
	display: inline-block; font-size: 0.86rem; letter-spacing: 0.04em;
	text-transform: uppercase; text-decoration: none; color: var(--uh-accent);
}
.uh-more:hover { text-decoration: underline; }

/* ---- Breadcrumb ----------------------------------------------------- */
.uh-breadcrumb {
	font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase;
	color: var(--uh-muted); margin-top: 0; margin-bottom: 0.5rem;
}
.uh-breadcrumb a { color: var(--uh-accent); text-decoration: none; }
.uh-breadcrumb span[aria-hidden] { color: #bbb; margin: 0 0.35rem; }

/* ---- Producer page -------------------------------------------------- */
.uh-producer__head h1 { margin-bottom: 0.25rem; }
/* Full-bleed cover hero (like wp-block-cover alignfull): min 400px tall, image fills */
.uh-producer__hero { position: relative; min-height: 400px; height: 45vh; margin: 1.5rem 0 2.5rem; overflow: hidden; }
.uh-producer__hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--uh-hero-focus, center); display: block; }
.uh-producer__story p { margin: 0 0 1.15rem; }
/* Bio: story on the left, headshot + logo in a column on the right (grid, no
   float — so a tall image column can't spill into the sections below). */
.uh-producer__bio.has-aside { display: grid; grid-template-columns: 1fr minmax(220px, 300px); gap: clamp(1.5rem, 3vw, 2.75rem); align-items: start; }
.uh-producer__aside { text-align: center; }
.uh-headshot { display: block; width: 100%; height: auto; margin: 0; }
.uh-headshot--circle { aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50%; } /* square-ish photos */
.uh-headshot--natural { border-radius: 10px; }                                       /* tall/wide photos, shown in full */
.uh-producer__logo { display: block; max-width: 220px; height: auto; margin: 1.5rem auto 0; }
/* "Visit the producer" box under the wine list */
.uh-producer__connect {
	margin-top: 2.5rem;
	padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1.25rem, 3vw, 2rem);
	background: #f6f3ee;
	border: 1px solid var(--uh-line);
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 1rem 1.5rem;
}
.uh-connect__label { font-family: var(--wp--preset--font-family--baskervville, Georgia, serif); font-size: 1.2rem; }
.uh-connect__brand { display: flex; align-items: center; }
.uh-connect__logo { max-height: 76px; width: auto; height: auto; display: block; }
.uh-connect__links { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.uh-connect__link {
	display: inline-block; border: 1px solid var(--uh-accent); color: var(--uh-accent);
	text-decoration: none; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase;
	padding: 0.55rem 1.15rem; border-radius: 2px; transition: background .2s ease, color .2s ease;
}
.uh-connect__link:hover { background: var(--uh-accent); color: #fff; }

/* ---- Wine roster on the producer page ------------------------------- */
.uh-wines { margin-top: 2.75rem; }
.uh-wines h2 { padding-bottom: 0.5rem; border-bottom: 1px solid var(--uh-line); margin-bottom: 1.25rem; }
/* Optional photo to the right of the wine list */
.uh-wines__layout { display: grid; grid-template-columns: 1fr; gap: clamp(1.5rem, 3vw, 2.5rem); }
.uh-wines__layout.has-aside { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.uh-wines__aside { position: sticky; top: 2rem; }
.uh-wines__aside img { width: 100%; height: auto; display: block; }
@media (max-width: 700px) { .uh-wines__layout.has-aside { grid-template-columns: 1fr; } }
.uh-wine-list { list-style: none; margin: 0; padding: 0; }
.uh-wine-row { display: flex; gap: 1.25rem; padding: 1.25rem 0; border-bottom: 1px solid var(--uh-line); }
.uh-wine-row__thumb { flex: 0 0 84px; }
.uh-wine-row__thumb img { width: 84px; height: 84px; object-fit: contain; display: block; }
.uh-wine-row__body h3 { margin: 0; font-size: 1.1rem; }
.uh-wine-row__body h3 a { color: inherit; text-decoration: none; }
.uh-wine-row__desc { margin: 0.5rem 0; }

/* ---- Wine page ------------------------------------------------------ */
.uh-wine__head h1 { margin-bottom: 0.25rem; }
.uh-wine__producer { margin: 0.35rem 0; font-size: 1.05rem; }
.uh-wine__producer a { color: var(--uh-accent); text-decoration: none; }
/* Bottle shot on the left, details on the right */
.uh-wine__layout.has-media { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.uh-wine__media { position: sticky; top: 2rem; }
.uh-wine__media figure { margin: 0; text-align: center; }
.uh-wine__label { margin: 0 0 1rem; }
.uh-wine__label img, .uh-wine__bottle img { width: 100%; max-width: 320px; height: auto; display: block; margin: 0 auto; }
@media (max-width: 700px) {
	.uh-wine__layout.has-media { grid-template-columns: 1fr; }
	.uh-wine__media { position: static; max-width: 240px; margin: 0 auto 1.5rem; }
}
.uh-wine__blurb { font-size: 1.15rem; }
.uh-wine__notes { margin: 1.75rem 0; }
.uh-wine__notes h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.uh-wine__notes p { margin: 0 0 1rem; }

.uh-specs { width: 100%; border-collapse: collapse; margin: 1.75rem 0; font-size: 0.95rem; }
.uh-specs th, .uh-specs td { text-align: left; padding: 0.6rem 0; border-bottom: 1px solid var(--uh-line); vertical-align: top; }
.uh-specs th { width: 34%; font-weight: 500; color: var(--uh-muted); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.8rem; }

/* ---- CTA + cross-links ---------------------------------------------- */
.uh-cta { margin: 2.25rem 0; }
.uh-cta p { margin: 0 0 1rem; }
.uh-btn {
	display: inline-block; background: var(--uh-accent); color: #fff !important;
	font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase;
	text-decoration: none; padding: 0.8rem 1.6rem; border-radius: 2px; transition: background .2s ease;
}
.uh-btn:hover { background: var(--uh-accent-dark); color: #fff !important; }
.uh-crosslink { margin-top: 2.5rem; font-size: 0.95rem; }
.uh-crosslink a { color: var(--uh-accent); }
.uh-empty { color: var(--uh-muted); }

/* Below tablet: the bio pic stops floating and shrinks so it never crowds
   the text into a narrow column. */
@media (max-width: 700px) {
	.uh-producer__bio.has-aside { grid-template-columns: 1fr; }
	.uh-producer__aside { order: -1; max-width: 260px; margin: 0 auto 1.5rem; } /* image on top on mobile */
}
@media (max-width: 480px) {
	.uh-wine-row { flex-direction: column; gap: 0.75rem; }
}
