/* ------------------------------------------------------------------
   JGCMarket · Interfaz de ficha de producto
   Se carga SOLO en fichas de producto, después de Elementor y del tema.
   Objetivo: alinear la caja de compra, dar jerarquía al CTA,
   stepper de cantidad (+/-) y aire en las migas de pan.
   Escala base 8px · radios 12px · altura táctil mínima 56px
   ------------------------------------------------------------------ */

/* ============ 1. MIGAS DE PAN ============ */

body.single-product .elementor-widget-woocommerce-breadcrumb {
	margin-top: 20px;
	margin-bottom: 4px;
}

body.single-product nav.breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 6px;
	list-style: none;
	margin: 0 0 20px;
	padding: 12px 16px;
	background: #f6f7f9;
	border: 1px solid #e8eaee;
	border-radius: 12px;
	font-size: 13.5px;
	line-height: 1.5;
}

body.single-product nav.breadcrumb li {
	display: inline-flex;
	align-items: center;
	min-width: 0;
	max-width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
	color: #6b7280;
}

body.single-product nav.breadcrumb li > a {
	color: #4b5563;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: color .15s ease, border-color .15s ease;
}

body.single-product nav.breadcrumb li > a:hover,
body.single-product nav.breadcrumb li > a:focus-visible {
	color: #111827;
	border-bottom-color: currentColor;
}

body.single-product nav.breadcrumb i.fa,
body.single-product nav.breadcrumb i.fas {
	font-size: 10px;
	opacity: .4;
	margin: 0 2px;
}

/* El último elemento es el producto: énfasis y recorte elegante */
body.single-product nav.breadcrumb li:last-child {
	font-weight: 600;
	color: #111827;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: block;
}

/* ============ 2. CAJA DE COMPRA: REJILLA VERTICAL ============ */

body.single-product .elementor-add-to-cart form.cart {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
}

/* La fila cantidad + botón pasa a ser una rejilla real, sin solaparse */
body.single-product .elementor-add-to-cart form.cart .e-atc-qty-button-holder {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 12px;
	width: 100%;
	margin: 0;
}

/* ============ 3. STEPPER DE CANTIDAD ============ */

body.single-product .elementor-add-to-cart .quantity {
	position: relative;
	display: inline-flex;
	align-items: stretch;
	flex: 0 0 auto;
	width: 148px;
	min-height: 56px;
	margin: 0;
	background: #fff !important;
	background-color: #fff !important;
	border: 1.5px solid #d5d9e0;
	border-radius: 12px;
	overflow: hidden;
	transition: border-color .15s ease, box-shadow .15s ease;
}

body.single-product .elementor-add-to-cart .quantity:focus-within {
	border-color: #111827;
	box-shadow: 0 0 0 3px rgba(17, 24, 39, .12);
}

/* Botones - y +
   El widget de Elementor aplica su color primario global (#FEB104) a los
   botones de esta zona; se fuerza blanco/negro para que no dependa de eso. */
body.single-product .elementor-add-to-cart .quantity .jgc-qty-btn,
body.single-product .jgc-qty-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 44px;
	width: 44px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: #fff !important;
	background-color: #fff !important;
	background-image: none !important;
	color: #111827 !important;
	box-shadow: none !important;
	text-shadow: none;
	font-size: 20px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
	transition: background-color .15s ease, color .15s ease;
}

body.single-product .elementor-add-to-cart .quantity .jgc-qty-btn:hover:not(:disabled),
body.single-product .jgc-qty-btn:hover:not(:disabled) {
	background: #f3f4f6 !important;
	color: #111827 !important;
}

body.single-product .elementor-add-to-cart .quantity .jgc-qty-btn:active:not(:disabled),
body.single-product .jgc-qty-btn:active:not(:disabled) {
	background: #e9ebef !important;
	color: #111827 !important;
}

body.single-product .jgc-qty-btn:focus-visible {
	outline: 2px solid #111827;
	outline-offset: -3px;
}

body.single-product .elementor-add-to-cart .quantity .jgc-qty-btn:disabled,
body.single-product .jgc-qty-btn:disabled {
	color: #c3c8d2 !important;
	background: #fff !important;
	opacity: 1;
	cursor: not-allowed;
}

body.single-product .elementor-add-to-cart .quantity .jgc-qty-btn.jgc-qty-minus {
	border-right: 1px solid #e3e6ec !important;
}

body.single-product .elementor-add-to-cart .quantity .jgc-qty-btn.jgc-qty-plus {
	border-left: 1px solid #e3e6ec !important;
}

/* El input: centrado, sin flechas nativas */
body.single-product .elementor-add-to-cart .quantity input.qty {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: 100%;
	min-height: 52px;
	padding: 0 4px;
	margin: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	text-align: center;
	font-size: 17px;
	font-weight: 600;
	color: #111827;
	-moz-appearance: textfield;
	appearance: textfield;
}

body.single-product .elementor-add-to-cart .quantity input.qty::-webkit-outer-spin-button,
body.single-product .elementor-add-to-cart .quantity input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
}

body.single-product .elementor-add-to-cart .quantity input.qty:focus {
	outline: none;
}

/* WooCommerce oculta la cantidad en algunos contextos (p. ej. productos
   variables sin variación elegida): respetamos ese estado. */
body.single-product .elementor-add-to-cart .quantity.hidden,
body.single-product .elementor-add-to-cart .quantity[style*="display: none"] {
	display: none;
}

