/* Breadcrumbs */
.wcato-category .woocommerce-breadcrumb {
	display: block;
	text-align: center;
	margin-bottom: 10px;
	font-size: 14px;
	color: #666;
}
.wcato-product-table-wrap, .wcato-tag-filter{
	width: 100%;
	overflow-x: auto !important;
	overflow-y: hidden !important;
}
.wcato-category .woocommerce-breadcrumb a {
	color: #b91c1c;
	text-decoration: none;
	transition: color 0.2s ease;
}

.wcato-category .woocommerce-breadcrumb a:hover {
	color: #991b1b;
	text-decoration: underline;
}

/* Page title */
.wcato-category h1 {
	text-align: center;
	font-size: 2.8rem;
	font-weight: 800;
	color: #111;
	margin: 0 0 24px;
	line-height: 1.15;
}

/* Divider below title */
.wcato-title-divider {
	border: none;
	border-top: 1px solid #e5e7eb;
	margin: 0 0 40px;
}

/* =========================================
Category Hero Section
========================================= */
.wcato-hero {
	display: flex;
	align-items: stretch;
	margin-bottom: 48px;
	position: relative;
	gap: 80px;
}

.wcato-hero-image {
	flex: 0 0 46%;
	max-width: 46%;
	overflow: hidden;
	line-height: 0;
}

.wcato-hero-image img {
	width: 100%;
	height: 100%;
	min-height: 380px;
	object-fit: cover;
	display: block;
}

.wcato-hero-swatch {
	flex: 0 0 90px;
	width: 90px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	line-height: 0;
	background: #fff;
}

.wcato-hero-swatch img {
	width: 90px;
	height: 220px;
	object-fit: cover;
	display: block;
}

.wcato-hero-description {
	flex: 1;
	border: 1px solid #d1d5db;
	padding: 32px 36px 32px 80px;
	font-size: 14.5px;
	line-height: 1.75;
	color: #333;
	background: #fff;
}

.wcato-hero-description ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wcato-hero-description ul li {
	padding: 6px 0 6px 22px;
	position: relative;
	border-bottom: 1px solid #f0f0f0;
}

.wcato-hero-description ul li:last-child {
	border-bottom: none;
}

.wcato-hero-description ul li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 8px;
	height: 8px;
	background: #1e3a5f;
	border-radius: 1px;
	flex-shrink: 0;
}

.wcato-hero-description p {
	margin: 12px 0 0;
	font-size: 13.5px;
}

.wcato-hero-description p em,
.wcato-hero-description p strong {
	font-style: normal;
}

.wcato-hero-description p:has(strong) {
	color: #b91c1c;
	font-weight: 600;
}

.wcato-hero-description strong {
	font-weight: 700;
}

@media (max-width: 1024px) {
	.wcato-hero-image {
		flex: 0 0 42%;
		max-width: 42%;
	}
	.wcato-hero-image img {
		min-height: 300px;
	}
	.wcato-hero-swatch {
		flex: 0 0 76px;
		width: 76px;
	}
	.wcato-hero-swatch img {
		width: 76px;
		height: 160px;
	}
}

@media (max-width: 768px) {
	.wcato-hero {
		flex-direction: column;
		gap: 0;
	}
	.wcato-hero-image {
		flex: none;
		max-width: 100%;
		width: 100%;
	}
	.wcato-hero-image img {
		min-height: 220px;
		height: 240px;
	}
	.wcato-hero-swatch {
		display: none;
	}
	.wcato-hero-description {
		width: 100%;
		padding: 20px 18px;
	}
}

.wcato-category-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 24px;
}

.wcato-parent-template main#main-content,
.wcato-child-template main#main-content {
	display: block;
}

.wd-products[class*="wd-stretch-cont"] {
	align-items: stretch;
	display: flex;
}

.wcato-category-card {
	cursor: pointer;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease;
}

.wcato-category-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
}

.wcato-category-image img {
	width: 100%;
	height: 280px;
	object-fit: cover;
	display: block;
}

.wcato-category-content {
	padding: 24px 20px;
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.wcato-category-name {
	font-size: 18px;
	font-weight: 700;
	color: #000;
	margin: 0;
	line-height: 1.3;
}

.wcato-assembly-toggle-wrapper {
	display: flex;
	justify-content: flex-end;
}

.wcato-shop-now-btn {
	background: #a12b2b;
	color: #fff;
	border: none;
	padding: 14px 32px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.5px;
	cursor: pointer;
	transition: background 0.2s ease;
	border-radius: 0;
	text-transform: uppercase;
}

.wcato-shop-now-btn:hover {
	background: #8a2424;
}

/* =========================================
Assembly Options Popup
========================================= */
.wcato-assembly-popup {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .55);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	padding: 20px;
}

