/* ==========================================================================
   HCK sidebar thông minh (bài viết & sản phẩm)
   ========================================================================== */
.hck-sb { --sb-navy: #002d72; --sb-gold: #f7d322; --sb-ink: #12233d; --sb-muted: #6a7a93; --sb-line: #e8edf4; display: flex; flex-direction: column; gap: 18px; }
.hck-sb-widget { margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
#secondary .hck-sb-widget, .sidebar-inner .hck-sb-widget { margin-bottom: 0 !important; }
.hck-sb *, .hck-sb *::before, .hck-sb *::after { box-sizing: border-box; }
.hck-sb a { text-decoration: none !important; }

.hck-sb__card { padding: 18px; border: 1px solid var(--sb-line); border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(0, 20, 60, .06); }
.hck-sb__title {
	position: relative; margin: 0 0 14px; padding-left: 12px;
	font-size: 15px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--sb-navy); line-height: 1.3;
}
.hck-sb__title::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 4px; border-radius: 4px; background: var(--sb-gold); }
.hck-sb__more { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; color: var(--sb-navy) !important; font-size: 14px; font-weight: 700; }
.hck-sb__more svg { width: 15px; height: 15px; transition: transform .15s; }
.hck-sb__more:hover svg { transform: translateX(3px); }

/* Tìm kiếm */
.hck-sb__search { position: relative; margin: 0; }
.hck-sb__search input[type="search"] {
	width: 100%; height: 50px; margin: 0; padding: 0 52px 0 18px; border: 1.5px solid #dbe3ee; border-radius: 999px;
	background: #fff; font-size: 15px; color: var(--sb-ink); box-shadow: 0 6px 20px rgba(0, 20, 60, .05);
}
.hck-sb__search input[type="search"]:focus { outline: none; border-color: var(--sb-navy); box-shadow: 0 0 0 4px rgba(0, 45, 114, .12); }
.hck-sb__search button {
	position: absolute; right: 5px; top: 5px; width: 40px; height: 40px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center; background: var(--sb-navy); color: #fff; cursor: pointer;
}

/* CTA */
.hck-sb__cta {
	border: 0; color: #fff;
	background: radial-gradient(320px 180px at 100% 0%, rgba(247, 211, 34, .28), transparent 65%), linear-gradient(150deg, #002d72 0%, #0a3f8f 100%);
	box-shadow: 0 18px 40px rgba(0, 45, 114, .25);
}
.hck-sb__cta-eyebrow { margin: 0 0 6px; color: var(--sb-gold); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hck-sb__cta-title { margin: 0 0 6px; color: #fff; font-size: 19px; font-weight: 800; line-height: 1.3; }
.hck-sb__cta-text { margin: 0 0 14px; color: rgba(255, 255, 255, .82); font-size: 14px; line-height: 1.55; }
.hck-sb__btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 46px; padding: 0 12px; border-radius: 999px;
	font-size: 15px; font-weight: 700; transition: background-color .15s, transform .15s, border-color .15s;
}
.hck-sb__btn--gold { background: var(--sb-gold); color: var(--sb-navy) !important; }
.hck-sb__btn--gold:hover { background: #ffdc2e; transform: translateY(-1px); }
.hck-sb__cta-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; margin-top: 8px; }
.hck-sb__btn--ghost { min-height: 42px; border: 1.5px solid rgba(255, 255, 255, .35); color: #fff !important; font-size: 14px; }
.hck-sb__btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .1); }
.hck-sb__btn--ghost svg { width: 16px; height: 16px; }

/* Chuyên mục bài viết */
.hck-sb__cats { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.hck-sb__cats li { margin: 0; }
.hck-sb__cats a {
	display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 12px;
	color: var(--sb-ink) !important; font-size: 15px; font-weight: 600; transition: background-color .12s, color .12s;
}
.hck-sb__cats a:hover, .hck-sb__cats li.is-current a { background: #f2f5fa; color: var(--sb-navy) !important; }
.hck-sb__count { flex: 0 0 auto; min-width: 28px; height: 24px; padding: 0 8px; border-radius: 999px; background: #eef2f8; color: var(--sb-navy); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
li.is-current .hck-sb__count { background: var(--sb-gold); }

/* Danh sách bài */
.hck-sb__posts { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; counter-reset: none; }
.hck-sb__posts li { margin: 0; }
.hck-sb__posts a { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; margin: 0 -8px; border-radius: 12px; transition: background-color .12s; }
.hck-sb__posts a:hover { background: #f4f7fb; }
.hck-sb__pthumb { position: relative; display: block; width: 72px; height: 60px; border-radius: 10px; overflow: hidden; background: #eef2f8; }
.hck-sb__pthumb img { width: 100%; height: 100%; object-fit: cover; }
.hck-sb__pnum { position: absolute; left: 4px; top: 4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; background: var(--sb-navy); color: var(--sb-gold); font-size: 11.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.hck-sb__ptext { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hck-sb__ptitle { color: var(--sb-ink); font-size: 14.5px; font-weight: 700; line-height: 1.38; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hck-sb__posts a:hover .hck-sb__ptitle { color: var(--sb-navy); }
.hck-sb__pmeta { color: var(--sb-muted); font-size: 12.5px; }

/* Sản phẩm gợi ý */
.hck-sb__prods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hck-sb__prod { display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 12px; border: 1px solid var(--sb-line); transition: border-color .12s, box-shadow .12s; }
.hck-sb__prod:hover { border-color: #c5d2e6; box-shadow: 0 8px 18px rgba(0, 20, 60, .08); }
.hck-sb__prod-img { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #f4f7fb; }
.hck-sb__prod-img img { width: 100%; height: 100%; object-fit: cover; }
.hck-sb__prod-name { padding: 0 2px 2px; color: var(--sb-ink); font-size: 13px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Danh mục sản phẩm */
.hck-sb__group { margin: 12px 0 6px; padding: 0 4px; color: var(--sb-muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.hck-sb__card--cats .hck-sb__title + .hck-sb__group { margin-top: 0; }
.hck-sb__pcats { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.hck-sb__pcats li { margin: 0; }
.hck-sb__pcats a { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 8px; border-radius: 12px; color: var(--sb-ink) !important; transition: background-color .12s; }
.hck-sb__pcats a:hover, .hck-sb__pcats li.is-current a { background: #f2f5fa; }
.hck-sb__pcats li.is-current a { box-shadow: inset 3px 0 0 var(--sb-gold); }
.hck-sb__pcat-img { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 9px; overflow: hidden; background: #eef2f8; border: 1px solid var(--sb-line); }
.hck-sb__pcat-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hck-sb__pcat-name { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
li.is-current .hck-sb__pcat-name { color: var(--sb-navy); font-weight: 800; }

/* Cam kết */
.hck-sb__usp { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.hck-sb__usp li { display: flex; gap: 10px; margin: 0; color: #3b4a63; font-size: 14px; line-height: 1.45; }
.hck-sb__usp svg { flex: 0 0 22px; width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: #e8f6ee; color: #1e9e5a; }
.hck-sb__usp strong { color: var(--sb-ink); }

/* Sticky trên desktop: chỉ khi sidebar không quá cao */
@media (min-width: 850px) {
	.hck-sb__cta { position: relative; }
}
@media (max-width: 849px) {
	.hck-sb { margin-top: 24px; }
	.hck-sb__prods { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 549px) {
	.hck-sb__prods { grid-template-columns: 1fr 1fr; }
}
