/*
 * Component layer.
 *
 * Every class contract PHP templates, block patterns and the classic WooCommerce
 * overrides emit. The design system ships these as JSX; they are not ported —
 * each one is re-expressed here as CSS, with the values read from
 * design_handoff_delsenter_woocommerce/prototype/_ds/…/_ds_bundle.js, which is
 * the authoritative source for each component's exact styling.
 *
 * Conventions
 *   .dl-block                block
 *   .dl-block__element       element
 *   .dl-block--modifier      block modifier
 *   .is-*  /  [aria-*]       state — prefer the ARIA attribute where one exists,
 *                            so the style and the semantics cannot drift apart
 *
 * Rules
 *   - Tokens only. A literal here means the design system has no token for it,
 *     and it carries a comment saying so. `php tools/check-css-tokens.php` fails
 *     the build on anything else.
 *   - Borders are exactly 1px (--border-width). Indicators that need more weight
 *     are drawn as elements, never as a thick border.
 *   - Focus is the global :focus-visible rule in base.css. No component removes
 *     or redefines it; composite controls reproduce it on a proxy element, which
 *     is called out at each site.
 *   - Nothing changes opacity on hover. No bounce, no spring.
 *
 * Contents
 *   1. Button, IconButton
 *   2. Badge, Tag
 *   3. Card
 *   4. Alert
 *   5. Forms — Field, Input, Select, Textarea, Checkbox, Radio,
 *              QuantityStepper, SearchField
 *   6. Navigation — Breadcrumb, Tabs, Accordion, Pagination, CheckoutSteps,
 *                   CategoryNav
 *   7. Feedback and overlays — EmptyState, Skeleton, Toast, Modal, Drawer
 *   8. Commerce — Price, ProductCard, the product grid and its mobile carousel
 *   9. Sections — the section header, CategoryTile, the blog teaser card
 *  10. Reduced motion
 */

/* ══ 1. Button ═══════════════════════════════════════════════════════════════ */

.dl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-3);
	height: var(--control-h-md);
	padding: 0 var(--space-6);
	border: var(--border-width) solid transparent;
	border-radius: var(--radius-sm);
	font-family: var(--font-body);
	font-size: var(--text-base);
	font-weight: var(--weight-medium);
	letter-spacing: 0.01em; /* no token — between --tracking-normal and --tracking-wide */
	white-space: nowrap;
	cursor: pointer;
	text-decoration: none;
	transition: var(--transition-control), transform var(--dur-fast) var(--ease-standard);
}

/* Press: 1px down, no scale, no colour change beyond the hover value. */
.dl-btn:active:not(:disabled):not([aria-disabled='true']) {
	transform: translateY(1px); /* no token — the design system's press offset */
}

.dl-btn:disabled,
.dl-btn[aria-disabled='true'],
.dl-btn.is-loading {
	cursor: not-allowed;
	opacity: 0.45; /* no token — the only opacity in the system */
}

/* ── Sizes ── */

.dl-btn--sm {
	height: var(--control-h-sm);
	padding: 0 14px; /* no token — sits between --space-4 and --space-5 */
	font-size: var(--text-sm);
	gap: 7px; /* no token */
}

.dl-btn--lg {
	height: var(--control-h-lg);
	padding: 0 28px; /* no token — sits between --space-7 and --space-8 */
	font-size: var(--text-base);
	gap: var(--space-4);
}

.dl-btn--full {
	display: flex;
	width: 100%;
}

/* ── Variants ──
 * Hover darkens one ramp step and gains the variant's shadow. Nothing else moves.
 */

/* The fill carries --brand-contrast, so it is --brand-strong, not --brand: the
 * logo blue is 4.27:1 against white and this is the shop's most-used control. */
.dl-btn--primary {
	background: var(--brand-strong);
	border-color: var(--brand-strong);
	color: var(--brand-contrast);
	box-shadow: var(--shadow-1);
}

.dl-btn--primary:hover:not(:disabled):not(.is-loading) {
	background: var(--brand-strong-hover);
	border-color: var(--brand-strong-hover);
	box-shadow: var(--shadow-brand);
}

.dl-btn--secondary {
	background: var(--surface-card);
	border-color: var(--border-default);
	color: var(--text-heading);
	box-shadow: var(--shadow-1);
}

.dl-btn--secondary:hover:not(:disabled):not(.is-loading) {
	background: var(--neutral-25);
	border-color: var(--border-strong);
	box-shadow: var(--shadow-2);
}

/*
 * Outline is a theme addition — the design system stops at secondary. It is
 * secondary without the card fill, for use on --surface-brand-soft panels and
 * over the hero wash where a white button would read as a second surface.
 */
.dl-btn--outline {
	background: transparent;
	border-color: var(--border-default);
	color: var(--text-heading);
}

.dl-btn--outline:hover:not(:disabled):not(.is-loading) {
	background: var(--surface-card);
	border-color: var(--border-strong);
}

.dl-btn--soft {
	background: var(--brand-subtle);
	color: var(--text-brand);
}

.dl-btn--soft:hover:not(:disabled):not(.is-loading) {
	background: var(--brand-subtle-hover);
}

.dl-btn--ghost {
	background: transparent;
	color: var(--text-body);
}

.dl-btn--ghost:hover:not(:disabled):not(.is-loading) {
	background: var(--neutral-100);
}

.dl-btn--danger {
	background: var(--status-danger);
	border-color: var(--status-danger);
	color: var(--text-inverse);
	box-shadow: var(--shadow-1);
}

.dl-btn--danger:hover:not(:disabled):not(.is-loading) {
	background: var(--red-700);
	border-color: var(--red-700);
}

/*
 * The same variants, on a link.
 *
 * WordPress prints theme.json's `elements.link` as
 * `:root :where(a:where(:not(.wp-element-button))){color:…}` — specificity
 * (0,1,0), the same as a variant class, and global styles land after this
 * sheet. So on `<a class="dl-btn dl-btn--primary">` the link blue won the
 * cascade and painted dark text on the brand fill; on `<button>` the rule never
 * matched, which is why only the anchors were unreadable. Restating each
 * variant's colour with the tag qualifier (0,1,1) puts the button in charge
 * again. Only `color` is restated — the link rule sets nothing else — and hover
 * needs no entry, because no variant changes its text colour on hover and this
 * rule already outranks `elements.link[":hover"]`, which prints the same way.
 */
a.dl-btn--primary {
	color: var(--brand-contrast);
}

a.dl-btn--secondary,
a.dl-btn--outline {
	color: var(--text-heading);
}

a.dl-btn--soft {
	color: var(--text-brand);
}

a.dl-btn--ghost {
	color: var(--text-body);
}

a.dl-btn--danger {
	color: var(--text-inverse);
}

/* ── Icon slots ──
 * Leading and trailing icons are ordinary .ds-icon spans; order is markup order.
 * The spinner replaces the leading slot while .is-loading is set.
 */

.dl-btn .ds-icon {
	color: currentColor;
}

.dl-btn__spinner {
	animation: ds-spin var(--dl-dur-spin) linear infinite;
}

.dl-btn:not(.is-loading) .dl-btn__spinner {
	display: none;
}

.dl-btn.is-loading .dl-btn__icon {
	display: none;
}

/* ══ IconButton ══════════════════════════════════════════════════════════════
 * Square, ghost by default. The accessible name is always on the element itself
 * (aria-label, or a .screen-reader-text child) — never inferred from the glyph.
 */

.dl-icon-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--control-h-md);
	height: var(--control-h-md);
	border: var(--border-width) solid transparent;
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--text-muted);
	cursor: pointer;
	transition: var(--transition-control);
}

.dl-icon-btn:hover:not(:disabled),
.dl-icon-btn.is-active,
.dl-icon-btn[aria-pressed='true'],
.dl-icon-btn[aria-expanded='true'] {
	color: var(--brand);
}

.dl-icon-btn:hover:not(:disabled) {
	background: var(--neutral-100);
}

.dl-icon-btn--sm {
	width: var(--control-h-sm);
	height: var(--control-h-sm);
}

.dl-icon-btn--lg {
	width: var(--control-h-lg);
	height: var(--control-h-lg);
}

.dl-icon-btn--outline {
	background: var(--surface-card);
	border-color: var(--border-subtle);
}

.dl-icon-btn--soft {
	background: var(--brand-subtle);
}

.dl-icon-btn--soft:hover:not(:disabled) {
	background: var(--brand-subtle-hover);
}

.dl-icon-btn:disabled {
	cursor: not-allowed;
	opacity: 0.45; /* no token */
}

/* Cart and wishlist counters. Hidden by the template when the count is zero. */
.dl-icon-btn__badge {
	position: absolute;
	top: 3px; /* no token — optical, from the design system */
	right: 1px; /* no token */
	display: grid;
	place-items: center;
	min-width: var(--space-5);
	height: var(--space-5);
	padding: 0 var(--space-2);
	border-radius: var(--radius-pill);
	background: var(--brand-strong); /* 10px white digits — text, so not --brand */
	color: var(--text-inverse);
	font: var(--weight-medium) 10px/1 var(--font-body); /* 10px — below --text-2xs, counters only */
}

/* ══ 2. Badge ════════════════════════════════════════════════════════════════ */

.dl-badge {
	display: inline-flex;
	align-items: center;
	height: 22px; /* no token */
	padding: 0 9px; /* no token */
	border-radius: var(--radius-xs);
	font: var(--weight-medium) var(--text-xs)/1 var(--font-body);
	letter-spacing: 0.02em; /* no token */
	white-space: nowrap;
	background: var(--neutral-100);
	color: var(--text-muted);
}

.dl-badge--brand {
	background: var(--brand-subtle);
	color: var(--text-brand);
}

.dl-badge--sale {
	background: var(--badge-sale);
	color: var(--text-inverse);
}

.dl-badge--new {
	background: var(--badge-new);
	color: var(--text-inverse);
}

.dl-badge--success {
	background: var(--status-success-bg);
	color: var(--status-success);
}

.dl-badge--warning {
	background: var(--status-warning-bg);
	color: var(--status-warning);
}

.dl-badge--danger {
	background: var(--status-danger-bg);
	color: var(--status-danger);
}

