/*
Theme Name:   Digital FiveM Store
Theme URI:    https://digitalfivem.com/
Description:  Car-catalogue front end for DIGITAL FIVEM. Child theme of the9-store: replaces the demo storefront with a spec-driven catalogue built from the real WooCommerce vehicle data.
Author:       Digital FiveM
Template:     the9-store
Version:      1.0.0
Text Domain:  digitalfivem
*/

/*
 * Design notes
 * ------------
 * The renders are the only saturated thing on the page; every surface around
 * them is a cool slate so the cars carry the colour. Spawncodes are what a
 * server owner actually types into a config, so all data is set in monospace
 * with tabular figures. Amber is reserved for the buy action alone.
 */

:root {
	/*
	 * Palette and type follow the reference direction: a near-black ground
	 * with a slight blue cast, charcoal panels, and a single electric-cyan
	 * signal. Sora carries display and body, JetBrains Mono every label and
	 * figure — spawncodes, polygon counts and prices are all data, so the
	 * monospace does real work rather than acting as decoration.
	 */
	--df-ink: #07070a;
	--df-panel: #101018;
	--df-panel-2: #16161f;
	--df-rule: #23232e;
	--df-rule-lit: #383846;
	--df-text: #eef0f6;
	--df-dim: #8b8fa3;
	--df-signal: #6ee7ff;
	--df-signal-ink: #04121a;
	--df-danger: #ff4d63;
	--df-warm: #ffb454;

	--df-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--df-sans: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	/*
	 * Hard edges. The reference direction is built from squared panels and
	 * notched actions — rounded corners read as a different, softer product.
	 * Every radius in both stylesheets routes through this token, so the whole
	 * geometry is one value.
	 */
	--df-radius: 0px;

	/* Corner cut on primary actions. */
	--df-notch: 10px;
}

.df-home {
	background: var(--df-ink);
	color: var(--df-text);
	font-family: var(--df-sans);
}

.df-home *,
.df-home *::before,
.df-home *::after {
	box-sizing: border-box;
}

.df-home :focus-visible {
	outline: 2px solid var(--df-signal);
	outline-offset: 2px;
}

.df-wrap {
	width: 100%;
	max-width: 1340px;
	margin: 0 auto;
	padding: 0 22px;
}

/* ---------- Hero stage ----------
 *
 * Full-bleed cross-fading rotator. Slides stack in the same grid cell so the
 * stage keeps one height and nothing reflows between transitions; the outgoing
 * slide fades under the incoming one. The render drifts slowly (Ken Burns) and
 * the copy re-enters per slide, which is what gives it the slider feel without
 * a plugin or animation library.
 */

.df-stage {
	position: relative;
	display: grid;
	min-height: clamp(420px, 62vh, 660px);
	overflow: hidden;
	background: var(--df-ink);
	border-bottom: 1px solid var(--df-rule);
	isolation: isolate;
}

.df-slide {
	position: relative;
	z-index: 0;
	display: flex;
	grid-area: 1 / 1;
	align-items: flex-end;
	padding: 0 0 clamp(38px, 6vw, 74px);
	opacity: 0;
	visibility: hidden;
	transition: opacity .9s ease;
}

.df-slide.is-active {
	z-index: 1;
	opacity: 1;
	visibility: visible;
}

.df-slide-media {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.df-slide-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 58%;
	transform: scale(1.06);
	transition: transform 7s linear;
}

.df-slide.is-active .df-slide-media img {
	transform: scale(1.16);
}

/*
 * The renders are bright daylight shots, so the copy needs a gradient to sit
 * on — without it the headline competes with sky and tarmac.
 */
.df-slide-media::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to top, var(--df-ink) 4%, rgba(7, 7, 10, .82) 34%, rgba(7, 7, 10, .28) 68%, rgba(7, 7, 10, .55) 100%),
		linear-gradient(to right, rgba(7, 7, 10, .88) 0%, rgba(7, 7, 10, .35) 46%, transparent 78%);
}

