/* ==========================================================================
   Components. Each block is self-contained and uses only the tokens in base.css.
   ========================================================================== */

/* Buttons ---------------------------------------------------------------- */
.btn,
.button,
.woocommerce a.button,
.woocommerce button.button {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--bd-space-2);
	min-height: 48px;                       /* touch target */
	padding: 0 var(--bd-space-5);
	border: 2px solid var(--bd-ink);
	border-radius: 999px;
	background: var(--bd-ink);
	color: var(--bd-white);
	font-family: var(--bd-font-display);
	font-size: var(--bd-step-0);
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}
.btn:hover, .button:hover { background: var(--bd-ink-2); border-color: var(--bd-ink-2); color: var(--bd-white); }
.btn:active, .button:active { transform: translateY(1px); }
.btn--accent { background: var(--bd-yellow); border-color: var(--bd-yellow); color: var(--bd-ink); }
.btn--accent:hover { background: #ffc800; border-color: #ffc800; color: var(--bd-ink); }
.btn--ghost { background: transparent; color: var(--bd-ink); }
.btn--ghost:hover { background: var(--bd-ink); color: var(--bd-white); }
.btn--small { min-height: 40px; padding: 0 var(--bd-space-4); font-size: var(--bd-step--1); }

/* Badges ----------------------------------------------------------------- */
.badges { display: flex; flex-wrap: wrap; gap: var(--bd-space-1); }
.badge {
	display: inline-flex; align-items: center; gap: 0.35em;
	padding: 0.28em 0.65em;
	border-radius: var(--bd-radius-s);
	background: var(--bd-ink);
	color: var(--bd-white);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.3;
	text-transform: uppercase;
	white-space: nowrap;
}
.badge::before {                        /* a brick stud */
	content: ""; width: 0.55em; height: 0.55em; border-radius: 50%;
	background: currentColor; opacity: 0.55;
}
.badge--retired { background: var(--bd-status-retired); color: var(--bd-yellow); }
.badge--retiring { background: var(--bd-status-retiring); }
.badge--rare { background: var(--bd-status-rare); }
.badge--collectable { background: var(--bd-status-collectable); }
.badge--new { background: var(--bd-status-new); }
.badge--sale { background: var(--bd-yellow); color: var(--bd-ink); font-weight: 800; box-shadow: inset 0 0 0 1.5px var(--bd-ink); }   /* outlined: still reads on a yellow band */

/* Price ------------------------------------------------------------------ */
.price { font-family: var(--bd-font-display); font-size: var(--bd-step-1); font-weight: 700; color: var(--bd-ink); }
.price del { color: var(--bd-muted); font-weight: 500; margin-right: 0.3em; }
.price ins { text-decoration: none; color: var(--bd-red); }
.bd-price-on-request { font-size: var(--bd-step-0); font-weight: 700; color: var(--bd-ink-2); }

/* Product card ----------------------------------------------------------- */
.card {
	position: relative;
	display: flex; flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--bd-line);
	border-radius: var(--bd-radius);
	background: var(--bd-white);
	transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.card:hover { box-shadow: var(--bd-shadow-lift); transform: translateY(-2px); border-color: transparent; }
.card__media {                          /* every image in the same box, whatever its shape */
	position: relative;
	aspect-ratio: 4 / 3;
	background: var(--bd-paper);
}
.card__media img {
	position: absolute; inset: var(--bd-space-4);
	width: calc(100% - 2 * var(--bd-space-4)); height: calc(100% - 2 * var(--bd-space-4));
	object-fit: contain; mix-blend-mode: multiply;
}
.card__badges { position: absolute; top: var(--bd-space-3); left: var(--bd-space-3); right: var(--bd-space-3); }
.card__body { display: flex; flex: 1; flex-direction: column; gap: var(--bd-space-1); padding: var(--bd-space-4); }
.card__set { font-size: var(--bd-step--1); font-weight: 600; color: var(--bd-muted); letter-spacing: 0.02em; }
.card__title { font-size: var(--bd-step-0); font-weight: 700; line-height: 1.25; text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }   /* the longest names (e.g. "Batman Tumbler vs. Two-Face & The Joker") stop at three lines */
.card__set, .card__facts { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__title a { color: var(--bd-ink); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }   /* the whole card is the link */
.card__title a:focus-visible { outline: none; }
.card:has(.card__title a:focus-visible) { outline: 3px solid var(--bd-focus); outline-offset: 2px; }
.card__facts { font-size: var(--bd-step--1); color: var(--bd-text-soft); }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--bd-space-2); margin-top: auto; padding-top: var(--bd-space-3); }
.card__foot .price { font-size: var(--bd-step-1); }
/* A state, not a price and not a button: quiet, flat, no border. */
.card__state { display: inline-flex; align-items: center; gap: 0.4em; padding: 0.3em 0.65em; border-radius: var(--bd-radius-s); background: var(--bd-paper); color: var(--bd-ink-2); font-size: var(--bd-step--1); font-weight: 600; white-space: nowrap; }
.card__state::before { content: ""; width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--bd-muted); }
/* The action sits above the card's whole-card link. */
.card__action { position: relative; z-index: 2; display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--bd-space-4); border-radius: 999px; font-weight: 700; font-size: var(--bd-step--1); text-decoration: none; white-space: nowrap; transition: background-color 0.12s ease; }
.card__action--buy { background: var(--bd-ink); color: var(--bd-white); }
.card__action--buy:hover { background: var(--bd-ink-2); }
.card__action--ask { border: 2px solid var(--bd-ink); color: var(--bd-ink); }
.card__action--ask:hover { background: var(--bd-yellow); border-color: var(--bd-yellow); }

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
	gap: var(--bd-space-5);
	margin: 0; padding: 0; list-style: none;
}
.grid > li { display: flex; min-width: 0; }
.grid > li > .card { flex: 1; min-width: 0; }
@media (max-width: 520px) {
	.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--bd-space-3); }   /* minmax(0): one-line meta text must not widen a column */
	.card__body { padding: var(--bd-space-3); }
	.card__media img { inset: var(--bd-space-2); width: calc(100% - 2 * var(--bd-space-2)); height: calc(100% - 2 * var(--bd-space-2)); }
	.card__badges { top: var(--bd-space-2); left: var(--bd-space-2); }
	.badge { font-size: 0.64rem; }
	.card__foot { flex-wrap: wrap; }
	.card__action { flex: 1 1 100%; justify-content: center; }
}