/* ══ Tag ═════════════════════════════════════════════════════════════════════
 * Pill chip for active filters. Renders as a <span> when static, as an <a> or
 * <button> when it navigates.
 */

.dl-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px; /* no token */
	height: 30px; /* no token */
	padding: 0 var(--space-4);
	border: var(--border-width) solid var(--border-subtle);
	border-radius: var(--radius-pill);
	background: var(--surface-card);
	color: var(--text-body);
	font: var(--type-small);
	text-decoration: none;
	transition: var(--transition-control);
}

.dl-tag--active,
.dl-tag[aria-pressed='true'] {
	border-color: var(--border-brand);
	background: var(--brand-subtle);
	color: var(--text-brand);
}

/* With a remove affordance the right padding tightens to hug the button. */
.dl-tag:has(.dl-tag__remove) {
	padding-right: 6px; /* no token */
}

.dl-tag__remove {
	display: grid;
	place-items: center;
	width: 18px; /* no token */
	height: 18px; /* no token */
	padding: 0;
	border: 0;
	border-radius: var(--radius-pill);
	background: transparent;
	color: var(--text-muted);
	cursor: pointer;
	transition: var(--transition-control);
}

.dl-tag__remove:hover {
	background: var(--neutral-200);
}

/* ══ 3. Card ═════════════════════════════════════════════════════════════════ */

.dl-card {
	background: var(--surface-card);
	border: var(--border-width) solid var(--border-subtle);
	border-radius: var(--radius-lg);
	padding: var(--space-7);
	box-shadow: var(--shadow-1);
	transition: var(--transition-elevate), border-color var(--dur-fast) var(--ease-standard);
}

.dl-card--flat { box-shadow: var(--shadow-0); }
.dl-card--raised { box-shadow: var(--shadow-2); }

.dl-card--pad-sm { padding: var(--space-6); } /* 20px — product tiles */
.dl-card--pad-lg { padding: var(--space-8); }

/* Clipped media cards: the plate runs to the edge, so the card carries no padding. */
.dl-card--pad-0 {
	padding: 0;
	overflow: hidden;
}

.dl-card--interactive:hover,
.dl-card--interactive:focus-within {
	border-color: var(--border-default);
	box-shadow: var(--shadow-3);
	transform: translateY(-2px); /* no token — the design system's card lift */
}

/* ══ 4. Alert ════════════════════════════════════════════════════════════════ */

.dl-alert {
	display: flex;
	gap: var(--space-4);
	padding: var(--space-4) var(--space-5);
	border: var(--border-width) solid transparent;
	border-radius: var(--radius-md);
	background: var(--status-info-bg);
	color: var(--text-body);
}

.dl-alert__icon {
	display: flex;
	padding-top: 2px; /* no token — optical alignment to the first text line */
	color: var(--status-info);
}

.dl-alert__body { min-width: 0; }

.dl-alert__title {
	font: var(--type-body-strong);
	color: var(--text-heading);
}

.dl-alert__title + .dl-alert__text {
	margin-top: 3px; /* no token */
}

.dl-alert__text { font: var(--type-small); }

.dl-alert--success { background: var(--status-success-bg); }
.dl-alert--success .dl-alert__icon { color: var(--status-success); }

.dl-alert--warning { background: var(--status-warning-bg); }
.dl-alert--warning .dl-alert__icon { color: var(--status-warning); }

.dl-alert--danger { background: var(--status-danger-bg); }
.dl-alert--danger .dl-alert__icon { color: var(--status-danger); }

/* ══ 5. Forms ════════════════════════════════════════════════════════════════
 *
 * The border lives on the control itself, not on a wrapper, so the global
 * :focus-visible rule in base.css lands on exactly the right box and no
 * component has to reproduce it. The leading-icon slot is positioned over the
 * control instead of wrapping it, for the same reason.
 */

/* ── Field: label + control + hint/error ── */

.dl-field {
	display: flex;
	flex-direction: column;
	gap: 6px; /* no token */
}

.dl-field__label {
	font: var(--weight-medium) var(--text-sm)/1.3 var(--font-body); /* 1.3 — --leading-snug */
	color: var(--text-heading);
}

.dl-field__required {
	margin-left: 3px; /* no token */
	color: var(--status-danger);
}

/* Wired to the control with aria-describedby; the error id replaces the hint id. */
.dl-field__hint {
	font: var(--type-caption);
	color: var(--text-muted);
}

.dl-field__error {
	font: var(--type-caption);
	color: var(--status-danger);
}

/* Two controls on one row — postcode + city, first + last name. */
.dl-field-row {
	display: grid;
	grid-template-columns: var(--dl-track-form2);
	gap: var(--space-5);
}

/* ── Input / Select / Textarea ── */

.dl-input,
.dl-select,
.dl-textarea {
	width: 100%;
	background: var(--surface-card);
	border: var(--border-width) solid var(--border-default);
	border-radius: var(--radius-sm);
	color: var(--text-heading);
	font: var(--type-body);
	transition: var(--transition-control);
}

.dl-input,
.dl-select {
	height: var(--control-h-md);
	padding: 0 var(--space-4);
}

.dl-input--sm,
.dl-select--sm {
	height: var(--control-h-sm);
	font: var(--type-small);
}

.dl-input--lg,
.dl-select--lg {
	height: var(--control-h-lg);
}

.dl-textarea {
	padding: 10px var(--space-4); /* 10px — no token, keeps the first line optically centred */
	line-height: var(--leading-relaxed);
}

.dl-input:hover:not(:disabled),
.dl-select:hover:not(:disabled),
.dl-textarea:hover:not(:disabled) {
	border-color: var(--border-strong);
}

.dl-input:disabled,
.dl-select:disabled,
.dl-textarea:disabled {
	background: var(--surface-sunken);
	color: var(--text-muted);
	cursor: not-allowed;
}

.dl-input[aria-invalid='true'],
.dl-select[aria-invalid='true'],
.dl-textarea[aria-invalid='true'] {
	border-color: var(--status-danger);
}

/* Leading icon: laid over the control, which gains room for it. */
.dl-control {
	position: relative;
	display: block;
}

.dl-control__icon {
	position: absolute;
	top: 50%;
	left: var(--space-4);
	transform: translateY(-50%);
	color: var(--text-faint);
	pointer-events: none;
}

.dl-control__icon ~ .dl-input,
.dl-control__icon ~ .dl-select {
	padding-left: var(--space-9); /* 40px — 12 left + 16 glyph + 12 gap */
}

/* Trailing static text — "kr", "stk". */
.dl-control__suffix {
	position: absolute;
	top: 50%;
	right: var(--space-4);
	transform: translateY(-50%);
	font: var(--type-small);
	color: var(--text-muted);
	pointer-events: none;
}

/* Native select: own chevron, drawn as a mask so it inherits the icon colour. */
.dl-select {
	appearance: none;
	padding-right: 34px; /* no token — clears the chevron */
	cursor: pointer;
}

.dl-control__chevron {
	position: absolute;
	top: 50%;
	right: 11px; /* no token — optical, from the design system */
	transform: translateY(-50%);
	color: var(--text-faint);
	pointer-events: none;
}

/* Placeholder option, while nothing is chosen. */
.dl-select:has(option[value='']:checked) {
	color: var(--text-faint);
}

.dl-textarea__counter {
	align-self: flex-end;
	font: var(--type-caption);
	color: var(--text-faint);
}

/* ── Checkbox / Radio ──
 * The native control stays in the accessibility tree and keeps every keyboard
 * behaviour; it is visually replaced by .dl-check__box. Focus is reproduced on
 * that proxy — the global rule still fires, it simply has nothing visible to
 * paint on a zero-sized input.
 */

/* Positioned so the visually-hidden input below is contained by its own row.
   Without it the input's containing block is whatever is positioned further up —
   the filter drawer's <dialog> — where a hundred 1px boxes laid out past the
   panel's bottom edge escape the body's `overflow` and give the dialog itself a
   scrollbar behind the one the body already has (#27). */
.dl-check {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 10px; /* no token */
	min-height: 44px; /* no token — the handoff's hit-target floor */
	padding-block: var(--space-4);
	font: var(--type-body);
	color: var(--text-body);
	cursor: pointer;
}

.dl-check--compact {
	min-height: 0;
	padding-block: 0;
}

.dl-check:has(.dl-check__input:disabled) {
	cursor: not-allowed;
	opacity: 0.5; /* no token */
}

.dl-check__input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.dl-check__box {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 18px; /* no token */
	height: 18px; /* no token */
	margin-top: 2px; /* no token — aligns to the first text line */
	border: var(--border-width) solid var(--border-default);
	border-radius: var(--radius-xs);
	background: var(--surface-card);
	color: var(--text-inverse);
	transition: var(--transition-control);
}

.dl-check--radio .dl-check__box {
	border-radius: var(--radius-pill);
}

.dl-check__input:checked + .dl-check__box {
	border-color: var(--brand);
	background: var(--brand);
}

/* The radio keeps a white field and fills a centred dot instead. */
.dl-check--radio .dl-check__input:checked + .dl-check__box {
	background: var(--surface-card);
}

.dl-check__box::after {
	content: '';
	width: var(--space-3);
	height: var(--space-3);
	border-radius: var(--radius-pill);
	background: transparent;
	transition: var(--transition-control);
}

.dl-check--radio .dl-check__input:checked + .dl-check__box::after {
	background: var(--brand);
}

/* The tick is a masked glyph, so it inherits the box's colour. */
.dl-check:not(.dl-check--radio) .dl-check__box::after {
	width: var(--space-4);
	height: var(--space-4);
	border-radius: 0;
	-webkit-mask: var(--ds-icon-check) center / contain no-repeat;
	mask: var(--ds-icon-check) center / contain no-repeat;
}

.dl-check:not(.dl-check--radio) .dl-check__input:checked + .dl-check__box::after {
	background: currentColor;
}

/* Focus, reproduced on the proxy. Same two declarations as the global rule. */
.dl-check__input:focus-visible + .dl-check__box {
	border-color: var(--border-brand);
	box-shadow: var(--focus-ring);
}

.dl-check__text {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px; /* --space-1 */
}

