/* ==========================================================================
   SD Thank You — Página de gracias La Primera
   Guideline: Libre Baskerville (títulos) · Montserrat (textos y botones)
   Paleta oficial · Espaciado 8/16/24/32/40/56/72/80/96/120
   Sin paddings externos: el espaciado lo da el container de Elementor.
   ========================================================================== */

:root {
	--sd-navy: #1F2749;
	--sd-navy-2: #252F66;
	--sd-white: #FFFFFF;
	--sd-grey: #F0F1F0;
	--sd-yellow: #EB9609;
	--sd-orange: #C06615;
	--sd-green: #557254;
	--sd-green-dark: #1F4A30;
	--sd-font-title: "Libre Baskerville", Georgia, serif;
	--sd-font-text: "Montserrat", Arial, sans-serif;
}

.sd-thankyou-overview,
.sd-thankyou-card,
.sd-thankyou-details,
.sd-thankyou-instructions,
.sd-thankyou-empty {
	font-family: var(--sd-font-text);
	color: var(--sd-navy);
	box-sizing: border-box;
	width: 100%;
	margin: 0;
}

.sd-thankyou-overview *,
.sd-thankyou-card *,
.sd-thankyou-details *,
.sd-thankyou-instructions *,
.sd-thankyou-empty * {
	box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Overview (N° / fecha / total / método)
   -------------------------------------------------------------------------- */
.sd-thankyou-overview {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	background: var(--sd-navy);
	color: var(--sd-white);
}

.sd-thankyou-overview__item {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 24px 32px;
	border-right: 1px solid var(--sd-navy-2);
}

.sd-thankyou-overview__item:last-child {
	border-right: 0;
}

.sd-thankyou-overview__label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--sd-yellow);
}

.sd-thankyou-overview__value {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	word-break: break-word;
}

.sd-thankyou-overview__value .woocommerce-Price-amount {
	font-weight: 700;
}

/* --------------------------------------------------------------------------
   Cards (facturación / envío)
   -------------------------------------------------------------------------- */
.sd-thankyou-card {
	display: flex;
	flex-direction: column;
	gap: 16px;
	height: 100%;
	padding: 32px;
	background: var(--sd-grey);
}

.sd-thankyou-card__title,
.sd-thankyou-details__title {
	margin: 0;
	font-family: var(--sd-font-title);
	font-style: italic;
	font-weight: 400;
	font-size: 24px;
	line-height: 1.3;
	color: var(--sd-navy);
}

.sd-thankyou-card__address {
	margin: 0;
	font-style: normal;
	font-size: 14px;
	line-height: 1.7;
}

.sd-thankyou-card__list {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding-top: 16px;
	border-top: 1px solid var(--sd-white);
	gap: 8px;
}

.sd-thankyou-card__row {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 16px;
	font-size: 14px;
	line-height: 1.5;
}

.sd-thankyou-card__label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	padding-top: 2px;
}

.sd-thankyou-card__value {
	margin: 0;
	word-break: break-word;
}

/* --------------------------------------------------------------------------
   Detalle del pedido
   -------------------------------------------------------------------------- */
.sd-thankyou-details {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.sd-thankyou-details__items {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--sd-grey);
}

.sd-thankyou-item {
	display: grid;
	grid-template-columns: 80px minmax(0, 1fr) auto;
	align-items: center;
	gap: 24px;
	padding: 16px 0;
	border-bottom: 1px solid var(--sd-grey);
}

.sd-thankyou-item__media {
	width: 80px;
	aspect-ratio: 1 / 1;
	background: var(--sd-grey);
	overflow: hidden;
}

.sd-thankyou-item__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
}

.sd-thankyou-item__info {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sd-thankyou-item__name {
	font-size: 13px;
	font-weight: 500;
	letter-spacing: .04em;
	text-transform: uppercase;
	line-height: 1.4;
	color: var(--sd-navy);
	text-decoration: none;
}

a.sd-thankyou-item__name:hover {
	color: var(--sd-orange);
}

.sd-thankyou-item__meta {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 12px;
	line-height: 1.5;
}

.sd-thankyou-item__meta li,
.sd-thankyou-item__meta p {
	margin: 0;
	display: inline;
}

.sd-thankyou-item__meta .wc-item-meta-label {
	font-weight: 600;
}

.sd-thankyou-item__qty {
	font-size: 12px;
}

.sd-thankyou-item__price {
	font-size: 14px;
	font-weight: 700;
	text-align: right;
	white-space: nowrap;
}

/* Totales */
.sd-thankyou-totals {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	margin-left: auto;
	width: 100%;
	max-width: 400px;
}

.sd-thankyou-totals__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	font-size: 14px;
	line-height: 1.5;
}

