/**
 * Component library. One block per component in template-parts/components/,
 * documented in docs/COMPONENT-LIBRARY.md. Tokens only, no raw values.
 */

/* Icon ------------------------------------------------------------------ */
.wot-icon {
	display: inline-block;
	flex: none;
	width: 1.25em;
	height: 1.25em;
	vertical-align: -0.25em;
}

.wot-icon--sm {
	width: 1em;
	height: 1em;
	vertical-align: -0.15em;
}

/* Button ---------------------------------------------------------------- */
.wot-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--wot-space-2);
	min-height: var(--wot-touch);
	padding: var(--wot-space-2) var(--wot-space-5);
	border: 1px solid var(--wot-color-primary);
	border-radius: var(--wot-radius-control);
	background: var(--wot-color-primary);
	color: var(--wot-ink-inverse);
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--wot-duration) var(--wot-ease), border-color var(--wot-duration) var(--wot-ease), color var(--wot-duration) var(--wot-ease);
}

.wot-button:hover {
	border-color: var(--wot-color-primary-hover);
	background: var(--wot-color-primary-hover);
	color: var(--wot-ink-inverse);
	text-decoration: none;
}

.wot-button--secondary {
	background: var(--wot-surface);
	color: var(--wot-color-primary);
}

.wot-button--secondary:hover {
	background: var(--wot-green-50);
	color: var(--wot-color-primary-hover);
}

.wot-button--quiet {
	border-color: transparent;
	background: transparent;
	color: var(--wot-color-primary);
}

.wot-button--quiet:hover {
	border-color: transparent;
	background: var(--wot-green-50);
	color: var(--wot-color-primary-hover);
}

.wot-button--danger {
	border-color: var(--wot-danger);
	background: var(--wot-danger);
}

.wot-button--danger:hover {
	border-color: #8f1c13;
	background: #8f1c13;
}

.wot-button--inverse {
	border-color: var(--wot-ink-inverse);
	background: var(--wot-ink-inverse);
	color: var(--wot-green-950);
}

.wot-button--inverse:hover {
	border-color: var(--wot-green-50);
	background: var(--wot-green-50);
	color: var(--wot-green-950);
}

.wot-button--outline-inverse {
	border-color: var(--wot-ink-inverse);
	background: transparent;
	color: var(--wot-ink-inverse);
}

.wot-button--outline-inverse:hover {
	background: rgb(255 255 255 / 0.14);
	color: var(--wot-ink-inverse);
}

.wot-button--sm {
	min-height: 2.25rem;
	padding: var(--wot-space-1) var(--wot-space-3);
	font-size: var(--wot-text-sm);
}

.wot-button--lg {
	min-height: 3.25rem;
	padding: var(--wot-space-3) var(--wot-space-6);
	font-size: var(--wot-text-lg);
}

.wot-button--block {
	display: flex;
	width: 100%;
}

.wot-button[disabled],
.wot-button[aria-disabled="true"] {
	opacity: 0.55;
	cursor: not-allowed;
	pointer-events: none;
}

.wot-button[aria-busy="true"]::before {
	width: 1em;
	height: 1em;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	content: "";
	animation: wot-spin 0.8s linear infinite;
}

@keyframes wot-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Form fields ------------------------------------------------------------- */
.wot-field {
	display: grid;
	gap: var(--wot-space-1);
	min-width: 0;
	margin-bottom: var(--wot-space-4);
}

.wot-field__label {
	font-weight: 600;
	font-size: var(--wot-text-sm);
}

.wot-field__required {
	color: var(--wot-danger);
}

.wot-field__hint {
	color: var(--wot-ink-muted);
	font-size: var(--wot-text-sm);
}

.wot-field__error {
	display: flex;
	gap: var(--wot-space-1);
	align-items: flex-start;
	color: var(--wot-danger);
	font-size: var(--wot-text-sm);
	font-weight: 500;
}

