/* ============================================================
   REN's Custom Eyewear Prescription Form — LensCrafters-style
   v2.1.0 — layout de 2 columnas, sin barra lateral
   ============================================================ */

.ewrx-fullwidth-wrap {
	max-width: 100%;
	padding: 0;
}

/* Layout de dos columnas: imagen izquierda + wizard derecha */
.ewrx-layout {
	display: grid;
	grid-template-columns: 50% 50%;
	height: calc(100vh - 60px); /* alto de pantalla menos margen para la barra de precio */
	gap: 0;
	align-items: stretch;
	overflow: hidden;
}
@media (max-width: 900px) {
	.ewrx-layout {
		grid-template-columns: 1fr;
		height: auto;
		overflow: visible;
	}
}

/* ---------- Columna izquierda: imagen (fija, no hace scroll) ---------- */
.ewrx-image-rail {
	background: #f4f4f2;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
	align-self: stretch;
	overflow: hidden;
	height: 100%;
}
.ewrx-image-rail-inner { text-align: center; }
.ewrx-image-rail-inner img {
	max-width: 100%;
	height: auto;
	max-height: 420px;
	object-fit: contain;
	mix-blend-mode: multiply;
}
.ewrx-rail-meta { margin-top: 22px; }
.ewrx-rail-meta strong {
	display: block;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 20px;
	font-weight: 500;
	color: #1a1a1a;
}
.ewrx-rail-meta span { color: #6b6b6b; font-size: 15px; }

@media (max-width: 900px) {
	.ewrx-image-rail { padding: 24px; height: auto; }
	.ewrx-image-rail-inner img { max-height: 220px; }
}

/* ---------- Columna derecha: wizard (scroll interno solo si hace falta) ---------- */
.ewrx-wizard {
	color: #1a1a1a;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	padding: 44px 48px 44px 64px;
	width: 100%;
	max-width: 680px;
	height: 100%;
	overflow-y: auto;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
}
/* Centra el paso verticalmente cuando es corto; cuando es alto, los márgenes
   automáticos ceden y el scroll interno permite verlo completo sin cortes. */
.ewrx-wizard > .ewrx-progress { flex: 0 0 auto; }
.ewrx-wizard > .ewrx-step {
	flex: 0 0 auto;
	margin-top: auto;
	margin-bottom: auto;
}
/* Scrollbar más discreta */
.ewrx-wizard::-webkit-scrollbar { width: 8px; }
.ewrx-wizard::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 4px; }
.ewrx-wizard::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 900px) {
	.ewrx-wizard {
		padding: 28px 22px 40px;
		max-width: 100%;
		height: auto;
		overflow-y: visible;
	}
}

/* ---------- Barra de progreso superior (líneas delgadas) ---------- */
.ewrx-wizard .ewrx-progress {
	display: flex !important;
	gap: 6px;
	margin: 0 0 36px !important;
	padding: 0;
	list-style: none;
}
.ewrx-wizard .ewrx-progress .ewrx-step-dot {
	flex: 1 1 auto !important;
	width: auto !important;
	height: 3px !important;
	min-height: 3px;
	background: #e2e2e2 !important;
	border-radius: 2px !important;
	font-size: 0 !important;
	color: transparent !important;
	line-height: 0 !important;
	padding: 0 !important;
	display: block !important;
	transition: background .3s ease;
}
.ewrx-wizard .ewrx-progress .ewrx-step-dot.active {
	background: #1a1a1a !important;
}

/* ---------- Encabezados de paso ---------- */
.ewrx-step-label {
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #6b6b6b;
	margin: 0 0 8px;
	font-weight: 600;
}
.ewrx-wizard .ewrx-step h2 {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 28px;
	font-weight: 500;
	line-height: 1.2;
	margin: 0 0 12px;
	letter-spacing: -0.01em;
	color: #1a1a1a;
}
.ewrx-note {
	color: #6b6b6b;
	font-size: 14px;
	line-height: 1.55;
	margin-bottom: 26px;
}

/* ---------- Tarjetas horizontales grandes ---------- */
.ewrx-card-grid {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 28px;
}
.ewrx-card-grid-4 { display: flex; flex-direction: column; gap: 12px; }

.ewrx-card {
	display: flex !important;
	align-items: center;
	gap: 16px;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	padding: 20px 22px;
	cursor: pointer;
	position: relative;
	transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
	background: #fff;
	text-align: left;
}
.ewrx-card:hover { border-color: #bbb; background: #fafafa; }
.ewrx-card:has(input:checked) {
	border-color: #1a1a1a;
	box-shadow: inset 0 0 0 1px #1a1a1a;
}
.ewrx-card input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 0; height: 0;
}
.ewrx-card .ewrx-card-icon {
	flex: 0 0 76px;
	width: 76px; height: 56px;
	display: flex; align-items: center; justify-content: center;
}
.ewrx-card .ewrx-card-icon img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	display: block;
}
/* Tarjetas sin icono (paso 2: grosor de lente) */
.ewrx-card.ewrx-card-noicon { gap: 0; }
.ewrx-card .ewrx-card-body { flex: 1; }
.ewrx-card strong {
	display: block;
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 3px;
	color: #1a1a1a;
}
.ewrx-card .ewrx-desc {
	display: block;
	font-size: 13px;
	color: #6b6b6b;
	line-height: 1.45;
}
.ewrx-card .ewrx-extra-price {
	flex: 0 0 auto;
	font-size: 14px;
	font-weight: 600;
	color: #1a1a1a;
	white-space: nowrap;
}

