/**
 * shop.css — WooCommerce shop / category / tag archive styles, and
 * the product grid shared with the homepage's Featured / Recently
 * Added sections (both use the same "ul.products" > template-parts/
 * product-card.php markup, so one set of grid/card rules covers both).
 *
 * Deliberately styling WooCommerce's own markup/classes rather than
 * replacing the loop, result count, ordering, or pagination — see the
 * project's "hooks + CSS first" rule.
 */

/* ---------------------------------------------------------------
   Product grid
   Mobile: 2 columns (1 only if a card genuinely doesn't fit — not
   forced by default, per brief's "2 if usable, otherwise 1").
   Tablet: 2–3. Desktop: 4 where space permits.
   --------------------------------------------------------------- */

ul.products {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-4);
	list-style: none;
	margin: 0 0 var(--space-5);
	padding: 0;
}

@media (min-width: 700px) {
	ul.products {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 1100px) {
	ul.products {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* ---------------------------------------------------------------
   Product card (template-parts/product-card.php)
   --------------------------------------------------------------- */

.product-card {
	list-style: none;
	display: flex;
	flex-direction: column;
}

.product-card__link {
	display: block;
	color: var(--color-text);
}

.product-card__image {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background-color: var(--color-cream);
	margin-bottom: var(--space-2);
}

.product-card__image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform var(--transition-fast);
}

.product-card__link:hover .product-card__image img,
.product-card__link:focus .product-card__image img {
	transform: scale(1.03);
}

.product-card__title {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 var(--space-1);
}

.product-card__price {
	display: block;
	color: var(--color-text);
	font-weight: 500;
}

.product-card__price ins {
	text-decoration: none;
	color: var(--color-black);
}

.product-card__price del {
	color: var(--color-text-muted);
	margin-right: var(--space-1);
}

.product-card__stock--out {
	display: inline-block;
	margin-top: var(--space-1);
	color: var(--color-error);
	font-weight: 600;
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.product-card__action {
	margin-top: auto;
	padding-top: var(--space-3);
}

.product-card__action .button {
	width: 100%;
	text-align: center;
}

/* ---------------------------------------------------------------
   WooCommerce chrome: result count, ordering, pagination, notices
   --------------------------------------------------------------- */

.woocommerce-result-count,
.woocommerce-ordering {
	margin-bottom: var(--space-3);
}

.woocommerce-ordering select {
	padding: var(--space-1) var(--space-2);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius);
	background-color: var(--color-white);
}

.woocommerce-pagination {
	margin-top: var(--space-5);
	text-align: center;
}

.woocommerce-pagination .page-numbers {
	display: inline-flex;
	gap: var(--space-2);
	list-style: none;
	padding: 0;
}

.woocommerce-pagination .page-numbers li a,
.woocommerce-pagination .page-numbers li span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	border: 1px solid var(--color-border);
}

.woocommerce-pagination .page-numbers li .current {
	background-color: var(--color-black);
	color: var(--color-white);
	border-color: var(--color-black);
}

.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-info {
	list-style: none;
	padding: var(--space-3) var(--space-4);
	margin-bottom: var(--space-4);
	border-left: 3px solid var(--color-gold);
	background-color: var(--color-cream);
}

.woocommerce-notices-wrapper .woocommerce-error {
	border-left-color: var(--color-error);
}
