/*
 * Shop: title, filters on the left, one toolbar, one grid of equal cards (card.css).
 */
.wauw-theme .wp-site-blocks > main.wauw-shop-main { background: var(--wp--preset--color--base); }
.sh-shop { --sh-line: color-mix(in srgb, var(--wp--preset--color--contrast) 18%, transparent); padding: 1.25rem max(var(--wauw-gutter), calc((100% - 96rem) / 2)) clamp(4rem, 7vw, 6.5rem); font-variant-numeric: lining-nums; }
.sh-shop :is(ul, ol) { margin: 0; padding: 0; list-style: none; }
.sh-shop h2 { letter-spacing: 0; }

/* ---------- Title ---------- */
.sh-crumbs ol { display: flex; flex-wrap: wrap; color: var(--wp--preset--color--accent-4); font-size: 0.95rem; }
.sh-crumbs li { display: inline-flex; align-items: center; }
.sh-crumbs li + li::before { content: "/"; margin-inline: 0.6rem; opacity: 0.6; }
.sh-crumbs a { display: inline-flex; align-items: center; min-height: 2.75rem; color: inherit; text-decoration: none; }
.sh-crumbs a:hover { color: var(--wp--preset--color--contrast); text-decoration: underline 1px; text-underline-offset: 0.3em; }
.sh-head h1 { margin: 0.1em 0 0; font-size: var(--wx-title); line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
.sh-lede { max-width: 42rem; margin: 0.6rem 0 0; line-height: 1.6; }
.sh-find { display: flex; gap: 0.75rem; max-width: 34rem; margin-top: 1.25rem; }
.sh-find input { flex: 1; box-sizing: border-box; min-width: 0; min-height: 3rem; padding: 0 1.25rem; border: 1px solid var(--sh-line); border-radius: 999px; background: #fff; color: inherit; font-size: 1rem; -webkit-appearance: none; appearance: none; }
.sh-find button { border: 0; cursor: pointer; }

/* ---------- Treatments that match a search ---------- */
.sh-services { max-width: 46rem; margin-top: 2rem; }
.sh-services h2 { margin: 0 0 0.4rem; font-size: 1.4rem; line-height: 1.3; }
.sh-services a { display: flex; gap: 1rem; justify-content: space-between; padding: 0.65rem 0; border-bottom: 1px solid var(--sh-line); text-decoration: none; }
.sh-services a:hover span { text-decoration: underline 1px; text-underline-offset: 0.3em; }
.sh-services b { font-weight: 600; white-space: nowrap; }

/* ---------- Two columns: filters and goods ---------- */
.sh-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: clamp(2rem, 3.4vw, 3.5rem); align-items: start; margin-top: clamp(1.5rem, 2.6vw, 2.5rem); }
.sh-side { position: sticky; top: calc(var(--wauw-header) + var(--wp-admin--admin-bar--height, 0px)); box-sizing: border-box; max-height: calc(100dvh - var(--wauw-header) - var(--wp-admin--admin-bar--height, 0px)); padding-block: 0.6rem 1.5rem; overflow-y: auto; overscroll-behavior: auto; scrollbar-width: thin; scrollbar-color: var(--sh-line) transparent; }
.sh-form__top, .sh-form__done { display: none; }
.sh-group { min-width: 0; margin: 0; padding: 0 0.5rem 1.1rem 0; border: 0; }
.sh-group + .sh-group { padding-top: 1.1rem; border-top: 1px solid var(--sh-line); }
.sh-group[hidden] { display: none; }
.sh-group h2 { margin: 0 0 0.35rem; font-family: var(--wp--preset--font-family--body); font-size: 1rem; font-weight: 700; line-height: 1.4; }
.sh-group li a, .wauw-theme .sh-check { display: flex; gap: 0.5rem; align-items: center; min-height: 2.15rem; margin: 0; line-height: 1.3; text-decoration: none; cursor: pointer; }
.sh-group small { color: var(--wp--preset--color--accent-4); font-size: 0.9rem; font-variant-numeric: lining-nums tabular-nums; }
.sh-group li small { margin-left: auto; }
.sh-group .sh-check small { margin-left: auto; }
.sh-group li a:hover span { text-decoration: underline 1px; text-underline-offset: 0.3em; }
.sh-group li a[aria-current] { font-weight: 700; }
.sh-check input { flex: none; width: 1.15rem; height: 1.15rem; margin: 0 0.15rem 0 0; accent-color: var(--wp--preset--color--contrast); cursor: pointer; }
.sh-group :focus-visible { outline-offset: -2px; }
.sh-apply { margin-top: 0.5rem; border: 0; cursor: pointer; }

/* ---------- Toolbar ---------- */
.sh-results { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-width: 0; scroll-margin-top: calc(var(--wauw-header) + var(--wp-admin--admin-bar--height, 0px) + 0.75rem); }
.sh-results > * { grid-column: 1 / -1; }
.sh-results > .sh-count { display: flex; grid-row: 1; grid-column: 1; align-items: center; }
.sh-results > .sh-bar { grid-row: 1; grid-column: 2; }
.sh-bar { display: flex; gap: 1rem; align-items: center; }
.sh-bar, .sh-count { margin: 0; min-height: 3rem; padding-bottom: 1rem; border-bottom: 1px solid var(--sh-line); }
.sh-bar button { border: 0; cursor: pointer; }
.sh-open { display: none; }
.wauw-theme .sh-sort { display: inline-flex; gap: 0.75rem; align-items: center; min-width: 0; margin: 0; white-space: nowrap; }
.sh-sort select { box-sizing: border-box; min-width: 0; max-width: 100%; min-height: 2.75rem; padding: 0 2.5rem 0 1.1rem; border: 1px solid var(--sh-line); border-radius: 999px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%23123a30' stroke-width='1.3'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E") calc(100% - 1.1rem) 50% / 0.7rem no-repeat; color: inherit; font-size: 1rem; text-overflow: ellipsis; cursor: pointer; -webkit-appearance: none; appearance: none; transition: border-color 0.2s; }
.sh-sort select:hover { border-color: currentColor; }

.sh-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding-top: 1rem !important; }
.sh-chips[hidden] { display: none; }
.sh-chip { display: inline-flex; gap: 0.6rem; align-items: center; min-height: 2.4rem; padding: 0 1rem; border: 1px solid var(--wp--preset--color--contrast); border-radius: 999px; font-size: 0.95rem; text-decoration: none; transition: background-color 0.2s, color 0.2s; }
.sh-chip:hover { background: var(--wp--preset--color--contrast); color: var(--wx-ivory); }
.sh-clear { display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: 0.5rem; font-size: 0.95rem; text-decoration: underline 1px; text-underline-offset: 0.3em; }
#sh-goods { scroll-margin-top: 8rem; }
#sh-goods:focus { outline: 0; }

/* ---------- Cards (card.css) ---------- */
.sh-results > .wauw-grid { padding-top: 1.5rem; transition: opacity 0.2s; }
.wauw-grid[aria-busy] { opacity: 0.45; }

.sh-shop .wauw-empty { padding: clamp(2rem, 4vw, 3.5rem) 0; text-align: left; }
.wauw-empty p { margin: 0 0 1.25rem; }
.wauw-empty p:first-child { font-family: var(--wp--preset--font-family--display); font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.25; }
.wauw-empty .wx-btn { text-decoration: none; }

.wauw-more { padding: clamp(2.5rem, 5vw, 4rem) 0 0; text-align: center; }
.wauw-more[hidden] { display: none; }
.wauw-more p { margin: 0 0 0.9rem; color: var(--wp--preset--color--accent-4); }
.wauw-more .wx-btn { min-width: 14rem; text-decoration: none; }
.wauw-more [aria-busy] { opacity: 0.6; }

/* ---------- The filters on a phone ---------- */
.sh-sheet { box-sizing: border-box; width: min(26rem, 100%); max-width: none; height: 100dvh; max-height: none; margin: 0 auto 0 0; padding: 0; border: 0; background: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast); font-variant-numeric: lining-nums; }
.sh-sheet::backdrop { background: rgb(var(--wx-rgb) / 0.6); }
.sh-sheet[open] { animation: wx-in 0.2s ease-out; }
.sh-sheet .sh-form { display: flex; flex-direction: column; height: 100%; }
.sh-sheet .sh-form__body { flex: 1; padding: 1rem var(--wauw-gutter); overflow-y: auto; overscroll-behavior: contain; }
:is(.sh-sheet, .sh-side:target) .sh-form__top { display: flex; flex: none; align-items: center; justify-content: space-between; padding: 0.6rem 0.35rem 0.6rem var(--wauw-gutter); border-bottom: 1px solid var(--sh-line); }
:is(.sh-sheet, .sh-side:target) .sh-form__top h2 { margin: 0; font-size: 1.5rem; line-height: 1.2; }
.sh-form__top h2:focus { outline: 0; }
.sh-close { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; }
:is(.sh-sheet, .sh-side:target) .sh-form__done { display: flex; flex: none; gap: 1rem; align-items: center; justify-content: space-between; padding: 0.75rem var(--wauw-gutter) calc(0.75rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--sh-line); }
.sh-form__done .wx-btn { flex: 1; max-width: 15rem; border: 0; cursor: pointer; }
.sh-form__done .sh-clear { padding-inline: 0; }
:is(.sh-sheet, .sh-side:target) :is(.sh-group li a, .sh-check) { min-height: 2.75rem; }