.dl-check__label { color: var(--text-heading); }

.dl-check__description {
	font: var(--type-caption);
	color: var(--text-muted);
}

/* Facet counts — "På lager 318". */
.dl-check__count {
	font: var(--type-caption);
	color: var(--text-faint);
}

/* ── QuantityStepper ──
 * Bounded 1–99 by the number input itself; the buttons only step it. Each button
 * is its own focus target and takes the global ring unchanged.
 */

.dl-qty {
	display: inline-flex;
	align-items: center;
	height: var(--control-h-md);
	border: var(--border-width) solid var(--border-default);
	border-radius: var(--radius-sm);
	background: var(--surface-card);
}

.dl-qty--sm {
	height: var(--control-h-sm);
}

.dl-qty__btn {
	display: grid;
	place-items: center;
	width: var(--control-h-md);
	height: 100%;
	border: 0;
	background: transparent;
	color: var(--text-body);
	cursor: pointer;
	transition: var(--transition-control);
}

.dl-qty--sm .dl-qty__btn {
	width: var(--control-h-sm);
}

.dl-qty__btn:disabled {
	color: var(--text-faint);
	cursor: not-allowed;
}

.dl-qty__input {
	width: 34px; /* no token — fits "99" plus air */
	height: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	text-align: center;
	appearance: textfield;
	font: var(--weight-medium) var(--text-base)/1 var(--font-body);
	color: var(--text-heading);
}

.dl-qty__input::-webkit-outer-spin-button,
.dl-qty__input::-webkit-inner-spin-button {
	appearance: none;
	margin: 0;
}

/* ── SearchField ──
 * A composite control: the pill is the form, the caret is the input inside it.
 * The form paints the ring on :focus-within; the inner input suppresses its own
 * by resolving --focus-ring and --dl-focus-outline to nothing locally. The
 * global rule is untouched — it still applies, it simply has neither a ring nor
 * a hairline left to draw on that one element.
 */

.dl-search {
	display: flex;
	align-items: center;
	height: 44px; /* no token — the handoff's hit-target floor */
	padding: 0 var(--space-2) 0 var(--space-5);
	border: var(--border-width) solid var(--border-subtle);
	border-radius: var(--radius-pill);
	background: var(--surface-card);
	box-shadow: var(--shadow-1);
	transition: var(--transition-control);
}

.dl-search:focus-within {
	border-color: var(--border-brand);
	box-shadow: var(--focus-ring);
}

.dl-search__icon {
	display: flex;
	margin-right: 10px; /* no token */
	color: var(--text-faint);
}

.dl-search__input {
	--focus-ring: none;
	--dl-focus-outline: none;

	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	font: var(--type-body);
	color: var(--text-heading);
}

.dl-search__submit {
	flex: 0 0 auto; /* the field gives up width before the button's label does */
	height: 36px; /* no token — 44 minus the 4px inset on both sides */
	padding: 0 var(--space-6);
	border: 0;
	border-radius: var(--radius-pill);
	background: var(--brand-strong);
	color: var(--text-inverse);
	font: var(--weight-medium) var(--text-sm)/1 var(--font-body);
	cursor: pointer;
	transition: var(--transition-control);
}

.dl-search__submit:hover {
	background: var(--brand-strong-hover);
}

/* ══ VehiclePicker ═══════════════════════════════════════════════════════════
 *
 * The card is the design system's VehiclePicker with two fields instead of four
 * — see inc/vehicle-picker.php for why. It is a Card by description rather than
 * by class: it is a <form>, and it carries the same border, radius and shadow
 * written out here rather than nesting a form inside a .dl-card that exists only
 * to draw them.
 *
 * The row is one grid whose tracks are the whole difference between the stacked
 * mobile card and the desktop `1fr 1fr auto` — resolved in section 1 of base.css
 * like every other responsive value in the theme.
 */

.dl-vehicle {
	padding: var(--dl-vehicle-pad);
	background: var(--surface-card);
	border: var(--border-width) solid var(--border-subtle);
	border-radius: var(--radius-xl);
	box-shadow: var(--shadow-2);
}

/*
 * Flush: the picker drawn straight onto the page instead of onto a card. That is
 * the catalogue sidebar (#31), where it is the first of three ways to narrow the
 * screen and the CategoryNav card sits directly under it — a third card stacked
 * on two would make the column read as a pile of boxes rather than as one list.
 * Everything the card drew goes, and the header row closes up: without the card's
 * inset the title would otherwise stand a whole padding above its own controls.
 */
.dl-vehicle--flush {
	--dl-vehicle-head-space: var(--space-4); /* 12px */

	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.dl-vehicle__head {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 9px; /* no token — the icon-to-title gap the prototype draws */
	margin-block-end: var(--dl-vehicle-head-space);
}

.dl-vehicle__icon {
	display: flex;
	color: var(--brand);
}

.dl-vehicle__title {
	font: var(--weight-medium) var(--text-base)/1.2 var(--font-display);
	color: var(--text-heading);
}

.dl-vehicle__hint {
	font: var(--type-small);
	color: var(--text-muted);
}

/* Pushed to the end of the header row, where it reads as an aside to the state
   rather than as a third piece of the title. */
.dl-vehicle__clear {
	margin-inline-start: auto;
	font: var(--type-small);
	color: var(--text-muted);
}

.dl-vehicle__row {
	display: grid;
	grid-template-columns: var(--dl-vehicle-cols);
	gap: var(--dl-vehicle-gap);
	align-items: end;
}

/* The button matches the controls' height rather than the Button scale's, so the
   three boxes line up on the desktop row. */
.dl-vehicle__submit {
	height: var(--control-h-md);
}

/* The loading state: the chevron's own position, so the row does not move. */
.dl-vehicle__spinner {
	position: absolute;
	top: 50%;
	right: 11px; /* no token — the chevron's optical inset, which this replaces */
	transform: translateY(-50%);
	color: var(--text-faint);
	pointer-events: none;
	animation: ds-spin var(--dl-dur-spin) linear infinite;
}

.dl-control:not(:has([aria-busy='true'])) .dl-vehicle__spinner {
	display: none;
}

.dl-control:has([aria-busy='true']) .dl-control__chevron {
	display: none;
}

/*
 * Announced by role="status"; hidden until it has something to announce, and
 * only *visible* for the states worth interrupting the page for — a failed
 * request, a make with no models. Waiting is said in the spinner and to
 * screen readers, never as a line of text that changes the card's height.
 */
.dl-vehicle__status {
	margin-block-start: var(--space-4);
	font: var(--type-caption);
	color: var(--text-muted);
}

/* ══ 6. Breadcrumb ═══════════════════════════════════════════════════════════ */

.dl-breadcrumb {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px; /* no token */
	font: var(--type-small);
}

.dl-breadcrumb__link {
	color: var(--text-brand);
	text-decoration: none;
}

/* The current page is text, not a link, and carries aria-current="page". */
.dl-breadcrumb__current {
	color: var(--text-muted);
}

.dl-breadcrumb__sep {
	color: var(--text-faint);
}

/* ══ Tabs ════════════════════════════════════════════════════════════════════
 * role="tablist" with roving tabindex, driven by assets/js/components.js. Without
 * JS the tabs are still anchors to the panels below, which stay visible — the
 * component degrades to an in-page table of contents.
 */

.dl-tabs {
	display: flex;
	gap: var(--space-8);
	border-bottom: var(--border-width) solid var(--border-subtle);
}

.dl-tabs__tab {
	position: relative;
	padding: 0 0 14px; /* no token — puts the indicator on the rule below */
	border: 0;
	background: transparent;
	color: var(--text-muted);
	font: var(--weight-light) var(--text-base)/1.2 var(--font-display);
	text-decoration: none;
	cursor: pointer;
	transition: var(--transition-control);
}

.dl-tabs__tab[aria-selected='true'] {
	color: var(--text-heading);
	font-weight: var(--weight-medium);
}

/*
 * The indicator is an element, not a border: the design system draws it 2px and
 * borders in this system are always exactly 1px.
 */
.dl-tabs__tab::after {
	content: '';
	position: absolute;
	right: 0;
	bottom: -1px;
	left: 0;
	height: 2px; /* no token — indicator weight, not a border */
	background: transparent;
	transition: background-color var(--dur-fast) var(--ease-standard);
}

.dl-tabs__tab[aria-selected='true']::after {
	background: var(--brand);
}

.dl-tabs__panel[hidden] {
	display: none;
}

/* ══ Accordion ═══════════════════════════════════════════════════════════════
 * <details>/<summary>: the UA supplies the button role and aria-expanded, so
 * there is no JS and no ARIA to keep in sync. `multiple` is the default; single
 * mode is the `name` attribute, which browsers without exclusive-accordion
 * support simply ignore, degrading to multiple.
 */

.dl-accordion {
	background: var(--surface-card);
	border: var(--border-width) solid var(--border-subtle);
	border-radius: var(--radius-lg);
	overflow: hidden;
}

.dl-accordion__item + .dl-accordion__item {
	border-top: var(--border-width) solid var(--border-subtle);
}

.dl-accordion__header {
	display: flex;
	align-items: center;
	gap: 14px; /* no token */
	padding: var(--space-5) var(--space-6);
	color: var(--text-heading);
	font: var(--weight-regular) var(--text-base)/1.35 var(--font-display); /* 1.35 — no token */
	cursor: pointer;
	list-style: none;
	transition: var(--transition-control);
}

.dl-accordion__header::-webkit-details-marker {
	display: none;
}

.dl-accordion__item[open] > .dl-accordion__header {
	color: var(--text-brand);
}

.dl-accordion__title { flex: 1; }

.dl-accordion__chevron {
	color: var(--text-faint);
	transition: transform var(--dur-fast) var(--ease-standard);
}

.dl-accordion__item[open] .dl-accordion__chevron {
	transform: rotate(180deg);
}

.dl-accordion__body {
	padding: 0 var(--space-6) var(--space-6);
	font: var(--type-body);
	color: var(--text-body);
}

/* ── core/details as the Accordion ──
 *
 * The Accordion's contract is <details>/<summary>, and so is core's Details
 * block — so an FAQ written in the editor is already the right element and only
 * needs the paint. It is mapped here, next to the component, because that is
 * what it is; the screen layer does not own components.
 *
 * The background, the radius and the type come from theme.json's
 * `styles.blocks.core/details`. What is left is what theme.json cannot express:
 * the marker swap, the chevron, and the border a stack of them shares.
 */

.entry-content .wp-block-details {
	border: var(--border-width) solid var(--border-subtle);
	overflow: hidden;
}

/* Two neighbours read as one Accordion: the shared hairline is one border, not
   two stacked, and the corners between them stop being rounded. */
.entry-content .wp-block-details + .wp-block-details {
	margin-block-start: calc(var(--border-width) * -1);
}

.entry-content .wp-block-details > summary {
	display: flex;
	align-items: center;
	gap: 14px; /* no token — the Accordion header's own gap */
	padding: var(--space-5) var(--space-6);
	color: var(--text-heading);
	font: var(--weight-regular) var(--text-base)/1.35 var(--font-display); /* 1.35 — no token */
	cursor: pointer;
	list-style: none;
	transition: var(--transition-control);
}

.entry-content .wp-block-details > summary::-webkit-details-marker {
	display: none;
}

/* The chevron, as a mask on currentColor — the same delivery as every other
   glyph in the theme, so it takes the open state's colour with it. */
.entry-content .wp-block-details > summary::after {
	content: '';
	inline-size: 16px;
	block-size: 16px;
	margin-inline-start: auto;
	background: currentColor;
	mask: var(--ds-icon-chevron-down) center / contain no-repeat;
	transition: transform var(--dur-fast) var(--ease-standard);
}

.entry-content .wp-block-details[open] > summary {
	color: var(--text-brand);
}

.entry-content .wp-block-details[open] > summary::after {
	transform: rotate(180deg);
}

.entry-content .wp-block-details > :not(summary) {
	padding-inline: var(--space-6);
}

.entry-content .wp-block-details > :last-child:not(summary) {
	padding-block-end: var(--space-6);
}

/* ══ Pagination ══════════════════════════════════════════════════════════════ */

.dl-pagination {
	display: flex;
	align-items: center;
	gap: 6px; /* no token */
}

.dl-pagination__item {
	display: grid;
	place-items: center;
	min-width: 36px; /* no token */
	height: 36px; /* no token */
	padding: 0 10px; /* no token */
	border: var(--border-width) solid var(--border-subtle);
	border-radius: var(--radius-sm);
	background: var(--surface-card);
	color: var(--text-body);
	font: var(--weight-regular) var(--text-sm)/1 var(--font-body);
	text-decoration: none;
	cursor: pointer;
	transition: var(--transition-control);
}

.dl-pagination__item:hover:not([aria-disabled='true']):not([aria-current]) {
	border-color: var(--border-default);
	background: var(--neutral-25);
}

/* aria-current="page" is what makes it current; the fill only reflects it. */
.dl-pagination__item[aria-current='page'] {
	border-color: var(--brand-strong);
	background: var(--brand-strong);
	color: var(--text-inverse);
}

.dl-pagination__item[aria-disabled='true'] {
	color: var(--text-faint);
	cursor: not-allowed;
}

.dl-pagination__gap {
	padding: 0 var(--space-2);
	color: var(--text-faint);
}

/* ══ CheckoutSteps ═══════════════════════════════════════════════════════════ */

.dl-steps {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	list-style: none;
	margin: 0;
	padding: 0;
}

.dl-steps__step {
	display: flex;
	align-items: center;
	gap: 10px; /* no token */
}

.dl-steps__marker {
	display: grid;
	place-items: center;
	width: 26px; /* no token */
	height: 26px; /* no token */
	border: var(--border-width) solid transparent;
	border-radius: var(--radius-pill);
	background: var(--neutral-100);
	color: var(--text-faint);
	font: var(--weight-medium) var(--text-sm)/1 var(--font-body);
}

.dl-steps__label {
	font: var(--weight-light) var(--text-base)/1 var(--font-display);
	color: var(--text-muted);
}

.dl-steps__step[aria-current='step'] .dl-steps__marker {
	border-color: var(--border-brand);
	background: var(--brand-subtle);
	color: var(--text-brand);
}

.dl-steps__step[aria-current='step'] .dl-steps__label {
	color: var(--text-heading);
	font-weight: var(--weight-medium);
}

.dl-steps__step.is-done .dl-steps__marker {
	background: var(--brand-strong);
	color: var(--text-inverse);
}

.dl-steps__step.is-done .dl-steps__number {
	display: none;
}

.dl-steps__step:not(.is-done) .dl-steps__check {
	display: none;
}

.dl-steps__rule {
	flex: 1;
	max-width: var(--space-12);
	height: var(--border-width);
	background: var(--border-subtle);
}

.dl-steps__rule.is-done {
	background: var(--blue-200);
}

/* ══ CategoryNav ═════════════════════════════════════════════════════════════
 * The department accordion. Two containers, one markup: the menu drawer on
 * mobile and tablet, the 280px catalogue sidebar from 1024px up.
 *
 * Headers are buttons, so the whole row is the control — the icon, the label and
 * the chevron are all inside it. `aria-expanded` is the only state class the
 * component has; assets/js/components.js writes it and the CSS reads it, which
 * is why there is no `is-open` here.
 */

.dl-catnav {
	background: var(--surface-card);
	border: var(--border-width) solid var(--border-subtle);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-1);
	overflow: hidden;
}