.wot-input {
	width: 100%;
	min-width: 0;
	min-height: var(--wot-touch);
	padding: var(--wot-space-2) var(--wot-space-3);
	border: 1px solid var(--wot-line-strong);
	border-radius: var(--wot-radius-control);
	background: var(--wot-surface);
	color: var(--wot-ink);
	font: inherit;
	transition: border-color var(--wot-duration) var(--wot-ease), box-shadow var(--wot-duration) var(--wot-ease);
}

textarea.wot-input {
	min-height: 7rem;
	resize: vertical;
}

select.wot-input {
	padding-right: var(--wot-space-6);
	background-image: linear-gradient(45deg, transparent 50%, var(--wot-ink-muted) 50%), linear-gradient(135deg, var(--wot-ink-muted) 50%, transparent 50%);
	background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
	background-size: 5px 5px;
	background-repeat: no-repeat;
	appearance: none;
}

.wot-input:hover {
	border-color: var(--wot-ink-muted);
}

.wot-input:focus {
	border-color: var(--wot-color-primary);
	outline: none;
	box-shadow: 0 0 0 3px var(--wot-green-100);
}

.wot-input:focus-visible {
	outline: 2px solid var(--wot-color-focus);
	outline-offset: 1px;
}

.wot-input[aria-invalid="true"] {
	border-color: var(--wot-danger);
}

.wot-check {
	display: flex;
	gap: var(--wot-space-2);
	align-items: flex-start;
	min-height: var(--wot-touch);
	padding-top: var(--wot-space-2);
	cursor: pointer;
}

.wot-check input {
	width: 1.125rem;
	height: 1.125rem;
	margin: 0.15rem 0 0;
	accent-color: var(--wot-color-primary);
}

/* Search ------------------------------------------------------------------ */
.wot-search {
	display: flex;
	width: 100%;
	max-width: 32rem;
}

.wot-search .wot-input {
	border-right: 0;
	border-radius: var(--wot-radius-control) 0 0 var(--wot-radius-control);
}

.wot-search .wot-button {
	padding-inline: var(--wot-space-4);
	border-radius: 0 var(--wot-radius-control) var(--wot-radius-control) 0;
}

/* Card -------------------------------------------------------------------- */
.wot-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	border: 1px solid var(--wot-line);
	border-radius: var(--wot-radius-card);
	background: var(--wot-surface);
}

.wot-card--raised {
	border-color: transparent;
	box-shadow: var(--wot-shadow-raised);
}

.wot-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wot-space-3);
	padding: var(--wot-space-4) var(--wot-space-5);
	border-bottom: 1px solid var(--wot-line);
}

.wot-card__title {
	margin: 0;
	font-size: var(--wot-text-lg);
}

.wot-card__body {
	flex: 1;
	padding: var(--wot-space-5);
}

.wot-card__body > :last-child {
	margin-bottom: 0;
}

.wot-card__footer {
	padding: var(--wot-space-3) var(--wot-space-5);
	border-top: 1px solid var(--wot-line);
	font-size: var(--wot-text-sm);
}

/* Figure (dashboard number card) ------------------------------------------ */
.wot-figure {
	display: grid;
	gap: var(--wot-space-1);
	padding: var(--wot-space-5);
	border: 1px solid var(--wot-line);
	border-radius: var(--wot-radius-card);
	background: var(--wot-surface);
}

.wot-figure__label {
	color: var(--wot-ink-muted);
	font-size: var(--wot-text-sm);
	font-weight: 500;
}

