/**
 * Woo Specialist Theme — Meat Storefront template
 *
 * Bold, simple merch-store homepage (meatcanyon.store-inspired): announcement
 * bar, full-bleed hero, and the WooCommerce catalog as a 3-up product grid.
 * All colors use the global theme + plugin design tokens so this layout
 * responds to light/dark mode and the owner's custom palette. The hero keeps a
 * dark overlay regardless of mode (it's image-forward).
 *
 * @package Woo_Specialist_Theme
 */

/* The announcement bar is now a GLOBAL element (.wst-announce in theme.css,
   rendered by header.php on every page), so the Meat template no longer ships
   its own bar. */

/* ---- Header ----
   The bold uppercase nav treatment used to live here, scoped to the Meat
   Storefront template only — which made the header (caps, weight, tracking,
   hover colour) visibly change between the homepage and every other page.
   It now lives in theme.css under `.wst-nav li a`, so the header is identical
   site-wide. Do NOT re-add per-template header rules here. */

/* ---- Hero ---- */
.wst-meat-hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 56vh;
	padding: 64px 24px;
	background: var(--wst-color-bg-alt, #f5f5f7);
	background-size: cover;
	background-position: center;
	text-align: center;
	overflow: hidden;
}

/* Dark overlay so hero text stays legible over any image, in any mode. */
.wst-meat-hero.has-image::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.wst-meat-hero__inner {
	position: relative;
	max-width: 760px;
}

.wst-meat-hero.has-image .wst-meat-hero__title,
.wst-meat-hero.has-image .wst-meat-hero__sub {
	color: #fff;
}

.wst-meat-hero__title {
	margin: 0 0 12px;
	font-size: clamp(2.25rem, 6vw, 4rem);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	color: var(--wst-color-text, #1d1d1f);
}

.wst-meat-hero__sub {
	margin: 0 0 24px;
	font-size: clamp(1rem, 2vw, 1.25rem);
	line-height: 1.4;
	color: var(--wst-color-text-muted, #6e6e73);
}

.wst-meat-hero__cta {
	display: inline-block;
	padding: 14px 36px;
	background: var(--wst-color-accent, #0071e3);
	color: var(--wsp-color-accent-text, #fff);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 2px;
	transition: opacity 150ms ease;
}

.wst-meat-hero__cta:hover {
	opacity: 0.88;
	color: var(--wsp-color-accent-text, #fff);
}

/* ---- Optional intro copy ---- */
.wst-meat-intro {
	padding: 48px 24px 0;
	text-align: center;
	color: var(--wst-color-text, #1d1d1f);
}

/* ---- Product grid (WC [products] output) ---- */
.wst-meat-grid {
	padding: 56px 24px 72px;
}

.wst-meat-grid .woocommerce,
.wst-meat-grid ul.products {
	margin: 0;
	padding: 0;
}

.wst-meat-grid ul.products {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
	list-style: none;
}

/* Neutralise WC's legacy float-clearfix pseudo-elements (they become phantom
   grid cells otherwise). */
.wst-meat-grid ul.products::before,
.wst-meat-grid ul.products::after {
	content: none;
	display: none;
}

.wst-meat-grid li.product {
	margin: 0 !important;
	width: auto !important;
	float: none !important;
	text-align: left;
}

.wst-meat-grid li.product a.woocommerce-LoopProduct-link {
	display: block;
	text-decoration: none;
	color: inherit;
	/* positioning context for the hover image-swap overlay */
	position: relative;
}

.wst-meat-grid li.product img {
	display: block;
	width: 100%;
	aspect-ratio: var(--wst-card-aspect, 1 / 1);
	object-fit: cover;
	background: var(--wsp-color-surface, #fff);
	border: 1px solid var(--wst-color-border, #d2d2d7);
	margin: 0 0 14px;
}

/* Hover image-swap: the 2nd gallery image overlays the primary and fades in
   on hover (meatcanyon-style). Injected by wst_meat_loop_alt_image() in
   functions.php. Sits over the image box only (top, width:100%, 1:1), so the
   title/price below are untouched. Desktop pointers only; honors reduced motion. */
.wst-meat-grid li.product .wst-meat-card__alt-img {
	position: absolute;
	top: 0;
	left: 0;
	margin: 0;
	opacity: 0;
	transition: opacity 250ms ease;
	pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
	.wst-meat-grid li.product:hover .wst-meat-card__alt-img {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wst-meat-grid li.product .wst-meat-card__alt-img {
		transition: none;
	}
}

.wst-meat-grid li.product .woocommerce-loop-product__title {
	padding: 0;
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	color: var(--wst-color-text, #1d1d1f);
}

.wst-meat-grid li.product .price {
	display: block;
	color: var(--wst-color-text-muted, #6e6e73);
	font-size: 14px;
	font-weight: 600;
}

.wst-meat-grid li.product .price del {
	opacity: 0.6;
	margin-right: 6px;
}

/* Clean meatcanyon-style card: the card links to the product page; the loop
   add-to-cart button is hidden (purchase happens on the product page). */
.wst-meat-grid li.product > a.button,
.wst-meat-grid li.product .add_to_cart_button,
.wst-meat-grid li.product .added_to_cart {
	display: none !important;
}

.wst-meat-grid .woocommerce-result-count,
.wst-meat-grid .woocommerce-ordering {
	display: none;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
	.wst-meat-grid ul.products {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}
}

@media (max-width: 600px) {
	.wst-meat-grid ul.products {
		grid-template-columns: 1fr;
	}
	.wst-meat-hero {
		min-height: 44vh;
	}
}
