/*
 * Anclajes Powers — fotos de las tarjetas de categorías (portada).
 * Lo carga mu-plugins/ap-categorias-fotos.php. Solo afecta tarjetas que tienen foto.
 */

/* Foto a color, entera, sin el lavado gris del tema */
.ap-cat__img {
	opacity: 1 !important;
	filter: none !important;
	object-fit: cover;
	object-position: center;
	transform: scale(1.02);
}

.ap-cat__link:hover .ap-cat__img,
.ap-cat__link:focus-visible .ap-cat__img {
	opacity: 1 !important;
	filter: none !important;
	transform: scale(1.07);
}

/* Tarjeta con foto: fondo oscuro mientras carga y velo negro abajo */
.ap-cat__link:has(.ap-cat__img) {
	background: #111 !important;
	border-color: transparent !important;
}

.ap-cat__link:has(.ap-cat__img):hover,
.ap-cat__link:has(.ap-cat__img):focus-visible {
	border-color: var(--color-detalle, #db011c) !important;
}

.ap-cat__link:has(.ap-cat__img) .ap-cat__body {
	padding-top: 56px;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 38%, rgba(0, 0, 0, 0.85) 100%) !important;
}

/* Letras blancas sobre la foto; número y "N productos" se mantienen legibles */
.ap-cat__link:has(.ap-cat__img) .ap-cat__name {
	color: #fff !important;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.ap-cat__link:has(.ap-cat__img) .ap-cat__desc,
.ap-cat__link:has(.ap-cat__img) .ap-cat__count {
	color: rgba(255, 255, 255, 0.85) !important;
}

.ap-cat__link:has(.ap-cat__img) .ap-cat__index {
	color: #ff4d61 !important;
}

/* Flecha: cuadrito blanco que se pone rojo al pasar el mouse */
.ap-cat__link:has(.ap-cat__img) .ap-cat__arrow {
	border-color: transparent !important;
	background: #fff !important;
	color: #111 !important;
}

.ap-cat__link:has(.ap-cat__img):hover .ap-cat__arrow,
.ap-cat__link:has(.ap-cat__img):focus-visible .ap-cat__arrow {
	background: var(--color-detalle, #db011c) !important;
	color: #fff !important;
}
