/* ============================================================================================
	WIDGET AB PROPERTY GALLERY / PATTERN
	WooCommerce 風ギャラリービューア (AB ORBIT / AB HOME / AB CUBE 共通):
	  - メイン表示エリア (固定比率 + ブラー背景フィル + object-fit: contain)
	  - サムネイル列 (正方形 + object-fit: cover)
============================================================================================ */
.matsunaga-ab-property-gallery {
	width: 100%;
	margin: 0 auto;
}

/* ---- メイン表示エリア ---- */
.matsunaga-ab-property-gallery-main {
	position: relative;
	width: 100%;
	height: 60lvh;
	overflow: hidden;
	border-radius: 4px;
	background-color: #1a1a1a;
}

/* ブラー背景フィル (画像の余白を埋める) */
.matsunaga-ab-property-gallery-main::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image: var(--bg-image);
	background-position: center center;
	background-size: cover;
	background-repeat: no-repeat;
	filter: blur(36px) brightness(.85) saturate(.9);
	transform: scale(1.15);
	z-index: 0;
	transition: .25s ease;
}

.matsunaga-ab-property-gallery-main-img {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	display: block;
	cursor: default;
	pointer-events: none;
	transition: .25s ease;
}

.matsunaga-ab-property-gallery.is-swapping .matsunaga-ab-property-gallery-main-img {
	opacity: 0;
}

.matsunaga-ab-property-single-title {
	text-align: center
}

/* ---- サムネイル列 ---- */
.matsunaga-ab-property-gallery-thumbs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
	gap: 8px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.matsunaga-ab-property-gallery-thumb {
	position: relative;
	margin: 0;
	padding: 0;
}

.matsunaga-ab-property-gallery-thumb-button {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16/9;
	padding: 0;
	margin: 0;
	border: 2px solid transparent;
	border-radius: 3px;
	background: none;
	cursor: pointer;
	overflow: hidden;
	transition: border-color .2s ease, opacity .2s ease, transform .2s ease;
}

.matsunaga-ab-property-gallery-thumb-button:hover {
	transform: translateY(-1px);
}

.matsunaga-ab-property-gallery-thumb-button:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent, #333);
	outline-offset: 2px;
}

.matsunaga-ab-property-gallery-thumb.is-active .matsunaga-ab-property-gallery-thumb-button {
	border-color: var(--wp--preset--color--accent, #333);
}

.matsunaga-ab-property-gallery-thumb-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover
}

.matsunaga-ab-property-gallery-thumb-button:hover .matsunaga-ab-property-gallery-thumb-img,
.matsunaga-ab-property-gallery-thumb.is-active .matsunaga-ab-property-gallery-thumb-img {
	opacity: 1;
}

/* ---- レスポンシブ調整 ---- */
@media (min-width: 768px) {
	.matsunaga-ab-property-gallery-thumbs {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 10px;
	}
}


