/*
 * Yagdul — carrito y checkout rediseñados (estilo Shopify).
 * Tokens y medidas tomados del diseño aprobado para la tienda.
 */

:root {
	--yg-ink: #14151a;
	--yg-header: #111214;
	--yg-lime: #D7FF3D;
	--yg-teal: #2fb8c4;
	--yg-surface: #ffffff;
	--yg-bg: #f4f4f2;
	--yg-border: #e7e7e4;
	--yg-border-input: #dddddd;
	--yg-muted: #8a8a8a;
	--yg-label: #555555;
	--yg-ok-bg: #eef7d8;
	--yg-ok: #5a7a10;
	--yg-error: #dd3333;
	--yg-link: #2f5fe0;
	--yg-link-hover: #1e3fa8;
	--yg-radius-card: 14px;
	--yg-radius-option: 12px;
	--yg-radius-input: 8px;
}

/* --------------------------------------------------------------------------
 * Lienzo: el rediseño ocupa la página completa, sin el ancho del tema
 * ----------------------------------------------------------------------- */

body.yagdul-ui-active {
	background: var(--yg-bg) !important;
	font-family: 'Inter', Arial, Helvetica, sans-serif;
	color: var(--yg-ink);
}

body.yagdul-ui-active .site-content,
body.yagdul-ui-active .ast-container,
body.yagdul-ui-active .content-area,
body.yagdul-ui-active .site-main,
body.yagdul-ui-active .entry-content,
body.yagdul-ui-active article.page,
body.yagdul-ui-active .woocommerce {
	max-width: none !important;
	width: auto !important;
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

body.yagdul-ui-active .ast-container {
	display: block !important;
}

.yagdul-page,
.yagdul-page * {
	box-sizing: border-box;
}

/* WooCommerce maqueta el checkout clásico con floats de dos columnas; aquí la
 * rejilla la define este diseño. */
.yagdul-page #order_review,
.yagdul-page #order_review_heading,
.yagdul-page #customer_details,
.yagdul-page .woocommerce-checkout-review-order,
.yagdul-page .col2-set,
.yagdul-page .col2-set .col-1,
.yagdul-page .col2-set .col-2 {
	float: none !important;
	width: auto !important;
	max-width: none !important;
	clear: none !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	box-shadow: none !important;
}

.yagdul-page {
	font-family: 'Inter', Arial, Helvetica, sans-serif;
	color: var(--yg-ink);
	font-size: 14px;
	line-height: 1.45;
	text-align: left;
}

.yagdul-page a {
	color: var(--yg-link);
	text-decoration: none;
}

.yagdul-page a:hover {
	color: var(--yg-link-hover);
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
 * Barra superior
 * ----------------------------------------------------------------------- */

.yagdul-topbar {
	background: var(--yg-header);
	padding: 18px 32px;
	width: 100vw;
	margin-left: calc(50% - 50vw);
}

.yagdul-topbar-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.yagdul-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none !important;
}

.yagdul-brand img {
	height: 26px;
	width: auto;
	display: block;
}

.yagdul-mark {
	position: relative;
	width: 26px;
	height: 26px;
	display: block;
}

.yagdul-mark-dot {
	position: absolute;
	inset: 0;
	background: var(--yg-lime);
	border-radius: 50%;
}

.yagdul-mark-diamond {
	position: absolute;
	width: 14px;
	height: 14px;
	background: var(--yg-teal);
	top: 6px;
	left: 6px;
	transform: rotate(45deg);
	border-radius: 2px;
}

.yagdul-wordmark {
	color: #fff;
	font-weight: 800;
	font-size: 20px;
	letter-spacing: .5px;
}

.yagdul-secure {
	color: var(--yg-muted);
	font-size: 13px;
	margin-left: 10px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

/* --------------------------------------------------------------------------
 * Rejilla
 * ----------------------------------------------------------------------- */

.yagdul-shell {
	/* La referencia define 1180px de contenido más 24px de aire a cada lado.
	 * Como esta hoja usa border-box, el contenedor exterior debe medir 1228px. */
	max-width: 1228px;
	margin: 0 auto;
	padding: 40px 24px 80px;
}

.yagdul-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	column-gap: 56px;
	row-gap: 28px;
	align-items: start;
}

/* checkout.js inserta los errores de validación como primer hijo directo del
 * formulario. Sin esta regla, CSS Grid lo interpreta como una tercera pieza:
 * el aviso ocupa la columna principal, desplaza el formulario a la lateral y
 * manda el resumen a una fila nueva. El aviso debe ser siempre una fila
 * completa situada antes de las dos columnas del checkout. */
.yagdul-grid > .woocommerce-NoticeGroup,
.yagdul-grid > .woocommerce-notices-wrapper {
	grid-column: 1 / -1;
	width: 100%;
	min-width: 0;
	margin: 0;
}

.yagdul-grid > .woocommerce-NoticeGroup:empty,
.yagdul-grid > .woocommerce-notices-wrapper:empty {
	display: none;
}

.yagdul-grid > .woocommerce-NoticeGroup > .woocommerce-error,
.yagdul-grid > .woocommerce-notices-wrapper > .woocommerce-error {
	margin: 0;
}

.yagdul-col-main {
	min-width: 0;
}

.yagdul-col-side {
	position: sticky;
	top: 24px;
	min-width: 0;
}

.yagdul-before {
	margin-bottom: 20px;
}

.yagdul-intro {
	margin-bottom: 28px;
}

.yagdul-pill {
	display: inline-block;
	background: var(--yg-ok-bg);
	color: var(--yg-ok);
	font-size: 12px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 20px;
}

.yagdul-page .yagdul-intro h1 {
	font-size: 26px;
	margin: 12px 0 4px;
	font-weight: 800;
	line-height: normal;
	color: var(--yg-ink);
}

.yagdul-cart-page .yagdul-intro h1 {
	margin: 0 0 4px;
}

.yagdul-page .yagdul-intro p {
	color: #6b6b6b;
	font-size: 14px;
	margin: 0;
}

/* --------------------------------------------------------------------------
 * Tarjetas
 * ----------------------------------------------------------------------- */

.yagdul-card {
	background: var(--yg-surface);
	border: 1px solid var(--yg-border);
	border-radius: var(--yg-radius-card);
	padding: 28px;
	margin-bottom: 20px;
}

.yagdul-col-side .yagdul-card {
	margin-bottom: 0;
}

.yagdul-page .yagdul-card-title,
.yagdul-page .woocommerce-billing-fields > h3,
.yagdul-page .woocommerce-billing-fields h3 {
	font-size: 16px;
	font-weight: 700;
	margin: 0 0 18px;
	padding: 0;
	border: 0;
	color: var(--yg-ink);
	line-height: 1.3;
	display: block;
}

.yagdul-card-payment .yagdul-card-title {
	margin-bottom: 4px;
}

.yagdul-save-info-slot:empty,
.yagdul-save-info-slot[hidden],
.yagdul-remember-actions[hidden],
.yagdul-forget-data[hidden] {
	display: none !important;
}

.yagdul-save-info {
	margin: 4px 0 22px;
	padding: 18px 20px;
	border: 1px solid var(--yg-border);
	border-radius: 12px;
	background: #fff;
}

.yagdul-save-info .form-row {
	margin: 0 !important;
	padding: 0 !important;
}

.yagdul-save-info label.checkbox {
	display: grid !important;
	grid-template-columns: 18px 1fr;
	column-gap: 10px;
	align-items: center;
	margin: 0 !important;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.35;
	cursor: pointer;
}

.yagdul-save-info #yagdul-remember-data {
	width: 18px !important;
	height: 18px !important;
	margin: 0 !important;
	accent-color: var(--yg-ink);
}