/* Inside a drawer the card is the drawer; the accordion drops its own frame. */
.dl-catnav--flush {
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
}

.dl-catnav__dept + .dl-catnav__dept {
	border-top: var(--border-width) solid var(--border-subtle);
}

.dl-catnav__head {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	width: 100%;
	padding: var(--space-4) var(--space-5);
	text-align: left;
	background: transparent;
	color: var(--text-body);
	font: var(--weight-regular) var(--text-base) / 1.3 var(--font-body);
	transition: var(--transition-control);
}

.dl-catnav__head[aria-expanded="true"],
.dl-catnav__head.is-current,
.dl-catnav__head[aria-current] {
	background: var(--brand-subtle);
	color: var(--text-brand);
}

.dl-catnav__label {
	flex: 1;
}

.dl-catnav__icon {
	color: var(--text-faint);
}

.dl-catnav__head[aria-expanded="true"] .dl-catnav__icon,
.dl-catnav__head.is-current .dl-catnav__icon,
.dl-catnav__head[aria-current] .dl-catnav__icon {
	color: var(--brand);
}

.dl-catnav__chevron {
	color: var(--text-faint);
	transition: transform var(--dur-fast) var(--ease-standard);
}

.dl-catnav__head[aria-expanded="true"] .dl-catnav__chevron {
	transform: rotate(180deg);
}

/* The indent steps the subcategories in from the department head without going
   all the way under its label — with a third level below, hanging them off the
   glyph would push the deepest rows too far into a 280px column. The third
   level indents again from here, off its own list rather than off the card. */
.dl-catnav__list {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
	padding: var(--space-1) var(--space-5) var(--space-4) var(--space-7);
}

.dl-catnav__link {
	display: block;
	padding-block: var(--space-2);
	font: var(--type-small);
	color: var(--text-muted);
}

.dl-catnav__link:hover,
.dl-catnav__link[aria-current] {
	color: var(--text-brand);
}

/* The department's own archive. The button header cannot link to it, so it is
   the last entry in the list rather than a second control in the row. */
.dl-catnav__link--all {
	color: var(--text-brand);
}

/* A level-2 row that opens. Same type as the link beside it — only the row
   layout the chevron needs is added, so the two read as one list. */
.dl-catnav__sub {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	width: 100%;
	padding-block: var(--space-2);
	text-align: left;
	font: var(--type-small);
	color: var(--text-muted);
	transition: var(--transition-control);
}

.dl-catnav__sub:hover,
.dl-catnav__sub[aria-expanded='true'],
.dl-catnav__sub.is-current {
	color: var(--text-brand);
}

.dl-catnav__sub-label {
	flex: 1;
}

.dl-catnav__sub-chevron {
	flex: none;
	color: var(--text-faint);
	transition: transform var(--dur-fast) var(--ease-standard);
}

.dl-catnav__sub[aria-expanded='true'] .dl-catnav__sub-chevron {
	transform: rotate(180deg);
}

/* Level 3. The rule down the left is what separates it from level 2 at a
   glance — at 280px the indent alone does not carry. */
.dl-catnav__sublist {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
	margin-block: var(--space-1) var(--space-3);
	padding-left: var(--space-4);
	border-left: var(--border-width) solid var(--border-subtle);
}

/* Same size as the level above it — the rule and --text-faint carry the level,
   not a smaller type. The tighter leading is what keeps a long child name from
   reading as two list rows. */
.dl-catnav__sublist .dl-catnav__link {
	font: var(--weight-light) var(--text-sm) / 1.25 var(--font-body); /* 1.25 — no token */
	color: var(--text-faint);
}

.dl-catnav__sublist .dl-catnav__link:hover,
.dl-catnav__sublist .dl-catnav__link[aria-current] {
	color: var(--text-brand);
}

.dl-catnav__sublist .dl-catnav__link--all {
	color: var(--text-brand);
}

/* ══ FilterBlock ═════════════════════════════════════════════════════════════
 * One group of the catalogue filters. Two containers again, and this time two
 * markups: a plain <div> in the sidebar card, where every group is open, and a
 * <details> in the drawer, where they are an accordion. A <details> forced open
 * by CSS would still be a disclosure to a screen reader — a control announcing
 * a state the customer cannot change — so the container that has no disclosure
 * does not render one.
 *
 * The hairline is on the top edge only. The card's own "Filtrer" heading sits
 * above the first block, so the rule under it is the first block's border and
 * the last block closes on the card's own edge — no double line either end.
 */

.dl-filter-block {
	padding: var(--space-5);
	border-top: var(--border-width) solid var(--border-subtle);
}

.dl-filter-block__title {
	margin-bottom: var(--space-4);
	font: var(--type-body-strong);
	color: var(--text-heading);
}