.df-slide-body {
	position: relative;
	z-index: 2;
}

.df-slide-title {
	max-width: 18ch;
	margin: 0 0 22px;
	font-family: var(--df-sans);
	font-size: clamp(2rem, 5vw, 3.6rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -.03em;
	text-transform: uppercase;
	color: #fff;
}

.df-slide-cta {
	display: inline-block;
	padding: 13px 26px;
	font-family: var(--df-mono);
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--df-signal-ink);
	background: var(--df-signal);
	clip-path: polygon(var(--df-notch) 0, 100% 0, 100% calc(100% - var(--df-notch)), calc(100% - var(--df-notch)) 100%, 0 100%, 0 var(--df-notch));
	transition: filter .15s ease;
}

.df-slide-cta:hover,
.df-slide-cta:focus {
	color: var(--df-signal-ink);
	filter: brightness(1.1);
}

/* Layers enter in sequence on the active slide only. */
.df-slide .df-eyebrow,
.df-slide .df-slide-title,
.df-slide .df-slide-cta {
	opacity: 0;
	transform: translateY(18px);
}

.df-slide.is-active .df-eyebrow,
.df-slide.is-active .df-slide-title,
.df-slide.is-active .df-slide-cta {
	opacity: 1;
	transform: none;
	transition: opacity .55s ease, transform .55s cubic-bezier(.22, .8, .3, 1);
}

.df-slide.is-active .df-eyebrow { transition-delay: .12s; }
.df-slide.is-active .df-slide-title { transition-delay: .22s; }
.df-slide.is-active .df-slide-cta { transition-delay: .34s; }

.df-stage-dots {
	position: absolute;
	right: max(22px, calc((100% - 1340px) / 2 + 22px));
	bottom: clamp(38px, 6vw, 74px);
	z-index: 3;
	display: flex;
	gap: 10px;
}

.df-stage-dot {
	width: 34px;
	height: 3px;
	padding: 0;
	background: rgba(238, 240, 246, .28);
	border: 0;
	border-radius: 0;
	cursor: pointer;
	transition: background-color .2s ease;
}

.df-stage-dot:hover { background: rgba(238, 240, 246, .55); }
.df-stage-dot.is-active { background: var(--df-signal); }

.df-stage.is-reduced .df-slide-media img,
.df-stage.is-reduced .df-slide .df-eyebrow,
.df-stage.is-reduced .df-slide .df-slide-title,
.df-stage.is-reduced .df-slide .df-slide-cta {
	transform: none;
	transition: opacity .3s ease;
}

@media (max-width: 600px) {
	.df-stage { min-height: 420px; }
	.df-stage-dots { right: 22px; }
}

/* ---------- Masthead ---------- */

.df-hero {
	position: relative;
	padding: clamp(80px, 12vh, 130px) 0 clamp(50px, 8vh, 80px);
	overflow: hidden;
	border-bottom: 1px solid var(--df-rule);
}

/* Muted looping video behind the masthead. The iframe is sized to cover:
 * whichever of "section height" or "16:9 of the viewport width" is larger
 * wins, and aspect-ratio derives the other dimension. */
.df-hero-video {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}

.df-hero-video iframe {
	position: absolute;
	top: 50%;
	left: 50%;
	width: auto;
	height: max(100%, 56.25vw);
	aspect-ratio: 16 / 9;
	border: 0;
	transform: translate(-50%, -50%);
	/* Hidden until footage actually plays — hero.js adds is-playing. Full
	 * opacity once playing: dimming the footage rendered its black regions
	 * darker than the page ink, which read as a tone step at the edges. */
	opacity: 0;
	transition: opacity .9s ease;
}

.df-hero-video.is-playing iframe {
	opacity: 1;
}

/*
 * Copy gradient plus an ink vignette on every edge, so the hero blends into
 * the page no matter what tone the footage is — edge pixels measure exactly
 * --df-ink (verified against real frames; black footage otherwise steps
 * visibly against the page ground).
 */
