/* VCL Shop UX: cover + filter bar for the four shop families. */

/* Title and breadcrumb live in the cover/bar; keep the page <h1> for accessibility and SEO. */
.vcl-family-archive .woocommerce-products-header,
.vcl-family-archive .ast-woocommerce-container > .woocommerce-breadcrumb {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Astra Addon's own shop toolbar is replaced by the bar below. */
.vcl-family-archive .ast-shop-toolbar-container {
	display: none !important;
}

.vcl-family-archive .site-content > .ast-container {
	padding-top: 0;
}

/* Cover */
.vcl-cat-cover {
	width: 100%;
	background: #111;
}

.vcl-cat-cover img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 560px;
	object-fit: cover;
	object-position: center;
}

.vcl-cat-cover--fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 260px;
	background: linear-gradient(135deg, #151515 0%, #3b3b3b 100%);
}

.vcl-cat-cover__title {
	color: #fff;
	font-size: clamp(28px, 5vw, 56px);
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-shadow: 0 2px 14px rgba(0, 0, 0, .5);
}

/* Breadcrumb above the cover is a mobile-only element */
.vcl-cat-breadcrumb {
	display: none;
}

/* Bar */
.vcl-shop-bar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 16px 16px;
	margin: 0 0 24px;
	padding: 18px 0 0;
}

.vcl-family-archive:not(.vcl-family-has-gender) .vcl-shop-bar {
	grid-template-columns: minmax(0, 1fr) auto;
}

/* Tabs: active = black + underline, others light grey. Labels are never truncated. */
.vcl-cat-tabs {
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.vcl-cat-tabs::-webkit-scrollbar {
	display: none;
}

.vcl-cat-tabs ul {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vcl-cat-tabs li {
	flex: 0 0 auto;
	margin: 0;
}

.vcl-cat-tabs a {
	display: inline-block;
	padding: 4px 0;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .04em;
	line-height: 1.4;
	text-transform: uppercase;
	white-space: nowrap;
	color: #a3a3a3;
	text-decoration: none;
	border-bottom: 2px solid transparent;
}

.vcl-cat-tabs a:hover,
.vcl-cat-tabs a:focus-visible {
	color: #555;
}

.vcl-cat-tabs li.is-active a {
	color: #000;
	border-bottom-color: #000;
}

/* Gender toggle: black fill = selected */
.vcl-gender {
	display: inline-flex;
	border: 1px solid #000;
	border-radius: 3px;
	overflow: hidden;
}

.vcl-gender__btn {
	display: inline-block;
	min-width: 64px;
	padding: 5px 16px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	line-height: 1.4;
	text-align: center;
	color: #000;
	background: #fff;
	text-decoration: none;
}

.vcl-gender__btn.is-active {
	color: #fff;
	background: #000;
}

.vcl-gender__btn:not(.is-active):hover {
	background: #f2f2f2;
}

/* Sort dropdown: full text visible */
.vcl-shop-tools {
	display: flex;
	align-items: center;
	gap: 16px;
}

.vcl-shop-count {
	display: none;
}

.vcl-shop-tools .woocommerce-ordering {
	margin: 0;
}

.vcl-shop-tools .woocommerce-ordering select {
	width: auto;
	min-width: 250px;
	max-width: none;
	padding: 5px 28px 5px 10px;
	font-size: 12px;
	line-height: 1.4;
	text-overflow: clip;
	white-space: nowrap;
	border: 1px dotted #777;
	border-radius: 0;
	background-color: #fff;
}

.vcl-shop-tools .woocommerce-result-count {
	margin: 0;
	font-size: 12px;
	color: #666;
}

/* Mobile: breadcrumb, cover, scrollable tabs, full-width toggle, count + sort */
@media (max-width: 767px) {
	.vcl-cat-breadcrumb {
		display: block;
		padding: 12px 16px;
		font-size: 12px;
		color: #666;
	}

	.vcl-cat-breadcrumb .woocommerce-breadcrumb {
		margin: 0;
		font-size: 12px;
	}

	.vcl-cat-cover img {
		max-height: 200px;
	}

	.vcl-cat-cover--fallback {
		min-height: 140px;
	}

	.vcl-shop-bar,
	.vcl-family-archive:not(.vcl-family-has-gender) .vcl-shop-bar {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
		padding-top: 14px;
	}

	.vcl-gender {
		display: flex;
		width: 100%;
	}

	.vcl-gender__btn {
		flex: 1 1 50%;
		padding: 8px 12px;
	}

	.vcl-shop-tools {
		justify-content: space-between;
	}

	.vcl-shop-count {
		display: block;
	}

	.vcl-shop-tools .woocommerce-ordering select {
		min-width: 0;
	}
}

/* Cover có chữ phủ lên ảnh (Sản Phẩm Custom): ảnh không có chữ sẵn như banner Áo Da */
.vcl-cat-cover picture { display: block; }
.vcl-cat-cover--overlay { position: relative; }
.vcl-cat-cover--overlay::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.45) 100%); pointer-events: none; }
.vcl-cat-cover--overlay .vcl-cat-cover__title { position: absolute; z-index: 2; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; color: rgba(255,255,255,.9); }