/* The drawer's variant: the title is the disclosure's own row. */
.dl-filter-block__summary {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	margin-bottom: 0;
	cursor: pointer;
	list-style: none;
}

.dl-filter-block__summary::-webkit-details-marker {
	display: none;
}

.dl-filter-block__chevron {
	margin-left: auto;
	color: var(--text-faint);
	transition: transform var(--dur-fast) var(--ease-standard);
}

.dl-filter-block--item[open] > .dl-filter-block__summary {
	margin-bottom: var(--space-4);
}

.dl-filter-block--item[open] .dl-filter-block__chevron {
	transform: rotate(180deg);
}

/*
 * 9px between rows, as the handoff has it. The rows themselves are compact
 * checkboxes — .dl-check--compact drops the padding the sidebar has no room
 * for, and the row's own min-height sets what is left of the height.
 */
.dl-filter-block__list {
	display: flex;
	flex-direction: column;
	gap: 9px; /* no token */
}

/*
 * A filter list runs to dozens of values, and the handoff's 44px hit-target
 * floor turned it into a column of unrelated blocks rather than one scannable
 * list. The row keeps only the height its 18px box needs (#39).
 */
.dl-filter-block__row {
	align-items: center;
	min-height: var(--space-7);
}

/*
 * A brand list is 121 terms long on this catalogue and a category can carry
 * dozens of them. Past eight rows the rest go behind "Vis alle (93)" — a
 * <details>, so it opens with the script blocked and is announced as the
 * disclosure it is. It replaces a 292px scrollbox: a group scrolling inside a
 * sidebar scrolling inside the page was three nested scrollers, and a trackpad
 * gesture landed in whichever one the pointer was over (#27).
 */
.dl-filter-block__more {
	display: flex;
	flex-direction: column;
	gap: 9px; /* no token — the list's own row rhythm */
}

.dl-filter-block__more-toggle {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	min-height: 44px; /* no token — the handoff's hit-target floor */
	font: var(--type-small);
	font-weight: var(--weight-medium);
	color: var(--text-brand);
	cursor: pointer;
	list-style: none;
}

.dl-filter-block__more-toggle::-webkit-details-marker {
	display: none;
}

.dl-filter-block__more-chevron {
	transition: transform var(--dur-fast) var(--ease-standard);
}

/* One control, two words: the label states what the click will do next. */
.dl-filter-block__more-hide,
.dl-filter-block__more[open] .dl-filter-block__more-show {
	display: none;
}

.dl-filter-block__more[open] .dl-filter-block__more-hide {
	display: inline;
}

.dl-filter-block__more[open] .dl-filter-block__more-chevron {
	transform: rotate(180deg);
}

.dl-filter-block__price {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
}

.dl-filter-block__price-field {
	flex: 1 1 0;
	min-width: 0;
}

/* The sidebar's Apply, on its own row under the pair it belongs to. */
.dl-filter-block__price-apply {
	flex: 1 0 100%;
}

/* Room for the "kr" the suffix draws over the field. */
.dl-filter-block__price-input {
	padding-right: var(--space-8);
}

/*
 * No native spinner. Its two arrows are 20px of chrome inside a 32px control,
 * squeezing a five-figure price into what is left, and stepping a 200–120 000 kr
 * range one krone at a time is not a thing anyone does.
 */
.dl-filter-block__price-input::-webkit-outer-spin-button,
.dl-filter-block__price-input::-webkit-inner-spin-button {
	appearance: none;
	margin: 0;
}

.dl-filter-block__price-input {
	appearance: textfield;
}

/*
 * The submit is the no-script path: with the script running, a tick in the
 * sidebar applies immediately and a price has its own button beside it, so this
 * one would be a second way to do what has already happened. Hidden rather than
 * removed, so the customer who ticks a box before the script loads still has
 * one.
 */
.dl-filters__submit {
	padding: 0 var(--space-5) var(--space-5);
}

.dl-filters.is-live .dl-filters__submit {
	display: none;
}

/* ══ 7. EmptyState ═══════════════════════════════════════════════════════════ */

.dl-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: var(--space-4);
	padding: var(--space-11) var(--space-7);
}

.dl-empty__icon {
	display: grid;
	place-items: center;
	width: 56px; /* no token */
	height: 56px; /* no token */
	border-radius: var(--radius-pill);
	background: var(--brand-subtle);
	color: var(--brand);
}

.dl-empty__title {
	font: var(--type-h3);
	color: var(--text-heading);
}

.dl-empty__text {
	max-width: 380px; /* no token — the measure the design system caps this copy at */
	font: var(--type-body);
	color: var(--text-muted);
}

/*
 * One exit usually, two where the screen genuinely has two — a category narrowed
 * to a car offers the category without the car and the car without the category.
 * They wrap rather than shrink: two full labels stacked read better at 390 than
 * two truncated ones side by side.
 */
.dl-empty__action {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-4);
	margin-top: var(--space-3);
}

/* ══ Skeleton ════════════════════════════════════════════════════════════════ */

.dl-skeleton {
	display: block;
	width: 100%;
	height: 14px; /* no token */
	border-radius: var(--radius-sm);
	background: linear-gradient(
		90deg,
		var(--neutral-100) 25%,
		var(--neutral-200) 37%,
		var(--neutral-100) 63%
	);
	background-size: 400% 100%;
	animation: ds-shimmer var(--dl-dur-shimmer) ease-in-out infinite;
}

.dl-skeleton--text { height: var(--space-4); }
.dl-skeleton--title { height: var(--space-6); }
.dl-skeleton--plate {
	height: auto;
	aspect-ratio: 4 / 3;
	border-radius: var(--radius-lg);
}

/* ══ Toast ═══════════════════════════════════════════════════════════════════
 * The region lives once per document and is built by assets/js/components.js.
 * Two placements, both from --dl-toast-* in base.css: a 340px card in the
 * bottom-right corner from 768px up, and a full-width band between 12px insets
 * below it, sitting clear of the BottomNav and the StickyBuyBar alike — see the
 * note beside the tokens for why that distance is a sum rather than the
 * handoff's 78px.
 */

.dl-toasts {
	position: fixed;
	left: var(--dl-toast-left);
	right: var(--dl-toast-right);
	bottom: var(--dl-toast-bottom);
	width: var(--dl-toast-w);
	max-width: calc(100vw - var(--dl-toast-inset) * 2);
	z-index: 90; /* above the header, below the modal */
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
	pointer-events: none;
}

.dl-toasts > * {
	pointer-events: auto;
}

.dl-toast {
	display: flex;
	align-items: flex-start;
	gap: var(--space-4);
	/* The region is the measure; the toast fills it. */
	width: 100%;
	padding: var(--space-5);
	border: var(--border-width) solid var(--border-subtle);
	border-radius: var(--radius-lg);
	background: var(--surface-card);
	box-shadow: var(--shadow-4);
	animation: ds-rise var(--dur-slow) var(--ease-out);
}

.dl-toast__icon {
	display: flex;
	padding-top: 1px; /* no token — optical */
	color: var(--status-success);
}

.dl-toast--info .dl-toast__icon { color: var(--status-info); }
.dl-toast--danger .dl-toast__icon { color: var(--status-danger); }

.dl-toast__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}

.dl-toast__title {
	font: var(--type-body-strong);
	color: var(--text-heading);
}

.dl-toast__text {
	font: var(--type-small);
	color: var(--text-muted);
}

.dl-toast__action {
	margin-top: 6px; /* no token */
}

.dl-toast__close {
	padding: 2px; /* --space-1 */
	border: 0;
	background: transparent;
	color: var(--text-faint);
	cursor: pointer;
}

/* ══ Modal ═══════════════════════════════════════════════════════════════════
 * <dialog> opened with showModal(): the focus trap, the Escape handler and the
 * inert background are the platform's, not ours. assets/js/components.js only
 * wires the open and close triggers.
 */

.dl-modal {
	width: 520px; /* no token — the design system's default dialog measure */
	max-width: 100%;
	max-height: 86vh;
	padding: 0;
	overflow: auto;
	border: var(--border-width) solid var(--border-subtle);
	border-radius: var(--radius-xl);
	background: var(--surface-card);
	box-shadow: var(--shadow-4);
	color: var(--text-body);
}

.dl-modal[open] {
	animation: ds-rise var(--dur-base) var(--ease-out);
}

.dl-modal::backdrop {
	background: var(--surface-overlay);
}

.dl-modal--wide { width: 720px; } /* no token */

.dl-modal__header {
	display: flex;
	align-items: center;
	gap: var(--space-5);
	padding: var(--space-6) var(--space-7);
	border-bottom: var(--border-width) solid var(--border-subtle);
}

.dl-modal__title {
	flex: 1;
	font: var(--type-h3);
}

.dl-modal__close {
	padding: var(--space-2);
	border: 0;
	background: transparent;
	color: var(--text-faint);
	cursor: pointer;
}

.dl-modal__body {
	padding: var(--space-7);
	font: var(--type-body);
}

.dl-modal__footer {
	display: flex;
	justify-content: flex-end;
	gap: var(--space-4);
	padding: var(--space-6) var(--space-7);
	border-top: var(--border-width) solid var(--border-subtle);
}

/* ══ Drawer ══════════════════════════════════════════════════════════════════
 * The edge-anchored slide-over: the menu (left), the filters (right) and the
 * mini-cart (right). Like Modal it is a <dialog> opened with showModal(), so the
 * scrim, the focus trap, Escape and the inert background come from the browser.
 *
 * The <dialog> *is* the panel — there is no inner wrapper — which is what lets
 * the slide be a `translate` transition on the element itself. Since `display`
 * flips between none and flex, the enter transition needs `allow-discrete` and
 * `@starting-style`; where those are not supported the drawer simply appears
 * without sliding, which is the same thing prefers-reduced-motion asks for.
 *
 * Width is per-instance: --dl-drawer-w, set inline by delsenter_get_drawer().
 * 330px for the menu, 340px for the filters.
 */

.dl-drawer {
	width: var(--dl-drawer-w, 330px);
	max-width: 90%;
	height: 100dvh;
	max-height: 100dvh;
	margin-block: 0;
	padding: 0;
	border: 0;
	background: var(--surface-card);
	color: var(--text-body);
	box-shadow: var(--shadow-4);
	overflow: hidden; /* the body scrolls; the panel itself never does */
	transition:
		translate var(--dur-base) var(--ease-out),
		display var(--dur-base) allow-discrete,
		overlay var(--dur-base) allow-discrete;
}