.df-hero-video::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to right, rgba(7, 7, 10, .92) 0%, rgba(7, 7, 10, .55) 48%, rgba(7, 7, 10, .28) 100%),
		linear-gradient(to right, var(--df-ink) 0%, rgba(7, 7, 10, 0) 12%),
		linear-gradient(to left, var(--df-ink) 0%, rgba(7, 7, 10, 0) 12%),
		linear-gradient(to top, var(--df-ink) 0%, rgba(7, 7, 10, 0) 42%),
		linear-gradient(to bottom, var(--df-ink) 0%, rgba(7, 7, 10, 0) 30%);
}

.df-hero > .df-wrap {
	position: relative;
	z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
	.df-hero-video { display: none; }
}

/*
 * Standalone, not scoped to .df-hero — the stage slides use it too, and
 * scoping it to the hero left every slide's eyebrow completely unstyled.
 */
.df-eyebrow {
	display: flex;
	align-items: center;
	gap: 14px;
	/* Overrides the hero paragraph's 62ch, which was wrapping this mid-phrase. */
	max-width: none;
	margin: 0 0 18px;
	font-family: var(--df-mono);
	font-size: .7rem;
	font-weight: 500;
	letter-spacing: .18em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--df-signal);
}

.df-eyebrow::before {
	content: "";
	flex: none;
	width: 46px;
	height: 1px;
	background: currentColor;
	opacity: .8;
}

.df-hero h1 {
	max-width: 16ch;
	margin: 0 0 18px;
	font-family: var(--df-sans);
	font-size: clamp(2.6rem, 6.4vw, 5.2rem);
	font-weight: 800;
	line-height: .94;
	letter-spacing: -.035em;
	text-transform: uppercase;
	text-wrap: balance;
	color: #fff;
}

.df-hero p {
	max-width: 62ch;
	margin: 0 0 32px;
	font-size: 1.03rem;
	line-height: 1.6;
	color: var(--df-dim);
}

/* Aggregate readout — reads as an instrument panel, not marketing tiles. */
.df-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
	gap: 1px;
	background: var(--df-rule);
	border: 1px solid var(--df-rule);
	border-radius: var(--df-radius);
	overflow: hidden;
}

.df-stat {
	padding: 15px 18px;
	background: var(--df-panel);
}

.df-stat b {
	display: block;
	margin-bottom: 3px;
	font-family: var(--df-mono);
	font-size: 1.45rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	letter-spacing: -.02em;
	color: #fff;
}

.df-stat span {
	font-family: var(--df-mono);
	font-size: .68rem;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: var(--df-dim);
}

/* ---------- Instrument bar ---------- */

.df-toolbar {
	position: sticky;
	/* Below the sticky masthead (70px) — at top:0 it slid underneath it,
	 * hiding search/sort and leaving a dead band above the filter sidebar. */
	top: 70px;
	z-index: 20;
	padding: 13px 0;
	background: rgba(7, 7, 10, .92);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--df-rule);
}

.df-toolbar-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.df-search {
	position: relative;
	flex: 1 1 300px;
}

.df-search input {
	width: 100%;
	padding: 11px 15px 11px 40px;
	font-family: var(--df-mono);
	font-size: .88rem;
	color: var(--df-text);
	background: var(--df-panel);
	border: 1px solid var(--df-rule);
	border-radius: var(--df-radius);
	outline: none;
	transition: border-color .15s ease;
}

.df-search input::placeholder { color: #67738a; }
.df-search input:focus { border-color: var(--df-rule-lit); }

.df-search svg {
	position: absolute;
	left: 14px;
	top: 50%;
	width: 16px;
	height: 16px;
	transform: translateY(-50%);
	fill: none;
	stroke: #67738a;
	stroke-width: 2;
	pointer-events: none;
}

.df-sort {
	padding: 11px 14px;
	font-family: var(--df-mono);
	font-size: .84rem;
	color: var(--df-text);
	background: var(--df-panel);
	border: 1px solid var(--df-rule);
	border-radius: var(--df-radius);
	cursor: pointer;
	outline: none;
}

.df-count {
	margin-left: auto;
	font-family: var(--df-mono);
	font-size: .78rem;
	font-variant-numeric: tabular-nums;
	letter-spacing: .04em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--df-dim);
}