/* Section heading -------------------------------------------------------- */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: var(--bd-space-4); margin-bottom: var(--bd-space-5); }
.section-head__link { font-weight: 700; white-space: nowrap; }

/* Header ----------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bd-white); border-bottom: 1px solid var(--bd-line); }
.site-header__bar { display: flex; align-items: stretch; gap: var(--bd-space-5); min-height: 76px; }
.site-header__logo { display: flex; align-items: center; flex: none; }
.site-header__logo img { width: auto; height: 56px; }
.site-header__logo .site-title { font-family: var(--bd-font-display); font-size: var(--bd-step-2); font-weight: 800; color: var(--bd-ink); text-decoration: none; }

.site-nav { display: flex; flex: 1; min-width: 0; }
.site-nav .menu { display: flex; align-items: stretch; gap: var(--bd-space-1); margin: 0; padding: 0; list-style: none; }
.site-nav .menu > li { display: flex; align-items: center; }   /* full bar height: no hover gap above the panel */
.site-nav .menu > li > a {
	display: block; padding: var(--bd-space-2) var(--bd-space-3);
	border-radius: 999px;
	color: var(--bd-ink); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.site-nav .menu > li > a:hover,
.site-nav .menu > li.is-open > a,
.site-nav .menu > li.current-menu-item > a,
.site-nav .menu > li.current-menu-ancestor > a { background: var(--bd-yellow-soft); }
.submenu-toggle {
	display: inline-grid; place-items: center; width: 28px; height: 28px; margin-left: -6px;
	border: 0; border-radius: 999px; background: transparent; color: var(--bd-ink); cursor: pointer;
}
.submenu-toggle svg { width: 16px; height: 16px; transition: transform 0.15s ease; }
.menu > li.is-open .submenu-toggle svg { transform: rotate(180deg); }

/* The drop-down panel: full width under the bar, contents on the page grid. */
.site-nav .sub-menu {
	position: absolute; top: 100%; left: 0; right: 0;
	display: none;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: var(--bd-space-1) var(--bd-space-4);
	margin: 0;
	padding: var(--bd-space-5) max(var(--bd-gutter), calc((100% - var(--bd-wrap)) / 2)) var(--bd-space-6);
	list-style: none;
	background: var(--bd-white);
	border-bottom: 1px solid var(--bd-line);
	box-shadow: 0 18px 30px -18px rgb(23 24 28 / 25%);
}
.site-nav .sub-menu a {
	display: block; padding: var(--bd-space-2) var(--bd-space-3);
	border-radius: var(--bd-radius-s);
	color: var(--bd-ink); font-weight: 500; text-decoration: none;
}
.site-nav .sub-menu a:hover, .site-nav .sub-menu a:focus-visible { background: var(--bd-paper); }
.site-nav .sub-menu .is-empty > a { color: var(--bd-muted); opacity: 0.55; cursor: default; background: none; }   /* a theme with no sets: not a link */

.site-search--header { align-self: center; flex: 0 1 260px; min-width: 200px; margin-left: auto; }
.site-header__actions { display: flex; align-items: center; gap: var(--bd-space-1); flex: none; }
.icon-btn {
	position: relative;
	display: inline-grid; place-items: center;
	width: 44px; height: 44px;
	border: 0; border-radius: 999px;
	background: transparent; color: var(--bd-ink);
	cursor: pointer;
}
.icon-btn:hover { background: var(--bd-paper); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn__count {
	position: absolute; top: 2px; right: 0;
	min-width: 20px; height: 20px; padding: 0 5px;
	border-radius: 999px; background: var(--bd-yellow); color: var(--bd-ink);
	font-size: 0.7rem; font-weight: 800; line-height: 20px; text-align: center;
}
.site-search { position: relative; }
.site-search input {
	width: 100%; height: 44px; padding: 0 var(--bd-space-4) 0 2.6rem;
	border: 1px solid var(--bd-line); border-radius: 999px; background: var(--bd-paper);
}
.site-search input:focus { outline: 3px solid var(--bd-focus); outline-offset: 1px; background: var(--bd-white); }
.site-search svg { position: absolute; left: 0.9rem; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--bd-muted); pointer-events: none; }
.menu-toggle { display: none; }
.search-toggle { display: none; }
.mobile-search { display: none; }

/* Laptop widths: eight links and a 260px search box do not fit side by side below ~1320px
   (measured 2026-10-13: Contact slid under the search box at 1240). The box becomes an icon
   that opens the same search row phones use. */
@media (min-width: 1121px) and (max-width: 1340px) {
	.site-search--header { display: none; }
	.search-toggle { display: inline-grid; }
	.site-header__actions { margin-left: auto; }
	.mobile-search.is-open { display: block; padding-block: var(--bd-space-3); border-bottom: 1px solid var(--bd-line); }
}

@media (min-width: 1121px) {
	.site-nav .menu > li:not(.is-dismissed):hover > .sub-menu,
	.site-nav .menu > li:not(.is-dismissed):focus-within > .sub-menu,
	.site-nav .menu > li.is-open > .sub-menu { display: grid; }
}

/* Phones and tablets: the menu folds behind the button; Themes becomes an accordion. */
@media (max-width: 1120px) {
	.site-header__bar { gap: var(--bd-space-3); min-height: 64px; }
	.site-header__logo img { height: 44px; }
	.site-search--header { display: none; }
	.menu-toggle { display: inline-grid; }
	.site-header__actions { margin-left: auto; }
	.mobile-search { display: block; padding-block: var(--bd-space-3); }
	.site-nav { display: none; }
	.site-header.is-open .site-nav {
		display: block; position: absolute; top: 100%; left: 0; right: 0;
		max-height: calc(100vh - 64px); overflow-y: auto;
		padding: var(--bd-space-3) var(--bd-gutter) var(--bd-space-6);
		background: var(--bd-white); border-bottom: 1px solid var(--bd-line);
		box-shadow: 0 18px 30px -18px rgb(23 24 28 / 25%);
	}
	.site-nav .menu { flex-direction: column; gap: 0; }
	.site-nav .menu > li { flex-wrap: wrap; justify-content: space-between; border-bottom: 1px solid var(--bd-line); }
	.site-nav .menu > li > a { padding: var(--bd-space-4) 0; border-radius: 0; font-size: var(--bd-step-1); background: none !important; }
	.submenu-toggle { width: 44px; height: 44px; }
	.site-nav .sub-menu {
		position: static; flex-basis: 100%;
		grid-template-columns: 1fr 1fr; padding: 0 0 var(--bd-space-4); box-shadow: none; border: 0;
	}
	.site-nav .menu > li.is-open > .sub-menu { display: grid; }
}

/* Breadcrumbs (Yoast) ---------------------------------------------------- */
.breadcrumbs { font-size: var(--bd-step--1); color: var(--bd-muted); }
.breadcrumbs a { color: var(--bd-ink-2); }

/* Page head -------------------------------------------------------------- */
.page-head { padding-block: var(--bd-space-6) var(--bd-space-5); }
.page-head h1 { margin-top: var(--bd-space-2); }
.page-head__intro { max-width: 65ch; margin-top: var(--bd-space-3); color: var(--bd-text-soft); }
.page-head__count { margin-top: var(--bd-space-2); color: var(--bd-muted); font-size: var(--bd-step--1); }

/* Pagination ------------------------------------------------------------- */
.pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--bd-space-2); margin: var(--bd-space-7) 0 0; padding: 0; list-style: none; }
.pagination a, .pagination span {
	display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 var(--bd-space-3);
	border: 1px solid var(--bd-line); border-radius: 999px; color: var(--bd-ink); font-weight: 700; text-decoration: none;
}
.pagination .current { background: var(--bd-ink); border-color: var(--bd-ink); color: var(--bd-white); }
.pagination a:hover { border-color: var(--bd-ink); }
.load-more { display: flex; flex-direction: column; align-items: center; gap: var(--bd-space-3); margin-top: var(--bd-space-7); }
.load-more__status { color: var(--bd-muted); font-size: var(--bd-step--1); }