.wot-figure__value {
	color: var(--wot-ink);
	font-size: var(--wot-text-3xl);
	font-weight: 700;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.wot-figure__note {
	color: var(--wot-ink-muted);
	font-size: var(--wot-text-sm);
}

.wot-figure--accent {
	border-color: var(--wot-green-100);
	background: var(--wot-green-50);
}

/* Status pill and count badge ----------------------------------------------- */
.wot-pill {
	display: inline-flex;
	align-items: center;
	gap: var(--wot-space-1);
	padding: 0.125rem var(--wot-space-2);
	border-radius: var(--wot-radius-pill);
	background: var(--wot-canvas);
	color: var(--wot-ink);
	font-size: var(--wot-text-xs);
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
}

.wot-pill::before {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: currentColor;
	content: "";
}

.wot-pill--success {
	background: var(--wot-success-soft);
	color: var(--wot-success);
}

.wot-pill--warning {
	background: var(--wot-warning-soft);
	color: var(--wot-warning);
}

.wot-pill--danger {
	background: var(--wot-danger-soft);
	color: var(--wot-danger);
}

.wot-pill--info {
	background: var(--wot-info-soft);
	color: var(--wot-info);
}

.wot-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.25rem;
	height: 1.25rem;
	padding: 0 0.375rem;
	border-radius: var(--wot-radius-pill);
	background: var(--wot-color-accent);
	color: var(--wot-ink);
	font-size: var(--wot-text-xs);
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

/* Notice ------------------------------------------------------------------ */
.wot-notice {
	display: flex;
	gap: var(--wot-space-3);
	align-items: flex-start;
	margin-bottom: var(--wot-space-4);
	padding: var(--wot-space-3) var(--wot-space-4);
	border: 1px solid transparent;
	border-left-width: 4px;
	border-radius: var(--wot-radius-control);
	background: var(--wot-info-soft);
	border-color: var(--wot-info);
	color: var(--wot-ink);
}

.wot-notice__icon {
	margin-top: 0.15rem;
	color: var(--wot-info);
}

.wot-notice__body {
	flex: 1;
}

.wot-notice__body > :last-child {
	margin-bottom: 0;
}

.wot-notice__title {
	display: block;
	font-weight: 600;
}

.wot-notice--success {
	background: var(--wot-success-soft);
	border-color: var(--wot-success);
}

.wot-notice--success .wot-notice__icon {
	color: var(--wot-success);
}

.wot-notice--warning {
	background: var(--wot-warning-soft);
	border-color: var(--wot-warning);
}

.wot-notice--warning .wot-notice__icon {
	color: var(--wot-warning);
}

.wot-notice--danger {
	background: var(--wot-danger-soft);
	border-color: var(--wot-danger);
}

.wot-notice--danger .wot-notice__icon {
	color: var(--wot-danger);
}

.wot-notice__dismiss {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	margin: -0.25rem -0.5rem 0 0;
	border: 0;
	border-radius: var(--wot-radius-control);
	background: transparent;
	color: var(--wot-ink-muted);
	cursor: pointer;
}

.wot-notice__dismiss:hover {
	background: rgba(23, 43, 36, 0.06);
	color: var(--wot-ink);
}

/* Empty state --------------------------------------------------------------- */
.wot-empty {
	display: grid;
	justify-items: center;
	gap: var(--wot-space-2);
	padding: var(--wot-space-7) var(--wot-space-5);
	text-align: center;
}

.wot-empty__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	background: var(--wot-green-50);
	color: var(--wot-color-primary);
}

.wot-empty__title {
	margin: var(--wot-space-2) 0 0;
	font-size: var(--wot-text-lg);
}

.wot-empty__text {
	max-width: 32rem;
	margin: 0;
	color: var(--wot-ink-muted);
}

.wot-empty__action {
	margin-top: var(--wot-space-3);
}

/* Loading skeleton ---------------------------------------------------------- */
.wot-skeleton {
	display: grid;
	gap: var(--wot-space-2);
}

.wot-skeleton__line {
	height: 0.875rem;
	border-radius: var(--wot-radius-control);
	background: linear-gradient(90deg, var(--wot-line) 25%, var(--wot-green-50) 37%, var(--wot-line) 63%);
	background-size: 400% 100%;
	animation: wot-shimmer 1.4s ease infinite;
}

.wot-skeleton__line:nth-child(3n) {
	width: 60%;
}

.wot-skeleton__line:nth-child(3n + 2) {
	width: 85%;
}

