/* =====================================================================
   CHECKOUT WIZARD — flujo por pasos (Cuenta → Facturación → Revisar → Pago)
   Theme: bricks-child | project/assets/css/lpx-checkout-steps.css
   TODO acotado a body.page-id-18 (checkout). WooCommerce sigue siendo la
   fuente de verdad; aquí solo se estiliza el flujo por pasos.
   ===================================================================== */

/* ---------- El checkout clásico pasa a flujo vertical en tarjetas ---------- */
@media (min-width: 992px) {
	body.page-id-18 form.checkout.woocommerce-checkout {
		display: block;
	}

	body.page-id-18 form.checkout #customer_details,
	body.page-id-18 form.checkout #order_review {
		grid-area: auto;
		position: static;
		top: auto;
	}
}

/* ---------- Tarjeta de paso ---------- */
body.page-id-18 .lp-checkout-step {
	background: #fff;
	border: 1px solid #eae8e4;
	border-radius: 1.25rem;
	box-shadow: 0 12px 34px rgba(0, 0, 0, 0.04);
	margin: 0 0 1.5rem;
	overflow: hidden;
}

/* Cabecera del paso */
body.page-id-18 .lp-checkout-step__header {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	padding: 1.15rem 1.5rem;
	border-bottom: 1px solid #f0ede8;
	background: #fff;
	cursor: default;
}

body.page-id-18 .lp-checkout-step.is-open .lp-checkout-step__header {
	background: #faf9f7;
}

body.page-id-18 .lp-checkout-step.is-complete .lp-checkout-step__header,
body.page-id-18 .lp-checkout-step.is-locked .lp-checkout-step__header {
	cursor: pointer;
}

/* Número */
body.page-id-18 .lp-checkout-step__num {
	flex: 0 0 auto;
	width: 2.1rem;
	height: 2.1rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #000;
	color: #fff;
	font-size: 0.85rem;
	font-weight: 700;
}

body.page-id-18 .lp-checkout-step.is-complete .lp-checkout-step__num {
	background: #2e7d32;
}

body.page-id-18 .lp-checkout-step.is-locked .lp-checkout-step__num {
	background: #ddd9d2;
	color: #8a867e;
}

/* Título (gana a la regla genérica de lpx-checkout.css sobre h2) */
body.page-id-18 form.checkout .lp-checkout-step__title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #000;
}

/* Estado (✓ / candado) */
body.page-id-18 .lp-checkout-step__status {
	margin-left: auto;
	font-size: 1rem;
	font-weight: 700;
	color: #8a867e;
	line-height: 1;
}

body.page-id-18 .lp-checkout-step.is-complete .lp-checkout-step__status::before {
	content: "✓";
	color: #2e7d32;
}

body.page-id-18 .lp-checkout-step.is-locked .lp-checkout-step__status::before {
	content: "🔒";
	font-size: 0.85rem;
}

body.page-id-18 .lp-checkout-step.is-error {
	border-color: #c0392b;
}

body.page-id-18 .lp-checkout-step.is-error .lp-checkout-step__num {
	background: #c0392b;
}

/* Cuerpo */
body.page-id-18 .lp-checkout-step__body {
	padding: 1.5rem 1.75rem;
}

body.page-id-18 .lp-checkout-step.is-locked .lp-checkout-step__body,
body.page-id-18 .lp-checkout-step.is-complete .lp-checkout-step__body {
	display: none;
}

/* Acciones de paso */
body.page-id-18 .lp-checkout-step__actions {
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid #f0ede8;
}

/* ---------- Paso Cuenta ---------- */
body.page-id-18 .lp-account__identify {
	max-width: 34rem;
}

body.page-id-18 .lp-account__lead {
	font-size: 0.9rem;
	color: #5c5a55;
	margin: 0 0 1.1rem;
}

body.page-id-18 .lp-account__hint {
	font-size: 0.78rem;
	color: #8a867e;
	margin: 0 0 1.1rem;
}

body.page-id-18 .lp-form-field {
	margin: 0 0 1.1rem;
}

body.page-id-18 .lp-form-row-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 1.25rem;
}

body.page-id-18 .lp-form-row-inline {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 1.1rem;
}

body.page-id-18 .lp-form-field label {
	display: block;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #5c5a55;
	margin-bottom: 0.45rem;
}

body.page-id-18 .lp-account__remember {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.85rem;
	font-weight: 600;
}

body.page-id-18 .lp-account__remember input[type="checkbox"] {
	width: 1.1rem;
	height: 1.1rem;
	accent-color: #000;
}

body.page-id-18 .lp-account__msg {
	margin-top: 1rem;
	font-size: 0.9rem;
	color: #c0392b;
}

body.page-id-18 .lp-account__msg.is-success {
	color: #2e7d32;
}

