/* hungwar - 02.11.2026 - group category pages as a directory (viewCat_groups_v2) */
.hw4-dir { --hw4-green: var(--hw3-brand-dark, #388E3C); --hw4-soft: var(--hw3-brand-soft, #E8F5E9); --hw4-ink: #1f2933; --hw4-muted: #6b7680; --hw4-line: #e3e8ec; margin: 22px 0 44px; color: var(--hw4-ink); }
.hw4-crumb { font-size: 14px; color: var(--hw4-muted); margin-bottom: 14px; }
.hw4-crumb a { color: var(--hw4-ink); }
.hw4-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 22px; }
.hw4-title { font-size: 28px; line-height: 1.2; font-weight: 800; margin: 0; letter-spacing: -.3px; }
.hw4-count { margin: 4px 0 0; color: var(--hw4-muted); font-size: 14px; }
.hw4-find { position: relative; flex: 0 1 340px; color: var(--hw4-muted); }
.hw4-find svg { position: absolute; left: 14px; top: 14px; pointer-events: none; }
.hw4-find input { width: 100%; height: 44px; box-sizing: border-box; border: 1px solid #cfd8dc; border-radius: 10px; padding: 0 14px 0 40px; font-size: 15px; background: #fff; color: var(--hw4-ink); outline: none; }
.hw4-find input:focus { border-color: var(--hw4-green); box-shadow: 0 0 0 3px rgba(var(--hw3-brand-rgb, 76, 175, 80), .2); }

.hw4-body { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 32px; align-items: start; }
.hw4-rail { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 104px); overflow-y: auto; }
.hw4-rail a { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 14.5px; line-height: 1.3; color: var(--hw4-ink); text-decoration: none; }
.hw4-rail a span { color: var(--hw4-muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.hw4-rail a:hover { background: #e9eef1; }
.hw4-rail a.is-on { background: var(--hw4-soft); color: var(--hw3-brand-deep, #2E7D32); font-weight: 700; }
.hw4-rail a.is-on span { color: var(--hw3-brand-deep, #2E7D32); font-weight: 400; }
.hw4-dir[data-mode="paged"] .hw4-rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.hw4-dir[data-mode="paged"] .hw4-rail a { justify-content: center; padding: 9px 0; font-weight: 700; background: #fff; border: 1px solid var(--hw4-line); }
.hw4-dir[data-mode="paged"] .hw4-rail a.is-on { background: var(--hw4-green); border-color: var(--hw4-green); color: #fff; }
.hw4-dir[data-mode="paged"] .hw4-rail a span { display: none; }

.hw4-sec { margin-bottom: 26px; scroll-margin-top: 88px; }
.hw4-sec:last-of-type { margin-bottom: 0; }
.hw4-sec h2 { font-size: 17px; font-weight: 700; margin: 0 0 10px; }
.hw4-sheet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: #fff; border: 1px solid var(--hw4-line); border-radius: 12px; overflow: hidden; }
/* hairlines between rows: each cell draws its top and left, the sheet clips the outer ones */
.hw4-sheet > * { margin: -1px 0 0 -1px; border-top: 1px solid var(--hw4-line); border-left: 1px solid var(--hw4-line); min-width: 0; }
.hw4-dir a.hw4-row, .hw4-row { display: flex; align-items: center; gap: 12px; min-height: 60px; box-sizing: border-box; padding: 9px 14px 9px 12px; color: var(--hw4-ink); text-decoration: none; cursor: pointer; }
.hw4-dir a.hw4-row:hover, summary.hw4-row:hover { background: var(--hw4-soft); color: var(--hw4-ink); }
.hw4-row:focus-visible, .hw4-rail a:focus-visible, .hw4-chips a:focus-visible, #hw4-clear:focus-visible { outline: 2px solid var(--hw4-green); outline-offset: -2px; }
.hw4-pic { flex: none; position: relative; width: 42px; height: 42px; border-radius: 8px; overflow: hidden; background: #f2f5f7; display: flex; align-items: center; justify-content: center; }
.hw3-ui .hw4-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hw4-pic b { color: var(--hw4-green); font-size: 17px; }
.hw4-name { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hw4-name small { display: block; font-size: 12.5px; font-weight: 400; color: var(--hw4-muted); }

.hw4-fam > summary { list-style: none; }
.hw4-fam > summary::-webkit-details-marker { display: none; }
.hw4-chev { flex: none; color: var(--hw4-muted); transition: transform .15s; }
.hw4-fam[open] { grid-column: 1 / -1; background: #fafbfc; }
.hw4-fam[open] .hw4-chev { transform: rotate(180deg); }
.hw4-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 14px 14px 66px; }
.hw4-dir .hw4-chips a { display: inline-block; padding: 6px 12px; border: 1px solid #cfd8dc; border-radius: 8px; background: #fff; font-size: 13.5px; line-height: 1.3; color: var(--hw4-ink); text-decoration: none; }
.hw4-dir .hw4-chips a:hover { border-color: var(--hw4-green); color: var(--hw3-brand-deep, #2E7D32); }

/* few sub categories: one column of product cards, no index */
.hw4-body.is-full { grid-template-columns: minmax(0, 1fr); }
.hw4-sec h2 span { margin-left: 8px; font-size: 14px; font-weight: 400; color: var(--hw4-muted); }
.hw4-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.hw4-cards .hw3-card-img { aspect-ratio: 5 / 4; background: #fff; }
.hw4-cards .hw3-card-img img { object-fit: contain; }
.hw4-cards .hw3-card-name { height: auto; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hw4-cards .hw3-card-price { margin-top: auto; }

.hw4-more { margin: 12px 0 0; color: var(--hw4-muted); font-size: 14px; }
.hw4-none { background: #fff; border: 1px solid var(--hw4-line); border-radius: 12px; padding: 28px; text-align: center; }
.hw4-none p { margin: 0 0 12px; }
#hw4-clear { border: 0; border-radius: 8px; padding: 9px 16px; background: var(--hw4-green); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.hw4-dir [hidden] { display: none !important; }

@media (max-width: 991px) {
	.hw4-body { grid-template-columns: minmax(0, 1fr); gap: 18px; }
	.hw4-rail, .hw4-dir[data-mode="paged"] .hw4-rail { position: static; display: flex; flex-direction: row; max-height: none; gap: 6px; overflow-x: auto; margin: 0 -15px; padding: 0 15px 4px; scrollbar-width: none; }
	.hw4-rail a, .hw4-dir[data-mode="paged"] .hw4-rail a { flex: none; background: #fff; border: 1px solid var(--hw4-line); white-space: nowrap; padding: 8px 12px; }
	.hw4-rail a span { display: none; }
	.hw4-sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hw4-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 575px) {
	.hw4-title { font-size: 23px; }
	.hw4-find { flex: 1 1 100%; }
	.hw4-sheet { grid-template-columns: minmax(0, 1fr); }
	.hw4-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hw4-row { min-height: 56px; }
	.hw4-chips { padding-left: 14px; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) { .hw4-chev { transition: none; } }