.wcato-assembly-popup.active {
	display: flex;
}

.wcato-popup-inner {
	background: #fff;
	width: 100%;
	max-width: 740px;
	padding: 36px 40px 40px;
	position: relative;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
	border-radius: 2px;
}

.wcato-popup-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
}

.wcato-popup-title {
	font-size: 2rem;
	font-weight: 800;
	color: #111;
	margin: 0;
	line-height: 1.15;
}

.wcato-popup-close {
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	background: #1e3a5f;
	color: #fff;
	border: none;
	border-radius: 3px;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 2px;
	transition: background 0.2s ease;
	padding: 0;
}

.wcato-popup-close:hover {
	background: #162d4a;
}

.wcato-popup-divider {
	border: none;
	border-top: 1px solid #e5e7eb;
	margin: 0 0 28px;
}

.wcato-popup-body {
	font-size: 17px;
	line-height: 1.65;
	color: #222;
	margin: 0 0 32px;
}

.wcato-popup-actions {
	display: flex;
	gap: 20px;
}

.wcato-assembly-btn {
	flex: 1;
	padding: 18px 12px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	border: none;
	cursor: pointer;
	color: #fff;
	transition: filter 0.2s ease;
	border-radius: 0;
	line-height: 1;
}

.wcato-assembly-btn:hover {
	filter: brightness(0.88);
}

.wcato-assembly-btn--rta {
	background: #1e3a5f;
}

.wcato-assembly-btn--assembled {
	background: #8b1a1a;
}

@media (max-width: 600px) {
	.wcato-popup-inner { padding: 24px 20px 28px; }
	.wcato-popup-title { font-size: 1.5rem; }
	.wcato-popup-body { font-size: 15px; margin-bottom: 24px; }
	.wcato-popup-actions { flex-direction: column; gap: 12px; }
	.wcato-assembly-btn { padding: 16px 12px; }
}

/* Assembly filter CSS */
#wcato-products[data-assembly-filter="assembled-cabinets"] tr.wcato-item[data-assembly-type="rta-cabinets"] { display: none; }
#wcato-products[data-assembly-filter="rta-cabinets"] tr.wcato-item[data-assembly-type="assembled-cabinets"] { display: none; }
#wcato-products[data-assembly-filter="assembled-cabinets"] .wcato-product-group:not(:has(tr.wcato-item[data-assembly-type="assembled-cabinets"])):not(:has(tr.wcato-item[data-assembly-type=""])):not(:has(tr.wcato-item:not([data-assembly-type]))) { display: none; }
#wcato-products[data-assembly-filter="rta-cabinets"] .wcato-product-group:not(:has(tr.wcato-item[data-assembly-type="rta-cabinets"])):not(:has(tr.wcato-item[data-assembly-type=""])):not(:has(tr.wcato-item:not([data-assembly-type]))) { display: none; }

.wcato-hero-swatch {
	position: absolute;
	left: 52%;
	top: 50%;
	transform: translate(-52%, -50%);
}

/* =========================================
Tag Filter
========================================= */
.wcato-tag-filter {
	display: flex;
	align-items: stretch;
	margin-bottom: 28px;
	border: 1px solid #dde3ee;
	overflow: hidden;
	background: #fff;
	max-width: 100%;
}

.wcato-tag-filter--scrollable {
	overflow-x: auto;
	scrollbar-width: thin;
	scrollbar-color: #c0c8d8 transparent;
}

.wcato-tag-filter--scrollable::-webkit-scrollbar { height: 4px; }
.wcato-tag-filter--scrollable::-webkit-scrollbar-thumb { background: #c0c8d8; border-radius: 2px; }

.wcato-tag-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 16px 20px;
	min-width: 120px;
	max-width: 160px;
	flex: 1 0 auto;
	cursor: pointer;
	border-right: 1px solid #dde3ee;
	background: #fff;
	transition: background 0.18s ease, color 0.18s ease;
	position: relative;
	text-align: center;
	user-select: none;
	margin-bottom: 0;
}

.wcato-tag-card:last-child { border-right: none; }

.wcato-tag-card input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.wcato-tag-card-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: #1a1a1a;
	transition: color 0.18s ease;
}

.wcato-tag-card-icon svg { width: 36px; height: 36px; display: block; }
.wcato-tag-card-icon img { width: 36px; height: 36px; object-fit: contain; display: block; }

.wcato-tag-card-name {
	font-size: 13px;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.3;
	transition: color 0.18s ease;
}

