/* WordPress-only local state pages. Product cards and cart primitives stay shared. */

.store-state-section {
	padding-block: 2.5rem;
}

.store-state-heading {
	display: flex;
	min-width: 0;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 1.25rem;
	margin-bottom: 2.5rem;
}

.store-state-persistence {
	max-width: 34rem;
	color: var(--color-muted);
	font-size: 0.875rem;
	line-height: 1.4;
}

.store-state-persistence:not([hidden]) {
	display: block;
}

.store-product-grid {
	margin-top: 0;
}

.store-product-unavailable,
.cart-line-unavailable {
	margin-top: 1rem;
	color: var(--color-muted);
	font-weight: 700;
	line-height: 1.3;
}

.site-product-card[data-product-unavailable] {
	opacity: 0.72;
}

.store-state-empty {
	display: flex;
	max-width: 40rem;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.25rem;
	padding: 2.5rem;
	border: 3px solid var(--color-anthracite);
}

.store-state-empty[hidden],
.cart-summary[hidden] {
	display: none;
}

.store-state-empty h2,
.store-orders-item h2 {
	font-family: var(--font-heading);
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.store-state-empty p,
.store-state-status,
.store-orders-warning,
.store-orders-item p {
	max-width: 60ch;
	color: var(--color-muted);
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.store-state-status:not(.sr-only) {
	margin-bottom: 1.25rem;
	padding: 1rem 1.25rem;
	border: 1px solid var(--color-anthracite);
	color: var(--color-anthracite);
}

.cart-layout-local {
	width: min(100%, 56rem);
	margin-inline: auto;
}

.cart-item[data-cart-unavailable] {
	opacity: 0.72;
}

.cart-item[data-cart-unavailable] :is([data-cart-decrement], [data-cart-increment]) {
	display: none;
}

.cart-item[data-cart-unavailable] .cart-price {
	display: none;
}

.store-orders-warning {
	margin-bottom: 2.5rem;
}

.store-orders-list {
	display: grid;
	gap: 1.25rem;
}

.store-orders-item {
	display: grid;
	min-width: 0;
	gap: 0.75rem;
	padding: 1.25rem;
	border: 3px solid var(--color-anthracite);
}

.store-orders-meta {
	display: flex;
	min-width: 0;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	color: var(--color-muted);
	font-size: 0.875rem;
	line-height: 1.35;
}

.store-orders-total {
	font-family: var(--font-heading);
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.2;
	overflow-wrap: anywhere;
}

.store-orders-lines-title {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
}

.store-orders-lines {
	display: grid;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.store-orders-lines li {
	display: flex;
	min-width: 0;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem 1.25rem;
	line-height: 1.35;
}

.store-orders-lines li span:first-child {
	min-width: 0;
	overflow-wrap: anywhere;
}

.store-orders-lines li span:last-child {
	font-weight: 700;
}

@media (min-width: 55rem) {
	.store-state-section {
		padding-block: 3.75rem;
	}

	.store-state-heading {
		margin-bottom: 3.75rem;
	}

	.store-state-empty,
	.store-orders-item {
		padding: 2.5rem;
	}
}

@media (min-width: 80rem) {
	.store-state-section {
		padding-block: 5rem;
	}

	.store-orders-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 2.5rem;
	}
}

@media (min-width: 120rem) {
	.store-state-section {
		padding-block: 6.25rem;
	}

	.cart-layout-local {
		width: min(100%, 64rem);
	}
}