.dl-drawer[open] {
	display: flex;
	flex-direction: column;
}

.dl-drawer--left {
	margin-inline: 0 auto;
	border-inline-end: var(--border-width) solid var(--border-subtle);
}

.dl-drawer--right {
	margin-inline: auto 0;
	border-inline-start: var(--border-width) solid var(--border-subtle);
}

.dl-drawer--left:not([open]) { translate: -100% 0; }
.dl-drawer--right:not([open]) { translate: 100% 0; }

@starting-style {
	.dl-drawer--left[open] { translate: -100% 0; }
	.dl-drawer--right[open] { translate: 100% 0; }
}

.dl-drawer::backdrop {
	background: var(--surface-overlay);
	opacity: 0;
	transition:
		opacity var(--dur-base) var(--ease-out),
		display var(--dur-base) allow-discrete,
		overlay var(--dur-base) allow-discrete;
}

.dl-drawer[open]::backdrop {
	opacity: 1;
}

@starting-style {
	.dl-drawer[open]::backdrop { opacity: 0; }
}

.dl-drawer__header {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	padding: var(--space-5) var(--space-6);
	border-bottom: var(--border-width) solid var(--border-subtle);
}

.dl-drawer__title {
	flex: 1;
	margin: 0;
	font: var(--type-h3);
}

.dl-drawer__close {
	padding: var(--space-2);
	color: var(--text-faint);
	border-radius: var(--radius-sm);
	transition: var(--transition-control);
}

.dl-drawer__close:hover {
	color: var(--text-body);
}

/*
 * The body is a bare scroll container: no padding, because what goes in it —
 * the department accordion, a filter list, cart lines — carries its own edges
 * and half of it wants to bleed to the panel's sides. A caller that needs
 * inset content pads its own wrapper.
 *
 * `overscroll-behavior` keeps a flick at the end of the list from scrolling the
 * page behind the scrim — the scroll lock stops the document, not the chain.
 */
.dl-drawer__body {
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
}

/* Sticky by being a flex sibling rather than by `position`, so it never covers
   the last row of a scrolled body. The safe area is the home indicator on iOS. */
.dl-drawer__footer {
	padding: var(--space-5) var(--space-6);
	padding-bottom: calc(var(--space-5) + env(safe-area-inset-bottom));
	border-top: var(--border-width) solid var(--border-subtle);
}

/* ══ 8. Commerce ═════════════════════════════════════════════════════════════
 *
 * Price, ProductCard and the grid they sit in. Emitted by the WooCommerce
 * overrides in woocommerce/ — see inc/product-card.php for which hook draws
 * which part.
 */

/* ── Price ──
 * Wrapped around WooCommerce's own price HTML, which is where <del>, <ins> and
 * the screen-reader text explaining them come from. The theme colours that
 * markup; it never builds a number.
 */

.dl-price {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
}

/*
 * Baseline-aligned so the struck-through original and the current price sit on
 * one line however different their sizes are. It wraps rather than shrinking:
 * a variable product's range plus its "was" price does not fit a 200px card.
 */
.dl-price__value {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: var(--space-3);
	font: var(--type-price);
	color: var(--text-price);
}

.dl-price--sm .dl-price__value { font-size: var(--text-base); }
.dl-price--lg .dl-price__value { font-size: var(--text-2xl); }

/* The original. Body face, not display: it is a footnote to the real price. */
.dl-price__value del {
	font: var(--weight-light) var(--text-sm) / var(--leading-tight) var(--font-body);
	color: var(--text-price-was);
	text-decoration: line-through;
}

/*
 * The sale price — the only positive use of red in the system. <ins> is
 * underlined and tinted by the UA, which would read as a link here.
 */
.dl-price__value ins {
	background: none;
	color: var(--text-price-sale);
	text-decoration: none;
}

.dl-price__vat {
	font: var(--type-caption);
	color: var(--text-faint);
}

/* ── ProductCard ── */

.dl-product-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%; /* equal height across a row, whatever the title does */
	background: var(--surface-card);
	border: var(--border-width) solid var(--border-subtle);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-1);
	transition: var(--transition-elevate);
}

/*
 * :focus-within as well as :hover — the lift is how the card says which tile is
 * live, and a keyboard reaches it just as a pointer does.
 */
.dl-product-card:hover,
.dl-product-card:focus-within {
	box-shadow: var(--shadow-3);
	transform: translateY(-2px); /* no token — the design system's card lift */
}

/* ── The 4:3 plate ── */

.dl-product-card__plate {
	position: relative;
	aspect-ratio: 4 / 3;
	display: grid;
	place-items: center;
	overflow: hidden;
	background: var(--surface-card);
}

/*
 * `contain`, not the handoff's `cover`. The catalogue feed carries every aspect
 * ratio there is and a part has to be shown whole — a wheel or a bumper cut off
 * at the edge reads as a different product. The plate keeps its 4:3 so a row of
 * cards still lines up; what does not fill it letterboxes against the card's own
 * surface, so the letterboxing reads as air rather than as a second panel.
 */
.dl-product-card__image {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform var(--dur-slow) var(--ease-out);
}

.dl-product-card:hover .dl-product-card__image {
	transform: scale(1.03); /* no token */
}

/* The stand-in for a product with no image: neutral and captioned, not broken. */
.dl-product-card__placeholder {
	font: var(--type-caption);
	color: var(--text-faint);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.dl-product-card__badges {
	position: absolute;
	top: 10px; /* no token — the badge inset as drawn */
	left: 10px; /* no token */
	display: flex;
	gap: 6px; /* no token */
}

/*
 * The wishlist heart. Revealed on hover where hover exists and shown at rest
 * where it does not — --dl-hover-reveal, resolved in section 1 of base.css.
 * z-index lifts it over the title's stretched link, which covers the card.
 */
.dl-product-card__wishlist {
	position: absolute;
	top: var(--space-3);
	right: var(--space-3);
	z-index: 1;
	background: var(--surface-card);
	opacity: var(--dl-hover-reveal);
	transition: opacity var(--dur-fast) var(--ease-standard);
}

.dl-product-card:hover .dl-product-card__wishlist,
.dl-product-card__wishlist:focus-visible,
.dl-product-card__wishlist[aria-pressed='true'] {
	opacity: 1;
}

.dl-product-card__wishlist[aria-pressed='true'] {
	color: var(--text-price-sale);
}

/* ── Body ── */

.dl-product-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
	flex: 1;
	padding: var(--space-6); /* 20px — product tiles are the exception to 24 */
}

.dl-product-card__category {
	font: var(--weight-medium) var(--text-xs) / var(--leading-tight) var(--font-display);
	color: var(--text-muted);
	letter-spacing: var(--tracking-wide);
}

/*
 * Two lines, clamped. The clamp is visual only: the full title — fitment code
 * and all — stays in the DOM and is the accessible name of the link, because it
 * is the part a customer matches against their own car. Nothing trims it on the
 * server. The min-height is two lines of the same type, so a one-line title
 * does not shorten its card.
 */
.dl-product-card__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: calc(var(--text-base) * 1.4 * 2); /* no token — 1.4 sits between --leading-snug and --leading-normal */
	font: var(--weight-regular) var(--text-base) / 1.4 var(--font-body); /* no token — as drawn */
	color: var(--text-heading);
}

/*
 * The whole card is clickable, and it is this link that makes it so — not an <a>
 * around the tile, which would swallow the add-to-cart button and the heart.
 *
 * The focus indicator belongs on the card, not on a two-line run of text, so
 * both halves of the global rule are resolved away here and repainted on the
 * card below.
 */
.dl-product-card__link {
	--focus-ring: none;
	--dl-focus-outline: none;

	color: inherit;
}

.dl-product-card__link::after {
	content: '';
	position: absolute;
	inset: 0;
}

.dl-product-card__link:hover {
	color: var(--text-brand);
}

.dl-product-card:has(.dl-product-card__link:focus-visible) {
	border-color: var(--border-brand);
	box-shadow: var(--focus-ring);
}

.dl-product-card__sku {
	margin-top: calc(var(--space-4) * -1 + var(--space-1));
}

/* Pinned to the foot of the card, so prices line up across a row. */
.dl-product-card__foot {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
}

/* Both live above the stretched link and stay separately clickable. */
.dl-product-card__foot .dl-btn {
	position: relative;
	z-index: 1;
}

/* ── Skeleton ── */

.dl-product-card--skeleton .dl-skeleton--plate {
	border-radius: 0;
}

.dl-product-card__skeleton-eyebrow { width: 40%; }
.dl-product-card__skeleton-sku { width: 60%; }
.dl-product-card__skeleton-price { width: 55%; }
.dl-product-card__skeleton-btn { height: var(--control-h-sm); }

/* ── The grid ──
 * `.dl-products` is the shared base; the tracks themselves are `.dl-grid--g4`
 * and `.dl-grid--cards` from base.css, so no column count is written here.
 */

.dl-products {
	align-items: stretch;
}

/*
 * The mobile carousel. Every value is a property resolved in section 1 of
 * base.css: below 768px this is a snapping flex row of 200px cards bleeding
 * into the gutter, and from tablet up the very same element is the g4 grid.
 */
.dl-product-row {
	display: var(--dl-row-display);
	grid-template-columns: var(--dl-row-columns);
	gap: var(--ds-grid-gutter);
	overflow-x: var(--dl-row-overflow);
	scroll-snap-type: var(--dl-row-snap);
	margin-inline: var(--dl-row-bleed);
	padding-inline: calc(var(--dl-row-bleed) * -1);
	padding-block-end: var(--dl-row-pad-block-end);
	scroll-padding-inline-start: calc(var(--dl-row-bleed) * -1);
}

.dl-product-row > .dl-product-card {
	flex: var(--dl-row-item);
	scroll-snap-align: start;
}

