.ch-cb { width: 100%; }
.ch-cb-header { display: flex; align-items: center; justify-content: space-between; }
.ch-cb-header-left { display: flex; align-items: center; gap: 10px; }
.ch-cb-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.ch-cb-title { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.2; }
.ch-cb-view-all { text-decoration: none; font-size: 14px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ch-cb-view-all:hover { text-decoration: underline; }

.ch-cb-grid { display: grid; gap: 24px; }
.ch-cb-cols-1 { grid-template-columns: repeat(1, 1fr); }
.ch-cb-cols-2 { grid-template-columns: repeat(2, 1fr); }
.ch-cb-cols-3 { grid-template-columns: repeat(3, 1fr); }
.ch-cb-cols-4 { grid-template-columns: repeat(4, 1fr); }
.ch-cb-cols-5 { grid-template-columns: repeat(5, 1fr); }
.ch-cb-cols-6 { grid-template-columns: repeat(6, 1fr); }

/* Blog grid (image left / text right) */
.ch-cb-grid-2col { grid-template-columns: repeat(2, 1fr); }
.ch-cb-grid-2col .ch-cb-card {
	display: flex;
	align-items: stretch;
	text-decoration: none;
	background: #fff;
}
.ch-cb-grid-2col .ch-cb-img { flex: 0 0 220px; }
.ch-cb-grid-2col .ch-cb-card-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 8px; }

.ch-cb-ratio-square { aspect-ratio: 1 / 1; }
.ch-cb-ratio-landscape { aspect-ratio: 16 / 9; }
.ch-cb-ratio-portrait { aspect-ratio: 3 / 4; }
.ch-cb-ratio-wide { aspect-ratio: 21 / 9; }
.ch-cb-img { overflow: hidden; }
.ch-cb-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-cb-img-placeholder { background: #e5e5e5; }
.ch-cb-img-small { width: 90px; flex: 0 0 90px; }

.ch-cb-cat-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }
.ch-cb-cat-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.ch-cb-card-title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.35; }
.ch-cb-card:hover .ch-cb-card-title { text-decoration: underline; }

/* Overlay cards (strip & grid) */
.ch-cb-overlay-strip { grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); overflow-x: auto; }
.ch-cb-overlay-card, .ch-cb-hero-main {
	position: relative;
	display: block;
	text-decoration: none;
	border-radius: inherit;
	overflow: hidden;
	min-height: 300px;
}
.ch-cb-overlay-strip .ch-cb-overlay-card { min-height: 340px; }
.ch-cb-overlay-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; margin: 0; }
.ch-cb-overlay-card::after, .ch-cb-hero-main::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
}
.ch-cb-overlay-content { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px; z-index: 2; display: flex; flex-direction: column; gap: 10px; }
.ch-cb-badge { align-self: flex-start; padding: 4px 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; border-radius: 4px; text-transform: uppercase; }
.ch-cb-overlay-title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; }
.ch-cb-hero-title { font-size: 26px; }

/* Featured hero layout */
.ch-cb-hero-layout { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 24px; align-items: stretch; }
.ch-cb-hero-side { display: flex; flex-direction: column; gap: 18px; }
.ch-cb-hero-side-item { display: flex; gap: 12px; text-decoration: none; align-items: center; }
.ch-cb-hero-side-item .ch-cb-card-body { display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.ch-cb-hero-side-item .ch-cb-card-title { font-size: 14px; }
.ch-cb-hero-main { min-height: 100%; }

/* Category icon tiles */
.ch-cb-tile-grid { }
.ch-cb-tile-cols-2 { grid-template-columns: repeat(2, 1fr); }
.ch-cb-tile-cols-3 { grid-template-columns: repeat(3, 1fr); }
.ch-cb-tile-cols-4 { grid-template-columns: repeat(4, 1fr); }
.ch-cb-tile-cols-5 { grid-template-columns: repeat(5, 1fr); }
.ch-cb-tile-cols-6 { grid-template-columns: repeat(6, 1fr); }
.ch-cb-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	text-decoration: none;
	padding: 24px 12px;
	border-radius: 12px;
	transition: transform 0.15s ease;
}
.ch-cb-tile:hover { transform: translateY(-3px); }
.ch-cb-tile-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
}
.ch-cb-tile-label { font-size: 14px; font-weight: 600; text-align: center; }

.ch-cb-empty { opacity: 0.6; font-style: italic; }

/* Category Image Grid widget */
.ch-cb-cat-card { display: block; text-decoration: none; position: relative; }
.ch-cb-cat-img-wrap { position: relative; width: 100%; overflow: hidden; }
.ch-cb-cat-img-wrap .ch-cb-cat-img,
.ch-cb-cat-img-wrap img.ch-cb-cat-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s ease; }
.ch-cb-cat-card:hover .ch-cb-cat-img-wrap .ch-cb-cat-img { transform: scale(1.05); }

/* Overlay style */
.ch-cb-cat-overlay { min-height: 180px; }
.ch-cb-cat-overlay .ch-cb-cat-img-wrap { position: absolute; inset: 0; height: 100%; }
.ch-cb-cat-overlay::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.ch-cb-cat-overlay .ch-cb-cat-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px; z-index: 2; }
.ch-cb-cat-overlay .ch-cb-cat-label { font-size: 16px; font-weight: 700; display: block; }
.ch-cb-cat-overlay .ch-cb-cat-count { font-size: 12px; opacity: 0.85; }

/* Stacked style */
.ch-cb-cat-stacked { display: flex; flex-direction: column; }
.ch-cb-cat-stacked .ch-cb-cat-caption { padding: 14px 16px; text-align: center; }
.ch-cb-cat-stacked .ch-cb-cat-label { font-size: 15px; font-weight: 600; display: block; }
.ch-cb-cat-stacked .ch-cb-cat-count { font-size: 12px; display: block; margin-top: 2px; }

/* Circle style */
.ch-cb-cat-circle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px 12px; text-align: center; }
.ch-cb-cat-circle-img { border-radius: 50%; overflow: hidden; display: block; }
.ch-cb-cat-circle-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-cb-cat-circle-placeholder { width: 100%; height: 100%; display: block; border-radius: 50%; }
.ch-cb-cat-circle .ch-cb-cat-label { font-size: 14px; font-weight: 600; }
.ch-cb-cat-circle .ch-cb-cat-count { font-size: 12px; opacity: 0.7; }

/* Category edit-screen admin field */
.term-ch-cb-image-wrap .ch-cb-cat-image-preview img { border: 1px solid #dcdcde; border-radius: 6px; }

/* Responsive fallbacks */
@media (max-width: 1024px) {
	.ch-cb-hero-layout { grid-template-columns: 1fr; }
	.ch-cb-hero-side { flex-direction: row; overflow-x: auto; }
}
@media (max-width: 767px) {
	.ch-cb-grid-2col, .ch-cb-cols-2, .ch-cb-cols-3, .ch-cb-cols-4, .ch-cb-cols-5, .ch-cb-cols-6 { grid-template-columns: 1fr; }
	.ch-cb-tile-cols-3, .ch-cb-tile-cols-4, .ch-cb-tile-cols-5, .ch-cb-tile-cols-6 { grid-template-columns: repeat(2, 1fr); }
}