@keyframes wot-shimmer {
	0% {
		background-position: 100% 50%;
	}

	100% {
		background-position: 0 50%;
	}
}

/* Table ------------------------------------------------------------------- */
.wot-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--wot-line);
	border-radius: var(--wot-radius-card);
	background: var(--wot-surface);
}

.wot-table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: var(--wot-text-sm);
	font-variant-numeric: tabular-nums;
}

.wot-table caption {
	padding: var(--wot-space-3) var(--wot-space-4);
	font-weight: 600;
	text-align: left;
}

.wot-table th,
.wot-table td {
	padding: var(--wot-space-3) var(--wot-space-4);
	border-bottom: 1px solid var(--wot-line);
	text-align: left;
	vertical-align: top;
}

.wot-table thead th {
	background: var(--wot-canvas);
	color: var(--wot-ink-muted);
	font-size: var(--wot-text-xs);
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	white-space: nowrap;
}

.wot-table tbody tr:last-child > * {
	border-bottom: 0;
}

.wot-table tbody tr:hover {
	background: var(--wot-green-50);
}

.wot-table .wot-num {
	text-align: right;
	white-space: nowrap;
}

/* Phones: each row becomes a block with labelled lines. */
@media (max-width: 767px) {
	.wot-table--stack thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
	}

	.wot-table--stack tbody tr {
		display: block;
		padding: var(--wot-space-2) 0;
		border-bottom: 1px solid var(--wot-line);
	}

	.wot-table--stack tbody tr:last-child {
		border-bottom: 0;
	}

	.wot-table--stack tbody td {
		display: flex;
		justify-content: space-between;
		gap: var(--wot-space-4);
		padding: var(--wot-space-1) var(--wot-space-4);
		border: 0;
		text-align: right;
	}

	.wot-table--stack tbody td::before {
		flex: none;
		color: var(--wot-ink-muted);
		font-weight: 600;
		text-align: left;
		content: attr(data-label);
	}

	.wot-table--stack .wot-num {
		text-align: right;
	}
}

/* Pager ------------------------------------------------------------------- */
.wot-pager {
	margin: var(--wot-space-6) 0;
}

.wot-pager__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wot-space-1);
	justify-content: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wot-pager__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--wot-space-1);
	min-width: var(--wot-touch);
	min-height: var(--wot-touch);
	padding: 0 var(--wot-space-3);
	border: 1px solid var(--wot-line);
	border-radius: var(--wot-radius-control);
	background: var(--wot-surface);
	color: var(--wot-ink);
	font-weight: 500;
	text-decoration: none;
}

.wot-pager__link:hover {
	border-color: var(--wot-color-primary);
	color: var(--wot-color-primary);
}

.wot-pager__link[aria-current="page"] {
	border-color: var(--wot-color-primary);
	background: var(--wot-color-primary);
	color: var(--wot-ink-inverse);
}

.wot-pager__gap {
	display: inline-flex;
	align-items: center;
	min-height: var(--wot-touch);
	padding: 0 var(--wot-space-2);
	color: var(--wot-ink-muted);
}

/* Breadcrumbs ------------------------------------------------------------- */
.wot-breadcrumbs__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wot-space-1) var(--wot-space-2);
	align-items: center;
	margin: 0 0 var(--wot-space-4);
	padding: 0;
	color: var(--wot-ink-muted);
	font-size: var(--wot-text-sm);
	list-style: none;
}

.wot-breadcrumbs__item {
	display: inline-flex;
	gap: var(--wot-space-2);
	align-items: center;
}

.wot-breadcrumbs__item + .wot-breadcrumbs__item::before {
	color: var(--wot-line-strong);
	content: "/";
}

.wot-breadcrumbs a {
	color: var(--wot-ink-muted);
}

.wot-breadcrumbs a:hover {
	color: var(--wot-color-primary);
}

.wot-breadcrumbs [aria-current="page"] {
	color: var(--wot-ink);
	font-weight: 500;
}

