/* ==========================================================================
   Kỹ thuật "phá khung" để tràn 100% màn hình dù theme (Flatsome) có container
   giới hạn width. Không đụng tới header/footer, chỉ áp dụng cho khối content
   chứa shortcode / template chi tiết bộ sưu tập.
   ========================================================================== */
.cg-fullwidth {
	position: relative;
	left: 50%;
	right: 50%;
	width: 100vw;
	margin-left: -50vw;
	margin-right: -50vw;
	max-width: 100vw;
	box-sizing: border-box;
}

/* ============================
   DANH SÁCH BỘ SƯU TẬP (SLIDER)
   ============================ */
.cg-collection-wrap {
	position: relative;
	overflow: hidden;
}

.cg-collection-slider {
	display: flex;
	width: 100%;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.cg-collection-slider::-webkit-scrollbar {
	display: none;
}

.cg-collection-wrap:not(.is-slider) .cg-collection-slider {
	overflow: hidden;
}

.cg-collection-item {
	flex: 0 0 33.3333%;
	scroll-snap-align: start;
	position: relative;
	box-sizing: border-box;
}

.cg-collection-link {
	display: flex;
	align-items: center; /* chữ nằm giữa theo chiều dọc, đổi lại "flex-end" nếu muốn về đáy */
	justify-content: center;
	position: relative;
	height: 90vh;
	min-height: 420px;
	background-size: cover;
	background-position: center top;
	background-repeat: no-repeat;
	text-decoration: none;
}

.cg-collection-link.cg-no-image {
	background-color: #e5e5e5;
}

.cg-collection-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.10);
	pointer-events: none;
}

.cg-collection-title {
	position: relative;
	z-index: 2;
	color: #fff;
	font-size: 18px;
	letter-spacing: 2px;
	text-transform: uppercase;
	font-weight: 500;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.cg-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	color: #111;
	font-size: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s ease;
	background: rgb(255 255 255 / 0%);
}

.cg-arrow:hover {
	background: rgb(255 255 255 / 0%);
}
.cg-arrow span {
	    font-size: 50px;
    font-weight: 100;
}

.cg-arrow-prev {
	left: 20px;
}

.cg-arrow-next {
	right: 20px;
}

/* ============================
   TRANG CHI TIẾT BỘ SƯU TẬP
   ============================ */
.cg-detail-header {
	text-align: center;
	padding: 40px 20px 20px;
}

.cg-detail-title {
	font-size: 20px;
	letter-spacing: 3px;
	text-transform: uppercase;
	font-weight: 600;
	margin: 0;
}

.cg-detail-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
}

.cg-detail-grid img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

.cg-detail-grid .cg-detail-cell {
	position: relative;
	overflow: hidden;
	aspect-ratio: 3 / 4;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 992px) {
	.cg-collection-item {
		flex: 0 0 50%;
	}
	.cg-detail-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 600px) {
	.cg-collection-item {
		flex: 0 0 85%;
	}
	.cg-collection-link {
		height: 60vh;
	}
	.cg-detail-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
