/*! Shop archive styles. Generated by scripts/build-bundles.py — edit the sources. */

/* sm-shop.css */
/**
 * SM Shop — archive chrome: container, header rhythm, chip rail, meta row,
 * sort control, empty state, pagination, product grid + cards.
 *
 * Grid is mobile-first 2-col: desktop 4 → tablet 3 → mobile compact 2.
 * Card internals come from Woo blocks, tuned here toward the homepage card
 * language. Everything scoped under .sm-shop so PDP/cart/checkout blocks
 * are untouched.
 */

.sm-shop {
	padding: 40px 20px 64px;
	background: #f5f5f7;
}

.sm-shop-title {
	margin: 0 0 16px;
	text-wrap: balance;
}

/* Chip rail: horizontal scroll pills duplicating the header categories. */
.sm-shop-chips {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 4px 2px 12px;
	margin: 0 0 8px;
	scrollbar-width: thin;
}

.sm-chip {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 18px;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	background: #fff;
	color: #404040;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.sm-chip:hover {
	border-color: #003d03;
	color: #003d03;
}

.sm-chip.is-active,
.sm-chip[aria-current="page"] {
	background: #003d03;
	border-color: #003d03;
	color: #fff;
}

/* Meta row: sort + result count. Stacked (desktop) / one row (mobile). */
.sm-shop-meta-row {
	margin: 0 0 8px;
}

/* Sort row: quiet label + premium pill select (native Woo ordering). */
.sm-shop-sortrow {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	margin: 0 0 8px;
}

.sm-shop form.woocommerce-ordering {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 24px;
	justify-content: flex-end;
}

.sm-shop form.woocommerce-ordering select.orderby {
	appearance: none;
	-webkit-appearance: none;
	min-height: 40px;
	padding: 8px 36px 8px 18px;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	background-color: #fff;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231d1d1f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	color: #1d1d1f;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
}

.sm-shop form.woocommerce-ordering select.orderby:hover {
	border-color: #003d03;
}

.sm-shop form.woocommerce-ordering select.orderby:focus-visible {
	outline: 2px solid #00b140;
	outline-offset: 2px;
}

/* Quiet empty state: one line + link back to the shop. */
.sm-shop-empty {
	margin: 24px 0;
	font-size: 14px;
	line-height: 1.6;
	color: #6b7280;
}

.sm-shop-empty a {
	color: #003d03;
	font-weight: 600;
}

/* Pagination: centered page numbers. */
.sm-shop-pagination {
	margin-top: 32px;
	text-align: center;
}

.sm-shop-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 6px 12px;
	margin: 2px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
}

.sm-shop-pagination a.page-numbers {
	color: #1d1d1f;
	text-decoration: none;
	background: #fff;
}

.sm-shop-pagination a.page-numbers:hover {
	border-color: #003d03;
	color: #003d03;
}

.sm-shop-pagination .page-numbers.current {
	background: #003d03;
	border-color: #003d03;
	color: #fff;
}

.sm-shop-pagination .page-numbers.dots {
	border-color: transparent;
}

/* Focus visibility. */
.sm-shop a:focus-visible,
.sm-shop select:focus-visible {
	outline: 2px solid #00b140;
	outline-offset: 2px;
}

/* Base product grid (desktop 4-col). Declared BEFORE the breakpoints so
 * max-width rules below win the cascade instead of losing to it. */
.sm-shop ul.wc-block-product-template {
	gap: 24px;
	row-gap: 24px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Woo product-collection cards: quieted toward the homepage card language.
 * Scoped to .sm-shop so PDP/cart/checkout Woo blocks are untouched. */
.sm-shop .wp-block-post-title a {
	color: #1d1d1f;
	text-decoration: none;
}

.sm-shop .wp-block-woocommerce-product-collection .wp-block-post-title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.45;
	margin: 14px 0 0;
}

.sm-shop .wc-block-components-product-price,
.sm-shop .wc-block-components-product-price .woocommerce-Price-amount {
	font-size: 14px;
	font-weight: 400;
	color: #1d1d1f;
	margin-top: auto;
	padding-top: 8px;
}

.sm-shop .wc-block-components-product-button {
	margin-top: 10px;
}

.sm-shop .wc-block-components-product-rating {
	margin-top: 6px;
}

.sm-shop .wp-block-button__link,
.sm-shop .wc-block-components-product-button .wp-element-button {
	min-height: 36px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 400;
	padding: 8px 15px;
	background: #003d03;
	color: #fff;
	border: 0;
}

.sm-shop .wc-block-components-product-sale-badge,
.sm-shop .woocommerce span.onsale {
	background: #003d03;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	border-radius: 999px;
	padding: 2px 8px;
}

.sm-shop .sm-shop-count {
	font-size: 13px;
	color: #6b7280;
	margin: 0 0 24px;
}

