
/* G6M_XFMG_FIX_V541 — gallery FR/visual fixes (bust xfmg541_75886) */
/* Do NOT let shop .itemList rules restyle XFMG */
html body[data-template*="xfmg_"] .itemList,
html body.template-xfmg_media_index .itemList,
html body.template-xfmg_category_view .itemList,
html body.template-xfmg_album_view .itemList {
	display: flex !important;
	flex-wrap: wrap !important;
	grid-template-columns: unset !important;
	gap: 0.85rem !important;
	padding: 0.75rem !important;
	align-items: stretch !important;
}

html body[data-template*="xfmg_"] .itemList-item,
html body.template-xfmg_media_index .itemList-item,
html body.template-xfmg_category_view .itemList-item,
html body.template-xfmg_album_view .itemList-item {
	background: rgba(18, 14, 28, 0.92) !important;
	border: 1px solid rgba(155, 77, 255, 0.35) !important;
	border-radius: 14px !important;
	overflow: hidden !important;
	transform: none !important;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35) !important;
}

html body[data-template*="xfmg_"] .itemList-item:hover {
	transform: translateY(-3px) !important;
	border-color: rgba(255, 45, 149, 0.55) !important;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 20px rgba(155, 77, 255, 0.2) !important;
}

/* Titles / meta under thumbs — force readable text (no transparent gradient bleed) */
html body[data-template*="xfmg_"] .itemList-itemOverlay,
html body[data-template*="xfmg_"] .itemInfoRow,
html body[data-template*="xfmg_"] .itemInfoRow-title,
html body[data-template*="xfmg_"] .itemInfoRow-title a,
html body[data-template*="xfmg_"] .structItem-title,
html body[data-template*="xfmg_"] .structItem-title a {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	color: #f3eaff !important;
	-webkit-text-fill-color: #f3eaff !important;
	background: none !important;
	-webkit-background-clip: initial !important;
	background-clip: initial !important;
	font-size: 0.92rem !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	text-shadow: none !important;
	filter: none !important;
	white-space: normal !important;
	overflow: visible !important;
	text-overflow: unset !important;
	height: auto !important;
	max-height: none !important;
	min-height: 0 !important;
}

html body[data-template*="xfmg_"] .itemList-itemOverlay {
	position: relative !important;
	inset: auto !important;
	padding: 0.65rem 0.75rem 0.8rem !important;
	background: linear-gradient(180deg, rgba(12, 8, 20, 0.2), rgba(12, 8, 20, 0.92)) !important;
}

html body[data-template*="xfmg_"] .itemList-itemOverlay .pairs,
html body[data-template*="xfmg_"] .itemList-itemOverlay .listInline,
html body[data-template*="xfmg_"] .itemList-itemOverlay .contentRow-minor,
html body[data-template*="xfmg_"] .itemList-itemOverlay time,
html body[data-template*="xfmg_"] .itemList-itemOverlay .username,
html body[data-template*="xfmg_"] .itemList-itemOverlay a {
	color: rgba(220, 210, 245, 0.88) !important;
	-webkit-text-fill-color: rgba(220, 210, 245, 0.88) !important;
	font-size: 0.78rem !important;
	visibility: visible !important;
	opacity: 1 !important;
}

html body[data-template*="xfmg_"] .itemList-item--placeholder {
	display: none !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	min-height: 0 !important;
	height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
}

/* Page action button readable (Add media) */
html body[data-template*="xfmg_"] .p-title-pageAction .button,
html body[data-template*="xfmg_"] .p-title-pageAction .button--primary {
	font-size: 0.92rem !important;
	letter-spacing: 0.02em !important;
	padding: 0.55rem 1.1rem !important;
	white-space: nowrap !important;
	overflow: visible !important;
	max-width: none !important;
}
