/* Product archive: shop page, product categories and product tags.
   Shares .card, .section-head and .button with main.css. */

.shop-archive__breadcrumb {
	margin-bottom: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.shop-archive__breadcrumb a {
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}

.shop-archive__head {
	margin-bottom: var(--wp--preset--spacing--30);
}

.shop-archive__description:empty {
	display: none;
}

.shop-archive__description {
	max-width: 60ch;
	margin-top: var(--wp--preset--spacing--10);
	color: var(--wp--preset--color--muted);
	line-height: 1.5;
}

.shop-archive__description p:last-child {
	margin-bottom: 0;
}

.shop-archive__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--20);
	margin-bottom: var(--wp--preset--spacing--30);
	padding-bottom: var(--wp--preset--spacing--20);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.shop-archive__toolbar .woocommerce-result-count {
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.shop-archive__toolbar .woocommerce-ordering {
	margin: 0;
	margin-inline-start: auto;
}

.shop-archive__toolbar select {
	max-width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font: inherit;
}

.shop-archive__toolbar .woocommerce-notices-wrapper {
	flex: 1 0 100%;
	order: -1;
}

.shop-archive__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: var(--wp--preset--spacing--20);
	margin: 0;
	padding: 0;
	list-style: none;
}

.shop-archive__item {
	display: flex;
}

.shop-archive .product-card {
	flex: 1;
	flex-direction: column;
}

.shop-archive .product-card__media {
	display: block;
	position: relative;
	background: var(--wp--preset--color--surface);
}

.shop-archive .product-card__media img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
}

.product-card__flag {
	position: absolute;
	inset-block-start: var(--wp--preset--spacing--10);
	inset-inline-start: var(--wp--preset--spacing--10);
	padding: 0.25rem 0.5rem;
	border-radius: 999px;
	background: var(--astm-success);
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
}

.product-card__flag--out {
	background: var(--wp--preset--color--muted);
}

.shop-archive .product-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.5rem;
	padding: var(--wp--preset--spacing--20);
}

.shop-archive .product-card__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.23536;
}

.shop-archive .product-card__title a {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

.shop-archive .product-card__meta {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.product-card__price {
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
}

.product-card__price del {
	margin-inline-end: 0.25rem;
	color: var(--wp--preset--color--muted);
	font-weight: 400;
}

.product-card__price ins {
	text-decoration: none;
}

.product-card__actions {
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--10);
}

.product-card__actions .button,
.product-card__actions .added_to_cart {
	justify-content: center;
	width: 100%;
	padding: 0.75rem 1rem;
	text-align: center;
}

.product-card__form {
	margin: 0;
}

.product-card__form.is-busy .button {
	opacity: 0.6;
	pointer-events: none;
}

.product-card__actions .added_to_cart {
	display: inline-block;
	margin-top: 0.5rem;
	color: var(--wp--preset--color--accent);
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
}

.shop-archive .woocommerce-pagination {
	margin-top: var(--wp--preset--spacing--40);
}

.shop-archive .woocommerce-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}

.shop-archive .woocommerce-pagination a,
.shop-archive .woocommerce-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	padding: 0.5rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

.shop-archive .woocommerce-pagination .current {
	border-color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

@media (max-width: 600px) {
	.shop-archive__grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	}

	.shop-archive__toolbar .woocommerce-ordering {
		margin-inline-start: 0;
		width: 100%;
	}

	.shop-archive__toolbar select {
		width: 100%;
	}
}
