/*
 * Custom Bathroom Vanity Solutions page (/custom-bathroom-vanity-solutions/).
 * Loaded only on that page (see inc/custom-vanity-solutions-editor.php).
 * Measurements follow the Shouya custom-solutions reference at 1440 / 820 / 390px:
 * 1140px content width, 24px H2 / 18px H3 / 14px body, pill buttons,
 * 2px 2px 5px card shadows with a -5px hover lift.
 * Everything is scoped under .cvs-page so no global styles change.
 */

.cvs-page {
	--cvs-navy: #1d3662;
	--cvs-navy-hover: #2d539f;
	--cvs-ink: #1b1b1b;
	--cvs-card-shadow: 2px 2px 5px 0 rgba(0, 0, 0, 0.35);
	--cvs-card-shadow-hover: 4px 4px 10px 0 rgba(0, 0, 0, 0.67);
	--cvs-gap: 20px;
	color: var(--cvs-ink);
	font-size: 14px;
	line-height: 1.7;
}

.cvs-page h1,
.cvs-page h2,
.cvs-page h3 {
	margin: 0;
	color: inherit;
	font-family: var(--font-heading);
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
}

.cvs-page p {
	margin: 0;
	font-size: 14px;
	line-height: 1.7;
}

.cvs-wrap {
	width: min(1140px, calc(100% - 32px));
	margin: 0 auto;
}

/* ---------- Buttons ---------- */

.cvs-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 8px 25px;
	border: 2px solid var(--cvs-navy);
	border-radius: 50px;
	font-family: var(--font-button);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.7;
	letter-spacing: 0.5px;
	text-align: center;
	text-decoration: none;
	transition: 0.5s;
}

.cvs-btn--primary {
	background: var(--cvs-navy);
	color: #fff;
}

.cvs-btn--primary:hover,
.cvs-btn--primary:focus-visible {
	background: var(--cvs-navy-hover);
	border-color: var(--cvs-navy-hover);
	color: #fff;
}

.cvs-btn--outline {
	background: transparent;
	color: var(--cvs-navy);
}

.cvs-btn--outline:hover,
.cvs-btn--outline:focus-visible {
	background: var(--cvs-navy);
	color: #fff;
}

.cvs-btn--ghost {
	background: transparent;
	border-color: #fff;
	color: #fff;
}

.cvs-btn--ghost:hover,
.cvs-btn--ghost:focus-visible {
	background: var(--cvs-navy-hover);
	border-color: var(--cvs-navy-hover);
	color: #fff;
}

.cvs-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin-top: 20px;
}

.cvs-actions--center {
	justify-content: center;
}

/* ---------- Shared section heads / cards ---------- */

.cvs-section {
	margin-top: 60px;
}

.cvs-page .cvs-title {
	font-size: 24px;
	line-height: 1.4;
	text-align: center;
}

.cvs-title__sub {
	display: block;
}

.cvs-intro {
	margin: 20px auto 0 !important;
	text-align: center;
}

.cvs-intro--left {
	text-align: left;
}

.cvs-card {
	background: #fff;
	box-shadow: var(--cvs-card-shadow);
	overflow: hidden;
	transition: 0.5s;
}

.cvs-card:hover {
	box-shadow: var(--cvs-card-shadow-hover);
	transform: translate(-5px, -5px);
}

.cvs-page .cvs-card h3 {
	font-size: 18px;
	line-height: 1.4;
	text-align: center;
}

/* ---------- Hero ---------- */

.cvs-hero {
	position: relative;
	overflow: hidden;
	background: #333;
	color: #fff;
}

.cvs-hero__bg,
.cvs-hero__overlay {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.cvs-hero__bg {
	object-fit: cover;
	object-position: center center;
}

.cvs-hero__overlay {
	background: rgb(51, 51, 51);
}

.cvs-hero__inner {
	position: relative;
	z-index: 1;
	display: grid;
	justify-items: center;
	row-gap: 10px;
	padding: 200px 0 80px;
	text-align: center;
}

.cvs-page .cvs-hero h1 {
	color: #fff;
	font-size: 33.6px;
	line-height: 1.4;
}

.cvs-breadcrumb {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-primary);
	font-size: 16px;
	line-height: 1.7;
	color: #fff;
}

.cvs-breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.cvs-breadcrumb a:hover {
	text-decoration: underline;
}

.cvs-page .cvs-hero p {
	color: #fff;
}

.cvs-hero--plain {
	background: #f4f4f4;
	color: var(--cvs-ink);
}

