/**
 * Shop archive — Jupiter underline filter tabs + shop-only chrome.
 * Enqueued on is_shop() only.
 */

:root {
	/* Soft ink-brown — same hue as Gishty border, dialed back */
	--skid-shop-card-border: color-mix(in srgb, var(--skid-ink-brown, #463c36) 38%, transparent);
	--skid-shop-card-radius: 7px;
	--skid-shop-card-face: var(--skid-white, #ffffff);
}

/* --- Filter tabs: tight under header; restore when content sits above --- */
body.woocommerce-shop .skid-archive-product {
	/* Float header clearance only — tabs own the next band */
	padding-top: 0.5rem;
}

body.woocommerce-shop .skid-shop-filter-tabs-shell {
	position: static;
	padding-top: 0.85rem !important;
	padding-bottom: 0.75rem !important;
}

body.woocommerce-shop .skid-shop-promo-bar + .skid-shop-filter-tabs-shell,
body.woocommerce-shop .wp-block-woocommerce-store-notices:has(.wc-block-components-notice-banner) + .skid-shop-filter-tabs-shell,
body.woocommerce-shop .woocommerce-notices-wrapper:not(:empty) + .skid-shop-filter-tabs-shell,
body.woocommerce-shop .wp-block-woocommerce-store-notices:not(:empty) + .skid-shop-filter-tabs-shell {
	padding-top: var(--wp--preset--spacing--50, 2rem);
}

.skid-shop-filter-tabs {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0.15rem 1.5rem;
	margin: 0;
	padding: 0 0 0.35rem;
	border-bottom: 0;
	font-family: var(--skid-font-body);
}

.skid-shop-filter-tabs__tab {
	appearance: none;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	margin: 0;
	padding: 0.65rem 0.1rem;
	min-height: 44px;
	color: var(--skid-ink);
	font-family: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	line-height: 1.2;
	text-transform: none;
	cursor: pointer;
	position: relative;
}

.skid-shop-filter-tabs__tab:hover,
.skid-shop-filter-tabs__tab:focus-visible {
	color: var(--skid-ink-brown);
	outline: none;
}

.skid-shop-filter-tabs__tab:focus-visible {
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--skid-honey) 55%, transparent);
}

.skid-shop-filter-tabs__tab.is-active {
	color: var(--skid-ink);
}

.skid-shop-filter-tabs__tab.is-active::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
	background: var(--skid-ink);
}

.skid-shop-filter-hidden {
	display: none !important;
}

.skid-shop-filter-empty {
	grid-column: 1 / -1;
	width: 100%;
	margin: 1.5rem 0 0;
	text-align: center;
	color: var(--skid-muted);
	font-family: var(--skid-font-body);
	font-size: 0.95rem;
}

/* One-page catalog — hide pagination chrome when filters own the list */
body.woocommerce-shop .skid-archive-product .wp-block-query-pagination {
	display: none !important;
}

@media (max-width: 600px) {
	.skid-shop-filter-tabs {
		gap: 0.1rem 1rem;
	}

	.skid-shop-filter-tabs__tab {
		font-size: 0.75rem;
		letter-spacing: 0.04em;
	}
}

/* --- Product card shell (white + ink-brown border, 7px, 1rem pad) --- */
body.woocommerce-shop .skid-archive-product .wc-block-product,
body.woocommerce-shop .skid-archive-product li[data-wp-key^="product-item-"] {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	background: var(--skid-shop-card-face);
	border: 1px solid var(--skid-shop-card-border);
	border-radius: var(--skid-shop-card-radius);
	box-shadow: none;
	overflow: visible;
	/* Top 1rem; sides 1.125rem (−25% from 1.5); bottom 1.5rem */
	padding: 1rem 1.125rem 1.5rem;
	/* Room for Gishty offset so neighbors don’t clip */
	margin-bottom: 0.35rem;
}

body.woocommerce-shop .skid-archive-product .wc-block-product .wc-block-components-product-image,
body.woocommerce-shop .skid-archive-product li[data-wp-key^="product-item-"] .wc-block-components-product-image {
	border-radius: var(--skid-shop-card-radius) var(--skid-shop-card-radius) 0 0;
	overflow: hidden;
}