body.page-id-18 .lp-account__msg:empty {
	display: none;
}

/* Usuario logueado */
body.page-id-18 .lp-account--signed .lp-account__signed {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 0.95rem;
	font-weight: 600;
	color: #1a1917;
}

body.page-id-18 .lp-checkout-step__ok {
	color: #2e7d32;
	font-weight: 800;
}

/* ---------- Inputs del paso Cuenta ----------
   (Prefijo html + clases + !important para ganar a la regla genérica de
   lpx-frontend.css, igual que el resto del checkout). */
html body.page-id-18 form.checkout .lp-checkout-step .lp-account .lp-form-field input.lp-input {
	width: 100%;
	height: 3rem !important;
	padding: 0 1rem !important;
	font-size: 0.95rem;
	font-family: inherit;
	color: #1a1917;
	background: #fff !important;
	border: 1px solid #ddd9d2 !important;
	border-radius: 0.65rem !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

html body.page-id-18 form.checkout .lp-checkout-step .lp-account .lp-form-field input.lp-input:focus {
	outline: none;
	background: #fff !important;
	border-color: #000 !important;
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06) !important;
}

body.page-id-18 .lp-account ::placeholder {
	color: #b0aca4;
	opacity: 1;
}

/* ---------- Botones del wizard (Cuenta + acciones de paso) ---------- */
html body.page-id-18 form.checkout .lp-checkout-step .lp-account__btn,
html body.page-id-18 form.checkout .lp-checkout-step .lp-checkout-step__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3.25rem;
	padding: 0 1.5rem;
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
	background: #000;
	border: 0;
	border-radius: 1rem;
	cursor: pointer;
	transition: background 0.2s ease, box-shadow 0.2s ease;
}

html body.page-id-18 form.checkout .lp-checkout-step .lp-account__btn:hover,
html body.page-id-18 form.checkout .lp-checkout-step .lp-checkout-step__btn:hover {
	background: #2a2926;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

html body.page-id-18 form.checkout .lp-checkout-step .lp-account__btn[disabled],
html body.page-id-18 form.checkout .lp-checkout-step .lp-checkout-step__btn[disabled] {
	opacity: 0.6;
	cursor: default;
}

/* Enlaces/botones tipo texto */
html body.page-id-18 form.checkout .lp-checkout-step .lp-account__link {
	background: none;
	border: 0;
	padding: 0;
	color: #000;
	text-decoration: underline;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
}

html body.page-id-18 form.checkout .lp-checkout-step .lp-account__link--back {
	display: block;
	margin-top: 0.9rem;
}

/* ---------- Pago (ahora vive en el paso 4, fuera de #order_review) ---------- */
body.page-id-18 #payment {
	margin: 0;
	padding: 0;
	background: #fff;
	border: 1px solid #eae8e4;
	border-radius: 1.25rem;
	box-shadow: 0 12px 34px rgba(0, 0, 0, 0.04);
	overflow: hidden;
}

body.page-id-18 #payment .payment_methods {
	margin: 0;
	padding: 0;
	list-style: none;
}

body.page-id-18 #payment .payment_methods li {
	padding: 1rem 1.5rem;
	border-bottom: 1px solid #f0ede8;
}

body.page-id-18 #payment .payment_methods li:last-child {
	border-bottom: 0;
}

body.page-id-18 #payment .payment_methods label {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
}

body.page-id-18 #payment .payment_methods input[type="radio"] {
	width: 1.05rem;
	height: 1.05rem;
	accent-color: #000;
}

body.page-id-18 #payment .payment_box {
	background: #f6f4f1;
	border-radius: 0.75rem;
	padding: 1.25rem;
	margin-top: 1rem;
	border: 1px solid #ece9e4;
}

body.page-id-18 #payment .payment_box p {
	font-size: 0.85rem;
	color: #6b6862;
}

body.page-id-18 #payment .place-order {
	margin: 0;
	padding: 1.25rem 1.5rem 1.5rem;
	background: #faf9f7;
	border-top: 1px solid #f0ede8;
}

body.page-id-18 #payment .woocommerce-privacy-policy-text {
	font-size: 0.8rem;
	color: #8a867e;
	margin: 0 0 1rem;
}

/* ---------- Campos inválidos (paso Facturación) ---------- */
body.page-id-18 .form-row.lp-invalid input,
body.page-id-18 .form-row.lp-invalid select {
	border-color: #c0392b !important;
	box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12) !important;
}

/* ---------- Móvil ---------- */
@media (max-width: 575px) {
	body.page-id-18 .lp-checkout-step__body {
		padding: 1.25rem 1.25rem;
	}

	body.page-id-18 .lp-checkout-step__header {
		padding: 1rem 1.25rem;
	}

	body.page-id-18 .lp-form-row-2 {
		grid-template-columns: 1fr;
		column-gap: 0;
	}
}

