/* Build Your Own Chesterfield — scoped styles only */

.rs-cfb-pdp-cta {
	margin: 1.1rem 0 0.35rem;
	padding-top: 0.85rem;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.rs-cfb-pdp-cta__help {
	margin: 0 0 0.65rem;
	color: #4a4a4a;
	font-size: 0.92rem;
	line-height: 1.45;
}

.rs-cfb-pdp-cta__btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 100%;
	padding: 0.85rem 1.25rem !important;
	border-radius: 10px !important;
	background: #1a1a1a !important;
	border: 1px solid #1a1a1a !important;
	color: #fff !important;
	font-weight: 600 !important;
	text-align: center;
	text-decoration: none !important;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.rs-cfb-pdp-cta__btn:hover,
.rs-cfb-pdp-cta__btn:focus {
	background: #0abab5 !important;
	border-color: #0abab5 !important;
	color: #fff !important;
}

.rs-cfb {
	--rs-cfb-ink: #222;
	--rs-cfb-muted: #666;
	--rs-cfb-line: rgba(0, 0, 0, 0.08);
	--rs-cfb-card: #f6f4f1;
	--rs-cfb-teal: #0abab5;
	--rs-cfb-radius: 14px;
	color: var(--rs-cfb-ink);
	max-width: 1100px;
	margin: 0 auto 3rem;
	padding: 0 1rem 5.5rem;
}

.rs-cfb__title {
	margin: 0.75rem 0 1rem;
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	font-weight: 650;
	letter-spacing: -0.02em;
	line-height: 1.15;
	text-align: center;
}

.rs-cfb__notice {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border-radius: 10px;
	font-size: 0.92rem;
}

.rs-cfb__notice--ok {
	background: #eef8f0;
	color: #1b5e20;
}

.rs-cfb__notice--err {
	background: #fdf2f2;
	color: #8a1f1f;
}

.rs-cfb__hero-image {
	position: relative;
	margin: 0 0 1.25rem;
	padding: 0;
	border: 1px solid var(--rs-cfb-line);
	border-radius: calc(var(--rs-cfb-radius) + 2px);
	background: #fff;
	overflow: hidden;
}

.rs-cfb__hero-image img {
	display: block;
	width: 100%;
	height: auto;
	min-height: min(52vh, 520px);
	max-height: 620px;
	object-fit: contain;
	background: #fafafa;
}

.rs-cfb__hero-loader {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	background: rgba(255, 255, 255, 0.78);
	backdrop-filter: blur(2px);
	z-index: 2;
}

.rs-cfb__hero-loader[hidden] {
	display: none !important;
}

.rs-cfb__hero-spinner {
	width: 42px;
	height: 42px;
	border: 3px solid rgba(0, 0, 0, 0.12);
	border-top-color: var(--rs-cfb-teal);
	border-radius: 50%;
	animation: rs-cfb-spin 0.8s linear infinite;
}

.rs-cfb__hero-loader-text {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--rs-cfb-ink);
	letter-spacing: 0.01em;
}

@keyframes rs-cfb-spin {
	to {
		transform: rotate(360deg);
	}
}

.rs-cfb__progress {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.45rem;
	margin: 0 0 1.35rem;
}

.rs-cfb__progress-item {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 0.75rem;
	border: 1px solid var(--rs-cfb-line);
	border-radius: 999px;
	background: #fff;
	color: var(--rs-cfb-muted);
	font-size: 0.8rem;
	cursor: pointer;
}

.rs-cfb__progress-item.is-active,
.rs-cfb__progress-item.is-done {
	border-color: rgba(10, 186, 181, 0.45);
	color: var(--rs-cfb-ink);
}

.rs-cfb__progress-item.is-active {
	background: rgba(10, 186, 181, 0.1);
}

.rs-cfb__progress-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.3rem;
	height: 1.3rem;
	border-radius: 50%;
	background: #eee;
	font-weight: 650;
	font-size: 0.72rem;
}

.rs-cfb__progress-item.is-active .rs-cfb__progress-num {
	background: var(--rs-cfb-teal);
	color: #fff;
}

.rs-cfb__steps {
	min-width: 0;
}

.rs-cfb-step h2 {
	margin: 0 0 0.95rem;
	font-size: 1.25rem;
	font-weight: 650;
}

.rs-cfb-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 0.75rem;
}

.rs-cfb-cards--styles {
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.rs-cfb-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0;
	padding: 0.75rem;
	border: 1px solid var(--rs-cfb-line);
	border-radius: 12px;
	background: var(--rs-cfb-card);
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.rs-cfb-card input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.rs-cfb-card.is-selected,
.rs-cfb-card:has(input:checked) {
	border-color: var(--rs-cfb-teal);
	background: #fff;
	box-shadow: 0 0 0 1px var(--rs-cfb-teal);
}

.rs-cfb-card__media {
	display: block;
	aspect-ratio: 16 / 10;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.04);
}

.rs-cfb-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #fff;
}