.yagdul-save-info-copy {
	display: block;
	grid-column: 2;
	margin-top: 3px;
	color: var(--yg-muted);
	font-size: 11.5px;
	font-weight: 400;
	line-height: 1.45;
}

.yagdul-save-info-copy a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.yagdul-remember-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 12px;
	margin: 10px 0 0 !important;
	padding: 0 !important;
}

.yagdul-page .yagdul-forget-data {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--yg-ink);
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.yagdul-remember-status {
	color: var(--yg-muted);
	font-size: 12px;
}

.yagdul-legal-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 20px;
	margin: 2px 0 8px;
	padding: 18px 0 0;
	border-top: 1px solid var(--yg-border);
}

.yagdul-legal-links a {
	color: #4f5b45;
	font-size: 12px;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.yagdul-legal-links a:hover,
.yagdul-legal-links a:focus-visible {
	color: var(--yg-ink);
}

.yagdul-page .yagdul-card-sub {
	color: var(--yg-muted);
	font-size: 13px;
	margin: 0 0 16px;
}

/* --------------------------------------------------------------------------
 * Campos de facturación
 * ----------------------------------------------------------------------- */

.yagdul-shipping-slot {
	display: block;
}

.yagdul-page .woocommerce-billing-fields__field-wrapper {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.yagdul-page .woocommerce-billing-fields .form-row {
	margin: 0;
	padding: 0;
	float: none;
	width: auto;
	display: block;
}

.yagdul-page .woocommerce-billing-fields .form-row-wide,
.yagdul-page .woocommerce-billing-fields .form-row-full {
	grid-column: 1 / -1;
}

/* WooCommerce reordena y reclasifica estos campos desde JavaScript cada vez que
 * cambia el país. El orden y el emparejado del diseño se fijan aquí, en CSS,
 * para que no dependan de ese script. */
.yagdul-page #billing_first_name_field { order: 1; grid-column: span 1; }
.yagdul-page #billing_last_name_field  { order: 2; grid-column: span 1; }
.yagdul-page #billing_country_field    { order: 3; grid-column: 1 / -1; }
.yagdul-page #billing_address_1_field  { order: 4; grid-column: 1 / -1; }
.yagdul-page #billing_address_2_field  { order: 5; grid-column: 1 / -1; }
.yagdul-page #billing_state_field      { order: 6; grid-column: span 1; }
.yagdul-page #billing_city_field       { order: 7; grid-column: span 1; }
.yagdul-page #billing_phone_field      { order: 8; grid-column: span 1; }
.yagdul-page #billing_email_field      { order: 9; grid-column: span 1; }
.yagdul-page #billing_postcode_field   { display: none; }

.yagdul-page #billing_document_type_field   { order: -2; grid-column: 1 / -1; }
.yagdul-page #billing_document_number_field { order: -1; grid-column: 1 / -1; }

.yagdul-invoice-heading {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 14px;
	margin: -2px 0 14px;
	padding-bottom: 12px;
	border-bottom: 1px solid #ececea;
}

.yagdul-invoice-heading strong {
	font-size: 14px;
	color: var(--yg-ink);
}

.yagdul-invoice-heading span {
	font-size: 11.5px;
	color: var(--yg-muted);
}

.yagdul-page #ship-to-different-address {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 15px !important;
	line-height: 1.35 !important;
}

.yagdul-page #ship-to-different-address label {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-weight: 700;
	cursor: pointer;
}