/* ── CartLine ──
 * One row in the cart. Two shapes from one markup tree: below 768px the
 * handoff's tighter variant — a 72px plate, the line total under the title, the
 * stepper and the bin on a row of their own — and above it the five-column row
 * with the quantity and the total beside the title. The areas are the whole
 * difference and they are declared in section 1 of base.css.
 *
 * The mini-cart has its own, narrower line (.dl-minicart__line): a drawer 420px
 * wide has no column for a unit price, and the two would have had to be one
 * component with a third shape in it. They share the stepper, the bin's
 * behaviour and the cart-item contract, which is where the reuse actually is.
 */

.dl-cartline {
	display: grid;
	grid-template-columns: var(--dl-cartline-cols);
	grid-template-areas: var(--dl-cartline-areas);
	align-items: var(--dl-cartline-align);
	gap: var(--dl-cartline-row-gap) var(--dl-cartline-gap);
	padding-block: var(--dl-cartline-pad-block);
	border-block-end: var(--border-width) solid var(--border-subtle);
}

/* The last hairline would draw a second line above the ghost actions, which
   carry their own. */
.dl-cartline:last-child {
	border-block-end: 0;
}

/* A line mid-request: dimmed rather than removed, because the fragment that
   replaces the list is the authority on what is left. */
.dl-cartline.is-busy {
	opacity: 0.5;
	pointer-events: none;
}

.dl-cartline__plate {
	grid-area: plate;
	display: grid;
	place-items: center;
	width: var(--dl-cartline-plate);
	height: var(--dl-cartline-plate);
	overflow: hidden;
	border: var(--border-width) solid var(--border-subtle);
	border-radius: var(--radius-md);
	background: var(--neutral-50);
}

/*
 * Contained, never cropped — the catalogue feed carries every aspect ratio and
 * has no house style to crop against. #11's rule.
 */
.dl-cartline__img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.dl-cartline__placeholder {
	display: grid;
	place-items: center;
	color: var(--neutral-300);
}

.dl-cartline__info {
	grid-area: info;
	display: flex;
	flex-direction: column;
	gap: 3px; /* no token — the handoff's line spacing inside a CartLine */
	min-width: 0;
}

.dl-cartline__title {
	font: var(--weight-regular) var(--text-base) / 1.35 var(--font-body);
	color: var(--text-heading);
	text-decoration: none;
}

.dl-cartline__title:hover {
	color: var(--text-brand);
}

.dl-cartline__sku {
	font: var(--type-mono);
	color: var(--text-faint);
}

/* Variation attributes and any plugin's item data, as WooCommerce formats them:
   a <dl> of name/value pairs, which is a two-line stack by default. */
.dl-cartline__meta,
.dl-cartline__meta p {
	margin: 0;
	font: var(--type-caption);
	color: var(--text-muted);
}

.dl-cartline__meta dl,
.dl-cartline__meta dt,
.dl-cartline__meta dd {
	display: inline;
	margin: 0;
}

.dl-cartline__meta dd + dt::before {
	content: ' · ';
}

.dl-cartline__backorder {
	margin: 0;
	font: var(--type-caption);
	color: var(--status-warning);
}

/* The unit price, hidden on the compact line — where the total is the only
   number the design shows. */
.dl-cartline__unit {
	display: var(--dl-cartline-unit-display);
	align-items: baseline;
	gap: var(--space-2);
	font: var(--type-caption);
	color: var(--text-muted);
}

.dl-cartline__unit del {
	color: var(--text-faint);
}

.dl-cartline__qty {
	grid-area: qty;
}

.dl-cartline__price {
	grid-area: price;
	justify-self: var(--dl-cartline-price-align);
	min-width: var(--dl-cartline-price-width);
	text-align: var(--dl-cartline-price-align);
}

.dl-cartline__remove {
	grid-area: remove;
	display: grid;
	place-items: center;
	width: var(--control-h-sm);
	height: var(--control-h-sm);
	border: 0;
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--text-faint);
	cursor: pointer;
	text-decoration: none;
}

.dl-cartline__remove:hover {
	background: var(--status-danger-bg);
	color: var(--status-danger);
}

/* ── MiniCart ──
 * The generic Drawer's third use, and its only desktop one. Nothing here styles
 * the panel — that is .dl-drawer — only what goes inside it: the compact
 * CartLine, and the subtotal block in the footer slot.
 *
 * `--dl-minicart-display` is `none` below 1024px. A closed <dialog> is already
 * display: none and out of the tab order, so this only matters if something ever
 * opens it at a width that has no mini-cart; the header's cart button is a plain
 * link to the cart page there. It carries no scroll container of its own — the
 * drawer's body is the one, which is the count #27 settled for a modal over a
 * locked page.
 */

.dl-drawer--cart[open] {
	display: var(--dl-minicart-display);
	flex-direction: column;
}

/* The drawer body is deliberately unpadded — see there — so the list insets
   itself, and the hairlines between lines run the full width of the panel. */
.dl-minicart__lines {
	padding-inline: var(--space-6);
}

.dl-minicart__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dl-minicart__line {
	display: grid;
	/* Three columns, not four: the line total sits inside the info column beside
	   the stepper — see .dl-minicart__edit. No token: the compact plate as drawn. */
	grid-template-columns: 56px 1fr auto;
	align-items: center;
	gap: var(--space-4);
	padding-block: var(--space-4);
	border-bottom: var(--border-width) solid var(--border-subtle);
}

/* A line waiting on the server is dimmed rather than removed: the fragment that
   replaces the list is the authority on what is left, and taking the row out
   first would move the drawer twice. */
.dl-minicart__line.is-busy,
/* A QuantityStepper that edits a cart line — `data-dl-cart-qty` — while its
   debounced update is in flight. The cart screen is where those are rendered;
   the state is declared beside the other waiting states rather than there, so
   there is one opacity for waiting in the theme. */
.dl-qty.is-busy {
	opacity: 0.45; /* the same value every waiting control in the system uses */
	pointer-events: none;
}

/*
 * The plate keeps the product's own ratio against --neutral-50 — #11's rule:
 * a catalogue feed with every aspect ratio in it has nothing to crop against.
 */
.dl-minicart__plate {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	overflow: hidden;
	border: var(--border-width) solid var(--border-subtle);
	border-radius: var(--radius-md);
	background: var(--neutral-50);
}

.dl-minicart__plate img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.dl-minicart__info {
	display: flex;
	flex-direction: column;
	gap: 5px; /* no token — the compact line's internal rhythm */
	min-width: 0;
}

.dl-minicart__title {
	font: var(--weight-regular) var(--text-base) / 1.35 var(--font-body);
	color: var(--text-heading);
	text-decoration: none;
}

.dl-minicart__title:hover {
	color: var(--text-brand);
}

.dl-minicart__meta {
	font: var(--type-caption);
	color: var(--text-faint);
}

/* The stepper and the line total, on their own row under the title. The extra
   2px lifts the row off the title's descenders — the stepper is a 32px control
   against a 16px line, and the info column's own 5px is drawn for text. */
.dl-minicart__edit {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	margin-top: 2px; /* no token — optical, see above */
}

/* Caption grey, and deliberately not the price type: the figure that carries
   the weight in this drawer is the subtotal in the footer, and a line total set
   in --type-body-strong beside a control competes with it. */
.dl-minicart__total {
	font: var(--type-caption);
	color: var(--text-muted);
	white-space: nowrap;
}

.dl-minicart__remove {
	display: grid;
	place-items: center;
	/* Top-aligned against a line that is now two rows tall — the trash sits with
	   the title it removes, not floating at the middle of the stepper. */
	align-self: flex-start;
	width: 32px; /* no token — the icon target as drawn */
	height: 32px;
	border: 0;
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--text-faint);
	cursor: pointer;
	transition: var(--transition-control);
}

.dl-minicart__remove:hover {
	color: var(--status-danger);
	background: var(--neutral-50);
}

/* ── The footer ──
 * Empty but present while the cart is: it is a fragment target, and a fragment
 * cannot replace an element that is not in the document. Its own padding is the
 * drawer footer's, so an empty one takes no room at all.
 */
.dl-drawer__footer:has(.dl-minicart__foot:empty) {
	display: none;
}