body.woocommerce-shop .skid-archive-product .wc-block-product .wc-block-components-product-image img,
body.woocommerce-shop .skid-archive-product li[data-wp-key^="product-item-"] .wc-block-components-product-image img {
	border-radius: var(--skid-shop-card-radius) var(--skid-shop-card-radius) 0 0;
	display: block;
	width: 100%;
	height: auto;
	/* Soft old-timey wash → full color + gentle zoom (clipped by overflow:hidden) */
	filter: sepia(0.42) saturate(0.88) contrast(0.96);
	transform: scale(1);
	transform-origin: center center;
	transition: filter 320ms ease, transform 420ms ease;
	will-change: transform;
}

body.woocommerce-shop .skid-archive-product .wc-block-product:hover .wc-block-components-product-image img,
body.woocommerce-shop .skid-archive-product .wc-block-product:focus-within .wc-block-components-product-image img,
body.woocommerce-shop .skid-archive-product li[data-wp-key^="product-item-"]:hover .wc-block-components-product-image img,
body.woocommerce-shop .skid-archive-product li[data-wp-key^="product-item-"]:focus-within .wc-block-components-product-image img {
	filter: sepia(0) saturate(1) contrast(1);
	transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
	body.woocommerce-shop .skid-archive-product .wc-block-product .wc-block-components-product-image img,
	body.woocommerce-shop .skid-archive-product li[data-wp-key^="product-item-"] .wc-block-components-product-image img {
		transition: filter 320ms ease;
		transform: none;
	}

	body.woocommerce-shop .skid-archive-product .wc-block-product:hover .wc-block-components-product-image img,
	body.woocommerce-shop .skid-archive-product .wc-block-product:focus-within .wc-block-components-product-image img,
	body.woocommerce-shop .skid-archive-product li[data-wp-key^="product-item-"]:hover .wc-block-components-product-image img,
	body.woocommerce-shop .skid-archive-product li[data-wp-key^="product-item-"]:focus-within .wc-block-components-product-image img {
		transform: none;
	}
}

/* --- Title + price row --- */
body.woocommerce-shop .skid-archive-product .wc-block-product,
body.woocommerce-shop .skid-archive-product li[data-wp-key^="product-item-"] {
	--skid-shop-card-row-gap: 0.65rem;
}

body.woocommerce-shop .skid-archive-product .skid-shop-card-meta-row {
	width: 100%;
	align-items: flex-start;
	gap: 0.5rem;
	margin-top: 0.65rem !important;
	margin-bottom: var(--skid-shop-card-row-gap) !important;
}

body.woocommerce-shop .skid-archive-product .skid-shop-card-title,
body.woocommerce-shop .skid-archive-product .skid-shop-card-meta-row .wp-block-post-title {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0 !important;
	font-family: var(--skid-font-body) !important;
	font-size: 1.125rem !important;
	font-weight: 500 !important;
	letter-spacing: -0.01em;
	line-height: 1.3 !important;
	text-align: left !important;
	color: var(--skid-ink);
}

body.woocommerce-shop .skid-archive-product .skid-shop-card-title a,
body.woocommerce-shop .skid-archive-product .skid-shop-card-meta-row .wp-block-post-title a {
	font-family: inherit;
	font-weight: inherit;
	color: inherit;
	text-decoration: none;
}

body.woocommerce-shop .skid-archive-product .skid-shop-card-title a:hover,
body.woocommerce-shop .skid-archive-product .skid-shop-card-meta-row .wp-block-post-title a:hover {
	color: var(--skid-ink-brown);
}

body.woocommerce-shop .skid-archive-product .skid-shop-card-price,
body.woocommerce-shop .skid-archive-product .skid-shop-card-meta-row .wc-block-components-product-price {
	flex: 0 0 auto;
	margin: 0 !important;
	text-align: right !important;
}

