/* Winter Supplies: site fixes, 2 Dec 2026, second pack (even search cards, shop buttons that filter in place, footer spacing).
   File: wp-content/themes/winter-supplies/assets/css/site-fixes-2026-12-02.css
   Loaded on every page by inc/site-fixes-2026-12-02.php. Uses the --ws-* tokens from design-system.css. */

/* ---------- Footer: more white space above the mountain ridge ----------
   The ridge is 40px tall and sits inside the footer's top margin, so a 40px margin left no gap at all.
   Now there is 56–88px of clear space between the last line of content and the peaks. */
.ws-footer { margin-top: clamp(96px, 10vw, 128px); }
main > *:last-child, .ws-content > *:last-child { margin-bottom: 0; }

/* ---------- Filter chips (also used outside listicle pages now) ---------- */
.ws-filter__chip {
	display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
	border: 1px solid var(--ws-border, #DDE5E8); background: var(--ws-white, #fff); color: var(--ws-charcoal, #1B2327);
	font-size: var(--ws-text-sm, .9375rem); font-weight: 600; text-decoration: none; line-height: 1.2;
}
.ws-filter__chip:hover { border-color: var(--ws-spruce, #17403A); color: var(--ws-spruce, #17403A); }
.ws-filter__chip.is-active { background: var(--ws-spruce, #17403A); border-color: var(--ws-spruce, #17403A); color: #fff; }
.ws-filter__chip--sm { padding: 4px 12px; font-size: var(--ws-text-xs, .8125rem); }

/* ---------- Shop category buttons (filter the cards in place) ---------- */
.ws-shop-cats { margin: 0 0 var(--ws-space-5, 24px); }
.ws-shop-cats__row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ws-shop-cats__row li { margin: 0; padding: 0; display: flex; }
.ws-shop-chip {
	display: inline-flex; align-items: center; min-height: 38px; box-sizing: border-box; padding: 6px 16px; border-radius: 999px;
	border: 1px solid var(--ws-border, #DDE5E8); background: var(--ws-white, #fff); color: var(--ws-charcoal, #1B2327);
	font-size: var(--ws-text-sm, .9375rem); font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.ws-shop-chip:hover { border-color: var(--ws-spruce, #17403A); color: var(--ws-spruce, #17403A); }
.ws-shop-chip:focus-visible { outline: 2px solid var(--ws-spruce, #17403A); outline-offset: 2px; }
.ws-shop-chip.is-active, .ws-shop-chip.is-active:hover { background: var(--ws-spruce, #17403A); border-color: var(--ws-spruce, #17403A); color: #fff; }
.ws-shop-chip--sm { min-height: 32px; padding: 4px 12px; font-size: var(--ws-text-xs, .8125rem); }
.ws-shop-cats__row--sub { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--ws-border, #DDE5E8); }
@media (max-width: 640px) {
	.ws-shop-cats__row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
	.ws-shop-cats__row::-webkit-scrollbar { display: none; }
	.ws-shop-cats__row li { flex: 0 0 auto; }
}
/* While the new cards load (assets/js/shop-filter.js) */
.ws-shop-loading ul.products { opacity: .45; pointer-events: none; transition: opacity .15s ease; }
.ws-shop-loading { cursor: progress; }

/* ---------- Search results ---------- */
.ws-search-page { padding-block: var(--ws-space-6, 32px) 0; }
.ws-sp__head { max-width: 820px; margin-bottom: var(--ws-space-6, 32px); }
.ws-sp__title { margin: 0 0 var(--ws-space-4, 16px); font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.15; }
.ws-sp__form { display: flex; gap: 8px; margin: 0 0 var(--ws-space-4, 16px); }
.ws-sp__form input[type="search"] {
	flex: 1; min-width: 0; min-height: 48px; padding: 0 16px; font: inherit;
	border: 1px solid var(--ws-border, #DDE5E8); border-radius: var(--ws-radius-sm, 10px); background: #fff;
}
.ws-sp__form input[type="search"]:focus { outline: 2px solid var(--ws-spruce, #17403A); outline-offset: 1px; }
.ws-sp__filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ws-sp__count { margin: 0; color: var(--ws-slate, #5E6C72); font-size: var(--ws-text-sm, .9375rem); }

/* Cards are all the same height: equal rows, a fixed image box, titles clamped to 2 lines, text to 3,
   a meta line on every card (score, date or type) and the button pinned to the bottom. */
.ws-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; align-items: stretch; gap: var(--ws-space-5, 24px); margin: 0; padding: 0; list-style: none; }
@media (max-width: 1000px) { .ws-results { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ws-results { grid-template-columns: 1fr; grid-auto-rows: auto; } }

.ws-result {
	display: flex; flex-direction: column; height: 100%; min-width: 0; margin: 0; overflow: hidden; box-sizing: border-box;
	background: var(--ws-white, #fff); border: 1px solid var(--ws-border, #DDE5E8); border-radius: var(--ws-radius, 14px);
	box-shadow: var(--ws-shadow, 0 1px 2px rgba(23,64,58,.06)); transition: box-shadow .2s ease, transform .2s ease;
}
.ws-result:hover { box-shadow: var(--ws-shadow-hover, 0 8px 24px rgba(23,64,58,.12)); transform: translateY(-2px); }
.ws-result__media { position: relative; display: block; flex: none; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ws-glacier-soft, #EEF5F7); }
@supports not (aspect-ratio: 1) { .ws-result__media { height: 0; padding-top: 62.5%; } }
.ws-result__media img {
	position: absolute !important; inset: 0; display: block;
	width: 100% !important; height: 100% !important; max-width: none !important; margin: 0 !important;
	object-fit: cover; border-radius: 0;
}
.ws-result--product .ws-result__media { background: #fff; border-bottom: 1px solid var(--ws-border, #DDE5E8); }
.ws-result--product .ws-result__media img { object-fit: contain; padding: 14px; box-sizing: border-box; }
.ws-result__noimg { position: absolute; inset: 0; display: block; background: linear-gradient(135deg, var(--ws-glacier, #DCEBF0), var(--ws-glacier-soft, #EEF5F7)); }
.ws-result__body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; padding: 16px 18px 18px; }
.ws-result__eyebrow { margin: 0 0 6px; font-size: var(--ws-text-xs, .8125rem); line-height: 1.4; color: var(--ws-slate, #5E6C72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-result__type { font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ws-ember-dark, #A4440F); }
.ws-result__title {
	margin: 0 0 6px; font-size: 1.1875rem; line-height: 1.3; min-height: 2.6em;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ws-result__title a { color: var(--ws-charcoal, #1B2327); text-decoration: none; }
.ws-result__title a:hover { color: var(--ws-spruce, #17403A); text-decoration: underline; text-underline-offset: 3px; }
.ws-result__meta { margin: 0 0 8px; min-height: 1.5em; font-size: var(--ws-text-sm, .9375rem); line-height: 1.5; color: var(--ws-slate, #5E6C72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-result__meta strong { font-family: var(--ws-font-heading, inherit); font-size: 1.0625rem; color: var(--ws-spruce, #17403A); }
.ws-result__text {
	margin: 0 0 16px; font-size: var(--ws-text-sm, .9375rem); color: var(--ws-slate, #5E6C72); line-height: 1.55; min-height: 4.65em;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ws-result__actions { margin: auto 0 0; }
.ws-result__btn { display: flex; justify-content: center; width: 100%; box-sizing: border-box; }
@media (max-width: 640px) { .ws-result__media { aspect-ratio: 16 / 9; } .ws-result__text { min-height: 0; } .ws-result__title { min-height: 0; } }

.ws-pagination { margin-top: var(--ws-space-6, 32px); }
.ws-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ws-pagination .page-numbers {
	display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 999px;
	border: 1px solid var(--ws-border, #DDE5E8); background: #fff; color: var(--ws-charcoal, #1B2327); text-decoration: none; font-weight: 600;
}
.ws-pagination .page-numbers.current { background: var(--ws-spruce, #17403A); border-color: var(--ws-spruce, #17403A); color: #fff; }
.ws-pagination a.page-numbers:hover { border-color: var(--ws-spruce, #17403A); }

.ws-sp__empty { max-width: 640px; padding: var(--ws-space-6, 32px); background: var(--ws-glacier-soft, #EEF5F7); border-radius: var(--ws-radius, 14px); }
.ws-sp__empty h2 { margin-top: 0; }
.ws-sp__empty .ws-btn { margin: 4px 8px 4px 0; }

/* ---------- Review page score badge (optional: echo ws_review_score_html( get_the_ID() ); in the verdict box) ---------- */
.ws-review-score { display: inline-flex; align-items: baseline; gap: 4px; margin: 0 0 12px; padding: 6px 14px; border-radius: 999px; background: var(--ws-glacier-soft, #EEF5F7); color: var(--ws-spruce, #17403A); }
.ws-review-score__num { font-family: var(--ws-font-heading, inherit); font-size: 1.5rem; font-weight: 800; line-height: 1; }
.ws-review-score__of { font-weight: 700; }
.ws-review-score__label { margin-left: 6px; font-size: var(--ws-text-sm, .9375rem); font-weight: 600; color: var(--ws-slate, #5E6C72); }
