/**
 * Shop landing page — matches test3.ant/shop (Elementor product archive).
 */

body.hq-shop-page .site-content {
	padding-top: 0;
}

body.hq-shop-page .site-content__inner {
	max-width: none;
	padding: 0;
}

body.hq-shop-page .woocommerce-main {
	padding-block: 0;
}

body.hq-shop-page .hq-shop-archive {
	width: 100%;
	max-width: 100%;
	overflow-x: clip;
}

body.hq-shop-page .hq-shop-hero.col-full,
body.hq-shop-page .hq-shop-intro.col-full,
body.hq-shop-page .hq-shop-categories.col-full {
	width: min(100% - 2rem, var(--hq-col-full, 1170px));
	margin-inline: auto;
}

/* Hero */
.hq-shop-hero {
	position: relative;
	min-height: clamp(320px, 50vh, 603px);
	overflow: hidden;
}

.hq-shop-hero__media {
	position: absolute;
	inset: 0;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
}

.hq-shop-hero__content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	min-height: clamp(320px, 50vh, 603px);
	padding: clamp(1.5rem, 4vw, 2.5rem) 1rem;
}

/* Match product category banner copy panel (test3) */
.hq-shop-hero__copy {
	display: inline-block;
	width: fit-content;
	max-width: 100%;
	padding: clamp(0.875rem, 2vw, 1.25rem) clamp(1rem, 2.5vw, 1.5rem);
	background-color: rgba(201, 150, 199, 0.62);
	border-radius: 8px;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	box-shadow: 0 6px 28px rgba(92, 48, 90, 0.14);
}

.hq-shop-hero__title {
	margin: 0;
	color: #ffffff;
	font-family: var(--font-family-base, 'Andika', sans-serif);
	font-size: clamp(2rem, 8vw, 3.875rem);
	font-weight: 600;
	line-height: 1.05;
	letter-spacing: -0.5px;
	text-transform: none;
	text-shadow: none;
}

.hq-shop-hero__tagline {
	margin: 0.5rem 0 0;
	max-width: min(28rem, 100%);
	color: #ffffff;
	font-family: var(--font-family-base, 'Andika', sans-serif);
	font-size: clamp(0.875rem, 2.5vw, 1rem);
	font-weight: 600;
	line-height: 1.5;
	text-shadow: none;
}

.hq-shop-hero__tagline strong {
	font-weight: 600;
}

/* Intro eyebrow */
.hq-shop-intro {
	padding: clamp(1.25rem, 3vw, 1.75rem) 1rem 0.5rem;
}

.hq-shop-intro__eyebrow {
	margin: 0;
	color: #54595f;
	font-family: var(--font-family-base, 'Andika', sans-serif);
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.3;
}

/* Category grid — space before footer (test3 ~301px mobile / ~384px desktop) */
.hq-shop-categories {
	padding: 0 1rem clamp(12rem, 40vw, 24rem);
}

.hq-shop-categories .woocommerce {
	width: 100%;
	margin: 0;
}

.hq-shop-categories ul.products {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(0.75rem, 2vw, 1rem);
	margin: 0;
	padding: 0;
	list-style: none;
	width: 100%;
}

@media (min-width: 1024px) {
	.hq-shop-categories ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 1.25rem 1.5rem;
	}
}

/* Override WooCommerce float/% widths so CSS grid can size cards */
body.hq-shop-page .hq-shop-categories .woocommerce ul.products.columns-4 li.product,
body.hq-shop-page .hq-shop-categories .woocommerce-page ul.products.columns-4 li.product,
body.hq-shop-page .hq-shop-categories ul.products li.product {
	width: 100% !important;
	max-width: none;
	margin: 0 !important;
	padding: 0;
	float: none !important;
	clear: none !important;
}

.hq-shop-categories ul.products::before,
.hq-shop-categories ul.products::after {
	display: none;
}

.hq-shop-categories ul.products li.product.product-category a {
	display: block;
	color: #111111;
	text-decoration: none;
}