/* Footer ----------------------------------------------------------------- */
.site-footer { margin-top: var(--bd-space-8); background: var(--bd-ink); color: #d7d8dc; }
.site-footer a { color: var(--bd-white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--bd-space-6); padding-block: var(--bd-space-7); }
.site-footer__brand p { max-width: 34ch; margin-top: var(--bd-space-3); }
.site-footer__brand img { height: 64px; width: auto; }
.social { display: flex; gap: var(--bd-space-2); margin-top: var(--bd-space-4) !important; }
.social li + li { margin-top: 0 !important; }
.social a { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; background: #2a2c32; }
.social a:hover { background: var(--bd-yellow); color: var(--bd-ink); text-decoration: none; }
.social svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.site-footer h2 { margin-bottom: var(--bd-space-3); font-size: var(--bd-step-0); color: var(--bd-yellow); }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li + li { margin-top: var(--bd-space-2); }
.site-footer__legal a { text-decoration: underline; }   /* a link inside text must not rely on colour alone */
.site-footer__legal { padding-block: var(--bd-space-4); border-top: 1px solid #33353b; font-size: var(--bd-step--1); color: #a9abb2; }
.site-footer__legal p + p { margin-top: var(--bd-space-1); }
@media (max-width: 860px) { .site-footer__top { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }

/* Style guide (local and admins only) ------------------------------------ */
.sg-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--bd-space-3); }
.sg-swatch { border: 1px solid var(--bd-line); border-radius: var(--bd-radius); overflow: hidden; font-size: var(--bd-step--1); }
.sg-swatch span { display: block; height: 72px; }
.sg-swatch p { padding: var(--bd-space-2) var(--bd-space-3); }
.sg-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--bd-space-3); }

