/* HST Catalog (prototype) - scoped styles. Tablet 2 cols, mobile 1 col,
   desktop multi-col; uniform card heights; no horizontal overflow. */

.hst-catalog { box-sizing: border-box; max-width: 100%; }
.hst-catalog *, .hst-catalog *::before, .hst-catalog *::after { box-sizing: inherit; }

.hst-catalog__head h2 { margin: 0 0 4px; }
.hst-catalog__head p { margin: 0 0 16px; opacity: .8; }

.hst-catalog__searchrow { display: flex; gap: 8px; flex-wrap: wrap; }
.hst-catalog__searchrow input[type="search"] {
	flex: 1 1 220px; min-height: 44px; padding: 8px 12px; font-size: 16px;
}
.hst-catalog__searchrow button { min-height: 44px; padding: 8px 18px; cursor: pointer; }
.hst-catalog__drawer-toggle { display: none; }

.hst-catalog__filters {
	display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; align-items: flex-end;
}
.hst-catalog__filter { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.hst-catalog__filter select { min-height: 40px; max-width: 200px; padding: 4px 8px; }
.hst-catalog__filter-actions { display: flex; gap: 10px; align-items: center; }
.hst-catalog__filter-actions button { min-height: 40px; padding: 6px 14px; cursor: pointer; }
.hst-catalog__clear { font-size: 14px; }

.hst-catalog__count { margin: 16px 0 10px; font-weight: 600; }

.hst-catalog__grid {
	display: grid; gap: 16px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1024px) {
	.hst-catalog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.hst-card {
	display: flex; flex-direction: column; height: 100%;
	border: 1px solid #e2e2e2; border-radius: 8px; overflow: hidden; background: #fff;
}
.hst-card__media {
	position: relative; display: block; aspect-ratio: 4 / 3; background: #f4f4f4; overflow: hidden;
}
.hst-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hst-card__badge {
	position: absolute; left: 8px; bottom: 8px; padding: 2px 8px;
	background: rgba(0, 0, 0, .72); color: #fff; font-size: 11px; border-radius: 3px;
	letter-spacing: .02em;
}
.hst-card__placeholder {
	display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
	background: repeating-linear-gradient(45deg, #f0f0f0, #f0f0f0 12px, #e9e9e9 12px, #e9e9e9 24px);
	color: #777; font-size: 13px; text-align: center; padding: 12px;
}
.hst-card__body { display: flex; flex-direction: column; gap: 6px; padding: 14px; flex: 1; }
.hst-card__name { margin: 0; font-size: 16px; line-height: 1.35; }
.hst-card__name a { text-decoration: none; }
.hst-card__sku { margin: 0; font-size: 13px; color: #555; font-family: monospace; word-break: break-all; }
.hst-card__series { margin: 0; font-size: 12px; color: #777; }
.hst-card__specs { list-style: none; margin: 4px 0; padding: 0; font-size: 13px; color: #333; }
.hst-card__specs li { padding: 2px 0; border-bottom: 1px dashed #eee; }
.hst-card__details { margin-top: auto; font-weight: 600; }

.hst-catalog__empty {
	margin-top: 16px; padding: 16px; border: 1px dashed #bbb; border-radius: 8px; text-align: center;
}
.hst-catalog__pagination { margin-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.hst-catalog__pagination a { padding: 6px 12px; border: 1px solid #ddd; border-radius: 4px; text-decoration: none; }
.hst-catalog__pagination a[aria-current="page"] { font-weight: 700; border-color: #999; }

.hst-catalog__grid[aria-busy="true"] { opacity: .55; }

/* Mobile: single column cards; filters collapse into a drawer panel. */
@media (max-width: 768px) {
	.hst-catalog__grid { grid-template-columns: minmax(0, 1fr); }
	.hst-catalog__drawer-toggle { display: inline-block; }
	.hst-catalog__filters { display: none; flex-direction: column; align-items: stretch; }
	.hst-catalog--filters-open .hst-catalog__filters { display: flex; }
	.hst-catalog__filter select { max-width: none; width: 100%; min-height: 44px; }
	.hst-catalog__filter-actions { position: sticky; bottom: 0; background: #fff; padding: 10px 0; }
}