.yagdul-page #ship-to-different-address-checkbox {
	width: 18px !important;
	height: 18px !important;
	min-width: 18px;
	margin: 0 !important;
	accent-color: var(--yg-ink);
}

.yagdul-page .shipping_address {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #ececea;
}

.yagdul-page .woocommerce-shipping-fields__field-wrapper {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.yagdul-page .woocommerce-shipping-fields .form-row {
	margin: 0;
	padding: 0;
	float: none;
	width: auto;
	display: block;
}

.yagdul-page .woocommerce-shipping-fields .form-row-wide {
	grid-column: 1 / -1;
}

.yagdul-page .woocommerce-shipping-fields label {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--yg-label);
	margin: 0 0 6px;
	line-height: 1.3 !important;
}

.yagdul-page .woocommerce-shipping-fields label .required,
.yagdul-page .woocommerce-shipping-fields .optional {
	display: none;
}

/* El rojo de WooCommerce sólo aparece tras el primer intento de confirmar. */
.yagdul-page .form-row.woocommerce-invalid input.input-text,
.yagdul-page .form-row.woocommerce-invalid select,
.yagdul-page .form-row.woocommerce-invalid .select2-selection {
	border-color: var(--yg-border-input) !important;
	box-shadow: none !important;
}

.yagdul-page .yagdul-validated .form-row.woocommerce-invalid input.input-text,
.yagdul-page .yagdul-validated .form-row.woocommerce-invalid select,
.yagdul-page .yagdul-validated .form-row.woocommerce-invalid .select2-selection {
	border-color: var(--yg-error) !important;
	box-shadow: 0 0 0 3px rgba(211, 51, 51, .08) !important;
}

.yagdul-page .woocommerce-billing-fields label {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--yg-label);
	margin: 0 0 6px;
	/* Astra impone 28.8px a las etiquetas del formulario. La referencia usa
	 * una línea compacta de 16px; el !important evita el espacio vertical extra. */
	line-height: 1.3 !important;
}

.yagdul-page .woocommerce-billing-fields label .required,
.yagdul-page .woocommerce-billing-fields label abbr {
	display: none;
}

.yagdul-page .woocommerce-billing-fields .optional {
	display: none;
}

.yagdul-page .woocommerce-input-wrapper {
	display: block;
	width: 100%;
}

.yagdul-page .yagdul-phone-field > label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.yagdul-phone-validity {
	margin-left: auto;
	font-size: 11px;
	font-weight: 700;
	color: var(--yg-muted);
}

.yagdul-page .yagdul-phone-field > label .required {
	display: inline !important;
	color: var(--yg-error);
}

.yagdul-phone-valid .yagdul-phone-validity {
	color: #168647;
}

.yagdul-phone-invalid .yagdul-phone-validity {
	color: var(--yg-error);
}

.yagdul-page .yagdul-phone-control {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 6px;
	width: 100%;
}

.yagdul-phone-prefix {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 76px;
	padding: 0 11px;
	border: 1px solid var(--yg-border-input);
	border-radius: var(--yg-radius-input);
	background: #f5f6f7;
	color: #334155;
	font-size: 12.5px;
	font-weight: 600;
	white-space: nowrap;
}

.yagdul-page .yagdul-phone-control input[type="tel"] {
	min-width: 0;
}

.yagdul-page .yagdul-phone-valid .yagdul-phone-control input[type="tel"] {
	border-color: #23b967 !important;
	background-color: #effcf4 !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23168647' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 12px center !important;
	padding-right: 40px;
	box-shadow: 0 0 0 3px rgba(35, 185, 103, .08) !important;
}

/* Tiene que ganar incluso si WooCommerce o el tema dejan la clase
 * `woocommerce-validated` en el campo después de una actualización AJAX. */
.yagdul-page .form-row.yagdul-phone-invalid .yagdul-phone-control input[type="tel"],
.yagdul-page .yagdul-validated .form-row.yagdul-phone-invalid .yagdul-phone-control input[type="tel"] {
	border-color: var(--yg-error) !important;
	background-color: #fff7f7 !important;
	background-image: none !important;
	box-shadow: 0 0 0 3px rgba(211, 51, 51, .08) !important;
}

.yagdul-page input[type="text"],
.yagdul-page input[type="tel"],
.yagdul-page input[type="email"],
.yagdul-page input[type="number"],
.yagdul-page input[type="password"],
.yagdul-page textarea,
.yagdul-page select {
	width: 100%;
	border: 1px solid var(--yg-border-input);
	border-radius: var(--yg-radius-input);
	padding: 11px 12px;
	font-size: 13.5px;
	font-family: inherit;
	color: var(--yg-ink);
	background: #fff;
	outline: none;
	box-shadow: none;
	height: auto;
	line-height: 1.35;
	margin: 0;
	transition: border-color .15s, box-shadow .15s;
}