.df-count b {
	font-weight: 600;
	color: var(--df-text);
}

/* ---------- Catalogue ---------- */

.df-grid-section { padding: 30px 0 90px; }

.df-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
	gap: 16px;
}

.df-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--df-panel);
	border: 1px solid var(--df-rule);
	border-radius: var(--df-radius);
	transition: border-color .16s ease, transform .16s ease;
}

.df-card:hover {
	transform: translateY(-3px);
	border-color: var(--df-rule-lit);
}

.df-shot {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	background: var(--df-panel-2);
	overflow: hidden;
}

.df-shot img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity .25s ease;
}

.df-shot img.df-alt { opacity: 0; }
.df-card:hover .df-shot img.df-main { opacity: 0; }
.df-card:hover .df-shot img.df-alt { opacity: 1; }

/* The spawncode is the model's real identifier — shown like a stamped plate. */
.df-spawn {
	position: absolute;
	left: 9px;
	bottom: 9px;
	z-index: 2;
	padding: 4px 8px;
	font-family: var(--df-mono);
	font-size: .69rem;
	letter-spacing: .03em;
	color: var(--df-text);
	background: rgba(7, 7, 10, .86);
	border: 1px solid var(--df-rule-lit);
	border-radius: var(--df-radius);
	backdrop-filter: blur(3px);
}

.df-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 13px 14px 14px;
}

.df-title {
	margin: 0 0 10px;
	font-size: .95rem;
	font-weight: 600;
	line-height: 1.34;
	letter-spacing: -.005em;
	color: #fff;
}

.df-title a {
	color: inherit;
	text-decoration: none;
}

.df-title a:hover { color: var(--df-signal); }

/* Scrutineering line: hairline-separated measurements. */
.df-specs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	padding-top: 10px;
	margin-bottom: 12px;
	border-top: 1px solid var(--df-rule);
}

.df-chip {
	font-family: var(--df-mono);
	font-size: .71rem;
	font-variant-numeric: tabular-nums;
	color: var(--df-dim);
}

.df-chip b {
	font-weight: 600;
	color: var(--df-text);
}

.df-foot {
	display: flex;
	gap: 10px;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
}

.df-price {
	font-family: var(--df-mono);
	font-size: .95rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--df-text);
}

.df-price del {
	margin-right: 5px;
	font-size: .8rem;
	font-weight: 400;
	color: var(--df-dim);
}

.df-price ins { text-decoration: none; }

/*
 * Notched corners.
 *
 * The reference cuts the top-left and bottom-right off its primary actions.
 * clip-path gives that without extra markup; the radius is dropped because the
 * two cannot coexist — a clipped corner on a rounded box reads as a mistake.
 */
.df-buy {
	padding: 9px 16px;
	font-family: var(--df-mono);
	font-size: .76rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--df-signal-ink);
	text-decoration: none;
	white-space: nowrap;
	background: var(--df-signal);
	border: 0;
	border-radius: 0;
	clip-path: polygon(var(--df-notch) 0, 100% 0, 100% calc(100% - var(--df-notch)), calc(100% - var(--df-notch)) 100%, 0 100%, 0 var(--df-notch));
	cursor: pointer;
	transition: filter .15s ease;
}

.df-buy:hover,
.df-buy:focus {
	filter: brightness(1.08);
	color: var(--df-signal-ink);
}

.df-empty {
	display: none;
	padding: 72px 20px;
	font-family: var(--df-mono);
	font-size: .86rem;
	text-align: center;
	color: var(--df-dim);
}

.df-empty.is-on { display: block; }

.df-more-wrap {
	margin-top: 30px;
	text-align: center;
}