/* ============ 4. BOTÓN PRINCIPAL ============ */

body.single-product .elementor-add-to-cart .single_add_to_cart_button {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 56px;
	padding: 0 28px;
	margin: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #333;
	border-radius: 12px;
	background-color: #333;
	color: #fff;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .01em;
	text-align: center;
	cursor: pointer;
	transition: background-color .16s ease, border-color .16s ease, transform .12s ease, box-shadow .16s ease;
}

body.single-product .elementor-add-to-cart .single_add_to_cart_button:hover {
	background-color: #4f4f4f;
	border-color: #4f4f4f;
	box-shadow: 0 6px 16px rgba(17, 24, 39, .16);
}

body.single-product .elementor-add-to-cart .single_add_to_cart_button:active {
	transform: translateY(1px);
	box-shadow: none;
}

body.single-product .elementor-add-to-cart .single_add_to_cart_button:focus-visible {
	outline: 3px solid rgba(17, 24, 39, .35);
	outline-offset: 2px;
}

body.single-product .elementor-add-to-cart .single_add_to_cart_button.disabled,
body.single-product .elementor-add-to-cart .single_add_to_cart_button[disabled] {
	background-color: #9ca3af;
	border-color: #9ca3af;
}

/* ============ 5. BOTÓN SECUNDARIO (Soporte de Dokan) ============ */
/* Estaba dentro del mismo formulario heredando "button alt": ahora es
   una acción secundaria, en su propia fila y con el mismo alto. */

body.single-product .elementor-add-to-cart form.cart .dokan-store-support-btn-product,
body.single-product form.cart .dokan-store-support-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 52px;
	/* Separación explícita del botón de compra: no depende solo del gap del form */
	margin: 18px 0 0 !important;
	padding: 0 20px;
	border: 1.5px solid #d5d9e0;
	border-radius: 12px;
	background-color: #fff;
	color: #111827;
	font-size: 15.5px;
	font-weight: 500;
	line-height: 1.2;
	box-shadow: none;
	text-transform: none;
	transition: background-color .15s ease, border-color .15s ease;
}

body.single-product .elementor-add-to-cart form.cart .dokan-store-support-btn-product:hover,
body.single-product form.cart .dokan-store-support-btn:hover {
	background-color: #f6f7f9;
	border-color: #b9bfc9;
	color: #111827;
}

body.single-product .dokan-store-support-btn-product:focus-visible {
	outline: 3px solid rgba(17, 24, 39, .25);
	outline-offset: 2px;
}

/* ============ 6. ELEMENTOS SUELTOS DEL FORMULARIO ============ */

/* Mensaje de puntos: deja de ser un span suelto con <br> detrás */
body.single-product .wc-points-rewards-product-message {
	display: inline-block;
	width: fit-content;
	margin: 0;
	padding: 6px 12px;
	background: #eef7f1;
	border: 1px solid #cfe8d8;
	border-radius: 999px;
	color: #1f6b3f;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
}

body.single-product .wc-points-rewards-product-message strong {
	color: #14522f;
}

/* El <br> que había detrás del mensaje ya no hace falta */
body.single-product .elementor-add-to-cart form.cart > br {
	display: none;
}

/* Bloque de garantía vacío: que no deje hueco */
body.single-product .elementor-add-to-cart .warranty_info:empty {
	display: none;
}

/* Disponibilidad */
body.single-product .elementor-add-to-cart .stock {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 14px;
	font-weight: 500;
	color: #1f6b3f;
}

body.single-product .elementor-add-to-cart .stock::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #22a05a;
	flex: 0 0 8px;
}

body.single-product .elementor-add-to-cart .stock.out-of-stock {
	color: #b42318;
}

body.single-product .elementor-add-to-cart .stock.out-of-stock::before {
	background: #d92d20;
}

/* ============ 7. "Sold by:" DEL TEMA HIJO ============ */
/* Se inyecta como <span class="details"> dentro del resumen. Ahora tiene
   estilo de metadato y el texto se reescribe a español desde el JS. */

body.single-product .summary .details,
body.single-product .product .details {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 12px;
	padding: 6px 12px;
	background: #f6f7f9;
	border: 1px solid #e8eaee;
	border-radius: 999px;
	font-size: 13.5px;
	color: #6b7280;
}

body.single-product .summary .details a,
body.single-product .product .details a {
	color: #111827;
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px solid #d5d9e0;
}

body.single-product .summary .details a:hover,
body.single-product .product .details a:hover {
	border-bottom-color: #111827;
}

/* ============ 8. RESPONSIVE ============ */

@media (max-width: 767px) {
	body.single-product nav.breadcrumb {
		padding: 10px 12px;
		font-size: 12.5px;
		margin-bottom: 16px;
	}

	/* En móvil: cantidad y botón en dos filas, ambos a ancho completo */
	body.single-product .elementor-add-to-cart form.cart .e-atc-qty-button-holder {
		flex-wrap: wrap;
		gap: 12px;
	}

	body.single-product .elementor-add-to-cart .quantity {
		width: 100%;
		flex: 1 1 100%;
	}

	body.single-product .elementor-add-to-cart .single_add_to_cart_button {
		flex: 1 1 100%;
		width: 100%;
		min-height: 54px;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.single-product .jgc-qty-btn,
	body.single-product .elementor-add-to-cart .single_add_to_cart_button,
	body.single-product .elementor-add-to-cart form.cart .dokan-store-support-btn-product {
		transition: none;
	}
}