.yagdul-page input::placeholder,
.yagdul-page textarea::placeholder {
	color: #9a9a9a;
	opacity: 1;
}

.yagdul-page input:focus,
.yagdul-page textarea:focus,
.yagdul-page select:focus {
	border-color: var(--yg-ink);
	box-shadow: 0 0 0 3px rgba(20, 21, 26, .08);
}

/* Estado de error nativo de WooCommerce: sólo tras intentar confirmar */
.yagdul-page .yagdul-validated .woocommerce-invalid input.input-text,
.yagdul-page .yagdul-validated .woocommerce-invalid select,
.yagdul-page .yagdul-validated .woocommerce-invalid .select2-selection,
.yagdul-page input.yagdul-error {
	border-color: var(--yg-error);
	box-shadow: 0 0 0 3px rgba(211, 51, 51, .08);
}

.yagdul-page .form-row.yagdul-client-invalid input.input-text,
.yagdul-page .form-row.yagdul-client-invalid select,
.yagdul-page .form-row.yagdul-client-invalid .select2-selection {
	border-color: var(--yg-error) !important;
	background-color: #fffafa !important;
	box-shadow: 0 0 0 3px rgba(211, 51, 51, .08) !important;
}

.yagdul-field-error,
.yagdul-inline-error {
	display: block;
	color: var(--yg-error);
	font-size: 11.5px;
	font-weight: 500;
	line-height: 1.35;
	margin-top: 5px;
}

/* Ayuda contextual accesible por hover, foco de teclado o toque. */
.yagdul-page label.yagdul-field-label-with-help {
	display: flex;
	align-items: center;
	gap: 5px;
}

.yagdul-help-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
}

.yagdul-help-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: 3px;
	width: 17px;
	height: 17px;
	min-width: 17px;
	padding: 0;
	border: 1px solid #8b8f96;
	border-radius: 50%;
	background: #fff !important;
	color: #656a72;
	font: 700 11px/1 Arial, sans-serif;
	cursor: help;
	appearance: none;
}

.yagdul-help-button:hover,
.yagdul-help-button:focus-visible,
.yagdul-help-button:active {
	border-color: var(--yg-ink);
	background: #fff !important;
	color: var(--yg-ink) !important;
	outline: none;
	box-shadow: 0 0 0 3px rgba(20, 21, 26, .1);
}

.yagdul-tooltip {
	position: absolute;
	right: -8px;
	bottom: calc(100% + 9px);
	z-index: 50;
	width: 230px;
	padding: 10px 12px;
	border-radius: 8px;
	background: #202124;
	color: #fff;
	font-size: 11.5px;
	font-weight: 500;
	line-height: 1.4;
	text-align: left;
	box-shadow: 0 8px 22px rgba(0, 0, 0, .2);
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	pointer-events: none;
	transition: opacity .14s, transform .14s, visibility .14s;
}

.yagdul-tooltip::after {
	content: '';
	position: absolute;
	right: 10px;
	top: 100%;
	border: 6px solid transparent;
	border-top-color: #202124;
}

.yagdul-help-wrap:hover .yagdul-tooltip,
.yagdul-help-wrap:focus-within .yagdul-tooltip,
.yagdul-help-wrap.is-open .yagdul-tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* select2 / selectWoo con la misma apariencia que un input */
.yagdul-page .select2-container--default .select2-selection--single {
	border: 1px solid var(--yg-border-input);
	border-radius: var(--yg-radius-input);
	height: auto;
	padding: 11px 12px;
	background: #fff;
}

.yagdul-page .select2-container--default .select2-selection--single .select2-selection__rendered {
	padding: 0;
	line-height: 1.35;
	font-size: 13.5px;
	color: var(--yg-ink);
}

.yagdul-page .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 100%;
	top: 0;
	right: 8px;
}

.yagdul-page .select2-container--default.select2-container--focus .select2-selection--single,
.yagdul-page .select2-container--default.select2-container--open .select2-selection--single {
	border-color: var(--yg-ink);
	box-shadow: 0 0 0 3px rgba(20, 21, 26, .08);
}

/* --------------------------------------------------------------------------
 * Formas de pago
 * ----------------------------------------------------------------------- */

.yagdul-page .yagdul-pay-options {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	display: grid;
	gap: 16px;
}

.yagdul-page .yagdul-pay-option {
	list-style: none;
	border: 2px solid #e2e2de;
	background: #fff;
	border-radius: var(--yg-radius-option);
	padding: 16px 18px;
	margin: 0;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}

.yagdul-page .yagdul-pay-option:hover {
	border-color: #b9b9b3;
}

.yagdul-page .yagdul-pay-option.yagdul-selected,
.yagdul-page .yagdul-pay-option.yagdul-selected:hover {
	border-color: var(--yg-ink);
	background: #fafcf0;
}

.yagdul-page .yagdul-pay-radio {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

.yagdul-page .yagdul-pay-label {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	font-size: 14.5px;
	font-weight: 400;
	color: var(--yg-ink);
	cursor: pointer;
	line-height: 1.35;
}

.yagdul-dot {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid #c9c9c4;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	transition: border-color .15s;
}

.yagdul-dot-inner {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--yg-ink);
	opacity: 0;
	transition: opacity .15s;
}

