/*
 * Category / shop / search pages.
 */

.pk-archive__head { padding-top: 18px; }
.pk-crumb { color: var(--pk-muted); font-size: 13px; }
.pk-crumb:hover { color: var(--pk-ink); }
.pk-archive__head .pk-h1 { margin: 2px 0 0; font-size: 32px; line-height: 1.1; }

/* Sticky bar: sub-category tabs + toolbar */
.pk-archive__bar {
	position: sticky;
	top: var(--pk-header-h);
	z-index: 10;
	padding-top: 14px;
	background: var(--pk-cream);
	box-shadow: 0 6px 12px -10px rgba(30, 35, 54, 0.25);
}
.admin-bar .pk-archive__bar { top: calc(var(--pk-header-h) + 46px); }
@media (min-width: 783px) { .admin-bar .pk-archive__bar { top: calc(var(--pk-header-h) + 32px); } }

.pk-tabs { gap: 8px; padding-bottom: 2px; scroll-snap-type: x proximity; }
/* Desktop: all sub-categories laid out in rows, no sideways scrolling. Phones keep the swipe rail. */
@media (min-width: 960px) {
	.pk-tabs.pk-rail { flex-wrap: wrap; overflow: visible; padding-inline: 0; scroll-snap-type: none; }
	.pk-archive__bar { position: static; box-shadow: none; }
}
.pk-tab {
	display: flex;
	align-items: center;
	height: 42px;
	padding: 0 16px;
	border-radius: 21px;
	background: var(--pk-white);
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
}
.pk-tab:hover { background: #ECEAE4; }
.pk-tab.is-on { background: var(--pk-navy); color: var(--pk-white); }

.pk-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding-block: 12px;
	border-bottom: 1px solid #E8E6DF;
}
.pk-toolbar__actions { display: flex; align-items: center; gap: 8px; }
.pk-toolbar__count { color: var(--pk-muted); font-size: var(--pk-fs-sm); white-space: nowrap; }

.pk-sort { position: relative; }
.pk-sort__menu {
	position: absolute;
	top: 48px;
	inset-inline-start: 0;
	z-index: 30;
	width: 236px;
	padding: 6px;
	border-radius: 18px;
	background: var(--pk-white);
	box-shadow: 0 12px 32px rgba(30, 35, 54, 0.18);
}
.pk-sort__menu a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 46px;
	padding: 0 12px;
	border-radius: 12px;
	font-size: 14.5px;
}
.pk-sort__menu a:hover { background: var(--pk-cream); }
.pk-sort__menu a.is-on { background: var(--pk-cream); font-weight: 600; }

/* Grid */
.pk-archive__body { padding-top: 18px; padding-bottom: 32px; }
.pk-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px 12px;
}
.pk-grid .pk-card__img { width: 70%; }
.pk-more-wrap { display: flex; justify-content: center; margin-top: 28px; }
.pk-archive__desc { margin-top: 40px; color: var(--pk-ink-2); font-size: var(--pk-fs-base); }

.pk-empty {
	padding: 32px 20px;
	border-radius: var(--pk-r-lg);
	background: var(--pk-white);
	text-align: center;
}
.pk-empty p { margin: 8px 0 18px; color: var(--pk-muted); }
.pk-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- Filters (sheet + side panel) ---------- */
.pk-filters { display: flex; flex-direction: column; height: 100%; }
.pk-filters__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 20px 0; }
.pk-filters__title {
	margin: 4px 20px 0;
	font-family: var(--pk-font-display);
	font-size: 30px;
	font-weight: 600;
}
.pk-filters__body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 20px 24px; }
.pk-filters__foot {
	flex: 0 0 auto;
	padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
	border-top: 1px solid #EEECE6;
	box-shadow: var(--pk-shadow-sheet);
}

.pk-fgroup { margin: 20px 0 0; padding: 0; border: 0; min-width: 0; }
.pk-fgroup legend {
	margin-bottom: 10px;
	padding: 0;
	color: var(--pk-muted);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
}
.pk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-chipcheck { position: relative; }
.pk-chipcheck input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pk-chipcheck span {
	display: flex;
	gap: 0.3em; /* flex drops the space before a <bdi> price */
	align-items: center;
	height: 40px;
	padding: 0 16px;
	border-radius: 20px;
	background: var(--pk-chip);
	font-size: 14px;
}
.pk-chipcheck input:checked + span { background: var(--pk-chip-on); font-weight: 500; }
.pk-chipcheck input:focus-visible + span { outline: 2.5px solid var(--pk-navy); outline-offset: 2px; }

.pk-switch {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 56px;
	margin-top: 18px;
	border-top: 1px solid #EEECE6;
	font-size: var(--pk-fs-base);
	cursor: pointer;
}
.pk-switch input { position: absolute; opacity: 0; width: 48px; height: 28px; inset-inline-end: 0; margin: 0; cursor: pointer; }
.pk-switch__track {
	display: flex;
	align-items: center;
	width: 48px;
	height: 28px;
	padding: 3px;
	border-radius: 14px;
	background: #D3D1C9;
	transition: background .2s;
}
.pk-switch__track::before {
	content: "";
	width: 22px;
	height: 22px;
	border-radius: 11px;
	background: var(--pk-white);
	transition: transform .2s var(--pk-ease);
}
.pk-switch input:checked + .pk-switch__track { background: var(--pk-navy); }
.pk-switch input:checked + .pk-switch__track::before { transform: translateX(-20px); }
[dir="ltr"] .pk-switch input:checked + .pk-switch__track::before { transform: translateX(20px); }
.pk-switch input:focus-visible + .pk-switch__track { outline: 2.5px solid var(--pk-navy); outline-offset: 2px; }

/* ---------- Desktop ---------- */
@media (min-width: 960px) {
	.pk-archive__head { padding-top: 28px; }
	.pk-archive__head .pk-h1 { font-size: 40px; }
	.pk-archive__bar { padding-top: 16px; }
	.pk-tabs { max-width: var(--pk-wrap); margin-inline: auto; }

	.pk-archive__body {
		display: grid;
		grid-template-columns: 260px minmax(0, 1fr);
		gap: 40px;
		padding-top: 28px;
	}
	.pk-filters-side {
		position: sticky;
		top: calc(var(--pk-header-h) + 140px);
		align-self: start;
		display: block !important;
		max-height: calc(100vh - var(--pk-header-h) - 160px);
		overflow-y: auto;
		border-radius: var(--pk-r-md);
		background: var(--pk-white);
	}
	.pk-filters--side .pk-filters__title { margin: 18px 20px 0; font-size: 22px; }
	.pk-filters--side .pk-filters__head { display: none; }
	.pk-filters--side .pk-filters__body { padding-bottom: 20px; }
	.pk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; }
}