.cvs-hero--plain .cvs-hero__overlay {
	display: none;
}

.cvs-hero--plain .cvs-hero__inner {
	padding: 60px 0;
}

.cvs-page .cvs-hero--plain h1,
.cvs-hero--plain .cvs-breadcrumb {
	color: var(--cvs-ink);
}

/* ---------- Semi-custom ---------- */

/* Section no longer ends with a CTA button; restore the reference site's
   gap to the next section (Material Options) by padding the section itself
   instead of stacking margin on top of .cvs-collections' own spacing. */
.cvs-semi {
	padding-bottom: 50px;
}

.cvs-semi__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--cvs-gap);
	margin-top: 19px;
}

.cvs-semi__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 40px 20px;
	text-align: center;
}

.cvs-semi__icon {
	width: 60px;
	height: 60px;
	object-fit: contain;
}

.cvs-page .cvs-semi__card h3 {
	margin-top: 20px;
}

.cvs-semi__card p {
	margin-top: 20px !important;
}

/* ---------- Collections (4 category cards) ---------- */

.cvs-collections {
	padding: 50px 0;
	margin-top: 10px;
}

.cvs-collections__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: 1fr; /* equal card heights also when the grid wraps to 2 or 1 columns */
	gap: var(--cvs-gap);
	margin-top: 20px;
}

.cvs-collection-card {
	display: flex;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

.cvs-collection-card:hover {
	color: inherit;
}

.cvs-collection-card__media {
	display: block;
	aspect-ratio: 173 / 130;
	background: #f4f4f4;
	overflow: hidden;
}

.cvs-collection-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cvs-collection-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 20px;
	padding: 20px 20px 40px;
	text-align: center;
}

.cvs-collection-card__desc {
	font-size: 14px;
	line-height: 1.7;
}

/* ---------- Configuration options (more products / sizes / colors / logo) ---------- */

.cvs-options {
	padding: 80px 0;
	margin-top: 10px;
}

.cvs-split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	gap: 40px;
	margin-top: 50px;
}

.cvs-options .cvs-split + .cvs-split {
	margin-top: 76px;
}

.cvs-split--flush {
	margin-top: 0;
}

.cvs-page .cvs-split__copy h2 {
	font-size: 24px;
	line-height: 1.4;
}

.cvs-page .cvs-split__copy h3 {
	font-size: 18px;
	line-height: 1.4;
}

.cvs-split__copy p {
	margin-top: 17px !important;
	line-height: 2 !important;
}

.cvs-split__copy h3 + p,
.cvs-page .cvs-split__copy h2 + p {
	margin-top: 20px !important;
}

.cvs-split__copy strong {
	font-weight: 600;
}

/* Match the two reference blocks without changing the other option rows. */
.cvs-split--colors {
	grid-template-columns: minmax(0, 530fr) minmax(0, 570fr);
}

.cvs-split--colors .cvs-split__copy p:last-child,
.cvs-split--logo .cvs-split__copy p + p {
	margin-top: 28px !important;
}

.cvs-split__img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.cvs-split__img--4x3 {
	aspect-ratio: 4 / 3;
}

.cvs-lift-image {
	border-radius: 5px;
	box-shadow: 2px 2px 10px 0 rgba(0, 0, 0, 0.6);
	transition: 0.5s ease-in-out;
}

.cvs-lift-image:hover {
	transform: scale(1.01) translate(-5px, -5px);
	box-shadow: 5px 5px 10px 0 rgba(0, 0, 0, 0.67);
}

/* ---------- Carousel (slide + dots, like the reference Swiper) ---------- */

.cvs-carousel {
	position: relative;
}

.cvs-carousel__viewport {
	overflow: hidden;
}

.cvs-carousel__track {
	display: flex;
	transition: transform 0.3s ease;
	will-change: transform;
}

.cvs-carousel__slide {
	flex: 0 0 100%;
	margin: 0;
}

.cvs-carousel__slide img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.cvs-carousel__dots {
	position: absolute;
	left: 50%;
	bottom: 15px;
	z-index: 2;
	display: flex;
	transform: translateX(-50%);
}

.cvs-carousel__dot {
	width: 10px;
	height: 10px;
	margin: 0 5px;
	padding: 0;
	border: 1px solid var(--cvs-navy);
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
}

.cvs-carousel__dot.is-active {
	background: var(--cvs-navy);
}

/* ---------- Mid-page CTA ---------- */

.cvs-cta {
	position: relative;
	overflow: hidden;
	padding: 60px 0;
	background: var(--cvs-navy);
	color: #fff;
}