.df-more {
	padding: 12px 28px;
	font-family: var(--df-mono);
	font-size: .82rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--df-text);
	background: transparent;
	border: 1px solid var(--df-rule-lit);
	border-radius: var(--df-radius);
	cursor: pointer;
	transition: background-color .15s ease;
}

/* Colour is restated because the site-wide button rules darken button text. */
.df-more:hover,
.df-more:focus {
	color: var(--df-text);
	background: var(--df-panel);
}
.df-more[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
	.df-home * {
		transition: none !important;
	}
}

@media (max-width: 600px) {
	.df-hero { padding: 44px 0 32px; }

	/* The eyebrow may wrap on narrow screens; the leading rule would not fit. */
	.df-eyebrow {
		white-space: normal;
		letter-spacing: .12em;
	}

	.df-eyebrow::before { display: none; }
	.df-grid { grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 11px; }
	.df-body { padding: 11px; }
	.df-count { margin-left: 0; }
	.df-foot { flex-direction: column; align-items: stretch; gap: 8px; }
	.df-buy { text-align: center; }
}

/* ---------- Filter sidebar ----------
 * Make filter beside the grid. Sticky under the masthead + toolbar on
 * desktop with its own scroll; collapses to a disclosure on small screens.
 * Logos are alpha-trimmed files; is-inv marks logos drawn for light grounds
 * (invert + hue-rotate keeps brand hues while flipping dark to light).
 */

.df-catalog-layout:has(.df-filter) {
	display: grid;
	grid-template-columns: 224px minmax(0, 1fr);
	gap: 26px;
	align-items: start;
}

.df-filter {
	position: sticky;
	/* masthead 70 + toolbar ~67 + 15 breathing = same rhythm as the list's
	 * bottom clearance. */
	top: 152px;
	/* Three groups now — the sidebar itself scrolls if they outgrow the
	 * viewport. */
	max-height: calc(100vh - 168px);
	overflow-y: auto;
	/* Overlay scrollbars take no layout space and were drawn over the
	 * right-aligned counts — the padding keeps rows clear of the bar. */
	padding-right: 8px;
	scrollbar-width: thin;
	scrollbar-color: var(--df-rule-lit) transparent;
}

.df-filter-group {
	background: transparent;
	border: 0;
}

/* Sidebar children are details groups and flat checkbox lists alike. */
.df-filter > * + * {
	margin-top: 16px;
}

.df-filter-flat + .df-filter-flat {
	margin-top: 2px;
}

.df-filter-summary {
	display: flex;
	gap: 10px;
	align-items: center;
	justify-content: space-between;
	padding: 0 0 8px;
	font-family: var(--df-mono);
	font-size: .68rem;
	font-weight: 500;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--df-dim);
	list-style: none;
	cursor: pointer;
	border-bottom: 1px solid var(--df-rule);
	transition: color .12s ease;
}

.df-filter-summary:hover {
	color: var(--df-text);
}

/* A collapsed group with an active filter keeps a signal dot visible. */
.df-filter-group.has-active .df-filter-eyebrow::after {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-left: 8px;
	vertical-align: 1px;
	background: var(--df-signal);
}

.df-filter-summary::-webkit-details-marker { display: none; }
.df-filter-summary::marker { content: ""; }

.df-filter-caret {
	display: block;
	width: 7px;
	height: 7px;
	border-right: 1px solid var(--df-dim);
	border-bottom: 1px solid var(--df-dim);
	transform: rotate(45deg);
	transition: transform .15s ease;
}

.df-filter-list {
	padding: 6px 0 0;
	margin: 0;
	list-style: none;
}

.df-filter-flat {
	padding: 0;
}

/* Only the make list is long enough to need its own scroll. */
.df-filter-list--makes {
	max-height: 44vh;
	overflow-y: auto;
	padding-right: 12px;
	scrollbar-width: thin;
	scrollbar-color: var(--df-rule-lit) transparent;
}

.df-filter-list li { list-style: none; }