.yagdul-selected .yagdul-dot {
	border-color: var(--yg-ink);
}

.yagdul-selected .yagdul-dot-inner {
	opacity: 1;
}

.yagdul-pay-icon {
	flex: none;
}

.yagdul-pay-copy {
	flex: 1;
	min-width: 0;
	display: block;
}

.yagdul-pay-title {
	display: block;
	font-weight: 700;
	font-size: 14.5px;
}

.yagdul-pay-sub {
	display: block;
	color: var(--yg-muted);
	font-size: 12.5px;
	font-weight: 400;
}

.yagdul-wompi-logo {
	height: 32px !important;
	width: auto !important;
	max-width: 120px !important;
	flex: none;
	object-fit: contain;
	object-position: left;
	display: block;
}

.yagdul-pay-spacer {
	flex: 1 1 auto;
	min-width: 8px;
}

.yagdul-pay-logos {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: none;
	min-height: 32px;
	margin: 0;
	padding: 0;
	max-width: 100%;
	box-sizing: border-box;
	line-height: 0;
}

.yagdul-pay-logos img {
	height: 32px !important;
	width: auto !important;
	max-width: none !important;
	display: block;
	object-fit: contain;
}

/* Panel desplegable del método seleccionado */
.yagdul-page .yagdul-expand-panel {
	display: none;
	margin-top: 16px;
	padding: 16px 0 0;
	border-top: 1px solid #ececec;
	background: none;
	border-radius: 0;
	color: #3a3a3a;
	font-size: 12.5px;
	animation: yagdul-panel-in .18s ease-out;
}

.yagdul-page .yagdul-pay-option.yagdul-selected .yagdul-expand-panel {
	display: block;
}

/* WooCommerce/Astra aplica a `.payment_box` un fondo gris, una flecha y otro
 * padding. El handoff usa el fondo suave de la tarjeta seleccionada y sólo una
 * separación superior antes de los beneficios. */
.yagdul-page #payment .payment_box.yagdul-expand-panel {
	background: transparent !important;
	margin: 16px 0 0 !important;
	padding: 16px 0 0 !important;
	border: 0 !important;
	border-top: 1px solid #ececec !important;
}

.yagdul-page #payment .payment_box.yagdul-expand-panel::before {
	display: none !important;
}

@keyframes yagdul-panel-in {
	from { opacity: 0; transform: translateY(4px); }
	to   { opacity: 1; transform: none; }
}

.yagdul-benefits {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-bottom: 14px;
}

.yagdul-benefit {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
	color: #3a3a3a;
}

.yagdul-bullet {
	width: 16px;
	height: 16px;
	flex: none;
	border-radius: 50%;
	background: var(--yg-ok-bg);
	display: flex;
	align-items: center;
	justify-content: center;
}

.yagdul-bullet span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--yg-ok);
	display: block;
}

.yagdul-panel-note {
	background: #fafaf7;
	border-radius: 10px;
	padding: 14px;
	font-size: 12.5px;
	color: #6b6b6b;
}

.yagdul-gateway-fields {
	margin-top: 12px;
	font-size: 12.5px;
	color: #6b6b6b;
}

.yagdul-gateway-fields p {
	margin: 0 0 8px;
}

/* --------------------------------------------------------------------------
 * Resumen del pedido / totales
 * ----------------------------------------------------------------------- */

.yagdul-summary {
	display: flex;
	flex-direction: column;
	padding: 24px;
}

.yagdul-page .yagdul-summary-head {
	order: 1;
	display: block;
	width: 100%;
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	text-align: left;
	cursor: default;
	color: inherit;
	font-family: inherit;
}

.yagdul-summary-toggle-label,
.yagdul-summary-head-total {
	display: none;
}

.yagdul-summary-body {
	order: 2;
}

.yagdul-place-order {
	order: 3;
}

.yagdul-trust {
	order: 4;
}

.yagdul-review-items {
	margin-bottom: 18px;
}

.yagdul-review-item {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-bottom: 14px;
}

.yagdul-review-item:last-child {
	margin-bottom: 0;
}

.yagdul-item-thumb {
	position: relative;
	width: 56px;
	height: 56px;
	flex: none;
	background: #f6f6f6;
	border-radius: 10px;
	overflow: visible;
}