.rs-cfb-card__swatch {
	display: block;
	height: 42px;
	border-radius: 8px;
	background: linear-gradient(135deg, #ddd 0%, #bbb 100%);
}

.rs-cfb-card__swatch[data-slug="black"] { background: #1f1f1f; }
.rs-cfb-card__swatch[data-slug="burgundy"] { background: #6b1e2a; }
.rs-cfb-card__swatch[data-slug="cognac"] { background: #8b4a2b; }
.rs-cfb-card__swatch[data-slug="dark-brown"] { background: #4a3224; }
.rs-cfb-card__swatch[data-slug="tan"] { background: #c4a484; }
.rs-cfb-card__swatch[data-slug="ivory"] { background: #e8e0d4; }
.rs-cfb-card__swatch[data-slug="navy"] { background: #1e2f4d; }
.rs-cfb-card__swatch[data-slug="forest-green"] { background: #2f4f3a; }

.rs-cfb-card__label {
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.3;
}

.rs-cfb-card__badge {
	align-self: flex-start;
	padding: 0.15rem 0.4rem;
	border-radius: 999px;
	background: rgba(10, 186, 181, 0.12);
	color: #087a76;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.rs-cfb-fieldset {
	margin: 0 0 1rem;
	padding: 0;
	border: 0;
}

.rs-cfb-fieldset legend {
	margin: 0 0 0.5rem;
	font-size: 0.92rem;
	font-weight: 650;
}

.rs-cfb-notes {
	display: grid;
	gap: 0.4rem;
	margin-top: 0.5rem;
	font-size: 0.9rem;
	font-weight: 600;
}

.rs-cfb-notes textarea {
	width: 100%;
	padding: 0.75rem 0.85rem;
	border: 1px solid var(--rs-cfb-line);
	border-radius: 10px;
	background: #fff;
	font: inherit;
	font-weight: 400;
	resize: vertical;
}

.rs-cfb__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	margin-top: 1.25rem;
}

.rs-cfb-btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding: 0.7rem 1.15rem;
	border-radius: 10px;
	border: 1px solid transparent;
	font: inherit;
	font-weight: 650;
	cursor: pointer;
}

.rs-cfb-btn--primary {
	background: #1a1a1a;
	color: #fff;
}

.rs-cfb-btn--primary:hover {
	background: var(--rs-cfb-teal);
}

.rs-cfb-btn--ghost {
	background: #fff;
	border-color: var(--rs-cfb-line);
	color: var(--rs-cfb-ink);
}

.rs-cfb-btn--back {
	min-height: 2rem;
	padding: 0.35rem 0.7rem;
	font-size: 0.8rem;
	font-weight: 600;
	border-radius: 8px;
}

/* Builder page only: remove WoodMart categories / right sidebar column */
body.rs-cfb-no-sidebar .sidebar-container,
body.rs-cfb-no-sidebar .wd-sidebar-opener,
body.page-id-27553 .sidebar-container,
body.page-id-27553 .wd-sidebar-opener,
body.page-slug-build-your-own-chesterfield-sofa .sidebar-container {
	display: none !important;
}

body.rs-cfb-no-sidebar .site-content,
body.page-id-27553 .site-content,
body.rs-cfb-no-sidebar .content-layout-wrapper > .site-content {
	width: 100% !important;
	max-width: 100% !important;
	flex: 0 0 100% !important;
	max-width: 100% !important;
}

body.rs-cfb-no-sidebar .content-layout-wrapper,
body.page-id-27553 .content-layout-wrapper {
	display: block !important;
}

.rs-cfb-cards--sizes {
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.rs-cfb-cards--upholstery {
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.rs-cfb-cards--upholstery .rs-cfb-card__media {
	aspect-ratio: 1 / 1;
}

.rs-cfb-cards--upholstery .rs-cfb-card__media img {
	object-fit: cover;
}

.rs-cfb__disclaimer {
	margin: 1.25rem 0 0;
	color: var(--rs-cfb-muted);
	font-size: 0.8rem;
	line-height: 1.45;
}

.rs-cfb__price {
	margin: 1rem 0;
	font-size: 1.45rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.rs-cfb__price--inline {
	margin-top: 0.75rem;
}

.rs-cfb-review {
	margin: 0;
	padding: 1rem;
	border: 1px solid var(--rs-cfb-line);
	border-radius: 12px;
	background: #faf9f7;
}

.rs-cfb-review div {
	display: grid;
	grid-template-columns: 1fr 1.2fr;
	gap: 0.5rem;
	padding: 0.45rem 0;
	border-bottom: 1px solid var(--rs-cfb-line);
	font-size: 0.92rem;
}

.rs-cfb-review div:last-child {
	border-bottom: 0;
}

.rs-cfb-review dt {
	margin: 0;
	color: var(--rs-cfb-muted);
}

.rs-cfb-review dd {
	margin: 0;
	font-weight: 600;
}

.rs-cfb-quote-fields {
	margin-top: 1rem;
	display: grid;
	gap: 0.65rem;
}

.rs-cfb-quote-fields label {
	display: grid;
	gap: 0.3rem;
	font-size: 0.88rem;
	font-weight: 600;
}

.rs-cfb-quote-fields input {
	padding: 0.7rem 0.8rem;
	border: 1px solid var(--rs-cfb-line);
	border-radius: 10px;
	font: inherit;
	font-weight: 400;
}

.rs-cfb__mobile-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 90;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
	border-top: 1px solid var(--rs-cfb-line);
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(8px);
}

.rs-cfb__mobile-label {
	display: block;
	color: var(--rs-cfb-muted);
	font-size: 0.72rem;
}

.rs-cfb__mobile-bar strong {
	font-size: 1.1rem;
}

@media (min-width: 821px) {
	.rs-cfb__mobile-bar {
		/* Keep price bar visible on desktop too after removing right summary */
		left: 50%;
		right: auto;
		bottom: 1rem;
		transform: translateX(-50%);
		width: min(640px, calc(100% - 2rem));
		border: 1px solid var(--rs-cfb-line);
		border-radius: 14px;
		box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
	}
}

@media (max-width: 820px) {
	.rs-cfb__hero-image img {
		min-height: 220px;
		max-height: 360px;
	}
	.rs-cfb__progress-label {
		display: none;
	}
	.rs-cfb-cards--styles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
