/* OOIWO_FAVORITOS — colores de la marca: naranja #f58d09, azul #5fafc9, letra Afacad. */

/* ---------- Corazón en las fotos ---------- */
li.product { position: relative; }
.woocommerce-product-gallery { position: relative; }

.ooiwo-fav-corazon {
	position: absolute !important; z-index: 5; top: 10px; right: 10px; left: auto !important; bottom: auto !important;
	display: flex !important; align-items: center; justify-content: center;
	width: 38px !important; height: 38px !important; min-width: 0; min-height: 0; max-width: none; margin: 0 !important; padding: 0 !important;
	border: 0 !important; border-radius: 50% !important;
	background: rgba(255, 255, 255, .92) !important; color: #4a4a4a !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .15) !important;
	cursor: pointer; line-height: 0; text-transform: none; transition: transform .15s ease, background .15s ease;
}
.ooiwo-fav-corazon:hover, .ooiwo-fav-corazon:focus-visible { background: #fff !important; transform: scale(1.08); outline: none; }
.ooiwo-fav-corazon:focus-visible { box-shadow: 0 0 0 3px rgba(95, 175, 201, .6) !important; }
.ooiwo-fav-svg { width: 20px; height: 20px; display: block; }
.ooiwo-fav-corazon .ooiwo-fav-svg path { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
.ooiwo-fav-corazon.es-favorito { color: #f58d09 !important; }
.ooiwo-fav-corazon.es-favorito .ooiwo-fav-svg path { fill: #f58d09; stroke: #f58d09; }
.ooiwo-fav-corazon.esta-cargando { opacity: .7; }
.ooiwo-fav-corazon.late { animation: ooiwo-fav-late .45s ease; }
@keyframes ooiwo-fav-late { 0% { transform: scale(1); } 35% { transform: scale(1.3); } 70% { transform: scale(.92); } 100% { transform: scale(1); } }

/* Ficha: al lado de la lupa de la galería. */
.ooiwo-fav-ficha { top: 14px; right: 14px; width: 42px !important; height: 42px !important; }
.ooiwo-fav-con-lupa .ooiwo-fav-ficha { right: 62px !important; }

/* ---------- Cabecera ---------- */
/* El carrito de Elementor va en una columna de su ancho: el corazón se coloca a su izquierda sin mover nada. */
.elementor-location-header .elementor-widget-woocommerce-menu-cart { position: relative; }
.elementor-widget-woocommerce-menu-cart > .ooiwo-fav-cab-wrap { position: absolute; z-index: 3; top: 50%; right: 100%; margin: 0 12px 0 0; transform: translateY(-50%); }
.ooiwo-fav-cab-wrap { display: flex; align-items: center; }
.ooiwo-fav-cabecera { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; background: #fff; color: #5fafc9; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); text-decoration: none !important; }
.ooiwo-fav-cabecera .ooiwo-fav-svg { width: 24px; height: 24px; }
.ooiwo-fav-cabecera .ooiwo-fav-svg path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.ooiwo-fav-cabecera:hover { color: #f58d09; }
.ooiwo-fav-contador { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: #d9534f; color: #fff; font: 700 11px/19px "Afacad", sans-serif; text-align: center; }
.ooiwo-fav-contador.es-cero { display: none; }

/* ---------- Ventanas ---------- */
html.ooiwo-fav-bloqueo { overflow: hidden; }
.ooiwo-fav-fondo { position: fixed; inset: 0; z-index: 99998; background: rgba(20, 30, 40, .55); }
.ooiwo-fav-fondo[hidden], .ooiwo-fav-ventana[hidden], .ooiwo-fav-aviso[hidden], .ooiwo-fav-mensaje[hidden] { display: none !important; }
.ooiwo-fav-ventana {
	position: fixed; z-index: 99999; top: 50%; left: 50%; transform: translate(-50%, -50%);
	width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
	padding: 26px 24px 22px; border-radius: 16px; background: #fff; color: #333;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .25); font-family: "Afacad", sans-serif; text-align: center;
}
.ooiwo-fav-ventana a, .ooiwo-fav-ventana p, .ooiwo-fav-ventana li, .ooiwo-fav-ventana label { text-transform: none; letter-spacing: normal; }
.ooiwo-fav-cerrar { position: absolute !important; top: 10px; right: 10px; left: auto !important; display: flex !important; align-items: center; justify-content: center; width: 36px !important; height: 36px !important; min-width: 0; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: #f2f4f6 !important; color: #555 !important; font-size: 0 !important; line-height: 0; cursor: pointer; box-shadow: none !important; outline: none !important; }
.ooiwo-fav-cerrar::before { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6L6 18' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6L6 18' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.ooiwo-fav-cerrar:focus-visible { box-shadow: 0 0 0 3px rgba(95, 175, 201, .6) !important; }
.ooiwo-fav-cerrar:hover, .ooiwo-fav-cerrar:active { color: #fff !important; background: #f58d09 !important; }
.ooiwo-fav-cabeza h2 { margin: 6px 0 4px; font-family: "Afacad", sans-serif; font-size: 24px; font-weight: 700; color: #333; text-transform: none; letter-spacing: 0; }
.ooiwo-fav-cabeza-icono { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border: 1.5px dashed #f58d09; border-radius: 50%; color: #f58d09; }
.ooiwo-fav-cabeza-icono .ooiwo-fav-svg { width: 24px; height: 24px; }
.ooiwo-fav-cabeza-icono .ooiwo-fav-svg path { fill: #f58d09; }
.ooiwo-fav-yatienes { margin: 0 0 12px; font-size: 15px; color: #666; }
.ooiwo-fav-yatienes a, .ooiwo-fav-mensaje a, .ooiwo-fav-legal a { color: #5fafc9; text-decoration: underline; }
.ooiwo-fav-texto { margin: 0 0 14px; font-size: 16px; }
.ooiwo-fav-form input[type=email] { width: 100%; height: 46px; padding: 0 14px; border: 1.5px solid #d5d9de; border-radius: 10px; font: 16px "Afacad", sans-serif; box-sizing: border-box; }
.ooiwo-fav-form input[type=email]:focus { border-color: #5fafc9; outline: none; box-shadow: 0 0 0 3px rgba(95, 175, 201, .25); }
.ooiwo-fav-trampa { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.ooiwo-fav-check { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 4px; font-size: 14px; color: #555; text-align: left; cursor: pointer; }
.ooiwo-fav-check input { margin-top: 3px; }
.ooiwo-fav-mensaje { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: #fdecec; color: #b42318; font-size: 14px; text-align: left; }
.ooiwo-fav-boton, a.ooiwo-fav-boton, button.ooiwo-fav-boton {
	display: block; width: 100%; margin: 12px 0 0; padding: 12px 16px !important; border: 0 !important; border-radius: 10px !important;
	background: #f58d09 !important; color: #fff !important; font: 700 17px "Afacad", sans-serif !important; text-align: center; text-decoration: none !important; text-transform: none !important; cursor: pointer; box-shadow: none !important;
}
.ooiwo-fav-boton:hover { background: #e07f00 !important; }
.ooiwo-fav-boton.esta-cargando { opacity: .7; cursor: wait; }
.ooiwo-fav-o { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; color: #888; font-size: 14px; }
.ooiwo-fav-o::before, .ooiwo-fav-o::after { content: ""; flex: 1; height: 1px; background: #e5e5e5; }
.ooiwo-fav-google { display: flex; justify-content: center; margin: 4px 0 0; }
.ooiwo-fav-legal { margin: 14px 0 8px; font-size: 13px; color: #777; line-height: 1.4; }
.ooiwo-fav-ventajas { margin: 6px 0 0; padding: 12px 0 0; border-top: 1px dashed #e5e5e5; list-style: none; text-align: left; font-size: 15px; }
.ooiwo-fav-ventajas li { position: relative; margin: 6px 0; padding-left: 26px; }
.ooiwo-fav-ventajas li::before { content: "✓"; position: absolute; left: 4px; color: #5fafc9; font-weight: 700; }

/* «Añadido a favoritos» */
.ooiwo-fav-ok-icono { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border: 2px solid #3aa76d; border-radius: 50%; color: #3aa76d; font-size: 22px; font-weight: 700; }
.ooiwo-fav-ok-producto img { width: 170px; height: 170px; object-fit: cover; margin: 10px auto 6px; border-radius: 12px; background: #f5f9fb; }
.ooiwo-fav-ok-nombre { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.ooiwo-fav-ok-sub { margin: 14px 0 8px; font-size: 16px; font-weight: 700; }
.ooiwo-fav-ok-lista { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.ooiwo-fav-ok-lista a { display: block; color: #333; text-decoration: none; font-size: 13px; line-height: 1.25; }
.ooiwo-fav-ok-lista img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: #f5f9fb; margin-bottom: 4px; }
.ooiwo-fav-ok-lista span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Aviso pequeño */
.ooiwo-fav-aviso { position: fixed; z-index: 99999; left: 50%; bottom: 90px; transform: translateX(-50%); padding: 10px 16px; border-radius: 999px; background: #333; color: #fff; font: 600 15px "Afacad", sans-serif; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); }

/* ---------- Mi cuenta → Mis favoritos ---------- */
.ooiwo-fav-intro { display: flex; align-items: center; gap: 12px; margin: 0 0 18px !important; padding: 12px 16px; border: 2px dashed #f58d09; border-radius: 14px; background: #fff8ee; color: #1f2a33; font-size: 17px; line-height: 1.3; }
.ooiwo-fav-intro strong { color: #f58d09; font-family: "Londrina Solid", sans-serif; font-size: 26px; font-weight: 400; }
.ooiwo-fav-intro em { display: block; color: #6b7680; font-size: 14px; font-style: normal; }
.ooiwo-fav-intro-ico { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.1); }
.ooiwo-fav-intro-ico .ooiwo-fav-svg { width: 22px; height: 22px; fill: #e0245e; }
.ooiwo-fav-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.ooiwo-fav-tarjeta { position: relative; display: flex; flex-direction: column; overflow: visible; border-radius: 20px; background: #f7f5f4; border: .8px solid #dadada; text-align: center; transition: opacity .2s; }
.ooiwo-fav-tarjeta.se-va { opacity: .4; pointer-events: none; }
.ooiwo-fav-foto { display: block; }
.ooiwo-fav-foto img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 17px; background: #f5f9fb; }
.ooiwo-fav-datos { display: flex; flex: 1; flex-direction: column; align-items: center; gap: 0; padding: 0 10px 12px; }
.ooiwo-fav-nombre { color: #54595f !important; font-family: "Afacad", sans-serif; font-size: 19px; font-weight: 700; line-height: 21px; text-transform: uppercase; text-align: center; padding: 9.5px 0; text-decoration: none !important; }
.ooiwo-fav-precio, .ooiwo-fav-precio .woocommerce-Price-amount { margin-top: auto; color: #f58d09; font-family: "Londrina Solid", sans-serif; font-size: 33px; font-weight: 400; letter-spacing: .6px; line-height: 1.1; text-transform: uppercase; text-align: center; }
.ooiwo-fav-accion { margin-top: auto; padding: 9px 12px; border-radius: 9px; background: #5fafc9; color: #fff !important; font-weight: 700; text-align: center; text-decoration: none !important; }
.ooiwo-fav-accion:hover { background: #4b9cb6; }
.ooiwo-fav-accion.added::after { content: " ✓"; }
.ooiwo-fav-quitar { position: absolute !important; z-index: 2; top: 8px; right: 8px; left: auto !important; width: 34px !important; height: 34px !important; min-width: 0; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: rgba(255, 255, 255, .92) !important; color: #666 !important; box-shadow: 0 2px 6px rgba(0, 0, 0, .15) !important; cursor: pointer; display: flex !important; align-items: center; justify-content: center; line-height: 0; }
.ooiwo-fav-quitar svg { width: 18px; height: 18px; flex: 0 0 auto; }
.ooiwo-fav-quitar:hover { color: #b42318 !important; }
.ooiwo-fav-vacio { padding: 30px 16px; border: 1.5px dashed #f58d09; border-radius: 14px; text-align: center; }
.ooiwo-fav-vacio-icono .ooiwo-fav-svg { width: 40px; height: 40px; margin: 0 auto 8px; }
.ooiwo-fav-vacio-icono .ooiwo-fav-svg path { fill: none; stroke: #f58d09; stroke-width: 1.6; }
.ooiwo-fav-vacio .ooiwo-fav-boton { display: inline-block; width: auto; }

@media (max-width: 767px) {
	.ooiwo-fav-corazon { top: 6px; right: 6px; width: 32px !important; height: 32px !important; }
	.ooiwo-fav-svg { width: 17px; height: 17px; }
	.ooiwo-fav-ficha { top: 10px; right: 10px; width: 38px !important; height: 38px !important; }
	.ooiwo-fav-con-lupa .ooiwo-fav-ficha { right: 10px !important; }
	/* La lupa baja a la esquina inferior derecha para no solaparse con el corazón. */
	.ooiwo-fav-con-lupa .flex-viewport { position: relative !important; }
	.ooiwo-fav-con-lupa .woocommerce-product-gallery__trigger { top: auto !important; bottom: 10px !important; right: 10px !important; }
	.elementor-widget-woocommerce-menu-cart > .ooiwo-fav-cab-wrap { margin-right: 8px; }
	.ooiwo-fav-cabecera { width: 40px; height: 40px; }
	.ooiwo-fav-ventana { padding: 22px 16px 18px; }
	.ooiwo-fav-cabeza h2 { font-size: 21px; }
	.ooiwo-fav-ok-producto img { width: 130px; height: 130px; }
	.ooiwo-fav-rejilla { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.ooiwo-fav-datos { padding: 9px; }
	.ooiwo-fav-precio { font-size: 15px; }
}
