/* =========================================================================
 * X3SALES DV Shop — element vhm_thm_shop
 * Khối "Không gian xưởng": cụm tiêu đề + SLIDER ảnh fade tự chạy (prev/next).
 * Bản gốc dùng height px cố định; ở đây khung slider dùng aspect-ratio để co
 * giãn theo bề rộng. Màu/tỉ lệ đổ qua --thm-shop-* trên thẻ gốc.
 * Scope dưới .thm-shop → không ảnh hưởng phần còn lại của site.
 * ========================================================================= */

@font-face {
	font-family: "THM Megante";
	src: url("https://w.ladicdn.com/5dadc2a03bf9ab4ea2cc8ccb/svn-megante-20231018093528-hgdbo.otf");
	font-display: swap;
}

.thm-shop,
.thm-shop * {
	box-sizing: border-box;
}

.thm-shop {
	position: relative;
	width: 100%;
	padding: 36px 15px 48px;
	background-color: var(--thm-shop-bg, #f1f3f4);
	overflow: hidden;
}

.thm-shop__inner {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
}

/* -------- Tiêu đề -------- */
.thm-shop__head {
	position: relative;
	margin-bottom: 28px;
	text-align: center;
}

.thm-shop__title {
	margin: 0;
	font-family: "THM Megante", Arial, sans-serif;
	font-weight: bold;
	font-size: 30px;
	line-height: 1.6;
	color: var(--thm-shop-accent, #264b9c);
	text-transform: uppercase;
	animation: thmFadeInDown 1s ease 0s 1;
}

.thm-shop__bracket {
	display: block;
	width: 121px;
	height: 2px;
	margin: 6px auto 0;
	background-color: var(--thm-shop-accent, #264b9c);
}

/* -------- Slider -------- */
.thm-shop__gallery {
	position: relative;
	width: 100%;
	aspect-ratio: var(--thm-shop-ratio, 2.2);
	overflow: hidden;
}

.thm-shop__slider {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.thm-shop__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	transition: opacity 500ms ease-in-out;
}

.thm-shop__slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
}

.thm-shop__arrow {
	position: absolute;
	top: calc(50% - 16.5px);
	z-index: 5;
	width: 33px;
	height: 33px;
	padding: 0;
	border: 0;
	background-color: transparent;
	background-repeat: no-repeat;
	background-position: center center;
	background-image: url("data:image/svg+xml;utf8,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='%23000'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.00015 0.585938L18.4144 12.0002L7.00015 23.4144L5.58594 22.0002L15.5859 12.0002L5.58594 2.00015L7.00015 0.585938Z'%3E%3C/path%3E%3C/svg%3E");
	cursor: pointer;
}

.thm-shop__arrow--prev {
	left: 5px;
	transform: rotateY(180deg);
}

.thm-shop__arrow--next {
	right: 5px;
}

@keyframes thmFadeInDown {
	0% { opacity: 0; transform: translateY(-20px); }
	100% { opacity: 1; transform: translateY(0); }
}

/* -------- Mobile (< 768px) -------- */
@media (max-width: 767px) {
	.thm-shop {
		padding: 24px 12px 32px;
	}

	.thm-shop__head {
		margin-bottom: 20px;
	}

	.thm-shop__title {
		font-size: 25px;
	}

	.thm-shop__bracket {
		width: 63px;
	}

	.thm-shop__slide {
		transition: opacity 300ms ease-in-out;
	}
}

/* -------------------------------------------------------------------------
 * Chế độ UX Builder ("chip viền builder"): các ảnh hiện thành chip CÓ VIỀN
 * (thumbnail) để người dùng dễ nhìn/kéo-thả/sửa. Frontend giữ slider thật.
 * ---------------------------------------------------------------------- */
.thm-shop__builder-items {
	width: 100%;
}

.thm-shop__builder-note {
	margin: 0 0 12px;
	color: #555;
	font-size: 13px;
	font-style: italic;
	text-align: center;
}

.thm-shop__builder-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}

.thm-shop__b-item {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	width: 150px;
	padding: 8px;
	border: 1px dashed rgba(0, 0, 0, 0.35);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.6);
}

.thm-shop__b-tag {
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--fs-color-primary, #264b9c);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
}

.thm-shop__b-thumb {
	width: 100%;
	height: 84px;
	border-radius: 4px;
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;
}

.thm-shop__b-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 84px;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.06);
	color: #888;
	font-size: 12px;
	text-align: center;
}