/* WooCommerce pages not yet designed (phase 4) ---------------------------- */
.woocommerce-page-body .breadcrumbs { margin-bottom: var(--bd-space-4); }

/* Not found and plain search ---------------------------------------------- */
.not-found__actions { display: flex; flex-wrap: wrap; gap: var(--bd-space-3); margin-top: var(--bd-space-5); }
.not-found__actions .site-search { flex: 1 1 320px; max-width: 480px; }
.plain-results { margin: 0; padding: 0; list-style: none; }
.plain-results li { padding-block: var(--bd-space-4); border-bottom: 1px solid var(--bd-line); }
.plain-results h2 { font-size: var(--bd-step-1); }
.page-content { max-width: 760px; }

/* Filters and sorting ------------------------------------------------------ */
.filters { position: relative; display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--bd-space-3); margin-bottom: var(--bd-space-5); }
.filters__panel { flex: 1 1 auto; }
.filters__panel > summary { list-style: none; }
.filters__panel > summary::-webkit-details-marker { display: none; }
.filters__count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: var(--bd-space-1); border-radius: 999px; background: var(--bd-yellow); color: var(--bd-ink); font-size: 0.75rem; }
.filters__body { display: flex; flex-wrap: wrap; align-items: end; gap: var(--bd-space-4); margin-top: var(--bd-space-3); padding: var(--bd-space-4); border: 1px solid var(--bd-line); border-radius: var(--bd-radius); background: var(--bd-paper); }
.filters fieldset { display: flex; flex-wrap: wrap; gap: var(--bd-space-2); margin: 0; padding: 0; border: 0; }
.filters legend { width: 100%; margin-bottom: var(--bd-space-1); font-size: var(--bd-step--1); font-weight: 700; color: var(--bd-muted); }
.chip { display: inline-flex; align-items: center; gap: var(--bd-space-2); min-height: 40px; padding: 0 var(--bd-space-3); border: 1px solid var(--bd-line); border-radius: 999px; background: var(--bd-white); font-weight: 600; cursor: pointer; }
.chip:has(input:checked) { border-color: var(--bd-ink); background: var(--bd-yellow-soft); }
.chip input { accent-color: var(--bd-ink); }
.chip input[type="radio"] { accent-color: var(--bd-ink); }
/* Sort: a designed menu, not the operating system's select list. */
.sort { position: absolute; top: 0; right: 0; }   /* stays beside Filter when the panel opens */
.sort > summary { list-style: none; }
.sort > summary::-webkit-details-marker { display: none; }
.sort > summary::after { content: ""; width: 0.45em; height: 0.45em; margin-left: 0.2em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform 0.15s ease; }
.sort[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.sort__label { font-weight: 500; color: var(--bd-muted); }
.sort__menu { position: absolute; right: 0; top: calc(100% + var(--bd-space-2)); z-index: 30; display: grid; min-width: 220px; padding: var(--bd-space-2); border: 1px solid var(--bd-line); border-radius: var(--bd-radius); background: var(--bd-white); box-shadow: var(--bd-shadow-lift); }
.sort__option { display: flex; align-items: center; min-height: 40px; padding: 0 var(--bd-space-3); border: 0; border-radius: var(--bd-radius-s); background: none; color: var(--bd-ink); font-weight: 600; text-align: left; cursor: pointer; }
.sort__option:hover, .sort__option:focus-visible { background: var(--bd-paper); }
.sort__option[aria-current="true"] { background: var(--bd-yellow-soft); }
.sort__option[aria-current="true"]::after { content: "✓"; margin-left: auto; font-weight: 800; }
.filters__clear { align-self: center; font-weight: 700; }
.js .filters__apply { display: none; }    /* site.js submits on change */
.no-results { padding-block: var(--bd-space-7); color: var(--bd-text-soft); }

/* WooCommerce notices: anywhere they appear ------------------------------- */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--bd-space-3);
	margin: 0 0 var(--bd-space-5); padding: var(--bd-space-4) var(--bd-space-5);
	border-radius: var(--bd-radius); border: 1px solid var(--bd-line); background: var(--bd-paper);
	list-style: none; font-weight: 600;
}
.woocommerce-message { border-color: #b8dfc6; background: #eef8f1; }
.woocommerce-error { border-color: #f1b8c0; background: #fdf0f2; color: #8a0b1f; flex-direction: column; align-items: flex-start; }
.woocommerce-message .button, .woocommerce-info .button { order: 2; min-height: 40px; }
.woocommerce-message:focus-visible, .woocommerce-info:focus-visible, .woocommerce-error:focus-visible { outline: 3px solid var(--bd-focus); }

/* Blog post cards: blog index, archives, home page --------------------------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--bd-space-5); margin: 0; padding: 0; list-style: none; }
.post-card { position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--bd-line); border-radius: var(--bd-radius); background: var(--bd-white); transition: box-shadow 0.18s ease, transform 0.18s ease; }
.post-card:hover { box-shadow: var(--bd-shadow-lift); transform: translateY(-2px); }
.post-card__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card__body { display: grid; gap: var(--bd-space-2); padding: var(--bd-space-5); }
.post-card__meta { font-size: var(--bd-step--1); color: var(--bd-muted); }
.post-card__title { font-size: var(--bd-step-1); }
.post-card__title a { color: var(--bd-ink); text-decoration: none; }
.post-card__title a::after { content: ""; position: absolute; inset: 0; }
.post-card__excerpt { color: var(--bd-text-soft); }

/* Theme tiles: the home page's "Shop by theme" and the top of /themes/. */
.theme-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: var(--bd-space-4); margin: 0; padding: 0; list-style: none; }
.theme-tiles > li { display: flex; }   /* every tile in a row is as tall as the tallest */
.theme-tile { display: flex; flex: 1; flex-direction: column; gap: var(--bd-space-1); padding: var(--bd-space-3); border-radius: var(--bd-radius); background: var(--bd-white); color: var(--bd-ink); text-decoration: none; transition: box-shadow 0.18s ease, transform 0.18s ease; }
.theme-tile:hover { box-shadow: var(--bd-shadow-lift); transform: translateY(-2px); }
/* A fixed frame: any image shape fits whole inside it, centred, never cropped. */
.theme-tile__media { position: relative; display: block; aspect-ratio: 4 / 3; margin-bottom: var(--bd-space-2); border-radius: var(--bd-radius-s); background: var(--bd-paper); }
.theme-tile__media img { position: absolute; inset: var(--bd-space-2); width: calc(100% - 2 * var(--bd-space-2)); height: calc(100% - 2 * var(--bd-space-2)); object-fit: contain; mix-blend-mode: multiply; }
/* Long names wrap evenly onto at most two lines; the count always sits at the bottom. */
.theme-tile__name { font-family: var(--bd-font-display); font-size: var(--bd-step-1); font-weight: 700; line-height: 1.2; text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.theme-tile__count { margin-top: auto; padding-top: var(--bd-space-1); font-size: var(--bd-step--1); color: var(--bd-muted); }
.page-themes { padding-block: var(--bd-space-6); margin-block: var(--bd-space-5) var(--bd-space-6); }
.page-themes__after { display: flex; justify-content: center; padding-bottom: var(--bd-space-7); }

/* Sales (inc/sale.php). Nothing below renders unless a sale is running. --------- */
/* The bar above the header, on every page. Scrolls away; the header stays sticky. */
.sale-bar { background: var(--bd-red); color: var(--bd-white); }
.sale-bar__inner {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--bd-space-1) var(--bd-space-3);
	padding-block: var(--bd-space-2);
	font-size: var(--bd-step--1); font-weight: 600; line-height: 1.35; text-align: center;
}
.sale-bar__tag {
	padding: 0.15em 0.6em; border-radius: var(--bd-radius-s);
	background: var(--bd-yellow); color: var(--bd-ink);
	font-family: var(--bd-font-display); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
}
.sale-bar__text { font-family: var(--bd-font-display); font-size: var(--bd-step-0); font-weight: 700; }
.sale-bar__link { color: var(--bd-white); font-weight: 700; white-space: nowrap; }
.sale-bar__link:hover { color: var(--bd-yellow); }
.sale-bar__link:focus-visible { outline-color: var(--bd-yellow); }
@media (max-width: 520px) { .sale-bar__more { display: none; } }   /* one line on a phone */

/* The phone menu opens under the header; with the bar above it, keep its bottom on screen */
@media (max-width: 1120px) { .sale-bar + .site-header.is-open .site-nav { max-height: calc(100vh - 64px - 2.5rem); } }

/* The menu's "Sale" link: red text, so it stands apart from the rest of the menu */
.site-nav .menu > .menu-item--sale > a { color: var(--bd-red); font-weight: 800; }
/* The Sale link is a ninth link, ~60px the header was not built for: on the live menu it ran
   38px under the search box at every width from 1360, and touched the account icon at 1121
   (measured 2026-10-17). Tighter link padding while it is there frees 72px; the search box keeps
   its size. No sale, no link, no change. */
.site-header:has(.menu-item--sale) .site-nav .menu > li > a { padding-inline: 8px; }

/* A theme or status page with sets on sale */
.sale-hint {
	display: flex; flex-wrap: wrap; align-items: center; gap: var(--bd-space-2) var(--bd-space-3);
	margin-bottom: var(--bd-space-4); padding: var(--bd-space-3) var(--bd-space-4);
	border: 2px solid var(--bd-yellow); border-radius: var(--bd-radius); background: var(--bd-yellow-soft);
	font-weight: 600;
}
.sale-hint a { color: var(--bd-ink); font-weight: 700; white-space: nowrap; }