.cvs-cta__bg,
.cvs-cta__overlay {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.cvs-cta__bg {
	object-fit: cover;
}

.cvs-cta__overlay {
	background: var(--cvs-navy);
}

.cvs-cta__inner {
	position: relative;
	z-index: 1;
	display: grid;
	justify-items: center;
	gap: 20px;
	text-align: center;
}

.cvs-page .cvs-cta h2 {
	color: #fff;
	font-size: 28px;
	line-height: 1.4;
}

/* ---------- Full custom / ODM ---------- */

.cvs-checks {
	margin: 17px 0 0;
	padding: 0;
	list-style: none;
}

.cvs-checks li {
	position: relative;
	padding-left: 16px;
	font-size: 14px;
	line-height: 2;
}

.cvs-checks li::before {
	content: "\2714";
	position: absolute;
	left: 0;
	top: 0;
	font-size: 12px;
}

/* ---------- Project scenarios ---------- */

.cvs-scenarios {
	padding: 80px 0;
	background: #f4f4f4;
}

.cvs-scenarios__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-auto-rows: 210px;
	gap: var(--cvs-gap);
	margin-top: 20px;
}

.cvs-scenarios__grid--3 > :first-child {
	grid-row: span 2;
}

.cvs-scenarios__grid--1 {
	grid-template-columns: minmax(0, 1fr);
	grid-auto-rows: 440px;
}

.cvs-scenario {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 15px;
	background: #555;
	color: #fff;
	text-decoration: none;
}

.cvs-scenario:hover {
	color: #fff;
}

.cvs-scenario__img,
.cvs-scenario__overlay {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.cvs-scenario__img {
	object-fit: cover;
}

.cvs-scenario__overlay {
	background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.15) 55%, rgba(0, 0, 0, 0.05) 100%);
	opacity: 1;
	transition: opacity 0.8s;
}

.cvs-scenario__info {
	position: absolute;
	left: 20px;
	right: 20px;
	bottom: 20px;
	z-index: 1;
	display: grid;
	gap: 10px;
	justify-items: center;
	text-align: center;
	opacity: 1;
	transition: 0.8s;
}

.cvs-page .cvs-scenario h3 {
	color: #fff;
	font-size: 18px;
	line-height: 1.4;
}

.cvs-scenario__info span {
	font-size: 14px;
	line-height: 1.7;
}

.cvs-scenario:hover .cvs-scenario__overlay {
	opacity: 0;
}

.cvs-scenario:hover .cvs-scenario__info {
	transform: translateY(150%);
	opacity: 0;
}

/* ---------- Company introduction ---------- */

.cvs-company {
	position: relative;
	overflow: hidden;
	padding: 80px 0;
	background: #222;
	color: #fff;
}

.cvs-company__bg,
.cvs-company__shade {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.cvs-company__bg {
	left: auto;
	width: 62%;
	object-fit: cover;
	object-position: center center;
}

.cvs-company__shade {
	background: linear-gradient(90deg, #222 0%, #222 38%, rgba(34, 34, 34, 0.85) 46%, rgba(34, 34, 34, 0.35) 62%, rgba(34, 34, 34, 0.1) 100%);
}

.cvs-company__inner {
	position: relative;
	z-index: 1;
}

.cvs-company__copy {
	max-width: 570px;
}

.cvs-page .cvs-company h2 {
	color: #fff;
	font-size: 24px;
	line-height: 1.4;
}

.cvs-page .cvs-company p {
	margin-top: 20px;
	color: #fff;
}

.cvs-company .cvs-btn {
	margin-top: 20px;
}

.cvs-stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 295px));
	margin-top: 50px;
}

.cvs-stat {
	display: grid;
	gap: 8px;
}

.cvs-stat__number {
	font-family: var(--font-heading);
	font-size: 44px;
	font-weight: 400;
	line-height: 1.1;
}

.cvs-stat span {
	font-size: 14px;
	line-height: 1.7;
}

/* ---------- Collaboration process ---------- */

.cvs-process__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px;
	margin-top: 20px;
}

.cvs-step__img {
	display: block;
	width: 100%;
	aspect-ratio: 353 / 199;
	object-fit: cover;
}

.cvs-step__body {
	display: grid;
	gap: 20px;
	padding: 20px 20px 30px;
}

.cvs-step--cta {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 260px;
	padding: 15px;
	background: var(--cvs-navy);
	color: #fff;
	font-family: var(--font-heading);
	font-size: 24px;
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	transition: background 0.5s;
}

