/* ==========================================================================
   Ramp Wizard — wizard.css
   Scoped under .wh-wizard to avoid theme conflicts.
   ========================================================================== */

.wh-wizard {
	--wh-blue:        #004079;
	--wh-blue-hover:  #00529f;
	--wh-blue-light:  #e6f0fa;
	--wh-green:       #059669;
	--wh-gray:        #6b7280;
	--wh-gray-light:  #f9fafb;
	--wh-border:      #d1d5db;
	--wh-text:        #111827;
	--wh-radius:      4px;
	--wh-shadow:      0 2px 8px rgba(0, 0, 0, 0.08);
	--wh-shadow-lg:   0 4px 20px rgba(0, 0, 0, 0.12);

	font-family: inherit;
	color: var(--wh-text);
	line-height: 1.5;
}

/* ── Progress bar ──────────────────────────────────────────────────────────── */

.wh-progress {
	display: flex;
	align-items: flex-start;
	margin-bottom: 1rem;
}

.wh-progress-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex-shrink: 0;
}

.wh-progress-dot {
	width: 3.25rem;
	height: 3.25rem;
	border-radius: 50%;
	background: var(--wh-border);
	color: var(--wh-gray);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.125rem;
	font-weight: 700;
	transition: background 0.2s, color 0.2s;
	/* button reset */
	border: none;
	padding: 0;
	cursor: default;
	font-family: inherit;
	flex-shrink: 0;
}
.wh-progress-dot--clickable {
	cursor: pointer;
}
.wh-progress-dot--clickable:hover {
	opacity: 0.8;
}

.wh-progress-step--active .wh-progress-dot {
	background: var(--wh-blue);
	color: #fff;
	box-shadow: 0 0 0 4px var(--wh-blue-light);
}

.wh-progress-step--done .wh-progress-dot {
	background: var(--wh-green);
	color: #fff;
}

.wh-progress-label {
	font-size: 0.8125rem;
	color: var(--wh-gray);
	margin-top: 0.5rem;
	text-align: center;
	max-width: 5.5rem;
	line-height: 1.3;
}

.wh-progress-step--active .wh-progress-label {
	color: var(--wh-blue);
	font-weight: 600;
}

.wh-progress-step--done .wh-progress-label {
	color: var(--wh-green);
	font-weight: 700;
}

.wh-progress-line {
	flex: 1;
	height: 2px;
	background: var(--wh-border);
	margin: 1.625rem 0.5rem 0;
	transition: background 0.2s;
}

.wh-progress-line--done {
	background: var(--wh-green);
}

/* ── Step panel ────────────────────────────────────────────────────────────── */

.wh-panel {
	background: #fff;
	border: 1px solid var(--wh-border);
	border-radius: 0;
	padding: 2rem;
	box-shadow: var(--wh-shadow);
}

.wh-question {
	font-size: 2rem;
	font-weight: 600;
	color: var(--wh-text);
	margin: 0 0 1.5rem;
}

/* ── Option buttons ────────────────────────────────────────────────────────── */

.wh-options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	margin-bottom: 1.75rem;
}

.wh-option {
	padding: 0.875rem 1.5rem;
	border: 2px solid var(--wh-border);
	border-radius: var(--wh-radius);
	background: #fff;
	color: #374151;
	font-size: 1.0625rem;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	text-align: left;
	line-height: 1.4;
}

.wh-option:hover {
	background: #fff;
	color: #374151;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14), inset 0 0 0 999px rgba(0, 0, 0, 0.06);
}

.wh-option--selected {
	border-color: var(--wh-blue);
	background: var(--wh-blue);
	color: #fff;
}

.wh-option--selected:hover {
	background: var(--wh-blue);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22), inset 0 0 0 999px rgba(0, 0, 0, 0.09);
}

/* Full-width options for long text (ramp functionality) */
.wh-options--full .wh-option {
	width: 100%;
}

/* ── Step with sidebar image (door width, floor height) ────────────────────── */

.wh-step-with-sidebar {
	display: flex;
	gap: 2rem;
	align-items: flex-start;
	margin-bottom: 1.75rem;
}

.wh-step-sidebar__left {
	flex: 1;
	min-width: 0;
}

.wh-step-sidebar__left .wh-options {
	margin-bottom: 0;
}

.wh-step-sidebar-img {
	width: 300px;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	flex-shrink: 0;
	background: var(--wh-gray-light);
	border:1px solid var(--wh-border);
	box-shadow: var(--wh-shadow);
}

/* ── Image option cards (door style, ramp use) ─────────────────────────────── */

.wh-options--images {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1rem;
	margin-bottom: 1.75rem;
}

