/* Product cards, category chips, archive layout and filters. */

.shop-card {
	height: 100%;
	background: var(--wp--preset--color--white, #fff);
	border: 1px solid var(--wp--preset--color--border-light);
	border-radius: var(--wp--custom--radius--card);
	padding: 0.6rem 0.6rem 0.8rem;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.shop-card:hover {
	box-shadow: var(--wp--custom--shadow--card);
	transform: translateY(-2px);
}

.shop-card__image {
	margin: 0 !important;
}

.shop-card__image img {
	border-radius: calc(var(--wp--custom--radius--card) - 6px);
	background: var(--wp--preset--color--white, #fff);
}

.shop-card__title {
	font-family: var(--wp--preset--font-family--primary) !important;
	font-size: 1rem !important;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0;
	margin: 0.25rem 0 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.6em;
}

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

.shop-card__price {
	margin-top: auto !important;
	font-size: 1.1rem;
}

.shop-card__price del,
.shop-product__price del {
	color: var(--wp--preset--color--secondary);
	font-weight: 500;
	opacity: 0.75;
	margin-right: 0.35rem;
}

.shop-card__price ins,
.shop-product__price ins {
	text-decoration: none;
}

.shop-card__button .wp-block-button__link,
.shop-card__button .wc-block-components-product-button__button {
	width: 100%;
	font-size: 0.95rem;
	padding: 0.6rem 1rem;
}

.wc-block-components-product-sale-badge,
.shop-card__badge .wc-block-components-product-sale-badge {
	background: var(--wp--preset--color--main);
	color: var(--wp--preset--color--white, #fff);
	border: 0;
	border-radius: var(--wp--custom--radius--pill);
	font-size: 0.8rem;
	font-weight: 800;
	padding: 0.2rem 0.6rem;
	text-transform: none;
}

/* Classic product loops ([products] shortcode in page content) match the block cards. */
.woocommerce ul.products,
.wp-block-post-content ul.products {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1rem;
	margin: 1rem 0 2rem;
	padding: 0;
	list-style: none;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
	display: none;
}

.woocommerce ul.products li.product {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	width: auto !important;
	margin: 0 !important;
	float: none !important;
	padding: 0.6rem 0.6rem 0.8rem;
	background: var(--wp--preset--color--white, #fff);
	border: 1px solid var(--wp--preset--color--border-light);
	border-radius: var(--wp--custom--radius--card);
}

.woocommerce ul.products li.product a img {
	margin: 0 0 0.25rem;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: calc(var(--wp--custom--radius--card) - 6px);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--wp--preset--font-family--primary);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--wp--preset--color--main);
	padding: 0;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.6em;
}

.woocommerce ul.products li.product .price {
	margin-top: auto;
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--wp--preset--color--primary-alt-accent);
}

.woocommerce ul.products li.product .price del {
	color: var(--wp--preset--color--secondary);
	font-weight: 500;
	opacity: 0.75;
}

.woocommerce ul.products li.product .price ins {
	text-decoration: none;
}

.woocommerce ul.products li.product .button {
	display: block;
	width: 100%;
	margin: 0.2rem 0 0;
	text-align: center;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white, #fff);
	font-weight: 700;
	padding: 0.6rem 1rem;
}

.woocommerce ul.products li.product .onsale {
	position: absolute;
	top: 1rem;
	left: 1rem;
	right: auto;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0.2rem 0.6rem;
	line-height: 1.3;
	font-size: 0.8rem;
	font-weight: 800;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--main);
	color: var(--wp--preset--color--white, #fff);
}

@media (max-width: 781px) {
	.woocommerce ul.products,
	.wp-block-post-content ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.6rem;
	}
}

/* Category chips */
.shop-chips {
	display: flex;
	gap: 0.5rem;
	overflow-x: auto;
	padding: 0.25rem 0 0.5rem;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.shop-chips::-webkit-scrollbar {
	display: none;
}

.shop-chip {
	flex: 0 0 auto;
	padding: 0.5rem 1rem;
	border: 1px solid var(--wp--preset--color--primary-alt-accent);
	border-radius: var(--wp--custom--radius--pill);
	color: var(--wp--preset--color--primary-alt-accent);
	background: var(--wp--preset--color--white, #fff);
	font-weight: 700;
	font-size: 0.95rem;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}

.shop-chip:hover,
.shop-chip.is-active {
	background: var(--wp--preset--color--primary-alt-accent);
	color: var(--wp--preset--color--white, #fff);
}

.shop-chips--sub .shop-chip {
	padding: 0.35rem 0.85rem;
	font-size: 0.875rem;
}

/* Archive */
.shop-archive__title {
	font-size: clamp(1.9rem, 4vw, 2.75rem);
	margin: 0;
}

.shop-archive__intro {
	color: var(--wp--preset--color--secondary);
	max-width: 70ch;
}

.shop-archive__bar {
	margin-bottom: 1rem;
	font-size: 0.95rem;
}

.shop-archive__bar .woocommerce-ordering select,
.shop-archive__bar select {
	border: 1px solid var(--wp--preset--color--border-light);
	border-radius: var(--wp--custom--radius--control);
	padding: 0.5rem 2rem 0.5rem 0.75rem;
	background-color: var(--wp--preset--color--white, #fff);
}

.shop-archive .wc-block-product-template {
	gap: 1rem;
}

.shop-archive__sidebar {
	position: relative;
}

.shop-filters__heading {
	font-family: var(--wp--preset--font-family--primary) !important;
	font-size: 0.95rem !important;
	font-weight: 800;
	letter-spacing: 0.02em;
	margin: 1.25rem 0 0.5rem;
}

.shop-filters .wc-block-product-filter-checkbox-list__items {
	max-height: 260px;
	overflow-y: auto;
}

.shop-pagination {
	margin-top: var(--wp--preset--spacing--medium);
	font-weight: 700;
}

.shop-pagination .page-numbers {
	display: inline-block;
	min-width: 2.25rem;
	padding: 0.35rem 0.5rem;
	border-radius: var(--wp--custom--radius--control);
	text-align: center;
}

.shop-pagination .page-numbers.current {
	background: var(--wp--preset--color--primary-alt-accent);
	color: var(--wp--preset--color--white, #fff);
}

.shop-empty {
	padding: var(--wp--preset--spacing--large) 1rem;
	background: var(--wp--preset--color--tertiary);
	border-radius: var(--wp--custom--radius--card);
}

@media (max-width: 781px) {
	.shop-archive__layout {
		flex-direction: column;
	}

	.shop-archive__sidebar {
		flex-basis: auto !important;
	}

	.shop-archive .wc-block-product-template {
		gap: 0.6rem;
	}

	.shop-card {
		padding: 0.4rem 0.4rem 0.6rem;
	}

	.shop-card__title {
		font-size: 0.92rem !important;
	}

	.shop-card__button .wp-block-button__link,
	.shop-card__button .wc-block-components-product-button__button {
		font-size: 0.85rem;
		padding: 0.5rem 0.6rem;
	}
}