.yagdul-item-thumb img {
	width: 56px !important;
	height: 56px !important;
	max-width: 56px !important;
	object-fit: cover;
	border-radius: 10px;
	display: block;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

.yagdul-item-qty {
	position: absolute;
	top: -6px;
	right: -6px;
	background: var(--yg-ink);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	min-width: 18px;
	height: 18px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
}

.yagdul-item-copy {
	flex: 1;
	min-width: 0;
}

.yagdul-item-name {
	display: block;
	font-weight: 700;
	font-size: 14px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.yagdul-item-sub {
	display: block;
	color: var(--yg-muted);
	font-size: 12.5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.yagdul-item-price {
	font-weight: 700;
	font-size: 14px;
	white-space: nowrap;
	flex: none;
}

.yagdul-item-price del {
	color: var(--yg-muted);
	font-weight: 400;
	margin-right: 4px;
}

/* Cupón */
.yagdul-coupon {
	display: flex;
	gap: 8px;
	margin-bottom: 18px;
	flex-wrap: wrap;
}

.yagdul-page .yagdul-coupon-input {
	flex: 1;
	min-width: 120px;
	border: 1px solid var(--yg-border-input);
	border-radius: var(--yg-radius-input);
	padding: 10px 12px;
	font-size: 13px;
	width: auto;
}

.yagdul-page .yagdul-apply-btn {
	border: 1px solid var(--yg-border-input) !important;
	background: #f6f6f4 !important;
	color: var(--yg-ink) !important;
	border-radius: var(--yg-radius-input) !important;
	padding: 10px 16px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	cursor: pointer;
	transition: background .15s;
	text-transform: none !important;
	letter-spacing: 0 !important;
	height: auto !important;
	width: auto !important;
}

.yagdul-page .yagdul-apply-btn:hover {
	background: #eee !important;
}

.yagdul-page .yagdul-apply-btn[disabled] {
	opacity: .6;
	cursor: default;
}

.yagdul-coupon-msg {
	flex: 1 0 100%;
	font-size: 12px;
	color: var(--yg-ok);
	display: none;
}

.yagdul-coupon-msg.is-visible {
	display: block;
}

.yagdul-coupon-msg.is-error {
	color: var(--yg-error);
}

/* Totales */
.yagdul-total-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 13.5px;
	color: #4a4a4a;
	margin-bottom: 8px;
}

.yagdul-total-row:last-child {
	margin-bottom: 0;
}

.yagdul-total-row-coupon a {
	font-size: 12px;
	margin-left: 6px;
}

.yagdul-total-row-grand {
	border-top: 1px solid #eee;
	padding-top: 14px;
	margin-top: 6px;
	align-items: baseline;
}

.yagdul-total-row-grand > span:first-child {
	font-weight: 700;
	font-size: 15px;
	color: var(--yg-ink);
}

.yagdul-grand,
.yagdul-grand .woocommerce-Price-amount {
	font-weight: 800;
	font-size: 20px;
	color: var(--yg-ink);
}

.yagdul-grand small {
	display: none;
}

.yagdul-free {
	color: var(--yg-ok);
	font-weight: 600;
}

.yagdul-muted {
	color: var(--yg-muted);
}

/* --------------------------------------------------------------------------
 * CTA
 * ----------------------------------------------------------------------- */

.yagdul-place-order {
	margin: 20px 0 0;
	padding: 0;
}

.yagdul-bar-total {
	display: none;
}

.yagdul-page .yagdul-cta,
.yagdul-page button#place_order,
.yagdul-page a.checkout-button {
	display: block;
	width: 100%;
	background: var(--yg-lime) !important;
	color: var(--yg-ink) !important;
	border: none !important;
	border-radius: 10px !important;
	padding: 16px !important;
	font-size: 15px !important;
	font-weight: 800 !important;
	font-family: inherit !important;
	line-height: 1.2 !important;
	text-align: center;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	cursor: pointer;
	transition: filter .15s;
	height: auto !important;
	box-shadow: none !important;
}

.yagdul-page .yagdul-cta:hover {
	filter: brightness(0.94);
	color: var(--yg-ink) !important;
	background: var(--yg-lime) !important;
	text-decoration: none !important;
}

.yagdul-page .yagdul-cta[disabled],
.yagdul-page .yagdul-cta.is-loading {
	opacity: .6;
	cursor: default;
	filter: none;
}

.yagdul-cta-inline {
	display: inline-block !important;
	width: auto !important;
	padding: 14px 26px !important;
	margin-top: 6px;
}

.yagdul-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(20, 21, 26, .3);
	border-top-color: var(--yg-ink);
	border-radius: 50%;
	animation: yagdul-spin .6s linear infinite;
	vertical-align: -2px;
	margin-right: 8px;
}

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

/* Términos y condiciones, si están activos */
.yagdul-page .woocommerce-terms-and-conditions-wrapper {
	margin-bottom: 14px;
	font-size: 12.5px;
}

/* --------------------------------------------------------------------------
 * Franjas de confianza
 * ----------------------------------------------------------------------- */

.yagdul-trust {
	margin-top: 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.yagdul-trust-row {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.yagdul-trust-row svg {
	flex: none;
	margin-top: 1px;
}

.yagdul-trust-title {
	font-weight: 700;
	font-size: 13px;
}

.yagdul-trust-copy {
	color: var(--yg-muted);
	font-size: 12px;
}

/* --------------------------------------------------------------------------
 * Carrito
 * ----------------------------------------------------------------------- */

.yagdul-cart-card {
	background: var(--yg-surface);
	border: 1px solid var(--yg-border);
	border-radius: var(--yg-radius-card);
	padding: 8px;
	margin-bottom: 20px;
}

/* El aviso informativo del precio anticipado se genera fuera de la tarjeta y
 * rompe la composición del carrito. Los errores y mensajes de acción siguen
 * visibles; sólo se oculta este aviso informativo directo en esta pantalla. */
.yagdul-cart-shell > .woocommerce-info {
	display: none !important;
}

.yagdul-cart-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px;
	border-bottom: 1px solid #f0f0ee;
	flex-wrap: wrap;
}

.yagdul-cart-items .yagdul-cart-item:last-child {
	border-bottom: 0;
}

.yagdul-page .yagdul-remove {
	width: 20px;
	height: 20px;
	flex: none;
	border: 1px solid var(--yg-border-input);
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
	color: #9a9a9a !important;
	font-size: 11px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all .15s;
	text-decoration: none !important;
}

.yagdul-page .yagdul-remove:hover {
	border-color: #999;
	color: #666 !important;
	background: #fff;
}

.yagdul-cart-item .yagdul-item-thumb {
	width: 48px;
	height: 48px;
}

.yagdul-cart-item .yagdul-item-thumb img {
	width: 48px !important;
	height: 48px !important;
	max-width: 48px !important;
	border-radius: 8px;
}

.yagdul-cart-item .yagdul-item-copy {
	flex: 1 1 100px;
}

.yagdul-cart-item .yagdul-item-sub {
	font-size: 12px;
}

.yagdul-cart-item .yagdul-item-price {
	min-width: 64px;
	text-align: right;
}

.yagdul-qty {
	display: flex;
	align-items: center;
	border: 1px solid var(--yg-border-input);
	border-radius: var(--yg-radius-input);
	flex: none;
	overflow: hidden;
	background: #fff;
}

.yagdul-page .yagdul-qty-btn {
	width: 26px;
	height: 30px;
	border: none !important;
	background: none !important;
	cursor: pointer;
	font-size: 15px;
	color: #444 !important;
	padding: 0 !important;
	line-height: 1 !important;
	border-radius: 0 !important;
	transition: background .15s;
}

.yagdul-page .yagdul-qty-btn:hover {
	background: #f2f2f0 !important;
}

.yagdul-page input.yagdul-qty-input[type="number"] {
	width: 22px !important;
	min-width: 22px !important;
	max-width: 22px !important;
	flex: 0 0 22px;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	border: 0 !important;
	padding: 0 !important;
	background: none !important;
	box-shadow: none !important;
	-moz-appearance: textfield;
}

.yagdul-page input.yagdul-qty-input[type="number"]::-webkit-outer-spin-button,
.yagdul-page input.yagdul-qty-input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.yagdul-qty-value {
	width: 34px;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
}

.yagdul-cart-card .yagdul-coupon {
	padding: 16px;
	margin: 0;
}

.yagdul-cart-fallback {
	display: none;
}

.yagdul-page .yagdul-keep-shopping {
	font-size: 13.5px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.yagdul-cart-totals .yagdul-summary-body {
	order: 2;
}

.yagdul-empty {
	text-align: center;
	padding: 56px 28px;
}

.yagdul-page .yagdul-empty h1 {
	font-size: 22px;
	font-weight: 800;
	margin: 16px 0 6px;
}

.yagdul-page .yagdul-empty p {
	color: #6b6b6b;
	font-size: 14px;
	margin: 0 0 18px;
}

/* --------------------------------------------------------------------------
 * Avisos de WooCommerce
 * ----------------------------------------------------------------------- */

.yagdul-page .woocommerce-message,
.yagdul-page .woocommerce-info,
.yagdul-page .woocommerce-error,
.yagdul-page .woocommerce-NoticeGroup ul {
	background: #fff;
	border: 1px solid var(--yg-border);
	border-left: 3px solid var(--yg-ink);
	border-radius: 10px;
	padding: 14px 16px;
	font-size: 13.5px;
	color: var(--yg-ink);
	list-style: none;
	margin: 0 0 14px;
}

.yagdul-page .woocommerce-error {
	border-left-color: var(--yg-error);
}

.yagdul-page .woocommerce-message {
	border-left-color: var(--yg-ok);
}

.yagdul-page .woocommerce-error li {
	list-style: none;
	margin: 0;
}

.yagdul-page .woocommerce-message .button,
.yagdul-page .woocommerce-info .button {
	display: none;
}

.yagdul-page form.checkout_coupon,
.yagdul-page .woocommerce-form-coupon-toggle {
	display: none !important;
}

/* Bloqueo de WooCommerce durante AJAX */
.yagdul-page .blockUI.blockOverlay {
	background: #fff !important;
	opacity: .5 !important;
}

/* --------------------------------------------------------------------------
 * Tablet / mobile
 * ----------------------------------------------------------------------- */

@media (max-width: 900px) {

	.yagdul-shell {
		padding: 0 0 24px;
	}

	.yagdul-grid {
		grid-template-columns: 1fr;
		gap: 0;
	}

	/* Tras una validación fallida, el aviso debe verse antes incluso del
	 * resumen móvil y conservar el mismo aire lateral que el formulario. */
	.yagdul-grid > .woocommerce-NoticeGroup,
	.yagdul-grid > .woocommerce-notices-wrapper {
		order: -2;
		padding: 16px 16px 0;
	}

	.yagdul-col-side {
		position: static;
		order: -1;
	}

	.yagdul-col-main {
		padding: 16px;
	}

	.yagdul-before {
		padding: 16px 16px 0;
		margin-bottom: 0;
	}

	.yagdul-card {
		padding: 20px;
	}

	.yagdul-intro {
		margin-bottom: 16px;
	}

	.yagdul-page .yagdul-intro h1 {
		font-size: 20px;
		margin: 10px 0 3px;
	}

	.yagdul-page .yagdul-intro p {
		font-size: 12.5px;
	}

	/* Resumen colapsable en la parte superior */
	.yagdul-col-side .yagdul-summary {
		border-radius: 0;
		border-left: 0;
		border-right: 0;
		border-top: 0;
		padding: 0;
		margin: 0;
	}

	.yagdul-page .yagdul-summary-head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 14px 16px;
		background: #fff;
		border-bottom: 1px solid #eee;
		cursor: pointer;
	}

	.yagdul-summary .yagdul-card-title {
		display: none;
	}

	.yagdul-summary-toggle-label {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		font-size: 13px;
		font-weight: 600;
		color: var(--yg-ink);
	}

	.yagdul-summary-toggle-label svg {
		transition: transform .18s;
	}

	.yagdul-summary-head[aria-expanded="true"] .yagdul-summary-toggle-label svg {
		transform: rotate(180deg);
	}

	.yagdul-summary-head-total {
		display: inline-block;
		font-weight: 800;
		font-size: 15px;
		color: var(--yg-ink);
	}

	.yagdul-summary-body {
		display: none;
		padding: 16px;
		background: #fff;
		border-bottom: 1px solid #eee;
	}

	.yagdul-summary-head[aria-expanded="true"] + .yagdul-summary-body {
		display: block;
	}

	.yagdul-summary .yagdul-trust {
		display: none;
		padding: 0 16px 16px;
		background: #fff;
		margin-top: 0;
	}

	.yagdul-summary-head[aria-expanded="true"] ~ .yagdul-trust {
		display: flex;
	}

	/* Barra inferior fija con total + CTA.
	   En el checkout el contenedor también lleva la clase `form-row`, cuyo
	   `margin: 0 0 6px` del tema gana por especificidad y despegaba la barra del
	   borde inferior. De ahí el selector doblemente cualificado. */
	.yagdul-place-order,
	.yagdul-page .yagdul-place-order.form-row {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 90;
		display: flex;
		align-items: center;
		gap: 12px;
		background: #fff;
		border-top: 1px solid var(--yg-border);
		padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
		margin: 0;
	}

	.yagdul-bar-total {
		display: block;
		flex: 0 1 auto;
		min-width: 0;
	}

	/* Sólo los hijos directos: el importe de WooCommerce llega envuelto en sus
	   propios <span> (.woocommerce-Price-amount y .woocommerce-Price-currencySymbol)
	   y un selector descendente los volvía bloque, partiendo el "$" de la cifra. */
	.yagdul-bar-total > span {
		display: block;
		font-size: 10.5px;
		color: var(--yg-muted);
	}

	.yagdul-bar-total strong {
		display: block;
		font-size: 15px;
		font-weight: 800;
		color: var(--yg-ink);
		white-space: nowrap;
	}

	.yagdul-bar-total .woocommerce-Price-amount {
		font-size: 15px;
	}

	.yagdul-place-order-inner {
		flex: 1.4;
		min-width: 0;
	}

	.yagdul-page .yagdul-cta,
	.yagdul-page button#place_order,
	.yagdul-page a.checkout-button {
		padding: 14px !important;
		font-size: 14.5px !important;
	}

	body.yagdul-ui-active {
		padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
	}

	body.yagdul-ui-active.yagdul-mobile-static-cta {
		padding-bottom: 0;
	}

	body.yagdul-mobile-static-cta .yagdul-place-order,
	body.yagdul-mobile-static-cta .yagdul-page .yagdul-place-order.form-row {
		position: static;
		padding: 12px 16px;
	}

	body.yagdul-mobile-static-cta .yagdul-bar-total {
		display: none;
	}

	.yagdul-wompi-logo {
		height: 24px !important;
	}

	.yagdul-pay-logos img {
		height: 32px !important;
	}

	.yagdul-logo-desktop {
		display: none;
	}

	.yagdul-cart-page .yagdul-cart-card {
		padding: 6px;
		border-radius: 10px;
	}

	.yagdul-topbar {
		padding: 14px 16px;
	}

	.yagdul-brand img {
		height: 26px;
	}

	.yagdul-secure {
		display: none;
	}
}

@media (max-width: 640px) {

	.yagdul-invoice-heading {
		align-items: flex-start;
		flex-direction: column;
		gap: 3px;
	}

	.yagdul-page .yagdul-pay-label {
		gap: 10px;
	}

	.yagdul-page .yagdul-pay-option {
		padding: 14px 16px;
	}

	.yagdul-page .yagdul-pay-options {
		gap: 14px;
	}

	.yagdul-pay-spacer {
		display: none;
	}

	.yagdul-pay-logos {
		flex: 0 0 calc(100% - 30px);
		width: calc(100% - 30px);
		margin: 6px 0 0 30px;
		flex-wrap: wrap;
		gap: 8px;
		justify-content: flex-start;
	}
}

@media (max-width: 480px) {

	.yagdul-page .woocommerce-billing-fields__field-wrapper,
	.yagdul-page .woocommerce-shipping-fields__field-wrapper {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.yagdul-card {
		padding: 16px;
		border-radius: 10px;
	}

	.yagdul-benefits {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.yagdul-cart-item {
		gap: 8px;
		padding: 12px;
	}

	.yagdul-cart-item .yagdul-item-copy {
		flex: 1 1 90px;
	}

	.yagdul-cart-item .yagdul-qty {
		margin-left: 28px;
	}

	.yagdul-cart-item .yagdul-item-price {
		margin-left: auto;
	}
}
