/* Jeeh WhatsApp Checkout */

.jgwa-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: #25d366;
	color: #fff !important;
	border: 0;
	border-radius: 6px;
	padding: 14px 26px;
	font-weight: 700;
	font-size: 14px;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: .3px;
	cursor: pointer;
	text-decoration: none !important;
	transition: background .2s ease;
}

.jgwa-btn:hover,
.jgwa-btn:focus {
	background: #1da851;
	color: #fff !important;
}

.jgwa-btn .jgwa-ico {
	flex: 0 0 auto;
}

/* --- Ficha de producto: al lado de "Anadir al carrito" ---
   El form de Porto mide mas alto que su primera fila (lleva "Ver carrito"
   debajo), asi que ambos se alinean por ARRIBA y el boton copia la altura
   exacta del "Anadir al carrito" del tema (48px). */
/* El form queda en BLOQUE (como en el tema original) para no arrastrar a
   .product-share ni al wishlist, que son inline-block y se subirian a la
   misma linea que los botones. El boton de WhatsApp se mete DENTRO del form
   por JS, asi que comparte linea con "Anadir al carrito" sin tocar el resto. */
.woocommerce div.product .summary > form.cart {
	display: block;
	margin-bottom: 0;
}

.jgwa-btn--product {
	vertical-align: top;
	margin: 0 0 0 12px;
	height: 48px;
	padding-top: 0;
	padding-bottom: 0;
}

@media (max-width: 575px) {
	.jgwa-btn--product {
		display: flex;
		width: 100%;
		margin: 12px 0 0;
	}
}

/* --- Listados: boton de WhatsApp en lugar del corazon (wishlist) ---
   Va ANTES de "Anadir al carrito". NO se toca el display de .add-links:
   el tema posiciona sus hijos y al pasarlo a flex el boton pierde altura.
   Se copia la caja del quickview (36x36) y el alto lo ajusta el JS por vista. */
.add-links .jgwa-loop-btn,
.product .jgwa-loop-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 36px;
	/* separacion del "Anadir al carrito" que va justo despues */
	margin-right: 6px;
	padding: 0;
	background: #25d366;
	color: #fff !important;
	border-radius: 0;
	text-decoration: none !important;
	transition: background .2s ease;
	vertical-align: middle;
	box-sizing: border-box;
	/* el SVG es el unico hijo: sin line-height heredado que lo descentre */
	line-height: 0;
	font-size: 0;
}

/* El icono centrado exacto: sin margenes ni alineacion de texto heredada */
.add-links .jgwa-loop-btn .jgwa-ico,
.product .jgwa-loop-btn .jgwa-ico {
	display: block;
	margin: 0;
	flex: 0 0 auto;
}

.add-links .jgwa-loop-btn:hover,
.add-links .jgwa-loop-btn:focus {
	background: #1da851;
	color: #fff !important;
}

.add-links .jgwa-loop-btn .jgwa-ico {
	width: 18px;
	height: 18px;
}

/* --- Carrito: formulario + boton --- */
.jgwa-cart {
	margin-top: 18px;
	text-align: left;
}

.jgwa-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 12px;
	margin-bottom: 16px;
}

.jgwa-field {
	margin: 0 !important;
}

.jgwa-field:last-child {
	grid-column: 1 / -1;
}

.jgwa-field label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .4px;
	color: #333;
	margin-bottom: 5px;
}

.jgwa-field label span {
	color: #e02b27;
}

.jgwa-field input,
.jgwa-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d6d6d6;
	border-radius: 5px;
	font-size: 14px;
	background: #fff;
	color: #333;
}

.jgwa-field input:focus,
.jgwa-field textarea:focus {
	border-color: #25d366;
	outline: 0;
}

.jgwa-field textarea {
	resize: vertical;
	min-height: 62px;
}

.jgwa-field.jgwa-invalid input,
.jgwa-field.jgwa-invalid textarea {
	border-color: #e02b27;
	background: #fff6f6;
}

.jgwa-error {
	margin: 0 0 12px !important;
	padding: 9px 12px;
	background: #fdecea;
	border-left: 3px solid #e02b27;
	border-radius: 4px;
	color: #b3231f;
	font-size: 13px;
}

.jgwa-btn--checkout {
	width: 100%;
	padding: 17px 20px;
	border-radius: 999px;
	font-size: 15px;
}

.jgwa-btn--checkout.jgwa-loading {
	opacity: .65;
	pointer-events: none;
}

@media (max-width: 480px) {
	.jgwa-fields {
		grid-template-columns: 1fr;
	}
}

/* --- Dos pasos en vez de tres (Carrito de Compra > Finalizar Compra) --- */
.jgwa-two-steps .woo-page-header .breadcrumb > li:last-child,
.jgwa-two-steps .woo-page-header .breadcrumb > li.disable {
	display: none;
}