.df-filter-link {
	position: relative;
	display: flex;
	gap: 10px;
	align-items: center;
	padding: 4px 2px 4px 12px;
	text-decoration: none;
	border: 0;
	background: transparent;
}

/* Active row: a thin signal bar in the gutter, nothing boxed. */
.df-filter-link::before {
	content: "";
	position: absolute;
	top: 6px;
	bottom: 6px;
	left: 0;
	width: 2px;
	background: transparent;
	transition: background-color .12s ease;
}

.df-filter-link.is-on::before {
	background: var(--df-signal);
}

.df-filter-name {
	overflow: hidden;
	font-family: var(--df-sans);
	font-size: .85rem;
	font-weight: 400;
	letter-spacing: 0;
	white-space: nowrap;
	text-overflow: ellipsis;
	text-transform: none;
	color: var(--df-dim);
	transition: color .12s ease;
}

.df-filter-link:hover .df-filter-name {
	color: var(--df-text);
}

.df-filter-link.is-on .df-filter-name {
	font-weight: 600;
	color: var(--df-signal);
}

.df-filter-count {
	margin-left: auto;
	font-family: var(--df-mono);
	font-size: .66rem;
	font-variant-numeric: tabular-nums;
	color: var(--df-dim);
	opacity: .75;
}

/* Brand header above the grid — appears when a make is selected. */
.df-make-head {
	display: flex;
	gap: 16px;
	align-items: center;
	padding: 0 0 16px;
	margin: 0 0 20px;
	border-bottom: 1px solid var(--df-rule);
}

.df-make-head[hidden] { display: none; }

.df-make-head-logo {
	width: auto;
	height: auto;
	max-width: 110px;
	max-height: 38px;
	object-fit: contain;
}

.df-make-head-logo.is-inv {
	filter: invert(1) hue-rotate(180deg);
}

.df-make-head-name {
	display: block;
	font-family: var(--df-sans);
	font-size: 1.3rem;
	font-weight: 800;
	letter-spacing: -.01em;
	line-height: 1.1;
	text-transform: uppercase;
	color: #fff;
}

.df-make-head-count {
	font-family: var(--df-mono);
	font-size: .72rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--df-dim);
}

@media (max-width: 900px) {
	.df-catalog-layout:has(.df-filter) {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.df-filter { position: static; }

	.df-filter-list--makes { max-height: 320px; }
}

.df-brand-chip.is-inv .df-brand-logo {
	/* hue-rotate flips the hue back after invert, so dark text goes white
	 * while brand colours keep roughly their own hue. */
	filter: invert(1) hue-rotate(180deg);
}

.df-brand-name {
	font-family: var(--df-mono);
	font-size: .72rem;
	font-weight: 500;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--df-text);
	white-space: nowrap;
}

.df-brand-count {
	font-family: var(--df-mono);
	font-size: .68rem;
	color: var(--df-dim);
}

.df-brand-chip.is-on .df-brand-name {
	color: var(--df-signal);
}

/* ---------- Layout switcher ----------
 * List or 2/3/4-column gallery. Buttons live in the toolbar; view.js applies
 * is-view-* to the grid and remembers the choice per visitor.
 */

.df-view {
	display: flex;
	gap: 4px;
}

.df-view button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	color: var(--df-dim);
	background: var(--df-panel);
	border: 1px solid var(--df-rule);
	border-radius: var(--df-radius);
	/* The global primary-button rule hands every <button> the cyan fill and
	 * notch clip-path; these are quiet controls, so both are revoked. */
	clip-path: none;
	cursor: pointer;
	transition: color .12s ease, border-color .12s ease;
}

.df-view button:hover {
	filter: none;
}

/*
 * Every state pins its own background: the global hover-repaint group in
 * site.css turns any bare button:hover solid cyan, which made a hovered
 * selected button cyan-on-cyan — an invisible icon.
 */
.df-view button:hover,
.df-view button:focus {
	color: var(--df-text);
	background: var(--df-panel-2);
	border-color: var(--df-rule-lit);
	filter: none;
}

