/* Shop and category pages: left filter sidebar on desktop, collapsible panel above results on phones. */

.gg-shop {
	display: grid;
	grid-template-columns: 16rem minmax(0, 1fr);
	gap: clamp(1.5rem, 4vw, 3rem);
	padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem);
}

.gg-filters > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 3rem;
	padding: 0 1rem;
	border: 1px solid var(--gg-line);
	border-radius: var(--gg-radius-sm);
	font-weight: 700;
	list-style: none;
	cursor: pointer;
}

.gg-filters > summary::-webkit-details-marker { display: none; }
.gg-filters[open] > summary .gg-icon { transform: rotate(180deg); }

.gg-filters__form { display: grid; gap: 1.75rem; padding-top: 1.25rem; }

.gg-filters__title {
	margin-bottom: .6rem;
	padding-bottom: .4rem;
	border-bottom: 2px solid var(--gg-accent);
	font-size: .82rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.gg-filters__list { display: grid; margin: 0; padding: 0; list-style: none; }

.gg-filters label {
	display: flex;
	align-items: center;
	gap: .6rem;
	min-height: 2.5rem;
	color: var(--gg-text-soft);
	font-size: .92rem;
	cursor: pointer;
}

.gg-filters__count { color: var(--gg-muted); font-size: .8rem; }
.gg-filters__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }

.gg-shop__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .75rem 1.5rem;
	margin-bottom: 1.5rem;
}

.gg-shop__count { margin: 0; color: var(--gg-muted); font-size: .9rem; }
.gg-sort { display: flex; gap: .5rem; }
.gg-sort select { min-width: 14rem; }
.gg-js .gg-sort__go { display: none; }

@media (min-width: 64rem) {
	/* On desktop the sidebar is always open; the summary is just a heading. */
	.gg-filters > summary { pointer-events: none; padding: 0; border: 0; }
	.gg-filters > summary .gg-icon { display: none; }
}

@media (max-width: 63.9375rem) {
	.gg-shop { grid-template-columns: 1fr; }
	.gg-sort, .gg-sort select { width: 100%; }
	.gg-sort select { min-width: 0; flex: 1; }
}

.gg-page-title__lede { max-width: 40rem; margin: .5rem 0 0; color: var(--gg-muted); }

.gg-filters__tree, .gg-filters__tree ul { margin: 0; padding: 0; list-style: none; }
.gg-filters__tree ul { padding-left: 1rem; border-left: 1px solid var(--gg-line); margin: .1rem 0 .4rem .2rem; }

.gg-filters__tree a {
	display: flex;
	align-items: center;
	gap: .35rem;
	min-height: 2.4rem;
	color: var(--gg-text-soft);
	font-size: .92rem;
	text-decoration: none;
}

.gg-filters__tree a:hover { color: var(--gg-ink); text-decoration: underline; text-decoration-color: var(--gg-accent); }
.gg-filters__tree a[aria-current] { color: var(--gg-ink); font-weight: 700; }
.gg-filters__form > * + * { margin-top: 1.5rem; }
.gg-filters__check { display: flex; align-items: center; gap: .6rem; min-height: 2.5rem; cursor: pointer; }
.gg-js .gg-filters__apply { display: none; }

/* Colour filter (owner, 2026-10-30: search prints by colour). Swatches use the catalog's
   colour vocabulary (app/catalog/naming.py PALETTE); classes, not inline styles (CSP). */
.gg-colors__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .15rem .75rem; margin: 0; padding: 0; list-style: none; }
.gg-colors__option { display: flex; align-items: center; gap: .5rem; min-height: 2.5rem; cursor: pointer; }
.gg-colors__option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gg-swatch { flex: none; width: 1.35rem; height: 1.35rem; border: 1px solid rgba(0, 0, 0, .18); border-radius: 50%; box-shadow: inset 0 0 0 2px var(--gg-paper); }
.gg-colors__option input:checked + .gg-swatch { outline: 2px solid var(--gg-ink); outline-offset: 2px; }
.gg-colors__option input:focus-visible + .gg-swatch { outline: 3px solid var(--gg-focus); outline-offset: 2px; }
.gg-colors__option:has(input:checked) { font-weight: 700; }
.gg-colors__clear { display: inline-block; margin-top: .5rem; font-size: .9rem; font-weight: 700; }
.gg-swatch--black { background: rgb(20 20 20); }
.gg-swatch--white { background: rgb(245 245 240); }
.gg-swatch--cream { background: rgb(236 222 190); }
.gg-swatch--grey { background: rgb(128 128 128); }
.gg-swatch--brown { background: rgb(110 70 40); }
.gg-swatch--tan { background: rgb(190 150 100); }
.gg-swatch--red { background: rgb(200 30 35); }
.gg-swatch--burgundy { background: rgb(120 20 40); }
.gg-swatch--orange { background: rgb(240 120 30); }
.gg-swatch--yellow { background: rgb(250 210 40); }
.gg-swatch--gold { background: rgb(200 155 40); }
.gg-swatch--green { background: rgb(40 150 60); }
.gg-swatch--olive { background: rgb(110 115 40); }
.gg-swatch--teal { background: rgb(20 140 140); }
.gg-swatch--blue { background: rgb(30 90 200); }
.gg-swatch--navy { background: rgb(20 35 90); }
.gg-swatch--purple { background: rgb(110 50 150); }
.gg-swatch--pink { background: rgb(235 100 160); }
.gg-swatch--multicolor { background: conic-gradient(rgb(200 30 35), rgb(250 210 40), rgb(40 150 60), rgb(30 90 200), rgb(110 50 150), rgb(200 30 35)); }