body.woocommerce-shop .skid-archive-product .skid-shop-card-price .wc-block-components-product-price,
body.woocommerce-shop .skid-archive-product .skid-shop-card-meta-row .wc-block-components-product-price {
	display: inline-block;
	padding: 0.2rem 0.55rem;
	border-radius: 4px;
	background: color-mix(in srgb, var(--skid-trust, #f0ebe3) 85%, var(--skid-bloom, #c794c1) 15%);
	color: var(--skid-ink-brown, #463c36);
	font-family: var(--skid-font-body);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.25;
	white-space: nowrap;
}

body.woocommerce-shop .skid-archive-product .skid-shop-card-price .woocommerce-Price-amount,
body.woocommerce-shop .skid-archive-product .skid-shop-card-meta-row .woocommerce-Price-amount {
	font-weight: 600;
}

/* --- Product card blurbs + application pills (polish #3) --- */
body.woocommerce-shop .skid-archive-product .skid-shop-card-blurb,
body.woocommerce-shop .skid-archive-product .wp-block-post-excerpt.skid-shop-card-blurb {
	margin: 0 0 var(--skid-shop-card-row-gap, 0.65rem);
	padding: 0;
	color: var(--skid-muted, #665c51);
	font-family: var(--skid-font-body);
	font-size: 0.8125rem;
	line-height: 1.45;
	text-align: left;
}

body.woocommerce-shop .skid-archive-product .skid-shop-card-blurb .wp-block-post-excerpt__excerpt,
body.woocommerce-shop .skid-archive-product .skid-shop-card-blurb p {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	margin: 0;
}

body.woocommerce-shop .skid-archive-product .skid-shop-card-blurb:empty,
body.woocommerce-shop .skid-archive-product .skid-shop-card-blurb .wp-block-post-excerpt__excerpt:empty {
	display: none;
}

body.woocommerce-shop .skid-archive-product .skid-shop-card-pills {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	gap: 0.35rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

body.woocommerce-shop .skid-archive-product .skid-shop-card-pills__item {
	margin: 0;
	padding: 0.2rem 0.55rem;
	border: 1px solid color-mix(in srgb, var(--skid-ink-brown, #463c36) 22%, transparent);
	border-radius: 999px;
	background: color-mix(in srgb, var(--skid-surface, #f7f4ef) 70%, transparent);
	color: var(--skid-ink-brown, #463c36);
	font-family: var(--skid-font-body);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-transform: none;
}

/* --- Phase B1: Gishty bridge → Woo product-button (shop only) --- */
body.woocommerce-shop .skid-archive-product .wc-block-components-product-button {
	/* Stick to card bottom; 2× row gap above CTA so it reads as its own zone. */
	margin-top: auto;
	padding: calc(var(--skid-shop-card-row-gap, 0.65rem) * 2) 0 0;
	overflow: visible;
}

body.woocommerce-shop .skid-archive-product .wc-block-components-product-button__button,
body.woocommerce-shop .skid-archive-product a.wc-block-components-product-button__button,
body.woocommerce-shop .skid-archive-product button.wc-block-components-product-button__button {
	--skid-btn-face: var(--skid-honey);
	--skid-btn-ink: var(--skid-ink);
	--skid-btn-offset: var(--skid-ink-brown);
	--skid-btn-offset-shift: 3px;
	position: relative;
	display: inline-block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	background: var(--skid-btn-face) !important;
	background-color: var(--skid-btn-face) !important;
	color: var(--skid-btn-ink) !important;
	border: 2px solid var(--skid-btn-offset) !important;
	border-radius: 0 !important;
	box-shadow: var(--skid-btn-offset-shift) var(--skid-btn-offset-shift) 0 0 var(--skid-btn-offset);
	transform: translate(0, 0);
	transition: transform 180ms ease-out, box-shadow 180ms ease-out;
	text-decoration: none;
	font-family: var(--skid-font-body) !important;
	font-size: 0.6875rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.1em !important;
	text-transform: uppercase !important;
	padding: 0.55rem 0.85rem !important;
	line-height: 1.2;
	text-align: center;
}

body.woocommerce-shop .skid-archive-product .wc-block-components-product-button__button:hover,
body.woocommerce-shop .skid-archive-product .wc-block-components-product-button__button:focus-visible,
body.woocommerce-shop .skid-archive-product a.wc-block-components-product-button__button:hover,
body.woocommerce-shop .skid-archive-product a.wc-block-components-product-button__button:focus-visible {
	transform: translate(2px, 2px);
	box-shadow: 1px 1px 0 0 var(--skid-btn-offset);
	color: var(--skid-btn-ink) !important;
}

body.woocommerce-shop .skid-archive-product .wc-block-components-product-button__button:active {
	transform: translate(3px, 3px);
	box-shadow: 0 0 0 0 var(--skid-btn-offset);
}

body.woocommerce-shop .skid-archive-product .wc-block-components-product-button__button:focus-visible {
	outline: 2px solid var(--skid-gold);
	outline-offset: 3px;
}