.df-view button.is-on,
.df-view button.is-on:hover,
.df-view button.is-on:focus {
	color: var(--df-signal);
	background: var(--df-panel);
	border-color: var(--df-signal);
	filter: none;
}

.df-view svg {
	width: 15px;
	height: 15px;
	fill: currentColor;
}

.df-grid.is-view-2 { grid-template-columns: repeat(2, 1fr); }
.df-grid.is-view-3 { grid-template-columns: repeat(3, 1fr); }
.df-grid.is-view-4 { grid-template-columns: repeat(4, 1fr); }

.df-grid.is-view-list {
	grid-template-columns: 1fr;
	gap: 12px;
}

.df-grid.is-view-list .df-card {
	flex-direction: row;
}

.df-grid.is-view-list .df-shot {
	flex: none;
	width: min(280px, 32%);
	aspect-ratio: 4 / 3;
}

.df-grid.is-view-list .df-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 4px;
	justify-content: center;
}

/* Gallery cards pin the price row to the card's bottom edge; in a list row
 * everything sits together, vertically centred beside the photo. */
.df-grid.is-view-list .df-foot {
	margin-top: 10px;
}

@media (max-width: 900px) {
	.df-grid.is-view-3,
	.df-grid.is-view-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
	.df-grid.is-view-2,
	.df-grid.is-view-3,
	.df-grid.is-view-4 { grid-template-columns: 1fr; }

	.df-grid.is-view-list .df-card { flex-direction: column; }

	.df-grid.is-view-list .df-shot {
		width: 100%;
		aspect-ratio: 1 / 1;
	}
}

/* Checkbox-style filter rows (Has extras / Has trunk). */
.df-filter-check::before { display: none; }

.df-filter-box {
	position: relative;
	flex: none;
	width: 15px;
	height: 15px;
	background: var(--df-panel-2);
	border: 1px solid var(--df-rule-lit);
	transition: background-color .12s ease, border-color .12s ease;
}

.df-filter-check.is-on .df-filter-box {
	background: var(--df-signal);
	border-color: var(--df-signal);
}

.df-filter-check.is-on .df-filter-box::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 5px;
	width: 4px;
	height: 8px;
	border-right: 2px solid var(--df-signal-ink);
	border-bottom: 2px solid var(--df-signal-ink);
	transform: rotate(45deg);
}

.df-filter-check .df-filter-name {
	color: var(--df-dim);
}

.df-filter-check.is-on .df-filter-name {
	font-weight: 400;
	color: var(--df-text);
}


.df-filter-group[open] .df-filter-caret { transform: rotate(225deg); }

/* ---------- Applied filters ----------
 * Chip per active filter above the grid, × to remove, big-store style.
 */

.df-active {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin: 0 0 18px;
}

.df-active[hidden] { display: none; }

.df-fchip {
	display: inline-flex;
	gap: 9px;
	align-items: center;
	padding: 6px 10px;
	font-family: var(--df-mono);
	font-size: .7rem;
	font-weight: 500;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--df-text);
	background: var(--df-panel-2);
	border: 1px solid var(--df-rule-lit);
}

.df-fchip-x {
	display: inline-flex;
	padding: 0;
	font-family: inherit;
	font-size: .85rem;
	line-height: 1;
	color: var(--df-dim);
	background: none;
	border: 0;
	clip-path: none;
	cursor: pointer;
	transition: color .12s ease;
}

.df-fchip-x:hover,
.df-fchip-x:focus {
	color: var(--df-danger);
	background: none;
	filter: none;
}

.df-active-clear {
	padding: 6px 2px;
	font-family: var(--df-mono);
	font-size: .7rem;
	letter-spacing: .05em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--df-dim);
	background: none;
	border: 0;
	clip-path: none;
	cursor: pointer;
	transition: color .12s ease;
}

.df-active-clear:hover,
.df-active-clear:focus {
	color: var(--df-text);
	background: none;
	filter: none;
}
