/* =========================================================================
   Vzduchotechnika SHOP – product archive extras
   - Subcategory pill row above the product grid
   - Friendly empty-state block (no products / no filter matches)
   ========================================================================= */

/* ---------- Subcategory pill row ---------- */
.wm-subcats {
	margin: 0 0 22px;
	padding: 16px 18px 18px;
	border-radius: 14px;
	background: linear-gradient(135deg, #e6f7f9 0%, #fff4ea 100%);
	border: 1px solid rgba(14,165,181,.15);
}

/* When user has applied filters, collapse to a single header row */
details.wm-subcats {
	padding: 0;
}
details.wm-subcats > summary {
	list-style: none;
	cursor: pointer;
	padding: 12px 16px;
	margin: 0;
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
details.wm-subcats > summary::-webkit-details-marker { display: none; }
details.wm-subcats > .wm-subcats__list {
	padding: 0 16px 16px;
}
details.wm-subcats .wm-subcats__caret {
	color: #0ea5b5;
	font-size: 12px;
	transition: transform .2s ease;
}
details.wm-subcats[open] .wm-subcats__caret {
	transform: rotate(180deg);
}
details.wm-subcats:not([open]) {
	background: #fff;
	border-color: #e6e8ec;
}
details.wm-subcats:not([open]) > summary:hover {
	background: #f7f8fa;
}

.wm-subcats__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}
.wm-subcats__title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	font-weight: 700;
	color: #1a1f2b;
	margin: 0;
	line-height: 1.3;
}
.wm-subcats__title i {
	color: #0ea5b5;
	font-size: 14px;
}
.wm-subcats__meta {
	flex-shrink: 0;
	font-size: 12px;
	font-weight: 600;
	color: #0ea5b5;
	background: #fff;
	padding: 4px 10px;
	border-radius: 999px;
	border: 1px solid rgba(14,165,181,.2);
}

.wm-subcats__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 10px;
}

.wm-subcat {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: 12px;
	background: #fff;
	border: 1px solid rgba(16,24,40,.06);
	text-decoration: none;
	color: #1a1f2b;
	transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
	min-width: 0;
	box-shadow: 0 1px 2px rgba(16,24,40,.03);
}
.wm-subcat:hover {
	transform: translateY(-1px);
	border-color: #ff6a00;
	box-shadow: 0 6px 16px rgba(255,106,0,.14);
	color: #1a1f2b;
}
.wm-subcat:hover .wm-subcat__arrow {
	color: #ff6a00;
	transform: translateX(2px);
}

.wm-subcat__thumb {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 10px;
	background: linear-gradient(135deg, #fff4ea 0%, #e6f7f9 100%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	color: #ff6a00;
	font-size: 18px;
}
.wm-subcat__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wm-subcat__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.wm-subcat__name {
	font-size: 13.5px;
	font-weight: 600;
	color: #1a1f2b;
	overflow-wrap: anywhere;
	word-break: break-word;
	hyphens: auto;
	line-height: 1.3;
}
.wm-subcat__count {
	font-size: 11.5px;
	color: #6b7280;
	font-variant-numeric: tabular-nums;
}

.wm-subcat__arrow {
	flex-shrink: 0;
	font-size: 12px;
	color: #8a94a5;
	transition: color .15s ease, transform .15s ease;
}

/* Tablet: 3 columns, slightly tighter */
@media (max-width: 991px) {
	.wm-subcats {
		padding: 14px;
		margin-bottom: 18px;
	}
	.wm-subcats__list {
		grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	}
}

/* Phones: horizontal scroll snap — iOS-like carousel that saves vertical
   space and feels native to touch */
@media (max-width: 640px) {
	.wm-subcats {
		padding: 14px 0 14px 14px;
		border-radius: 12px;
	}
	.wm-subcats__head {
		padding-right: 14px;
		margin-bottom: 10px;
	}
	.wm-subcats__title { font-size: 14px; }
	.wm-subcats__title i { font-size: 13px; }
	.wm-subcats__meta { font-size: 11px; padding: 3px 8px; }

	.wm-subcats__list {
		display: flex;
		grid-template-columns: none;
		gap: 8px;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		padding-right: 14px;
		padding-bottom: 4px;
		scrollbar-width: none;
	}
	.wm-subcats__list::-webkit-scrollbar { display: none; }
	.wm-subcat {
		flex: 0 0 auto;
		width: 200px;
		scroll-snap-align: start;
		padding: 10px 12px;
		gap: 10px;
	}
	.wm-subcat__thumb { width: 38px; height: 38px; font-size: 15px; }
	.wm-subcat__name { font-size: 13px; }
	.wm-subcat__count { font-size: 11px; }
	.wm-subcat__arrow { font-size: 11px; }
}

/* ---------- Empty state ---------- */
.wm-empty {
	margin: 16px 0 32px;
	padding: 40px 28px;
	text-align: center;
	border-radius: 16px;
	background: linear-gradient(180deg, #fff 0%, #f7f8fa 100%);
	border: 1px dashed #d1d5db;
}
.wm-empty__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	margin-bottom: 16px;
	background: linear-gradient(135deg, #fff4ea 0%, #fdecf4 100%);
	color: #ff6a00;
	font-size: 26px;
	box-shadow: 0 6px 18px rgba(255,106,0,.12);
}
.wm-empty__title {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 700;
	color: #1a1f2b;
	line-height: 1.3;
}
.wm-empty__text {
	margin: 0 auto 20px;
	max-width: 420px;
	color: #6b7280;
	font-size: 14px;
	line-height: 1.55;
}

.wm-empty__actions {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-bottom: 24px;
}
.wm-empty__actions .wm-btn {
	flex: 0 0 auto;
	min-width: 180px;
	height: 44px;
	padding: 0 18px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.wm-empty__actions .wm-btn--primary {
	background: linear-gradient(135deg, #ff6a00 0%, #ff8a3d 100%);
	color: #fff;
	border: 1px solid #ff6a00;
	box-shadow: 0 4px 10px rgba(255,106,0,.25);
}
.wm-empty__actions .wm-btn--primary:hover {
	filter: brightness(.96);
	color: #fff;
}
.wm-empty__actions .wm-btn--ghost {
	background: #fff;
	color: #6b7280;
	border: 1px solid #e6e8ec;
}
.wm-empty__actions .wm-btn--ghost:hover {
	color: #1a1f2b;
	border-color: #8a94a5;
}

.wm-empty__suggestions {
	margin-top: 8px;
	padding-top: 20px;
	border-top: 1px solid rgba(16,24,40,.06);
}
.wm-empty__suggestions-label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: #0ea5b5;
	margin-bottom: 10px;
}
.wm-empty__suggestions-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
}
.wm-empty__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 999px;
	background: #e6f7f9;
	color: #0ea5b5;
	border: 1px solid rgba(14,165,181,.2);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: background .15s ease, color .15s ease, transform .1s ease;
}
.wm-empty__chip:hover {
	background: #0ea5b5;
	color: #fff;
	transform: translateY(-1px);
}
.wm-empty__chip span {
	background: rgba(255,255,255,.45);
	padding: 1px 6px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
}
.wm-empty__chip:hover span {
	background: rgba(255,255,255,.22);
	color: #fff;
}

/* Hide the stock WooCommerce notice when we render our empty state on top */
.wm-empty + .woocommerce-info,
.wm-empty ~ .woocommerce-no-products-found {
	display: none !important;
}

@media (max-width: 480px) {
	.wm-empty { padding: 28px 18px; }
	.wm-empty__title { font-size: 17px; }
	.wm-empty__actions .wm-btn { min-width: 0; width: 100%; }
}