/* Tabs (links between views) ------------------------------------------------ */
.wot-tabs {
	margin-bottom: var(--wot-space-5);
	overflow-x: auto;
	border-bottom: 1px solid var(--wot-line);
}

.wot-tabs__list {
	display: flex;
	gap: var(--wot-space-1);
	margin: 0;
	padding: 0;
	list-style: none;
}

.wot-tabs__link {
	display: inline-flex;
	gap: var(--wot-space-2);
	align-items: center;
	min-height: var(--wot-touch);
	padding: 0 var(--wot-space-4);
	border-bottom: 3px solid transparent;
	color: var(--wot-ink-muted);
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
}

.wot-tabs__link:hover {
	color: var(--wot-ink);
}

.wot-tabs__link[aria-current="page"] {
	border-bottom-color: var(--wot-color-primary);
	color: var(--wot-color-primary);
	font-weight: 600;
}

/* Dropdown menu ------------------------------------------------------------- */
.wot-dropdown {
	position: relative;
	display: inline-block;
}

.wot-dropdown__menu {
	position: absolute;
	top: calc(100% + var(--wot-space-1));
	right: 0;
	z-index: 60;
	min-width: 14rem;
	margin: 0;
	padding: var(--wot-space-1);
	border: 1px solid var(--wot-line);
	border-radius: var(--wot-radius-card);
	background: var(--wot-surface);
	box-shadow: var(--wot-shadow-menu);
	list-style: none;
}

.wot-dropdown__menu[hidden] {
	display: none;
}

.wot-dropdown__link {
	display: flex;
	gap: var(--wot-space-2);
	align-items: center;
	min-height: var(--wot-touch);
	padding: var(--wot-space-2) var(--wot-space-3);
	border-radius: var(--wot-radius-control);
	color: var(--wot-ink);
	text-decoration: none;
}

.wot-dropdown__link:hover,
.wot-dropdown__link[aria-current="page"] {
	background: var(--wot-green-50);
	color: var(--wot-color-primary);
}

.wot-dropdown__link .wot-badge {
	margin-left: auto;
}

/* Modal (native dialog) ------------------------------------------------------ */
.wot-modal {
	width: min(36rem, calc(100% - 2 * var(--wot-gutter)));
	max-height: calc(100% - 2 * var(--wot-gutter));
	padding: 0;
	border: 0;
	border-radius: var(--wot-radius-card);
	background: var(--wot-surface);
	color: var(--wot-ink);
	box-shadow: var(--wot-shadow-menu);
}

.wot-modal::backdrop {
	background: rgba(6, 69, 45, 0.55);
}

.wot-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wot-space-3);
	padding: var(--wot-space-4) var(--wot-space-5);
	border-bottom: 1px solid var(--wot-line);
}

.wot-modal__title {
	margin: 0;
	font-size: var(--wot-text-xl);
}

.wot-modal__body {
	padding: var(--wot-space-5);
}

.wot-modal__body > :last-child {
	margin-bottom: 0;
}

.wot-modal__footer {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wot-space-2);
	justify-content: flex-end;
	padding: var(--wot-space-4) var(--wot-space-5);
	border-top: 1px solid var(--wot-line);
}

.wot-icon-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--wot-touch);
	height: var(--wot-touch);
	border: 0;
	border-radius: var(--wot-radius-control);
	background: transparent;
	color: var(--wot-ink-muted);
	cursor: pointer;
}

.wot-icon-button:hover {
	background: var(--wot-green-50);
	color: var(--wot-ink);
}

/* Price ------------------------------------------------------------------- */
.wot-price {
	display: grid;
	gap: 0.125rem;
}

.wot-price__amount {
	color: var(--wot-ink);
	font-size: var(--wot-text-lg);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.wot-price__note {
	color: var(--wot-ink-muted);
	font-size: var(--wot-text-xs);
}

.wot-price--locked {
	display: flex;
	gap: var(--wot-space-2);
	align-items: center;
	color: var(--wot-ink-muted);
	font-size: var(--wot-text-sm);
}

/* Product card ------------------------------------------------------------ */
.wot-product-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--wot-line);
	border-radius: var(--wot-radius-card);
	background: var(--wot-surface);
	transition: border-color var(--wot-duration) var(--wot-ease), box-shadow var(--wot-duration) var(--wot-ease);
}

