/* =====================================================================================
   Fumagalli · Ajustes de noviembre (plugin fumagalli-ajustes 1.0.0)
   Solo corrige lo pedido; el diseño de escritorio no cambia.
   ===================================================================================== */

/* ---------- 4 · Franja «Envíos gratis a todo el mundo · Impuestos incluidos» en el teléfono ---------- */
@media (max-width: 767px) {
	.elementor .fj-topbar,
	.elementor .fj-topbar > .e-con-inner { justify-content: center !important; flex-wrap: wrap !important; }
	.elementor .fj-topbar { height: auto !important; min-height: var(--fj-topbar-h, 34px); padding-top: 8px !important; padding-bottom: 8px !important; }
	.elementor .fj-topbar .fj-topbar__text { flex: 1 1 100% !important; width: 100% !important; max-width: 100% !important; min-width: 0; text-align: center; }
	.elementor .fj-topbar__text .elementor-heading-title {
		display: block; text-align: center !important; white-space: normal !important; overflow: visible !important; text-overflow: clip !important;
		font-size: 9.5px; letter-spacing: .1em; line-height: 1.5; text-wrap: balance;
	}
}

/* ---------- 4 · «Pieza única» en las tarjetas de gemas: etiqueta compacta que no tapa la piedra ni otros textos ---------- */
.fm-unica { max-width: calc(100% - 24px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 767px) {
	.fm-unica {
		top: 6px; left: 6px; max-width: calc(100% - 12px); padding: 3px 8px 3px 6px;
		background: rgba(255, 255, 255, .94); border: 1px solid rgba(87, 41, 50, .12);
		font-size: 11px; line-height: 1.25; letter-spacing: 0;
	}
	.fm-unica::before { width: 4px; height: 4px; margin: 0 5px 2px 0; }
	/* Ficha de la gema: el texto de disponibilidad va en su propia línea. */
	.fj-pdp__stock, .fj-pdp__stock .stock { position: static !important; display: block; margin: 0; }
}

/* ---------- 4/6 · Teléfono, fichas: los botones flotantes no tapan la barra «Comprar» ---------- */
@media (max-width: 1024px) {
	body.single-product .fj-geo-idiomas--flota { bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; }
}
@media (max-width: 767px) {
	body.single-product { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
	.elementor .fj-buybar { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important; }
	.elementor .fj-buybar__cta .elementor-button { cursor: pointer; }
}

/* ---------- 5 · Gemas: sin precio de la piedra; «Elige tu diseño» con el precio de la joya ---------- */
body.fj-es-gema .e-con:has(> .elementor-widget-woocommerce-product-price),
body.fj-es-gema .e-con:has(> .elementor-widget.fj-pdp__price),
body.fj-es-gema .fj-pdp__price { display: none !important; }
.fj-precio-gema { font-family: var(--fj-sans, inherit); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--fm-vino, #572932); }
.fj-ver-disenos { text-transform: none; }

.fj-elige { display: flex; flex-direction: column; gap: 14px; width: 100%; margin: 0 0 18px; scroll-margin-top: calc(var(--fm-hdr-bottom, 110px) + 16px); }
.fj-elige__group { margin: 0; padding: 0; border: 0; min-width: 0; }
.fj-elige__group legend { margin: 0 0 6px; padding: 0; font-family: var(--fj-sans, inherit); font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--fm-negro, #0D0B0B); }
.fj-elige__ayuda { margin: 0 0 14px; font-family: var(--fj-sans, inherit); font-size: 13px; line-height: 1.55; color: var(--fm-tinta, #4A4343); }
.fj-elige .fj-diseno { position: relative; display: flex; flex-direction: column; margin: 0; padding: 0 0 12px; border: 1px solid rgba(13, 11, 11, .14); background: #FFFFFF; text-align: left; }
.fj-elige .fj-diseno__foto { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: #FFFFFF; border-bottom: 1px solid rgba(13, 11, 11, .08); cursor: pointer; }
.fj-elige .fj-diseno__foto img { display: block; width: 100%; height: 100%; object-fit: contain !important; }
.fj-elige .fj-elige__precio { margin-top: 4px; font-family: var(--fj-serif, serif); font-size: 19px; color: var(--fm-vino, #572932); }
.fj-elige .fj-elige__precio .woocommerce-Price-amount { font-weight: 400; }
.fj-elige__toggle { position: relative; display: flex; align-items: center; justify-content: center; margin: 10px 12px 0; min-height: 42px; border: 1px solid var(--fm-vino, #572932); color: var(--fm-vino, #572932); font-family: var(--fj-sans, inherit); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s; }
.fj-elige__toggle input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.fj-elige__toggle:hover { background: rgba(87, 41, 50, .06); }
.fj-elige__toggle:has(input:focus-visible) { outline: 2px solid var(--fm-vino, #572932); outline-offset: 2px; }
.fj-elige__elegido { display: none; }
.fj-elige .fj-diseno:has(input:checked), .fj-elige .fj-diseno.is-elegido { border-color: var(--fm-vino, #572932); box-shadow: inset 0 0 0 1px var(--fm-vino, #572932); }
.fj-elige .fj-diseno:has(input:checked) .fj-elige__toggle, .fj-elige .fj-diseno.is-elegido .fj-elige__toggle { background: var(--fm-vino, #572932); color: #FFFFFF; }
.fj-elige .fj-diseno:has(input:checked) .fj-elige__elegir, .fj-elige .fj-diseno.is-elegido .fj-elige__elegir { display: none; }
.fj-elige .fj-diseno:has(input:checked) .fj-elige__elegido, .fj-elige .fj-diseno.is-elegido .fj-elige__elegido { display: inline; }
.fj-elige .fj-diseno__talla { margin: 10px 12px 0; }
.fj-elige .fj-diseno__talla[hidden] { display: none; }
.fj-elige .fj-diseno__talla label { display: block; margin: 0 0 6px; font-family: var(--fj-sans, inherit); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.fj-elige .fj-diseno__talla select { width: 100%; max-width: none; min-height: 42px; }
.fj-elige__total { display: flex; flex-direction: column; padding: 14px 16px; border: 1px solid rgba(13, 11, 11, .14); background: #FAF7F2; font-family: var(--fj-sans, inherit); font-size: 15px; }
.fj-elige__total .fj-disenos__linea { display: flex; justify-content: space-between; gap: 12px; }
.fj-elige__totalv { font-weight: 500; }
.fj-elige .fj-montaje__note { margin: 0; font-family: var(--fj-sans, inherit); font-size: 12.5px; line-height: 1.5; color: var(--fm-tinta, #4A4343); }
.fj-elige--aviso .fj-elige__group legend, .fj-elige--aviso .fj-elige__ayuda { color: #B32D2E; }
.fj-elige--aviso .fj-elige__options { animation: fj-aviso .6s ease 2; }
@keyframes fj-aviso { 50% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .fj-elige--aviso .fj-elige__options { animation: none; } }
@media (max-width: 480px) {
	.fj-elige .fj-disenos__options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.fj-elige .fj-diseno__titulo { font-size: 16px; }
	.fj-elige .fj-diseno__desc { display: none; }
	.fj-elige .fj-elige__precio { font-size: 16px; }
	.fj-elige__toggle { margin: 10px 8px 0; }
	.fj-elige .fj-diseno__talla { margin: 10px 8px 0; }
}
.fj-elige--consulta .fj-consultar { align-self: flex-start; }

/* ---------- 3 · Tu piedra de nacimiento: imagen editorial del mes ---------- */
.fj-mes-editorial { display: block; width: 100%; height: 100%; object-fit: cover; }
.fm-cal__img .fj-mes-editorial { height: auto; aspect-ratio: 1 / 1; }
.fm-hovervid:has(.fj-mes-editorial) .fm-hovervid__video,
.fm-hovervid:has(.fj-mes-editorial) .fm-hv__hint { display: none !important; }
.fm-hovervid:has(.fj-mes-editorial) .fm-hovervid__img { opacity: 1 !important; }
.fm-hovervid:has(.fj-mes-editorial) .fm-hovervid__img img { padding: 0 !important; object-fit: cover !important; }

/* ---------- 2 · Fotos de joyas: la pieza completa en tarjetas y galería del teléfono ---------- */
@media (max-width: 767px) {
	.single-product .fj-pdp__gallery .woocommerce-product-gallery__image img,
	.single-product .fj-pdp__gallery .flex-viewport img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain !important; background: #FFFFFF; }
}
