/* Patio category + collection pages (inc/pfp-collections-view.php).
   Colours, fonts and spacing come from the theme tokens in css/main.css;
   .catalog, .catalog__title, .eyebrow, .btn and .text-link come from the theme too. */

.cv-page {
	--cv-line: #e4e2dc;
	--cv-soft: #f8f7f4;
	--cv-muted: #555555;
}

/* ── Shared ── */
.cv-h2 {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(1.6rem, 2.6vw, 2rem);
	line-height: 1.15;
	text-transform: uppercase;
}

.cv-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	font-size: var(--text-base);
	color: #333333;
}

.cv-meta span + span { color: var(--cv-muted, #555555); }

.cv-colours {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 10px 0 0;
}

.cv-colours__dots { display: inline-flex; gap: 6px; }

.cv-dot {
	width: 18px;
	height: 18px;
	border: 1px solid #bbbbbb;
	border-radius: 50%;
	background: var(--dot, #b9b9b9);
}

.cv-colours__text { font-size: 13px; color: #555555; }

.cv-btn-outline {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 20px;
	border: 1px solid var(--color-text, #111111);
	color: var(--color-text, #111111);
	font-family: var(--font-display);
	font-size: var(--text-base);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background var(--transition-fast, 0.15s), color var(--transition-fast, 0.15s);
}

.cv-btn-outline:hover,
.cv-btn-outline:focus-visible {
	background: var(--color-text, #111111);
	color: #ffffff;
}

/* Photos: lifestyle shots fill the frame; product photos sit on white. */
.cv-photo {
	display: block;
	overflow: hidden;
	background: #ecebe6;
}

.cv-photo__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.cv-photo--product { background: #ffffff; border: 1px solid #e4e2dc; }
.cv-photo--product .cv-photo__img { object-fit: contain; padding: 6%; }
.cv-photo--empty { aspect-ratio: 4 / 3; }

a:hover > .cv-photo .cv-photo__img { transform: scale(1.03); }

@media (prefers-reduced-motion: reduce) {
	.cv-photo__img { transition: none; }
	a:hover > .cv-photo .cv-photo__img { transform: none; }
}

/* ── Category hero: photo with dark overlay, like the All collections page.
   Uses the theme's .hero / .hero__slide-bg / .hero__img (css/main.css); the text here sits in the
   normal flow so the hero grows with the intro and links instead of overlapping them. ── */
.hero.cv-hero {
	display: flex;
	align-items: flex-end;
	min-height: clamp(520px, 64vh, 720px);
}

.cv-hero .hero__slide-bg::after {
	background:
		linear-gradient(to top, rgba(10, 10, 9, 0.7) 0%, rgba(10, 10, 9, 0) 55%),
		linear-gradient(to right, rgba(10, 10, 9, 0.75) 0%, rgba(10, 10, 9, 0.4) 60%, rgba(10, 10, 9, 0.15) 100%);
}

.cv-hero .hero__content.cv-hero__content {
	position: relative;
	z-index: 1;
	inset: auto;
	max-width: 760px;
	padding: 140px 3rem clamp(48px, 8vh, 88px);
}

.cv-hero__title.hero__heading {
	margin: 16px 0 0;
	text-transform: uppercase;
}

.cv-hero__intro {
	max-width: 58ch;
	margin: 18px 0 0;
	font-size: var(--text-lg);
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.88);
}

.cv-hero__count {
	margin: 24px 0 0;
	font-size: var(--text-sm);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.75);
}
.cv-hero__count strong { font-weight: 600; color: #ffffff; }

@media (max-width: 900px) {
	.cv-hero .hero__content.cv-hero__content { padding: 120px 2rem 48px; }
}

.cv-hero__jumps {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 20px;
}

.cv-hero__jumps-label {
	margin-right: 4px;
	font-size: var(--text-xs);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--color-accent-gold);
}

.cv-hero__jump {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 8px 18px;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	color: #ffffff;
	font-size: var(--text-sm);
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.cv-hero__jump:hover,
.cv-hero__jump:focus-visible {
	background: #ffffff;
	border-color: #ffffff;
	color: var(--color-primary-dark);
}
.cv-hero__jump:focus-visible { outline: 2px solid var(--color-accent-gold); outline-offset: 2px; }

/* Featured blocks are jump targets: leave room for the sticky header. */
.cv-feature { scroll-margin-top: 140px; }
html:has(.cv-hero__jumps) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html:has(.cv-hero__jumps) { scroll-behavior: auto; }
	.cv-hero__jump { transition: none; }
}

/* ── Tabs (category pages and the collection page's grid) ── */
.cv-tabs { margin-top: 8px; border-bottom: 1px solid #dddddd; }

.cv-tabs__list {
	display: flex;
	gap: 6px 28px;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	list-style: none;
	scrollbar-width: thin;
}

.cv-tabs__tab {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	min-height: 44px;
	padding: 12px 0 10px;
	margin-bottom: -1px;
	border-bottom: 3px solid transparent;
	color: #222222;
	font-family: var(--font-display);
	font-size: 1.05rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
}

.cv-tabs__tab:hover { color: var(--color-primary); }
.cv-tabs__tab.is-active { border-bottom-color: var(--color-primary); color: var(--color-primary); }
.cv-tabs__n { font-family: var(--font-body); font-size: 12px; letter-spacing: 0; color: #666666; }

.cv-tabs--grid { margin: 0 0 18px; }

.cv-summary {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
	margin: 14px 0 0;
	font-size: var(--text-base);
}

.cv-summary__count { margin: 0; color: var(--cv-muted); }

/* ── Featured collections ── */
.cv-feature { margin-top: 36px; }

.cv-feature__main {
	display: flex;
	flex-wrap: wrap;
	background: var(--cv-soft);
	border: 1px solid var(--cv-line);
}

.cv-feature--flip .cv-feature__main { flex-direction: row-reverse; }

.cv-feature__media {
	display: block;
	flex: 3 1 560px;
	min-width: 0;
}

.cv-feature__media .cv-photo {
	height: 100%;
	min-height: 320px;
	max-height: 540px;
	aspect-ratio: 16 / 10;
}

.cv-feature__media .cv-photo--product { border: 0; }

.cv-feature__body {
	display: flex;
	flex: 2 1 340px;
	flex-direction: column;
	justify-content: center;
	gap: 14px;
	min-width: 0;
	padding: clamp(24px, 3.5vw, 44px);
}

.cv-feature__title {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(1.9rem, 3.2vw, 2.6rem);
	line-height: 1.05;
	text-transform: uppercase;
}

.cv-feature__story { margin: 0; font-size: var(--text-lg); line-height: 1.6; color: #333333; }
.cv-feature__body .cv-colours { margin-top: 0; }
.cv-feature__actions { margin: 6px 0 0; }

.cv-keys { margin-top: 16px; }
.cv-keys__label { margin-bottom: 10px; }

.cv-keys__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cv-keys__link { display: block; color: inherit; text-decoration: none; }

.cv-keys__media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	padding: 8%;
	background: #ffffff;
	border: 1px solid var(--cv-line);
}

.cv-keys__media img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.cv-keys__name { display: block; margin-top: 8px; font-size: var(--text-base); font-weight: 600; line-height: 1.35; }
.cv-keys__link:hover .cv-keys__name { color: var(--color-primary); }

/* ── All other collections ── */
.cv-grid-wrap { margin-top: 64px; }

.cv-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 44px 28px;
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
}

@media (max-width: 1023px) { .cv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px)  { .cv-grid { grid-template-columns: minmax(0, 1fr); } }

.cv-card { display: flex; flex-direction: column; min-width: 0; }
.cv-card__media { display: block; }
.cv-card__media .cv-photo { aspect-ratio: 4 / 3; }

.cv-card__title {
	margin: 18px 0 6px;
	font-family: var(--font-display);
	font-weight: 400;
	font-size: 1.5rem;
	line-height: 1.15;
	text-transform: uppercase;
}

.cv-card__title a { color: inherit; text-decoration: none; }
.cv-card__title a:hover { color: var(--color-primary); }
.cv-card__story { margin: 0 0 10px; font-size: 15px; line-height: 1.55; color: #333333; }
.cv-card__actions { margin: auto 0 0; padding-top: 16px; }

/* ── Quiz band ── */
.cv-band {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-top: 72px;
	padding: clamp(24px, 3vw, 40px);
	background: var(--color-primary-dark);
	color: #ffffff;
}

.cv-band__eyebrow { color: #d6e4f0; }
.cv-band__title { margin: 8px 0 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 1.9rem); text-transform: uppercase; color: #ffffff; }
.cv-band__text { margin: 6px 0 0; color: #e6eef5; }

.cv-band__btn {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 0 24px;
	background: #ffffff;
	color: var(--color-primary-dark);
	font-family: var(--font-display);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
}

.cv-band__btn:hover { background: #eef3f8; }

/* ── Collection page header ── */
.cv-coll { margin-bottom: 40px; }
.cv-coll__photo { aspect-ratio: 12 / 5; overflow: hidden; background: #ecebe6; }
.cv-coll__img { display: block; width: 100%; height: 100%; object-fit: cover; }

.cv-coll__intro {
	display: flex;
	flex-wrap: wrap;
	gap: 32px 64px;
	padding-top: 32px;
}

.cv-coll__text { flex: 3 1 520px; min-width: 0; }

.cv-coll__desc {
	max-width: 62ch;
	margin-top: 14px;
	font-size: var(--text-lg);
	color: #333333;
}

.cv-coll__facts {
	display: flex;
	flex: 2 1 320px;
	flex-direction: column;
	gap: 16px;
	align-self: start;
	min-width: 0;
	padding: 24px 28px;
	background: var(--cv-soft, #f8f7f4);
	border: 1px solid var(--cv-line, #e4e2dc);
}

.cv-facts { display: grid; gap: 10px; margin: 0; }
.cv-facts__row { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 12px; align-items: baseline; }

.cv-facts dt {
	font-size: var(--text-sm);
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #555555;
}

.cv-facts dd { margin: 0; font-size: 15px; }
.cv-facts .cv-colours { margin: 0; }

.cv-coll__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 0; }

.cv-anchor { scroll-margin-top: calc(var(--header-height, 80px) + 16px); }

/* ── "More ... collections" under the grid ── */
.cv-more { margin-top: 80px; }

.cv-more__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
}

.cv-more__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 28px 24px;
	margin: 22px 0 0;
	padding: 0;
	list-style: none;
}

@media (max-width: 1023px) { .cv-more__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.cv-more__link { display: block; color: inherit; text-decoration: none; }
.cv-more__link .cv-photo { aspect-ratio: 4 / 3; }
.cv-more__name { display: block; margin-top: 12px; font-family: var(--font-display); font-size: 1.25rem; text-transform: uppercase; }
.cv-more__link:hover .cv-more__name { color: var(--color-primary); }
.cv-more__pieces { display: block; margin-top: 2px; font-size: var(--text-base); color: #555555; }

/* ?view=pieces: link back to the collections */
.cv-back { margin: 0 0 18px; font-size: var(--text-base); }