.wot-product-card:hover,
.wot-product-card:focus-within {
	border-color: var(--wot-green-100);
	box-shadow: var(--wot-shadow-raised);
}

.wot-product-card__media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	padding: var(--wot-space-4);
	background: var(--wot-surface);
}

.wot-product-card__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.wot-product-card__placeholder {
	color: var(--wot-line-strong);
}

.wot-product-card__placeholder .wot-icon {
	width: 3rem;
	height: 3rem;
}

.wot-product-card__body {
	display: grid;
	flex: 1;
	gap: var(--wot-space-2);
	align-content: start;
	padding: var(--wot-space-4);
	border-top: 1px solid var(--wot-line);
}

.wot-product-card__brand {
	color: var(--wot-ink-muted);
	font-size: var(--wot-text-xs);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.wot-product-card__title {
	margin: 0;
	font-size: var(--wot-text-base);
	font-weight: 600;
	line-height: 1.35;
}

.wot-product-card__title a {
	color: var(--wot-ink);
	text-decoration: none;
}

/* The whole card is clickable through the title link. */
.wot-product-card__title a::after {
	position: absolute;
	inset: 0;
	content: "";
}

.wot-product-card__meta {
	color: var(--wot-ink-muted);
	font-size: var(--wot-text-xs);
}

.wot-product-card__footer {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wot-space-2);
	align-items: center;
	justify-content: space-between;
	padding: 0 var(--wot-space-4) var(--wot-space-4);
}

/* Category tile ----------------------------------------------------------- */
.wot-category-tile {
	position: relative;
	display: flex;
	gap: var(--wot-space-3);
	align-items: center;
	min-height: 5rem;
	padding: var(--wot-space-4);
	border: 1px solid var(--wot-line);
	border-radius: var(--wot-radius-card);
	background: var(--wot-surface);
	color: var(--wot-ink);
	text-decoration: none;
	transition: border-color var(--wot-duration) var(--wot-ease), box-shadow var(--wot-duration) var(--wot-ease);
}

.wot-category-tile:hover {
	border-color: var(--wot-green-100);
	box-shadow: var(--wot-shadow-raised);
	color: var(--wot-ink);
	text-decoration: none;
}

.wot-category-tile__icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: var(--wot-radius-control);
	background: var(--wot-green-50);
	color: var(--wot-color-primary);
}

.wot-category-tile__name {
	display: block;
	font-weight: 600;
}

.wot-category-tile__count {
	display: block;
	color: var(--wot-ink-muted);
	font-size: var(--wot-text-sm);
}

/* With a category image (plugin 1.1): the photo on top, the text below. */
.wot-category-tile--photo {
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	padding: 0;
	overflow: hidden;
}

.wot-category-tile__media {
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--wot-green-50);
}

.wot-category-tile__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--wot-duration) var(--wot-ease);
}

.wot-category-tile--photo:hover .wot-category-tile__media img {
	transform: scale(1.03);
}

.wot-category-tile--photo .wot-category-tile__body {
	padding: var(--wot-space-3) var(--wot-space-4);
}

/* Grids used by components -------------------------------------------------- */
.wot-grid {
	display: grid;
	gap: var(--wot-space-4);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--wot-grid-min, 15rem)), 1fr));
}

@media (min-width: 768px) {
	.wot-grid {
		gap: var(--wot-space-5);
	}
}

.wot-grid--products {
	--wot-grid-min: 13rem;
}

@media (max-width: 479px) {
	.wot-grid--products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--wot-space-3);
	}
}

.wot-product-card__footer {
	position: relative;
	z-index: 1;
}