/* ---------- Narrower ---------- */
@media (max-width: 1239px) {
	.sh-layout { grid-template-columns: 13.5rem minmax(0, 1fr); }
}
@media (max-width: 959px) {
	.sh-layout { display: block; }
	.sh-side { position: static; max-height: none; padding: 0; overflow: visible; }
	.sh-side:not(:target) { display: none; }
	.sh-side:target { margin-bottom: 1.5rem; border: 1px solid var(--sh-line); scroll-margin-top: 6rem; }
	.sh-side:target .sh-form__body { padding: 1rem var(--wauw-gutter); }
	.sh-results { display: block; }
	.sh-bar { position: sticky; top: calc(var(--wauw-header) + var(--wp-admin--admin-bar--height, 0px)); z-index: 20; justify-content: space-between; margin-inline: calc(-1 * var(--wauw-gutter)); padding: 0.75rem var(--wauw-gutter); background: var(--wp--preset--color--base); }
	.sh-results > .sh-count { min-height: 0; padding: 1rem 0 0; border: 0; }
	.sh-open { box-sizing: border-box; display: inline-flex; gap: 0.6rem; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0 1.25rem; border: 1px solid var(--wp--preset--color--contrast); border-radius: 999px; font-weight: 600; text-decoration: none; white-space: nowrap; }
}
@media (max-width: 699px) {
	.sh-shop { padding-top: 0.5rem; }
	.sh-bar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.6rem; min-height: 0; padding-block: 0.6rem; }
	.sh-bar .sh-sort { display: block; position: relative; }
	.sh-sort > span { position: absolute; top: 0.25rem; left: 1.15rem; color: var(--wp--preset--color--accent-4); font-size: 0.875rem; line-height: 1.2; pointer-events: none; }
	.sh-sort select { width: 100%; min-height: 2.9rem; padding: 0.95rem 2.2rem 0.1rem 1.1rem; }
	.sh-open { min-height: 2.9rem; padding-inline: 1.1rem; }
	.sh-chip { min-height: 2.75rem; }
}
@media (prefers-reduced-motion: reduce) {
	.sh-shop *, .sh-sheet { transition: none !important; animation: none !important; }
}
/* On the narrowest phones the trail starts at Handil, so it stays on one line. */
@media (max-width: 23rem) {
	.sh-crumbs li:first-child { display: none; }
	.sh-crumbs li:nth-child(2)::before { content: none; }
}