.wcato-tag-card:hover { background: #eef1f8; }

.wcato-tag-card:has(input:checked) {
	background: #2a528a;
	border-right-color: #2a528a;
}

.wcato-tag-card:has(input:checked) .wcato-tag-card-icon { color: #fff; }
.wcato-tag-card:has(input:checked) .wcato-tag-card-name { color: #fff; }

.wcato-tag-card:has(input:checked)::after {
	content: '';
	position: absolute;
	bottom: -9px;
	left: 50%;
	transform: translateX(-50%);
	border-left: 9px solid transparent;
	border-right: 9px solid transparent;
	border-top: 9px solid #2a528a;
	z-index: 2;
}

/* =========================================
Product Group
========================================= */
.wcato-product-group {
	margin-bottom: 40px;
	overflow: hidden;
	background: #fff;
}

.wcato-product-group-inner {
	display: flex;
	align-items: flex-start;
	gap: 0;
}

.wcato-product-image {
	flex: 0 0 220px;
	width: 220px;
	border-right: 1px solid #e5e7eb;
	padding: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fafafa;
}

.wcato-product-image img {
	width: 100%;
	max-width: 180px;
	height: auto;
	object-fit: contain;
	display: block;
}

.wcato-product-table-wrap {
	flex: 1;
	overflow-x: auto;
	padding: 20px 24px;
}

.wcato-product-name {
	font-size: 17px;
	font-weight: 700;
	color: #111;
	margin: 0 0 14px;
	line-height: 1.3;
}

/* Product name link */
.wcato-product-name a {
	color: inherit;
	text-decoration: none;
}

.wcato-product-name a:hover {
	color: #b91c1c;
	text-decoration: underline;
	cursor: pointer;
}

/* =========================================
Product Table
========================================= */
.wcato-product-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
	color: #333;
}

.wcato-product-table thead tr {
	background: #f3f4f6;
	border-bottom: 2px solid #d1d5db;
}

.wcato-product-table thead th {
	padding: 10px 12px;
	text-align: left;
	font-weight: 600;
	color: #555;
	white-space: nowrap;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

.wcato-product-table tbody tr {
	border-bottom: 1px solid #e5e7eb;
	transition: background 0.15s ease;
}

.wcato-product-table tbody tr:last-child { border-bottom: none; }
.wcato-product-table tbody tr:hover { background: #f9fafb; }
.wcato-product-table td { padding: 12px 12px; vertical-align: middle; }

.wcato-product-table .col-model { white-space: nowrap; font-weight: 600; color: #111; font-size: 13px; min-width: 90px; }
.wcato-product-table .col-desc { min-width: 200px; line-height: 1.4; }
.wcato-product-table .col-qty { white-space: nowrap; min-width: 110px; }
.wcato-product-table .col-assembly { white-space: nowrap; min-width: 90px; text-align: center; }
.wcato-product-table thead .col-assembly { text-align: center; }
.wcato-product-table .col-price { white-space: nowrap; font-weight: 600; color: #111; min-width: 80px; }
.wcato-product-table .col-stock { text-align: center; min-width: 70px; }
.wcato-product-table thead .col-stock { text-align: center; }
.wcato-product-table .col-action { white-space: nowrap; min-width: 130px; }

/* Qty control */
.wcato-qty-control {
	display: inline-flex;
	align-items: center;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	overflow: hidden;
	height: 34px;
}

.wcato-qty-btn {
	background: #f3f4f6;
	border: none;
	width: 28px;
	height: 34px;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	color: #444;
	flex-shrink: 0;
	transition: background 0.15s;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wcato-qty-btn:hover { background: #e5e7eb; }

.wcato-qty-control .wcato-qty {
	width: 38px;
	height: 34px;
	border: none;
	border-left: 1px solid #d1d5db;
	border-right: 1px solid #d1d5db;
	text-align: center;
	font-size: 13px;
	padding: 0;
	-moz-appearance: textfield;
	outline: none;
	color: #333;
}

.wcato-qty-control .wcato-qty::-webkit-inner-spin-button,
.wcato-qty-control .wcato-qty::-webkit-outer-spin-button { -webkit-appearance: none; }

/* Assembly badge */
.wcato-assembly-badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.3px;
	text-transform: uppercase;
}

.wcato-assembly-assembled-cabinets { background: #dbeafe; color: #1d4ed8; }
.wcato-assembly-rta-cabinets { background: #dcfce7; color: #15803d; }
.wcato-assembly-na { color: #aaa; }

/* Stock icon */
.wcato-stock-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
}

.wcato-stock-icon svg { width: 16px; height: 16px; }
.wcato-in-stock { background: #dcfce7; color: #16a34a; }
.wcato-out-of-stock { background: #fee2e2; color: #dc2626; }

/* Add to Cart */
.wcato-product-table .wcato-add-to-cart.button {
	background: #4b5563;
	color: #fff;
	border: none;
	padding: 8px 14px;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	cursor: pointer;
	border-radius: 4px;
	white-space: nowrap;
	transition: background 0.2s ease;
}

.wcato-product-table .wcato-add-to-cart.button:hover:not(:disabled) { background: #374151; }
.wcato-product-table .wcato-add-to-cart.button:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 768px) {
	.wcato-product-group-inner { flex-direction: column; }
	.wcato-product-image { flex: none; width: 100%; border-right: none; border-bottom: 1px solid #e5e7eb; padding: 16px; }
	.wcato-product-image img { max-width: 140px; margin: 0 auto; }
	.wcato-product-table-wrap { padding: 16px; }
}

/* =========================================
Assembly Toggle Bar
========================================= */
.wcato-assembly-bar {
	display: inline-flex;
	align-items: center;
	margin-bottom: 28px;
	background: #f1f1f1;
	border-radius: 4px;
	overflow: hidden;
	height: 52px;
	font-size: 15px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.wcato-assembly-bar-label {
	background: #1a1a1a;
	color: #fff;
	font-weight: 600;
	font-size: 15px;
	padding: 0 22px 0 20px;
	height: 100%;
	display: flex;
	align-items: center;
	white-space: nowrap;
	clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
	padding-right: 34px;
	letter-spacing: 0.2px;
}

.wcato-assembly-bar-control {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 0 24px;
	height: 100%;
}

.wcato-assembly-bar-control input[type="radio"] { display: none; }

.wcato-bar-option {
	font-size: 15px;
	color: #333;
	font-weight: 500;
	white-space: nowrap;
	user-select: none;
	cursor: pointer;
}

.wcato-ios-toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	flex-shrink: 0;
}

.wcato-ios-checkbox {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.wcato-ios-track {
	display: block;
	width: 52px;
	height: 30px;
	background: #8b1a1a;
	border-radius: 15px;
	position: relative;
	transition: background 0.25s ease;
	flex-shrink: 0;
}

.wcato-ios-thumb {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 24px;
	height: 24px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
	transition: transform 0.25s ease;
}

.wcato-ios-checkbox:checked + .wcato-ios-track { background: #8b1a1a; }
.wcato-ios-checkbox:checked + .wcato-ios-track .wcato-ios-thumb { transform: translateX(22px); }

#rta:checked ~ .wcato-bar-control .wcato-bar-rta,
.wcato-bar-rta:has(~ .wcato-assembly-bar-control #rta:checked) { font-weight: 700; color: #111; }

#assembled:checked ~ .wcato-bar-assembled { font-weight: 700; color: #111; }


/* =========================================
Pagination
========================================= */
.wcato-pagination {
	width: 100%;
}

.wcato-pagination--top {
	margin-bottom: 24px;
}

.wcato-pagination--bottom {
	margin-top: 32px;
}

.wcato-pagination-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 12px 20px;
	flex-wrap: wrap;
}

/* Per-page dropdown */
.wcato-per-page-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.wcato-per-page-label {
	font-size: 13px;
	font-weight: 600;
	color: #555;
	white-space: nowrap;
}

.wcato-per-page-select {
	height: 34px;
	padding: 0 28px 0 10px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 13px;
	color: #333;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 8px center;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	cursor: pointer;
	transition: border-color 0.2s ease;
}

.wcato-per-page-select:focus {
	outline: none;
	border-color: #1e3a5f;
}

/* Showing X–Y of Z */
.wcato-pagination-info {
	font-size: 13.5px;
	color: #555;
	text-align: center;
	flex: 1;
}

.wcato-pagination-info strong {
	color: #111;
	font-weight: 700;
}

/* Prev / Next nav */
.wcato-pagination-nav {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

.wcato-page-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 7px 14px;
	font-size: 13px;
	font-weight: 600;
	border-radius: 4px;
	border: 1px solid #d1d5db;
	background: #fff;
	color: #1e3a5f;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
	line-height: 1;
	cursor: pointer;
}

.wcato-page-btn svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

.wcato-page-btn:hover {
	background: #1e3a5f;
	border-color: #1e3a5f;
	color: #fff;
}

.wcato-page-btn--disabled {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}

.wcato-page-current {
	font-size: 13px;
	color: #555;
	white-space: nowrap;
	padding: 0 4px;
}

/* Responsive pagination */
@media (max-width: 640px) {
	.wcato-pagination-inner {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		padding: 14px 16px;
	}

	.wcato-pagination-info {
		text-align: center;
	}

	.wcato-pagination-nav {
		justify-content: center;
	}

	.wcato-per-page-wrap {
		justify-content: center;
	}
}