.sm-shop .wp-block-woocommerce-product-collection li.wc-block-product {
	background: #fff;
	border-radius: 18px;
	box-shadow: 2px 4px 12px rgba(0,0,0,0.08);
	padding: 20px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	height: 100%;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sm-shop .wp-block-woocommerce-product-collection li.wc-block-product:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

/* Tablet: 3 columns. */
@media (max-width: 991px) {
	.sm-shop ul.wc-block-product-template {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Mobile: compact 2-column grid. Never collapses to 1 column — a single
 * full-width card per row wastes the viewport on phones. */
@media (max-width: 767px) {
	.sm-shop {
		padding: 24px 12px 48px;
	}

	.sm-shop-title {
		font-size: 22px;
		margin-bottom: 12px;
	}

	/* Edge-to-edge chip rail: bleeds to the screen edges, no scrollbar. */
	.sm-shop-chips {
		margin: 0 -12px 4px;
		padding: 4px 12px 12px;
		scrollbar-width: none;
		-ms-overflow-style: none;
		scroll-snap-type: x proximity;
	}

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

	.sm-shop-chips .sm-chip {
		scroll-snap-align: start;
	}

	.sm-chip {
		min-height: 40px;
		padding: 8px 16px;
		font-size: 13px;
	}

	/* Meta row: count left, compact sort right — one row, no wasted space. */
	.sm-shop-meta-row {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		margin: 0 0 16px;
	}

	.sm-shop-meta-row .sm-shop-sortrow {
		margin: 0;
	}

	.sm-shop-meta-row form.woocommerce-ordering {
		margin: 0;
		justify-content: flex-end;
	}

	.sm-shop-meta-row form.woocommerce-ordering select.orderby {
		min-height: 38px;
		max-width: 168px;
		padding: 6px 32px 6px 14px;
		background-position: right 12px center;
		font-size: 13px;
	}

	.sm-shop-meta-row .sm-shop-count {
		flex: 1 1 auto;
		min-width: 0;
		margin: 0;
		font-size: 12px;
	}

	/* Compact 2-col grid. */
	.sm-shop ul.wc-block-product-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
		row-gap: 16px;
	}

	/* Compact cards: tighter padding, square thumbs, clamped titles,
	 * full-width touch-friendly buttons. */
	.sm-shop .wp-block-woocommerce-product-collection li.wc-block-product {
		padding: 12px;
		border-radius: 14px;
	}

	.sm-shop .wp-block-woocommerce-product-collection li.wc-block-product:hover {
		transform: none;
	}

	.sm-shop li.wc-block-product img {
		width: 100%;
		height: auto;
		aspect-ratio: 1 / 1;
		object-fit: cover;
		border-radius: 10px;
	}

	.sm-shop .wp-block-woocommerce-product-collection .wp-block-post-title {
		font-size: 13px;
		margin: 10px 0 0;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
		min-height: calc(2em * 1.45);
	}

	.sm-shop .wc-block-components-product-rating {
		margin-top: 4px;
	}

	.sm-shop .wc-block-components-product-price,
	.sm-shop .wc-block-components-product-price .woocommerce-Price-amount {
		font-size: 13px;
		font-weight: 700;
		padding-top: 6px;
	}

	.sm-shop .wc-block-components-product-button {
		margin-top: 8px;
	}

	.sm-shop .wp-block-button__link,
	.sm-shop .wc-block-components-product-button .wp-element-button {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		min-height: 42px;
		font-size: 13px;
		font-weight: 600;
		text-align: center;
	}

	.sm-shop .wc-block-components-product-sale-badge,
	.sm-shop .woocommerce span.onsale {
		font-size: 10px;
	}
}

/* Archive/store templates: white canvas behind the showcase + grid. */
.sm-archive-store { background: #fff; }
.sm-search-guides { max-width: 1240px; margin: 0 auto; padding: 0 32px 72px; }

/* Pull the white archive canvas up over the header template gap. */
.sm-archive-store { margin-top: -16px; padding-top: 16px; }

@media (max-width: 767px) {
	.sm-search-guides { padding-inline: 20px; }
}


/* sm-archive-5.css */
/**
 * Shop surface — main shop, category and brand archives.
 *
 * One tone from header to footer: no white bands, no hairline rules.
 * "Sort by" sits on the "Shop by need" line; the count lives under the
 * grid next to the load-more control.
 */

body.archive,
body.tax-product_brand,
body.woocommerce-shop,
.sm-archive-store,
.sm-shop-page {
	background: #f9f9fa;
}

/* Every band on the page sits on the same tone. */
.sm-archive-store .sm-store-showcase,
.sm-archive-store .sm-pg,
.sm-archive-store .sm-bch,
.sm-archive-store .sm-broad-main,
.sm-archive-store .sm-broad-secondary,
.sm-shop-page .sm-store-showcase,
.sm-shop-page .sm-pg,
.sm-shop-page .sm-bch,
.sm-shop-page .sm-broad-main,
.sm-shop-page .sm-broad-secondary {
	background: transparent;
}

/* Legacy rows used by the main Shop page (broad-hero + product carousels)
 * also sit on the page tone, whatever their is-white / is-gray flag says. */
.sm-shop-page .sm-broad-hero,
.sm-archive-store .sm-broad-hero,
.sm-shop-page .sm-broad-hero.is-white,
.sm-archive-store .sm-broad-hero.is-white,
.sm-shop-page .sm-broad-hero.is-gray,
.sm-archive-store .sm-broad-hero.is-gray,
.sm-shop-page .sm-hp-prod-car,
.sm-archive-store .sm-hp-prod-car,
.sm-shop-page .sm-hp-prod-car.is-white,
.sm-archive-store .sm-hp-prod-car.is-white,
.sm-shop-page .sm-hp-prod-car.is-gray,
.sm-archive-store .sm-hp-prod-car.is-gray {
	background: transparent;
}

/* No rules: above "Shop by need", under the filter/sort bar, above rows. */
.sm-archive-store .sm-sc-needs,
.sm-shop-page .sm-sc-needs,
.sm-archive-store .sm-pg-bar,
.sm-shop-page .sm-pg-bar,
.sm-archive-store .sm-bch,
.sm-shop-page .sm-bch,
.sm-archive-store .sm-broad-main,
.sm-shop-page .sm-broad-main,
.sm-archive-store .sm-broad-secondary,
.sm-shop-page .sm-broad-secondary {
	border-top: 0;
	border-bottom: 0;
}

/* Desktop: "Sort by" joins the "Shop by need" line at the right. */
@media (min-width: 761px) {
	.sm-archive-store .sm-pg-inner,
	.sm-shop-page .sm-pg-inner {
		position: relative;
		display: flow-root;
	}

	.sm-archive-store .sm-pg-bar,
	.sm-shop-page .sm-pg-bar {
		position: absolute;
		top: -66px;
		right: 0;
		left: auto;
		z-index: 30;
		margin: 0;
		padding: 0;
		background: transparent;
	}

	.sm-archive-store .sm-pg-bar-left,
	.sm-shop-page .sm-pg-bar-left {
		display: none;
	}

	.sm-archive-store .sm-pg-body,
	.sm-shop-page .sm-pg-body {
		margin-top: 26px;
	}
}

/* The count sits with the load-more control at the end of the grid. */
.sm-archive-store .sm-pg-foot,
.sm-shop-page .sm-pg-foot {
	margin-top: 32px;
}

.sm-archive-store .sm-pg-result-foot,
.sm-shop-page .sm-pg-result-foot {
	margin: 0;
	font-size: 12.5px;
	color: #6f7680;
}

.sm-archive-store .sm-pg-result-foot b,
.sm-shop-page .sm-pg-result-foot b {
	font-weight: 600;
	color: #111214;
}

/* Mobile keeps the same tone: the filter/sort bar is not a white band. */
@media (max-width: 760px) {
	.sm-archive-store .sm-pg,
	.sm-shop-page .sm-pg {
		padding-inline: 20px;
	}

	.sm-archive-store .sm-pg-bar,
	.sm-shop-page .sm-pg-bar {
		margin: 0 -20px 16px;
		padding: 10px 20px;
		background: #f9f9fa;
		backdrop-filter: none;
	}

	.sm-archive-store .sm-pg-sort-cap,
	.sm-shop-page .sm-pg-sort-cap {
		display: inline;
		font-size: 12px;
		color: #3f3f46;
	}
}

/* ------------------------------------------------------------------ */
/* "Sort by" sits on the "Shop by need" line - only when that line exists. */
/*                                                                        */
/* The desktop rule above pulls the bar 66px up (top: -66px) so it shares  */
/* the band with "Shop by need". A brand without that row - Anker - has no */
/* band there, so the same offset dropped the bar 38px into the category   */
/* slider (measured: slider 221-365, bar 327-365). Fall back to normal     */
/* flow, which keeps the bar under the showcase with real space.           */
/* ------------------------------------------------------------------ */
@media (min-width: 761px) {
	.sm-archive-store:not(:has(.sm-sc-needs)) .sm-pg-bar,
	.sm-shop-page:not(:has(.sm-sc-needs)) .sm-pg-bar {
		position: static;
		top: auto;
		right: auto;
		margin: 0 0 18px;
		padding: 0;
		background: transparent;
		/* The left group is hidden on desktop, so space-between would push
		   the sort control to the left edge. Keep it on the right. */
		justify-content: flex-end;
	}
}