/* Product grid (homepage, store lists, [wds_catalogue]) -------------------- */
.wot-product-grid {
	display: grid;
	gap: var(--wot-space-4);
	margin: 0;
	padding: 0;
	list-style: none;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
}

.wot-product-grid > li {
	display: flex;
}

.wot-product-grid > li > * {
	flex: 1;
}

/* Phones: two cards per row. */
@media (max-width: 479px) {
	.wot-product-grid {
		gap: var(--wot-space-3);
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Links after a notice's text (the storefront's "Sign in", "Apply"). */
.wot-notice__link {
	margin-left: var(--wot-space-2);
	font-weight: 600;
}

/* Error summary (0.4.0) ------------------------------------------------------ */
.wot-error-summary {
	margin-bottom: var(--wot-space-5);
	padding: var(--wot-space-4) var(--wot-space-5);
	border: 2px solid var(--wot-danger);
	border-radius: var(--wot-radius-card);
	background: var(--wot-danger-soft);
}

.wot-error-summary:focus {
	outline: 3px solid var(--wot-color-focus);
	outline-offset: 2px;
}

.wot-error-summary__title {
	display: flex;
	gap: var(--wot-space-2);
	align-items: center;
	margin: 0 0 var(--wot-space-2);
	color: var(--wot-danger);
}

.wot-error-summary__list {
	margin: 0;
	padding-left: var(--wot-space-6);
}

.wot-error-summary__list li + li {
	margin-top: var(--wot-space-1);
}

.wot-error-summary__list a {
	color: var(--wot-danger);
	font-weight: 600;
}

/* Photo (component "photo"; here since 0.4.0) --------------------------- */
.wot-photo {
	position: relative;
	margin: 0;
	overflow: hidden;
	background: var(--wot-green-950);
}

.wot-photo__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wot-photo__credit {
	position: absolute;
	right: var(--wot-space-2);
	bottom: var(--wot-space-2);
	z-index: 2;
	max-width: calc(100% - var(--wot-space-4));
	padding: 2px var(--wot-space-2);
	border-radius: var(--wot-radius-control);
	background: rgb(6 69 45 / 0.72);
	color: var(--wot-ink-inverse);
	font-size: var(--wot-text-xs);
	line-height: 1.4;
}

.wot-photo__credit a {
	color: inherit;
	text-decoration: underline;
}

/* Steps (component "steps", 0.5.0) ---------------------------------------- */
.wot-steps__list {
	display: flex;
	gap: var(--wot-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.wot-steps__item {
	display: flex;
	flex: 1 1 0;
	gap: var(--wot-space-2);
	align-items: center;
	min-width: 0;
	color: var(--wot-ink-muted);
	font-size: var(--wot-text-sm);
	font-weight: 500;
}

/* A line between steps, filled in up to the current one. */
.wot-steps__item:not(:last-child)::after {
	content: "";
	flex: 1 1 auto;
	min-width: var(--wot-space-3);
	height: 2px;
	border-radius: 1px;
	background: var(--wot-line);
}

.wot-steps__item--done:not(:last-child)::after {
	background: var(--wot-color-primary);
}

.wot-steps__marker {
	display: grid;
	flex: none;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border: 2px solid var(--wot-line-strong);
	border-radius: 50%;
	background: var(--wot-surface);
	font-weight: 700;
}

.wot-steps__item--done .wot-steps__marker {
	border-color: var(--wot-color-primary);
	background: var(--wot-color-primary);
	color: var(--wot-ink-inverse);
}

.wot-steps__item--current {
	color: var(--wot-ink);
	font-weight: 700;
}

.wot-steps__item--current .wot-steps__marker {
	border-color: var(--wot-color-primary);
	color: var(--wot-color-primary);
	box-shadow: 0 0 0 3px var(--wot-green-50);
}

.wot-steps__label {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@media (max-width: 479px) {
	/* On small phones only the current step keeps its name. */
	.wot-steps__item:not(.wot-steps__item--current) .wot-steps__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
}