.wh-option-card {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	border: 2px solid var(--wh-border);
	border-radius: var(--wh-radius);
	background: #fff;
	cursor: pointer;
	padding: 0;
	overflow: hidden;
	font-family: inherit;
	text-align: center;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wh-option-card:hover {
	background: #fff;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14), inset 0 0 0 999px rgba(0, 0, 0, 0.06);
}

.wh-option-card--selected {
	border-color: var(--wh-blue);
	background: var(--wh-blue);
}

.wh-option-card--selected:hover {
	background: var(--wh-blue);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22), inset 0 0 0 999px rgba(0, 0, 0, 0.09);
}

.wh-option-card-img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	background: var(--wh-gray-light);
	display: block;
	flex-shrink: 0;
}

.wh-option-card-label {
	display: block;
	padding: 0.75rem;
	font-size: 0.9rem;
	font-weight: 400;
	color: var(--wh-text);
	line-height: 1.3;
}
.wh-option-card-label strong {
	display: block;
	font-weight: 700;
	font-size: 1rem;
}

.wh-option-card--selected .wh-option-card-label,
.wh-option-card--selected:hover .wh-option-card-label {
	color: #fff;
}

/* ── Navigation ────────────────────────────────────────────────────────────── */

.wh-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 0.5rem;
}

.wh-btn-back {
	background: none;
	border: none;
	color: var(--wh-gray);
	font-size: 0.875rem;
	font-family: inherit;
	cursor: pointer;
	padding: 0;
	transition: color 0.15s;
}

.wh-btn-back:hover {
	background: none;
	color: var(--wh-gray);
	opacity: 0.65;
}

/* ── Loading ───────────────────────────────────────────────────────────────── */

.wh-loading {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: var(--wh-gray);
	font-style: italic;
	padding: 1rem 0;
}

.wh-spinner {
	width: 1.25rem;
	height: 1.25rem;
	border: 2px solid var(--wh-border);
	border-top-color: var(--wh-blue);
	border-radius: 50%;
	animation: wh-spin 0.7s linear infinite;
	flex-shrink: 0;
}

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

/* ── Results ───────────────────────────────────────────────────────────────── */

.wh-section-label {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--wh-gray);
	margin: 0 0 0.875rem;
}

.wh-section-label--featured {
	color: var(--wh-blue);
}

/* Featured card */
.wh-card-featured {
	display: flex;
	gap: 1.75rem;
	align-items: flex-start;
	border: 2px solid var(--wh-blue);
	border-radius: 0;
	padding: 1.5rem;
	background: #fff;
	text-decoration: none;
	color: inherit;
	margin-bottom: 2rem;
	transition: box-shadow 0.15s, transform 0.15s;
	box-shadow: var(--wh-shadow);
}

.wh-card-featured:hover {
	box-shadow: var(--wh-shadow-lg);
	transform: translateY(-2px);
	text-decoration: none;
	color: inherit;
}

.wh-card-featured .wh-card-img {
	width: 240px;
	aspect-ratio: 4 / 3;
	object-fit: contain;
	flex-shrink: 0;
	border-radius: 0;
	background: var(--wh-gray-light);
}

.wh-card-featured .wh-card-body {
	flex: 1;
}

/* Also considered grid */
.wh-alt-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
	margin-bottom: 1.75rem;
}

.wh-card-alt {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--wh-border);
	border-radius: 0;
	overflow: hidden;
	background: #fff;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.15s, transform 0.15s;
	box-shadow: var(--wh-shadow);
}

.wh-card-alt:hover {
	box-shadow: var(--wh-shadow-lg);
	transform: translateY(-2px);
	text-decoration: none;
	color: inherit;
}

.wh-card-alt .wh-card-img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: contain;
	background: var(--wh-gray-light);
	padding: 0.5rem;
}

.wh-card-alt .wh-card-body {
	padding: 1rem;
	display: flex;
	flex-direction: column;
	flex: 1;
}

/* Shared card body */
.wh-card-name {
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--wh-text);
	margin: 0 0 0.25rem;
	line-height: 1.4;
}

.wh-card-featured .wh-card-name {
	font-size: 1.125rem;
	margin-bottom: 0.375rem;
}

.wh-card-sku {
	font-size: 0.8125rem;
	color: var(--wh-gray);
	margin: 0 0 0.375rem;
}

.wh-card-price {
	font-size: 1.375rem;
	font-weight: 700;
	color: var(--wh-blue);
	margin: 0;
}

.wh-card-alt .wh-card-price {
	font-size: 1.125rem;
}

.wh-card-cta {
	display: inline-block;
	padding: 0.5625rem 1.25rem;
	background: var(--wh-blue);
	color: #fff;
	border-radius: 4px;
	font-size: 0.875rem;
	font-weight: 600;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	align-self: flex-start;
}

.wh-card-featured .wh-card-cta {
	padding: 0.625rem 1.5rem;
	font-size: 0.9375rem;
}

