/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* Homepage HOT PRODUCTS: 4 equal product cards per row on desktop */
@media (min-width: 1200px) {
	.stk-93f1c3b .stk--block-horizontal-flex {
		display: flex !important;
		flex-wrap: wrap !important;
		column-gap: 20px !important;
		row-gap: 24px !important;
		align-items: stretch !important;
	}
	.stk-93f1c3b .stk--block-horizontal-flex > .stk-block-image {
		flex: 1 1 calc(25% - 15px) !important;
		width: calc(25% - 15px) !important;
		max-width: calc(25% - 15px) !important;
	}
	.stk-93f1c3b .stk-block-image figure,
	.stk-93f1c3b .stk-block-image .stk-img-wrapper {
		width: 100% !important;
	}
}

/* ===== PRODUCTS page: category sidebar nav, HOT PRODUCTS tab style ===== */
#sidebar .wc-block-product-categories-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 8px !important;
}
#sidebar .wc-block-product-categories-list-item {
	margin: 0 !important;
}
/* Flyout submenu: opens to the right of the parent on hover, like the main top menu */
#sidebar .wc-block-product-categories-list--depth-1 {
	position: absolute;
	left: calc(100% + 10px);
	top: 0;
	min-width: 210px;
	background: #ffffff;
	border: 1px solid #ececec;
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
	padding: 8px !important;
	gap: 6px !important;
	z-index: 60;
}
#sidebar .wc-block-product-categories-list--depth-1 .wc-block-product-categories-list-item a {
	padding: 9px 12px !important;
	font-size: 12px !important;
}
/* Flyout submenu hidden until hover / + toggled */
#sidebar .wc-block-product-categories-list-item {
	position: relative;
}
#sidebar .wc-block-product-categories-list--depth-0 > li > a {
	padding-right: 38px !important;
}
#sidebar .wc-block-product-categories-list-item > .wc-block-product-categories-list--depth-1 {
	display: none !important;
}
#sidebar .wc-block-product-categories-list-item.cat-parent:hover > .wc-block-product-categories-list--depth-1 {
	display: flex !important;
	flex-direction: column !important;
}
/* Dropdown child rows: plain text, no hamburger icon */
#sidebar .wc-block-product-categories-list--depth-1 .wc-block-product-categories-list-item a::before {
	content: none;
	width: 0;
}
#sidebar .wc-block-product-categories-list--depth-1 .wc-block-product-categories-list-item a {
	gap: 0 !important;
	font-weight: 500 !important;
}
#sidebar .sidebar-cat-arrow {
	position: absolute;
	right: 12px;
	top: 50%;
	width: 8px;
	height: 8px;
	fill: currentColor;
	transform: translateY(-50%) rotate(-90deg);
	pointer-events: none;
	z-index: 1;
}
#sidebar .wc-block-product-categories-list-item a {
	display: flex !important;
	align-items: center !important;
	gap: 10px !important;
	padding: 11px 14px !important;
	border-radius: 4px !important;
	color: #111518 !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	letter-spacing: 0.02em !important;
	text-transform: uppercase !important;
	text-decoration: none !important;
	background: transparent !important;
	line-height: 1.25 !important;
	transition: background 0.15s ease;
}
#sidebar .wc-block-product-categories-list-item a::before {
	content: "";
	flex: 0 0 16px;
	width: 16px;
	height: 12px;
	background-image:
		linear-gradient(currentColor, currentColor),
		linear-gradient(currentColor, currentColor),
		linear-gradient(currentColor, currentColor);
	background-size: 16px 2px, 16px 2px, 16px 2px;
	background-position: 0 0, 0 5px, 0 10px;
	background-repeat: no-repeat;
}
#sidebar .wc-block-product-categories-list-item a:hover {
	background: #eeeeee !important;
}
/* Hide the widget heading to match the HOT PRODUCTS left tab column */
#sidebar .stk-block-subtitle {
	display: none !important;
}
/* Active / current category: light gray background, dark text (no black fill) */
body.term-basin-faucets #sidebar a[href*="/basin-faucets/"],
body.term-basin-faucet-cold-only #sidebar a[href*="/basin-faucet-cold-only/"],
body.term-rbf #sidebar a[href*="/rbf/"],
body.term-acce #sidebar a[href*="/acce/"],
body.term-cold-faucet-series #sidebar a[href*="/cold-faucet-series/"],
body.term-featured-products #sidebar a[href*="/featured-products/"],
body.term-kitchen-faucets #sidebar a[href*="/kitchen-faucets/"],
body.term-kitchen-faucet #sidebar a[href*="/kitchen-faucet/"],
body.term-rkf #sidebar a[href*="/rkf/"],
body.term-kitchen-purifier-faucet #sidebar a[href*="/kitchen-purifier-faucet/"],
body.term-sbf #sidebar a[href*="/sbf/"],
body.term-shower-sets #sidebar a[href*="/shower-sets/"] {
	background: #f2f2f2 !important;
	color: #111518 !important;
}

/* Hide leftover empty categories that should not appear in the nav */
#sidebar .wc-block-product-categories-list-item:has(a[href*="/uncategorized/"]),
#sidebar .wc-block-product-categories-list-item:has(a[href*="/cold-faucet-series/"]),
#sidebar .wc-block-product-categories-list-item:has(a[href*="/faucet-serieshotcold/"]) {
	display: none !important;
}

/* Sidebar category order per requested sequence (top level; children nest under parent) */
#sidebar .wc-block-product-categories-list-item:has(a[href*="/featured-products/"]) { order: 1; }
#sidebar .wc-block-product-categories-list-item:has(a[href*="/basin-faucets/"]) { order: 2; }
#sidebar .wc-block-product-categories-list-item:has(a[href*="/kitchen-faucets/"]) { order: 3; }
#sidebar .wc-block-product-categories-list-item:has(a[href*="/kitchen-purifier-faucet/"]) { order: 4; }
#sidebar .wc-block-product-categories-list-item:has(a[href*="/sbf/"]) { order: 5; }
#sidebar .wc-block-product-categories-list-item:has(a[href*="/shower-sets/"]) { order: 6; }
#sidebar .wc-block-product-categories-list-item:has(a[href*="/acce/"]) { order: 7; }

/* Main top menu and its dropdown: uppercase labels */
.menu-container .ct-menu-link {
	text-transform: uppercase !important;
}
