/**
 * Los listados de producto.
 *
 * POR QUE ES CSS GLOBAL Y NO UN AJUSTE DE ELEMENTOR
 * ------------------------------------------------
 * Las categorías no usan la misma plantilla: «Coronas Funebres Premium»
 * se dibuja con la 1717 y «Pies de Caja Funebres» con la 2627. Por eso
 * unas fichas salían con las esquinas redondeadas y otras cuadradas.
 *
 * Arreglarlo plantilla por plantilla sería arreglarlo hasta la próxima
 * que alguien duplique. Con una regla global da igual con qué plantilla
 * se pinte cada categoría: todas se ven igual.
 */

/* ---- La imagen ---- */

.woocommerce ul.products li.product img,
.elementor-wc-products ul.products li.product img,
ul.products li.product a img {
	border-radius: 12px !important;
	display: block;
}

/* Las etiquetas de oferta tienen que respetar la curva. */
.woocommerce ul.products li.product .onsale,
.elementor-wc-products ul.products li.product .onsale {
	border-radius: 999px !important;
	top: 12px !important;
	left: 12px !important;
	right: auto !important;
	margin: 0 !important;
	padding: 5px 13px !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	letter-spacing: .06em;
	text-transform: uppercase;
	line-height: 1.3 !important;
	min-height: 0 !important;
	min-width: 0 !important;
}

/* ---- El botón de WhatsApp ---- */

.fs-tie-wa {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin: 8px 0 0 !important;
	padding: 11px 16px;
	border: 1px solid #CFE3D5;
	border-radius: 999px;
	background: #fff;
	color: #204E36 !important;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none !important;
	transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.fs-tie-wa:hover,
.fs-tie-wa:focus-visible {
	background: #25D366;
	border-color: #25D366;
	color: #0B3D23 !important;
}

.fs-tie-wa svg {
	flex: 0 0 16px;
}

/* En el listado, el botón de comprar y el de WhatsApp van apilados y del
   mismo ancho: dos opciones al mismo nivel, no una principal y un enlace
   perdido debajo. */
.woocommerce ul.products li.product .button,
.elementor-wc-products ul.products li.product .button {
	display: block;
	width: 100%;
	text-align: center;
}

/* WooCommerce cuelga un «Ver carrito» detrás de cada botón AJAX. Con el
   carrito lateral abriéndose solo, ahí sobra. */
.woocommerce ul.products li.product a.added_to_cart {
	display: none !important;
}

@media (max-width: 480px) {
	.fs-tie-wa {
		font-size: 13px;
		padding: 10px 12px;
	}
}

/* =================================================================
 * LA BARRA DE FILTRO
 * ============================================================== */

.fs-tie-filtro {
	display: flex;
	align-items: flex-end;
	gap: 28px;
	flex-wrap: wrap;
	margin: 0 0 14px;
	padding: 20px 24px;
	border: 1px solid #E4E4DF;
	border-radius: 14px;
	background: #FAF9F6;
}

.fs-tie-filtro__precio {
	flex: 1 1 320px;
	min-width: 240px;
}

.fs-tie-filtro__orden {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 10px;
}

.fs-tie-filtro__rotulo {
	display: block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #8A8A8A;
	margin: 0 0 6px;
}

.fs-tie-filtro__orden .fs-tie-filtro__rotulo {
	margin: 0;
	white-space: nowrap;
}

.fs-tie-filtro__valor {
	display: block;
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 19px;
	color: #0D281A;
	margin: 0 0 10px;
	text-align: right;
}

.fs-tie-filtro__select {
	border: 1px solid #E4E4DF !important;
	border-radius: 10px !important;
	background: #fff !important;
	padding: 11px 14px !important;
	font-size: 14px !important;
	color: #0D281A !important;
	min-width: 200px;
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23204E36' stroke-width='1.8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 14px center !important;
	padding-right: 36px !important;
}

/* ---- El deslizador de dos extremos ---- */

.fs-tie-rango {
	position: relative;
	height: 22px;
}

.fs-tie-rango__via {
	position: absolute;
	top: 9px;
	left: 0;
	right: 0;
	height: 4px;
	border-radius: 999px;
	background: #DFDFD8;
}

.fs-tie-rango__activo {
	position: absolute;
	top: 0;
	height: 100%;
	border-radius: 999px;
	background: #204E36;
}

.fs-tie-rango input[type="range"] {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 22px;
	margin: 0;
	background: none !important;
	border: 0 !important;
	padding: 0 !important;
	-webkit-appearance: none;
	appearance: none;
	/* La vía no debe capturar el ratón: solo los tiradores. */
	pointer-events: none;
}

.fs-tie-rango input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	pointer-events: auto;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #204E36;
	box-shadow: 0 1px 4px rgba(13, 40, 26, .25);
	cursor: grab;
}

.fs-tie-rango input[type="range"]::-moz-range-thumb {
	pointer-events: auto;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #204E36;
	box-shadow: 0 1px 4px rgba(13, 40, 26, .25);
	cursor: grab;
}

.fs-tie-rango input[type="range"]::-moz-range-track {
	background: none;
}

.fs-tie-filtro__topes {
	display: flex;
	justify-content: space-between;
	margin-top: 6px;
	font-size: 12px;
	color: #9A9A92;
}

.fs-tie-filtro__topes .amount {
	font-size: 12px;
}

.fs-tie-filtro__aplicar {
	background: #204E36 !important;
	border: 0 !important;
	border-radius: 999px !important;
	color: #fff !important;
	padding: 12px 24px !important;
	font-size: 14px !important;
}

.fs-tie-cuantas {
	margin: 0 0 22px !important;
	font-size: 13px;
	color: #8A8A8A;
}

.fs-tie-cuantas strong {
	color: #0D281A;
	font-weight: 600;
}

@media (max-width: 720px) {
	.fs-tie-filtro {
		flex-direction: column;
		align-items: stretch;
		gap: 18px;
		padding: 18px;
	}
	.fs-tie-filtro__orden {
		flex-direction: column;
		align-items: stretch;
		gap: 6px;
	}
	.fs-tie-filtro__select { min-width: 0; width: 100%; }
}