/* ---------- Título de página ---------- */
body.page-id-18 h1.lp-checkout-page-title {
	font-size: clamp(1.8rem, 2vw, 2.4rem);
	font-weight: 700;
	letter-spacing: -0.01em;
	color: #000;
	margin: 0 0 1.5rem;
}

/* ---------- Layout 2 columnas: formulario + resumen del pedido ---------- */
@media (min-width: 992px) {
	body.page-id-18 .lpx-checkout-layout {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
		column-gap: 2.75rem;
		align-items: start;
	}

	body.page-id-18 .lpx-checkout-layout__main {
		min-width: 0;
	}

	body.page-id-18 .lpx-checkout-layout__summary {
		position: sticky;
		top: 1.5rem;
	}
}

body.page-id-18 .lpx-checkout-summary {
	background: #fff;
	border: 1px solid #eae8e4;
	border-radius: 1.25rem;
	box-shadow: 0 12px 34px rgba(0, 0, 0, 0.04);
	padding: 1.5rem 1.5rem 1.75rem;
	overflow: hidden;
}

body.page-id-18 .lpx-checkout-summary__title {
	margin: 0 0 1.25rem;
	font-size: clamp(1.05rem, 1.2vw, 1.25rem);
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #000;
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

body.page-id-18 .lpx-checkout-summary__title::before {
	content: "";
	display: inline-block;
	width: 5px;
	height: 1.1em;
	border-radius: 99px;
	background: var(--primary, #000);
	flex: 0 0 auto;
}

/* Tabla del resumen (duplicado; también se actualiza con update_checkout) */
body.page-id-18 .lpx-checkout-summary table.shop_table {
	border-collapse: collapse;
	border-spacing: 0;
	width: 100%;
	margin: 0;
	border: 0 !important; /* elimina el borde por defecto de WooCommerce en <table> */
	border-radius: 0;
	box-shadow: none;
}

body.page-id-18 .lpx-checkout-summary table.shop_table th,
body.page-id-18 .lpx-checkout-summary table.shop_table td {
	padding: 0.65rem 0;
	border: 0 !important;
	border-bottom: 1px solid #f0ede8 !important;
	text-align: left;
	background: transparent;
	vertical-align: top;
}

/* Ocultar la cabecera (Producto/Subtotal): el título de la tarjeta ya lo indica */
body.page-id-18 .lpx-checkout-summary table.shop_table thead {
	display: none;
}

/* Filas de producto */
body.page-id-18 .lpx-checkout-summary table.shop_table tbody td.product-total {
	text-align: right;
	white-space: nowrap;
	color: #1a1917;
}

body.page-id-18 .lpx-checkout-summary table.shop_table tbody .product-name {
	font-weight: 600;
	color: #1a1917;
	line-height: 1.4;
}

body.page-id-18 .lpx-checkout-summary table.shop_table tbody .product-quantity {
	display: inline-block;
	margin-left: 0.4rem;
	padding: 0.08rem 0.5rem;
	background: #faf9f7;
	border: 1px solid #eae8e4;
	border-radius: 99px;
	font-size: 0.75rem;
	font-weight: 700;
	color: #5c5a55;
}

/* Totales */
body.page-id-18 .lpx-checkout-summary table.shop_table tfoot th {
	font-weight: 600;
	color: #1a1917;
	text-align: left;
}

body.page-id-18 .lpx-checkout-summary table.shop_table tfoot td {
	text-align: right;
}

/* El subtotal sin divisor inferior (lo marca el total con su línea superior) */
body.page-id-18 .lpx-checkout-summary table.shop_table tfoot tr.cart-subtotal th,
body.page-id-18 .lpx-checkout-summary table.shop_table tfoot tr.cart-subtotal td {
	border-bottom: 0 !important;
}

/* Total destacado con separador negro */
body.page-id-18 .lpx-checkout-summary table.shop_table tfoot .order-total {
	border-top: 2px solid #000;
}

body.page-id-18 .lpx-checkout-summary table.shop_table tfoot .order-total th,
body.page-id-18 .lpx-checkout-summary table.shop_table tfoot .order-total td {
	padding-top: 1rem;
	padding-bottom: 0.25rem;
	border-bottom: 0 !important;
}

body.page-id-18 .lpx-checkout-summary table.shop_table .order-total strong {
	font-size: 1.3rem;
	font-weight: 800;
	color: #000;
}

body.page-id-18 .lpx-checkout-summary .includes_tax {
	display: block;
	font-size: 0.76rem;
	color: #8a867e;
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
}

/* Móvil / tablet: el resumen va debajo del formulario */
@media (max-width: 991px) {
	body.page-id-18 .lpx-checkout-layout__summary {
		margin-top: 1.5rem;
	}
}