.dl-minicart__foot {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

.dl-minicart__sum {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
}

.dl-minicart__sum-label {
	font: var(--type-body-strong);
	color: var(--text-heading);
}

.dl-minicart__sum-value {
	font: var(--type-price);
	font-size: var(--text-xl);
	color: var(--text-heading);
}

/* ── Discounts in the drawer ──
 * A cart-level discount is a row of its own, in the success colour the cart's
 * own summary gives discounts, and the sum under it is what those rows add up
 * to. Once they are there the subtotal is no longer the number the customer is
 * looking for, so it steps down to body size and the result keeps the price
 * type — the emphasis follows the meaning rather than the order of the markup.
 */
.dl-minicart__sum--discount .dl-minicart__sum-label,
.dl-minicart__foot:has(.dl-minicart__sum--discount) .dl-minicart__sum:first-child .dl-minicart__sum-label {
	font: var(--type-body);
	color: var(--text-muted);
}

.dl-minicart__sum--discount .dl-minicart__sum-value,
.dl-minicart__foot:has(.dl-minicart__sum--discount) .dl-minicart__sum:first-child .dl-minicart__sum-value {
	font: var(--type-body);
	font-size: var(--text-base);
}

.dl-minicart__sum--discount .dl-minicart__sum-value {
	color: var(--status-success);
}

.dl-minicart__note {
	font: var(--type-caption);
	color: var(--text-faint);
}

.dl-minicart__actions {
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
	margin-block-start: var(--space-2);
}

/* ══ OrderRow ════════════════════════════════════════════════════════════════
 *
 * One order in Min konto — the dashboard's «Siste ordrer» card and the Ordrer
 * screen (#21). A component rather than a screen rule because both draw it and
 * because it is the design system's own `OrderRow`.
 *
 * From 1024px up it is the `orders` grid, under the uppercase eyebrow the list
 * puts above it. Below that the grid collapses to one column and the row reads
 * as a stacked block: the id and the date, then the badge, the total and the
 * action on one line. The header is `aria-hidden` and hidden with it — column
 * names for columns that are no longer there.
 */

.dl-order-list {
	display: flex;
	flex-direction: column;
}

.dl-order-head,
.dl-order-row {
	display: grid;
	grid-template-columns: var(--dl-track-orders);
	gap: var(--dl-order-row-gap);
	align-items: center;
}

.dl-order-head {
	display: var(--dl-order-head-display);
	padding-block-end: 10px; /* no token — as drawn under the eyebrow */
	border-block-end: 1px solid var(--border-subtle);
	font: var(--type-eyebrow);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
	color: var(--text-faint);
}

.dl-order-row {
	padding-block: var(--space-5);
	border-block-end: 1px solid var(--border-subtle);
}

.dl-order-row:last-child {
	border-block-end: 0;
	padding-block-end: 0;
}

.dl-order-row__id {
	grid-area: var(--dl-order-id-area);
	font: var(--type-mono);
	letter-spacing: var(--tracking-wide);
	color: var(--text-heading);
}

.dl-order-row__date {
	grid-area: var(--dl-order-date-area);
	font: var(--type-small);
	color: var(--text-muted);
}

.dl-order-row__status {
	grid-area: var(--dl-order-status-area);
	justify-self: var(--dl-order-cell-justify);
}

.dl-order-row__total {
	grid-area: var(--dl-order-total-area);
	justify-self: var(--dl-order-cell-justify);
	text-align: var(--dl-order-cell-align);
	font: var(--type-body);
	color: var(--text-heading);
}

.dl-order-row__items {
	margin-inline-start: var(--space-3);
	font: var(--type-caption);
	color: var(--text-faint);
}

/* On one column the action is a full-width control rather than a button
   floating at the end of a stacked block. */
.dl-order-row__action {
	grid-area: var(--dl-order-action-area);
	justify-self: var(--dl-order-action-justify);
}

.dl-order-row__action .dl-btn {
	width: var(--dl-order-action-width);
	justify-content: center;
}

/* ══ 9. Sections ═════════════════════════════════════════════════════════════
 *
 * Three pieces every screen in the shop reuses: the header a row opens with,
 * the category tile, and the blog teaser. They live here rather than in
 * screens.css because none of them belongs to the front page — that is only
 * where they are used first.
 *
 * Every responsive value is a custom property resolved in section 1 of base.css.
 */

/* ── Section header ── */

.dl-section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--dl-section-head-gap);
	margin-block-end: var(--dl-section-head-space);
}

.dl-section-head__eyebrow {
	margin-block-end: var(--dl-section-head-eyebrow-gap);
}

.dl-section-head__title {
	font: var(--dl-section-head-title-font);
	letter-spacing: var(--tracking-snug);
}

/* The action never shrinks under a long title, and never wraps its own label. */
.dl-section-head__action {
	flex: 0 0 auto;
	white-space: nowrap;
}

/* ── CategoryTile ──
 * The image-led entry the "Delsenter Bestselgere" row is made of. Unlike the
 * product card it is one link and nothing else, so the whole tile is the <a>:
 * there is no button and no wishlist heart inside it for a wrapping link to
 * swallow, and the focus ring lands on the tile itself through the global rule.
 */

.dl-cat-tile {
	display: flex;
	flex-direction: column;
	background: var(--surface-card);
	border: var(--border-width) solid var(--border-subtle);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-0);
	color: inherit;
	transition: var(--transition-elevate);
}

.dl-cat-tile:hover {
	box-shadow: var(--shadow-2);
}

.dl-cat-tile__plate {
	aspect-ratio: 5 / 4;
	display: grid;
	place-items: center;
	overflow: hidden;
	background: var(--neutral-100);
}

/*
 * `cover`, and the one place the theme crops. Category imagery is house-shot for
 * the slot it sits in — it is not the product feed, which carries every aspect
 * ratio there is and is shown whole for that reason.
 */
.dl-cat-tile__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--dur-slow) var(--ease-out);
}

.dl-cat-tile:hover .dl-cat-tile__image {
	transform: scale(1.04); /* no token — the tile's zoom as drawn */
}

.dl-cat-tile__glyph {
	color: var(--neutral-300);
}

.dl-cat-tile__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	padding: var(--space-4) var(--space-5);
}

.dl-cat-tile__label {
	font: var(--weight-regular) var(--text-base) / var(--leading-snug) var(--font-display);
	color: var(--text-heading);
}

.dl-cat-tile__meta {
	display: flex;
	align-items: center;
	gap: 6px; /* no token — optical, between the count and its arrow */
	color: var(--text-faint);
	transition: color var(--dur-fast) var(--ease-standard);
}

.dl-cat-tile:hover .dl-cat-tile__meta {
	color: var(--text-brand);
}

.dl-cat-tile__count {
	font: var(--type-caption);
}

/* ── Blog teaser card ──
 * A 16:9 plate over `date · category`, the title, an excerpt and the arrow that
 * says the card is clickable. Below 768px the same markup lies on its side with
 * a 104px image rail, and the excerpt and the arrow are gone.
 */

.dl-post-card {
	position: relative;
	display: flex;
	flex-direction: var(--dl-post-card-direction);
	height: 100%;
	background: var(--surface-card);
	border: var(--border-width) solid var(--border-subtle);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-1);
	transition: var(--transition-elevate);
}

.dl-post-card:hover,
.dl-post-card:focus-within {
	box-shadow: var(--shadow-3);
	transform: translateY(-2px); /* no token — the design system's card lift */
}

.dl-post-card__plate {
	flex: 0 0 var(--dl-post-card-plate-width);
	width: var(--dl-post-card-plate-width);
	aspect-ratio: var(--dl-post-card-plate-ratio);
	background: var(--neutral-100);
	overflow: hidden;
}

.dl-post-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dl-post-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	flex: 1;
	min-width: 0;
	padding: var(--dl-post-card-pad);
}

.dl-post-card__meta {
	font: var(--type-caption);
	color: var(--text-faint);
}

.dl-post-card__title {
	font: var(--dl-post-card-title-font);
	color: var(--text-heading);
}

/* The card's one link, stretched over the card — see the ProductCard note,
   including why both halves of the focus rule are resolved away here. */
.dl-post-card__link {
	--focus-ring: none;
	--dl-focus-outline: none;

	color: inherit;
}

.dl-post-card__link::after {
	content: '';
	position: absolute;
	inset: 0;
}

.dl-post-card__link:hover {
	color: var(--text-brand);
}

.dl-post-card:has(.dl-post-card__link:focus-visible) {
	border-color: var(--border-brand);
	box-shadow: var(--focus-ring);
}

/*
 * Three lines, clamped, so teasers line up across a row whatever the excerpt
 * does. The property holds `-webkit-box` from tablet up and `none` on mobile,
 * where the sideways card has no room for an excerpt at all.
 */
.dl-post-card__excerpt {
	display: var(--dl-post-card-excerpt-display);
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font: var(--type-small);
	color: var(--text-muted);
}

/* Decoration on top of the stretched link, which is why it is not focusable. */
.dl-post-card__more {
	display: var(--dl-post-card-more-display);
	align-items: center;
	gap: 6px; /* no token — optical, between the label and its arrow */
	margin-block-start: auto;
	padding-block-start: var(--space-2);
	font: var(--type-small);
	color: var(--text-brand);
}

/* ══ 10. Reduced motion ══════════════════════════════════════════════════════
 *
 * Every transition in this file runs on a --dur-* token, and tokens/motion.css
 * already collapses those to 0ms under prefers-reduced-motion. The two looping
 * animations are the exception: a duration of 0 does not stop a loop, so they
 * are declared as their own custom properties here and switched off outright.
 */

:root {
	--dl-dur-spin: 900ms; /* no token — outside the --dur-* scale by design */
	--dl-dur-shimmer: 1600ms; /* no token */
}

@media (prefers-reduced-motion: reduce) {
	.dl-btn__spinner,
	.dl-vehicle__spinner,
	.dl-skeleton,
	.dl-toast,
	.dl-modal[open] {
		animation: none;
	}

	/*
	 * The card's two movements are transforms, and a zeroed duration only makes
	 * a transform instant, not absent. Both are dropped outright; the elevation
	 * change stays, because a shadow is not motion and it is what is left to say
	 * which tile is live.
	 */
	.dl-product-card:hover,
	.dl-product-card:focus-within,
	.dl-product-card:hover .dl-product-card__image,
	.dl-post-card:hover,
	.dl-post-card:focus-within,
	.dl-cat-tile:hover .dl-cat-tile__image {
		transform: none;
	}
}

/* ══ 11. Hit targets ═════════════════════════════════════════════════════════
 *
 * A capability, not a width — same reasoning as the hover queries in § 1 of
 * base.css. WCAG 2.2's own floor is 24×24 and every control in the theme
 * already clears it; 44 is the handoff's number and the stricter one, and it is
 * the one the theme is held to.
 *
 * Six controls are drawn smaller than that: the icon button at --control-h-md,
 * its small variant and the small button at --control-h-sm, the pagination
 * item, the mini-cart's remove and the small stepper's buttons. They keep every
 * pixel of their paint — the design draws 32, 36 and 40px squares and they stay
 * 32, 36 and 40 — and gain the missing area as a centred ::after, which is
 * where the finger lands. The same trick the stretched card link already uses,
 * pointing the other way.
 */

:root {
	--dl-hit-target: 44px; /* no token — the handoff's hit-target floor */
}

@media (pointer: coarse) {
	/* .dl-icon-btn is `position: relative` already and is deliberately left out:
	   re-declaring it here would land after .dl-product-card__wishlist and take
	   the heart out of its corner on exactly the devices this block is for. */
	.dl-btn--sm,
	.dl-pagination__item,
	.dl-minicart__remove,
	.dl-qty--sm .dl-qty__btn {
		position: relative;
	}

	.dl-btn--sm::after,
	.dl-icon-btn::after,
	.dl-pagination__item::after,
	.dl-minicart__remove::after,
	.dl-qty--sm .dl-qty__btn::after {
		content: '';
		position: absolute;
		top: 50%;
		left: 50%;
		min-width: var(--dl-hit-target);
		min-height: var(--dl-hit-target);
		width: 100%;
		height: 100%;
		transform: translate(-50%, -50%);
	}
}