.sd-thankyou-totals__label {
	font-weight: 500;
}

.sd-thankyou-totals__value {
	margin: 0;
	text-align: right;
}

.sd-thankyou-totals__value small,
.sd-thankyou-totals__value .includes_tax,
.sd-thankyou-totals__value .shipped_via {
	display: block;
	font-size: 11px;
	font-weight: 400;
}

.sd-thankyou-totals__row--order_total {
	margin-top: 8px;
	padding-top: 16px;
	border-top: 1px solid var(--sd-navy);
}

.sd-thankyou-totals__row--order_total .sd-thankyou-totals__label {
	font-family: var(--sd-font-title);
	font-style: italic;
	font-weight: 400;
	font-size: 20px;
}

.sd-thankyou-totals__row--order_total .sd-thankyou-totals__value {
	font-size: 20px;
	font-weight: 700;
}

/* --------------------------------------------------------------------------
   Instrucciones de pago (salida nativa de gateways, ej. transferencia)
   -------------------------------------------------------------------------- */
.sd-thankyou-instructions {
	font-size: 14px;
	line-height: 1.7;
}

.sd-thankyou-instructions:empty {
	display: none;
}

.sd-thankyou-instructions h2,
.sd-thankyou-instructions h3 {
	margin: 0 0 16px;
	font-family: var(--sd-font-title);
	font-style: italic;
	font-weight: 400;
	font-size: 24px;
	color: var(--sd-navy);
}

.sd-thankyou-instructions p {
	margin: 0 0 16px;
}

.sd-thankyou-instructions ul {
	list-style: none;
	margin: 0 0 16px;
	padding: 24px 32px;
	background: var(--sd-grey);
}

.sd-thankyou-instructions ul li {
	margin: 0 0 8px;
}

.sd-thankyou-instructions ul li:last-child {
	margin-bottom: 0;
}

.sd-thankyou-instructions .wc-bacs-bank-details-account-name {
	font-family: var(--sd-font-text);
	font-style: normal;
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
}

/* --------------------------------------------------------------------------
   Estado vacío + botón (variante azul del guideline)
   -------------------------------------------------------------------------- */
.sd-thankyou-empty {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
}

.sd-thankyou-empty__text {
	margin: 0;
	font-size: 16px;
	line-height: 1.6;
}

.sd-thankyou-btn {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	padding: 16px 28px;
	border-radius: 31px;
	background: var(--sd-navy);
	color: var(--sd-white);
	font-family: var(--sd-font-text);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1;
	transition: background-color .25s ease;
}

.sd-thankyou-btn:hover,
.sd-thankyou-btn:focus {
	background: var(--sd-navy-2);
	color: var(--sd-white);
}

.sd-thankyou-btn__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin: -4px -12px -4px 0;
	border-radius: 50%;
	background: var(--sd-white);
	color: var(--sd-navy);
	transition: transform .25s ease;
}

.sd-thankyou-btn:hover .sd-thankyou-btn__icon {
	transform: rotate(45deg);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.sd-thankyou-overview {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sd-thankyou-overview__item:nth-child(2n) {
		border-right: 0;
	}

	.sd-thankyou-overview__item:nth-child(-n+2) {
		border-bottom: 1px solid var(--sd-navy-2);
	}
}

@media (max-width: 767px) {
	.sd-thankyou-overview__item {
		padding: 16px 24px;
	}

	.sd-thankyou-card {
		padding: 24px;
	}

	.sd-thankyou-card__row {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.sd-thankyou-item {
		grid-template-columns: 72px minmax(0, 1fr);
		gap: 16px;
	}

	.sd-thankyou-item__media {
		width: 72px;
	}

	.sd-thankyou-item__price {
		grid-column: 2;
		text-align: left;
	}

	.sd-thankyou-totals {
		max-width: none;
	}
}

@media (max-width: 480px) {
	.sd-thankyou-overview {
		grid-template-columns: 1fr;
	}

	.sd-thankyou-overview__item {
		border-right: 0;
		border-bottom: 1px solid var(--sd-navy-2);
	}

	.sd-thankyou-overview__item:last-child {
		border-bottom: 0;
	}
}