.cvs-step--cta:hover,
.cvs-step--cta:focus-visible {
	background: var(--cvs-navy-hover);
	color: #fff;
}

/* Form section spacing (the form component itself is the shared homepage one). */
.cvs-page > .home-rfq {
	margin-top: 80px;
}

/* ---------- Tablet (reference: 820px) ---------- */

@media (max-width: 991px) {
	.cvs-wrap {
		width: min(1140px, calc(100% - 132px));
	}

	.cvs-hero__inner {
		padding: 160px 0 60px;
	}

	.cvs-page .cvs-title,
	.cvs-page .cvs-split__copy h2,
	.cvs-page .cvs-company h2 {
		font-size: 20px;
	}

	.cvs-page .cvs-card h3,
	.cvs-page .cvs-split__copy h3,
	.cvs-page .cvs-scenario h3 {
		font-size: 16px;
	}

	.cvs-page .cvs-cta h2 {
		font-size: 26px;
	}

	.cvs-btn {
		min-height: 36px;
		padding: 5px 20px;
		font-size: 12px;
	}

	.cvs-semi__card {
		padding: 30px 15px;
	}

	.cvs-semi__icon {
		width: 50px;
		height: 50px;
	}

	.cvs-collections__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cvs-split {
		gap: 20px;
	}

	.cvs-split--colors {
		grid-template-columns: minmax(0, 530fr) minmax(0, 570fr);
	}

	.cvs-scenarios__grid {
		grid-auto-rows: 125px;
	}

	.cvs-scenarios__grid--1 {
		grid-auto-rows: 260px;
	}

	.cvs-process__grid {
		gap: 20px;
	}

	.cvs-step--cta {
		font-size: 20px;
	}

	.cvs-company__bg {
		width: 75%;
	}

	.cvs-company__shade {
		background: linear-gradient(90deg, #222 0%, rgba(34, 34, 34, 0.92) 45%, rgba(34, 34, 34, 0.55) 75%, rgba(34, 34, 34, 0.35) 100%);
	}
}

@media (max-width: 767px) {
	.cvs-wrap {
		width: calc(100% - 32px);
	}

	.cvs-split,
	.cvs-split--media-right {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	/* Image above text on phones, like the reference. */
	.cvs-split--media-right .cvs-split__media {
		order: -1;
	}

	.cvs-split--colors {
		grid-template-columns: minmax(0, 1fr);
	}

	.cvs-split--colors .cvs-split__copy p,
	.cvs-split--logo .cvs-split__copy p {
		font-size: 12px;
		line-height: 24px !important;
	}

	.cvs-split--colors .cvs-split__copy h3 + p,
	.cvs-split--logo .cvs-split__copy h3 + p {
		margin-top: 10px !important;
	}

	.cvs-options .cvs-split + .cvs-split {
		margin-top: 50px;
	}

	.cvs-split--colors .cvs-split__copy p:last-child,
	.cvs-split--logo .cvs-split__copy p + p {
		margin-top: 24px !important;
	}

	.cvs-semi {
		padding-bottom: 40px;
	}

	.cvs-semi__grid,
	.cvs-process__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cvs-collections__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.cvs-scenarios__grid {
		grid-template-columns: minmax(0, 1fr);
		grid-auto-rows: 134px;
	}

	.cvs-scenarios__grid--3 > :first-child {
		grid-row: span 2;
	}

	.cvs-company__bg {
		width: 100%;
	}

	.cvs-company__shade {
		background: rgba(34, 34, 34, 0.72);
	}

	.cvs-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cvs-stat__number {
		font-size: 36px;
	}
}

/* ---------- Phone (reference: 390px) ---------- */

@media (max-width: 478px) {
	.cvs-page .cvs-hero h1 {
		font-size: 28.8px;
	}

	.cvs-page .cvs-title,
	.cvs-page .cvs-split__copy h2,
	.cvs-page .cvs-company h2 {
		font-size: 18px;
	}

	.cvs-page .cvs-cta h2 {
		font-size: 20px;
	}

	.cvs-semi__card {
		padding: 30px 12px;
	}

	.cvs-semi__icon {
		width: 40px;
		height: 40px;
	}

	.cvs-process__grid {
		gap: 20px;
	}

	.cvs-step__body {
		padding: 15px 12px 20px;
	}

	.cvs-step--cta {
		min-height: 200px;
		font-size: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cvs-card,
	.cvs-lift-image,
	.cvs-carousel__track,
	.cvs-scenario__info,
	.cvs-scenario__overlay,
	.cvs-btn {
		transition: none;
	}
}