/* ---------- Selector de color ---------- */
.ewrx-color-picker { margin: 4px 0 24px; }
.ewrx-color-picker h4 { font-size: 15px; font-weight: 600; margin: 0 0 12px; }
.ewrx-color-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.ewrx-swatch {
	padding: 9px 16px;
	border: 1px solid #e2e2e2;
	border-radius: 30px;
	background: #fff;
	cursor: pointer;
	font-size: 13px;
	transition: all .15s ease;
}
.ewrx-swatch:hover { border-color: #999; }
.ewrx-swatch.selected { border-color: #1a1a1a; background: #1a1a1a; color: #fff; }

/* ---------- Tabla de prescripción ---------- */
.ewrx-rx-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	margin-bottom: 24px;
}
.ewrx-rx-table th, .ewrx-rx-table td { padding: 9px 8px; text-align: center; font-size: 13px; }
.ewrx-rx-table thead th { font-weight: 600; color: #6b6b6b; border-bottom: 1px solid #e2e2e2; }
.ewrx-rx-table thead th small { font-weight: 400; font-size: 11px; }
.ewrx-rx-table tbody th { text-align: left; font-weight: 600; white-space: nowrap; }
.ewrx-rx-table tbody th small { color: #6b6b6b; font-weight: 400; }

.ewrx-select {
	width: 100%;
	min-width: 72px;
	padding: 9px 8px;
	border: 1px solid #e2e2e2;
	border-radius: 7px;
	background: #fff;
	font-size: 14px;
	cursor: pointer;
	transition: border-color .15s ease;
}
.ewrx-select:focus { outline: none; border-color: #1a1a1a; background: #f2fbf5; }

.ewrx-pd-block { margin-bottom: 22px; }
.ewrx-pd-block > label { display: block; margin-bottom: 12px; font-weight: 600; font-size: 14px; }
.ewrx-pd-block select { max-width: 220px; }
#ewrx-two-pds-fields { display: flex; gap: 20px; margin-top: 12px; }
#ewrx-two-pds-fields label { font-weight: 600; font-size: 13px; }

.ewrx-checkbox-line, .ewrx-radio-line {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 16px;
	font-size: 14px;
	line-height: 1.5;
	cursor: pointer;
}
.ewrx-checkbox-line input, .ewrx-radio-line input {
	margin-top: 2px;
	width: 17px; height: 17px;
	flex: 0 0 auto;
	accent-color: #1a1a1a;
}
.ewrx-radio-line { font-weight: 500; }

/* ---------- Resumen ---------- */
.ewrx-summary-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.ewrx-summary-table th, .ewrx-summary-table td {
	border-bottom: 1px solid #e2e2e2;
	padding: 13px 4px;
	text-align: left;
	font-size: 14px;
	vertical-align: top;
}
.ewrx-summary-table th { width: 42%; color: #6b6b6b; font-weight: 500; }
.ewrx-summary-table td { font-weight: 500; }
.ewrx-summary-total th, .ewrx-summary-total td {
	font-weight: 700;
	font-size: 18px;
	color: #1a1a1a;
	border-top: 2px solid #1a1a1a;
	border-bottom: none;
	padding-top: 16px;
}

/* ---------- Botones ---------- */
.ewrx-wizard .ewrx-btn-next,
.ewrx-wizard .ewrx-btn-back,
.ewrx-wizard .ewrx-btn-submit {
	padding: 14px 34px;
	border-radius: 30px;
	border: 1px solid transparent;
	font-weight: 600;
	cursor: pointer;
	font-size: 14px;
	transition: all .15s ease;
	margin-top: 6px;
}
.ewrx-wizard .ewrx-btn-next,
.ewrx-wizard .ewrx-btn-submit { background: #1a1a1a; color: #fff; }
.ewrx-wizard .ewrx-btn-next:hover:not(:disabled),
.ewrx-wizard .ewrx-btn-submit:hover:not(:disabled) { background: #000; }
.ewrx-wizard .ewrx-btn-next:disabled,
.ewrx-wizard .ewrx-btn-submit:disabled {
	background: #e4e4e4 !important;
	color: #a5a5a5 !important;
	cursor: not-allowed;
}
.ewrx-wizard .ewrx-btn-back {
	background: #fff;
	color: #1a1a1a;
	border-color: #e2e2e2;
	margin-right: 12px;
}
.ewrx-wizard .ewrx-btn-back:hover { border-color: #999; }

.ewrx-error { color: #c0392b; margin-top: 12px; font-size: 14px; }

/* ---------- Barra fija de precio ---------- */
.ewrx-price-bar {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	background: #fff;
	border-top: 1px solid #e2e2e2;
	box-shadow: 0 -2px 14px rgba(0,0,0,.05);
	z-index: 9999;
}
.ewrx-price-bar-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 14px 24px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 14px;
}
.ewrx-price-bar .ewrx-running-label { font-size: 13px; color: #6b6b6b; }
.ewrx-price-bar .ewrx-running-total { font-size: 22px; font-weight: 700; font-family: Georgia, serif; }

/* ---------- Responsivo tabla ---------- */
@media (max-width: 640px) {
	.ewrx-wizard .ewrx-step h2 { font-size: 23px; }
	.ewrx-card { padding: 16px; gap: 12px; }
	.ewrx-card .ewrx-card-icon { flex-basis: 48px; width: 48px; height: 42px; }
	.ewrx-card strong { font-size: 15px; }
	.ewrx-rx-table th, .ewrx-rx-table td { padding: 6px 4px; }
	.ewrx-select { min-width: 56px; font-size: 13px; padding: 7px 4px; }
	#ewrx-two-pds-fields { flex-direction: column; gap: 12px; }
}