.hq-shop-categories ul.products li.product.product-category a:focus-visible {
	outline: 2px solid #c996c7;
	outline-offset: 4px;
}

.hq-shop-categories ul.products li.product.product-category .cat-image-wrapper {
	display: block;
	position: relative;
	overflow: hidden;
	border-radius: 10px;
	isolation: isolate;
	transform: translateZ(0);
}

@supports (overflow: clip) {
	.hq-shop-categories ul.products li.product.product-category .cat-image-wrapper {
		overflow: clip;
	}
}

/* View icon overlay on hover (test3 Elementor wc-categories widget) */
.hq-shop-categories ul.products li.product.product-category .cat-image-wrapper::after {
	content: "⌕";
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	width: 55px;
	height: 55px;
	border: 2px solid #ffffff;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(3px);
	color: #ffffff;
	font-size: 28px;
	line-height: 46px;
	text-align: center;
	pointer-events: none;
	opacity: 0;
	transform: translate(-50%, -50%) scale(0.8);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.hq-shop-categories ul.products li.product.product-category:hover .cat-image-wrapper::after,
.hq-shop-categories ul.products li.product.product-category:focus-within .cat-image-wrapper::after {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

.hq-shop-categories ul.products li.product.product-category img {
	display: block;
	width: 100%;
	height: auto;
	transform: scale(1);
	transform-origin: center center;
	transition: transform 0.36s ease-out;
	backface-visibility: hidden;
}

.hq-shop-categories ul.products li.product.product-category a:hover img,
.hq-shop-categories ul.products li.product.product-category a:focus-visible img,
.hq-shop-categories ul.products li.product.product-category:hover img,
.hq-shop-categories ul.products li.product.product-category:focus-within img {
	transform: scale(1.05);
}

.hq-shop-categories ul.products li.product.product-category .woocommerce-loop-category__title {
	margin: 0.75em 0 0;
	font-size: clamp(0.9375rem, 0.81rem + 0.4vw, 1.0625rem);
	font-weight: 400;
	line-height: 1.25;
	text-align: center;
	letter-spacing: 0;
}

.hq-shop-categories ul.products li.product.product-category .count,
.hq-shop-categories ul.products li.product.product-category h2 mark {
	display: none;
}

/* Tablet: keep 2 columns so cards stay readable (4-up only on large screens) */
@media (min-width: 640px) and (max-width: 1023px) {
	.hq-shop-hero,
	.hq-shop-hero__content {
		min-height: clamp(360px, 45vw, 500px);
	}

	.hq-shop-categories ul.products {
		gap: 1rem 1.25rem;
	}
}

/* Small phones */
@media (max-width: 639px) {
	.hq-shop-hero,
	.hq-shop-hero__content {
		min-height: clamp(280px, 48vh, 409px);
	}

	.hq-shop-hero__copy {
		max-width: 100%;
	}

	.hq-shop-hero__title {
		font-size: clamp(1.5rem, 6vw, 2.25rem);
	}

	.hq-shop-hero__tagline {
		font-size: clamp(0.875rem, 3.5vw, 1rem);
	}

	.hq-shop-categories ul.products li.product.product-category .cat-image-wrapper::after {
		width: 44px;
		height: 44px;
		font-size: 22px;
		line-height: 38px;
	}

	.hq-shop-categories ul.products li.product.product-category .woocommerce-loop-category__title {
		margin-top: 0.5em;
		font-size: 0.875rem;
	}
}

/* Touch devices: tap feedback instead of hover-only effects */
@media (hover: none) and (pointer: coarse) {
	.hq-shop-categories ul.products li.product.product-category .cat-image-wrapper::after {
		opacity: 0;
	}

	.hq-shop-categories ul.products li.product.product-category:active .cat-image-wrapper::after {
		opacity: 1;
		transform: translate(-50%, -50%) scale(1);
	}

	.hq-shop-categories ul.products li.product.product-category a:hover img,
	.hq-shop-categories ul.products li.product.product-category:hover img {
		transform: scale(1);
	}

	.hq-shop-categories ul.products li.product.product-category:active img {
		transform: scale(1.05);
	}
}