.wh-card-featured:hover .wh-card-cta,
.wh-card-alt:hover .wh-card-cta {
	box-shadow: inset 0 0 0 999px rgba(0, 0, 0, 0.09);
}

/* ── Cart results: item list ────────────────────────────────────────────────── */

/* Featured card — cart variant */
.wh-card-featured--cart .wh-card-body {
	flex: 1;
}

/* Alt card — cart variant */
.wh-card-alt--cart .wh-card-body {
	padding: 1.25rem;
}

/* Line-item list */
.wh-item-list {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
}

.wh-item-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--wh-border);
	font-size: 0.9375rem;
}

.wh-item-name {
	flex: 1;
	color: var(--wh-text);
	line-height: 1.4;
	font-size: 1rem;
	font-weight: 500;
	margin-right: 0.9em;
}

.wh-item-qty {
	display: inline-block;
	font-size: 0.75em;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wh-gray);
	white-space: nowrap;
	margin-left:0.8rem;
}

.wh-item-price {
	font-weight: 600;
	color: var(--wh-blue);
	white-space: nowrap;
	flex-shrink: 0;
}

.wh-item-price--na {
	color: var(--wh-gray);
	font-weight: 400;
	font-style: italic;
}

/* Shipping note */
.wh-shipping-note {
	font-size: 0.8125rem;
	color: var(--wh-green);
	font-weight: 600;
	margin: 0 0 1rem;
}

/* Cart button + error */
.wh-cart-wrap {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
}

.wh-btn-cart {
	display: inline-block;
	padding: 0.625rem 1.5rem;
	background: var(--wh-blue);
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 0.9375rem;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wh-btn-cart:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22), inset 0 0 0 999px rgba(0, 0, 0, 0.09);
}

.wh-btn-cart:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.wh-card-alt--cart .wh-btn-cart {
	padding: 0.5rem 1.125rem;
	font-size: 0.875rem;
}

.wh-cart-error {
	font-size: 0.8125rem;
	color: #b32d2e;
	margin: 0;
	line-height: 1.4;
}

/* Card footer: left col (price + cart) | right col (preview image) */
.wh-card-footer {
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 1rem;
}

.wh-card-footer__left {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 0.625rem;
	flex: 1;
	min-width: 0;
}

.wh-card-preview {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.25rem;
	flex-shrink: 0;
	width: 180px;
}

.wh-card-preview__label {
	font-size: 0.6rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #8896a5;
}

.wh-card-preview__img {
	flex: 1;
	width: 100%;
	min-height: 120px;
	object-fit: cover;
	border: 1px solid var(--wh-border);
	background: var(--wh-gray-light);
	display: block;
}

/* Smaller preview in the 3-up alt cards */
.wh-card-alt--cart .wh-card-preview {
	width: 130px;
}

.wh-card-alt--cart .wh-card-preview__img {
	min-height: 90px;
}

/* No results / error */
.wh-no-results {
	color: var(--wh-gray);
	padding: 0.5rem 0 1.5rem;
}

/* Start over */
.wh-btn-restart {
	background: none;
	border: 1px solid var(--wh-border);
	border-radius: var(--wh-radius);
	color: var(--wh-gray);
	font-size: 0.875rem;
	font-family: inherit;
	cursor: pointer;
	padding: 0.5rem 1rem;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	margin-top: 0.5rem;
}

.wh-btn-restart:hover {
	background: none;
	color: var(--wh-gray);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14), inset 0 0 0 999px rgba(0, 0, 0, 0.06);
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
	.wh-panel {
		padding: 1.25rem;
	}

	.wh-progress-label {
		display: none;
	}

	.wh-progress-dot {
		width: 2.25rem;
		height: 2.25rem;
		font-size: 0.875rem;
	}

	.wh-progress-line {
		margin-top: 1.125rem;
	}

	.wh-card-featured {
		flex-direction: column;
	}

	.wh-card-featured .wh-card-img {
		width: 100%;
		aspect-ratio: 4 / 3;
	}

	.wh-alt-grid {
		grid-template-columns: 1fr;
	}

	.wh-options--images {
		grid-template-columns: repeat(2, 1fr);
	}

	.wh-step-with-sidebar {
		flex-direction: column;
	}

	.wh-step-sidebar-img {
		width: 100%;
	}

	.wh-card-footer {
		flex-wrap: wrap;
	}

	.wh-card-preview {
		width: 100%;
		align-items: flex-start;
	}

	.wh-card-preview__img {
		width: 100%;
		min-height: 160px;
		flex: none;
	}
}

@media (min-width: 641px) and (max-width: 860px) {
	.wh-alt-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.wh-options--images {
		grid-template-columns: repeat(2, 1fr);
	}
}
