/* ==========================================================================
   Shop marketplace landing — plain /shop/ only (template-parts/shop/landing.php)
   Loaded after shop-archive.css, so product cards keep their grid styles.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero: rotating banner (homepage hero, simplified; no pause button)
   -------------------------------------------------------------------------- */
.shop-hero {
	position: relative;
	height: clamp(460px, 64vh, 640px);
	background: var(--evo-gradient-dark);
	color: var(--evo-text-on-dark);
	overflow: hidden;
	isolation: isolate;
}
.shop-hero__slides { position: absolute; inset: 0; }
.shop-hero__slide {
	position: absolute; inset: 0;
	opacity: 0; visibility: hidden;
	transition: opacity var(--evo-speed-slow) var(--evo-ease), visibility 0s linear var(--evo-speed-slow);
}
.shop-hero__slide.is-active {
	opacity: 1; visibility: visible; z-index: 1;
	transition: opacity var(--evo-speed-slow) var(--evo-ease), visibility 0s;
}

.shop-hero__media { position: absolute; inset: 0; background: var(--evo-gradient-dark); }
.shop-hero__video,
.shop-hero__image,
.shop-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Videos fade in once frames are playing, so there's never a black box */
.shop-hero__video { opacity: 0; transition: opacity var(--evo-speed-slow) var(--evo-ease); }
.shop-hero__video.is-playing { opacity: 1; }

.shop-hero__scrim {
	position: absolute; inset: 0;
	background:
		linear-gradient(90deg, rgba(20, 22, 28, 0.82) 0%, rgba(20, 22, 28, 0.45) 50%, rgba(20, 22, 28, 0.08) 100%),
		linear-gradient(0deg, rgba(20, 22, 28, 0.7) 0%, rgba(20, 22, 28, 0) 45%),
		linear-gradient(180deg, rgba(20, 22, 28, 0.55) 0%, rgba(20, 22, 28, 0) 30%);
}

.shop-hero__content {
	position: relative; z-index: 1;
	height: 100%;
	display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
	padding-top: calc(var(--evo-header-height) + 24px);
	padding-bottom: 104px;
}
.shop-hero__content > * { max-width: 600px; }
.shop-hero__label {
	font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: var(--evo-tracking-wide);
	color: var(--evo-accent-light);
}
.shop-hero__title {
	margin: 10px 0 12px;
	font-size: clamp(2rem, 1.35rem + 2.4vw, 3.4rem);
	color: #fff;
	text-wrap: balance;
}
.shop-hero__text { margin: 0 0 26px; font-size: 1.06rem; color: var(--evo-text-on-dark-muted); }

/* Subtle lift-in for the active slide's text */
.shop-hero__slide .shop-hero__content > * {
	transform: translateY(12px); opacity: 0;
	transition: transform var(--evo-speed-slow) var(--evo-ease), opacity var(--evo-speed-slow) var(--evo-ease);
}
.shop-hero__slide.is-active .shop-hero__content > * { transform: none; opacity: 1; }
.shop-hero__slide.is-active .shop-hero__content > :nth-child(2) { transition-delay: 60ms; }
.shop-hero__slide.is-active .shop-hero__content > :nth-child(3) { transition-delay: 120ms; }
.shop-hero__slide.is-active .shop-hero__content > :nth-child(4) { transition-delay: 180ms; }

/* Slide navigation: labelled progress bars (bars only on phones) */
.shop-hero__nav {
	position: absolute; left: 0; right: 0; bottom: 32px; z-index: 2;
	display: flex; gap: 16px;
}
.shop-hero__dot {
	flex: 0 1 180px; min-width: 0;
	display: flex; flex-direction: column; gap: 10px;
	padding: 10px 0; margin: 0;
	background: none; border: 0; cursor: pointer; text-align: left;
	color: var(--evo-text-on-dark-muted);
	transition: color var(--evo-speed-fast) var(--evo-ease);
}
.shop-hero__dot:hover,
.shop-hero__dot.is-active { color: #fff; }
.shop-hero__dot-bar { position: relative; display: block; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.28); overflow: hidden; }
.shop-hero__dot-fill {
	position: absolute; inset: 0;
	background: #fff;
	transform: scaleX(0); transform-origin: left center;
}
.shop-hero__dot.is-done .shop-hero__dot-fill { transform: scaleX(1); background: rgba(255, 255, 255, 0.55); }
.shop-hero__dot-label {
	font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: var(--evo-tracking-wide);
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   Search + material jump links
   -------------------------------------------------------------------------- */
.shop-bar { background: var(--evo-white); border-bottom: 1px solid var(--evo-border); }
.shop-bar__inner { display: flex; align-items: center; gap: 24px; padding-block: 18px; }
.shop-bar__search { flex: 0 0 380px; }
.shop-bar__search { min-width: 0; }
.shop-bar__search .search-form__field { min-width: 0; background: var(--evo-surface-sunken); font-size: 16px; } /* 16px: no iOS zoom */
.shop-bar__search .search-form__submit { flex-shrink: 0; }
.shop-bar__links {
	flex: 1; min-width: 0;
	display: flex; gap: 8px;
	margin: 0; padding: 2px; list-style: none;
	overflow-x: auto; scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.shop-bar__links::-webkit-scrollbar { display: none; }
.shop-bar__link {
	display: inline-flex; align-items: center;
	padding: 9px 16px; white-space: nowrap;
	background: var(--evo-white); border: 1px solid var(--evo-border); border-radius: 999px;
	font-size: 0.85rem; font-weight: 600; color: var(--evo-text);
	transition: border-color var(--evo-speed-fast) var(--evo-ease), color var(--evo-speed-fast) var(--evo-ease), background var(--evo-speed-fast) var(--evo-ease);
}
.shop-bar__link:hover { border-color: var(--evo-accent); color: var(--evo-accent); }
.shop-bar__link--all { background: var(--evo-dark); border-color: var(--evo-dark); color: #fff; }
.shop-bar__link--all:hover { background: var(--evo-accent); border-color: var(--evo-accent); color: #fff; }

/* --------------------------------------------------------------------------
   Material shelves
   -------------------------------------------------------------------------- */
.shop-shelves { padding-block: 56px 16px; }
.shop-shelf { scroll-margin-top: 24px; }
.shop-shelf + .shop-shelf { margin-top: 56px; padding-top: 48px; border-top: 1px solid var(--evo-border); }

.shop-shelf__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.shop-shelf__intro { min-width: 0; }
.shop-shelf__title { margin: 0; font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem); }
.shop-shelf__title a { transition: color var(--evo-speed-fast) var(--evo-ease); }
.shop-shelf__title a:hover { color: var(--evo-accent); }
.shop-shelf__blurb { margin: 6px 0 0; max-width: 560px; font-size: 0.95rem; }

.shop-shelf__actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.shop-shelf__all {
	display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
	font-size: 0.85rem; font-weight: 700; color: var(--evo-text);
	transition: color var(--evo-speed-fast) var(--evo-ease);
}
.shop-shelf__all:hover { color: var(--evo-accent); }
.shop-shelf__arrows { display: flex; gap: 8px; }
.shop-shelf__arrows[hidden] { display: none; }
.shop-shelf__arrow {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; padding: 0;
	background: var(--evo-white); border: 1px solid var(--evo-border); border-radius: 50%;
	color: var(--evo-text); cursor: pointer;
	transition: border-color var(--evo-speed-fast) var(--evo-ease), color var(--evo-speed-fast) var(--evo-ease), opacity var(--evo-speed-fast) var(--evo-ease);
}
.shop-shelf__arrow:hover:not(:disabled) { border-color: var(--evo-accent); color: var(--evo-accent); }
.shop-shelf__arrow:disabled { opacity: 0.35; cursor: default; }

/* The row: same cards as the grid, laid out as a scroll-snap strip */
ul.products.shop-shelf__track {
	--shelf-gap: 24px;
	--shelf-cols: 4;
	display: grid;
	grid-template-columns: none;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--shelf-cols) - 1) * var(--shelf-gap)) / var(--shelf-cols));
	gap: var(--shelf-gap);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 4px;
}
ul.products.shop-shelf__track::-webkit-scrollbar { display: none; }
.shop-shelf__track > li { scroll-snap-align: start; min-width: 0; }
/* The shelf heading already names the material */
.shop-shelf__track .product-card__cat { display: none; }
/* Add to Cart alignment comes from the shared card rules in shop-archive.css */

/* Last tile: "See all N …" */
.shop-shelf__more { list-style: none; }
.shop-shelf__more-link {
	display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
	aspect-ratio: 1 / 1; padding: 24px;
	background: var(--evo-gradient-dark); color: #fff;
	border-radius: var(--evo-radius-md);
	transition: background var(--evo-speed-base) var(--evo-ease);
}
.shop-shelf__more-link:hover { background: var(--evo-gradient-accent); }
.shop-shelf__more-count { font-size: clamp(2rem, 1.6rem + 1.4vw, 2.8rem); font-weight: 800; line-height: 1; }
.shop-shelf__more-text { font-size: 0.95rem; font-weight: 700; }
.shop-shelf__more-arrow { margin-top: 8px; font-size: 1.3rem; line-height: 1; }

.shop-shelves--empty { padding-block: 64px; }

/* --------------------------------------------------------------------------
   Closing band: full catalog + contact
   -------------------------------------------------------------------------- */
.shop-browse { margin-top: 64px; padding-block: 56px; background: var(--evo-white); border-top: 1px solid var(--evo-border); }
.shop-browse__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.shop-browse__title { margin: 0 0 6px; font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.9rem); }
.shop-browse__text p { margin: 0; max-width: 560px; }
.shop-browse__actions { display: flex; gap: 12px; flex-shrink: 0; }
.shop-browse .btn--outline { border-width: 1px; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
	ul.products.shop-shelf__track { --shelf-cols: 3; --shelf-gap: 20px; }
	.shop-bar__search { flex-basis: 300px; }
}

@media (max-width: 782px) {
	.shop-hero { height: min(560px, 80svh); min-height: 460px; }
	.shop-hero__content { padding-bottom: 76px; }
	.shop-hero__title { font-size: clamp(1.85rem, 1.3rem + 2.6vw, 2.4rem); }
	.shop-hero__text { font-size: 0.98rem; margin-bottom: 20px; }
	.shop-hero__scrim {
		background:
			linear-gradient(0deg, rgba(20, 22, 28, 0.88) 0%, rgba(20, 22, 28, 0.35) 60%, rgba(20, 22, 28, 0.1) 100%),
			linear-gradient(180deg, rgba(20, 22, 28, 0.55) 0%, rgba(20, 22, 28, 0) 30%);
	}
	.shop-hero__nav { bottom: 18px; gap: 8px; }
	.shop-hero__dot { flex: 0 0 44px; padding: 14px 0; } /* tall hit area, short bar */
	.shop-hero__dot-label { display: none; }

	.shop-bar__inner { flex-direction: column; align-items: stretch; gap: 12px; padding-block: 14px; }
	.shop-bar__search { flex: none; }
	/* Chips scroll edge to edge */
	.shop-bar__links { margin-inline: -24px; padding-inline: 24px; scroll-padding-inline: 24px; }

	.shop-shelves { padding-block: 40px 8px; }
	.shop-shelf + .shop-shelf { margin-top: 40px; padding-top: 36px; }
	.shop-shelf__head { align-items: flex-start; margin-bottom: 18px; gap: 16px; }
	.shop-shelf__blurb { font-size: 0.9rem; }
	.shop-shelf__arrows { display: none !important; } /* swipe on touch screens */
	.shop-shelf__all { padding-top: 6px; }

	/* Cards peek past the edge so it's obvious the row scrolls */
	ul.products.shop-shelf__track {
		--shelf-gap: 14px;
		grid-auto-columns: 42%;
		margin-inline: -24px;
		padding-inline: 24px;
		scroll-padding-inline: 24px;
	}

	.shop-browse { margin-top: 48px; padding-block: 40px; }
	.shop-browse__inner { flex-direction: column; align-items: stretch; gap: 20px; }
	.shop-browse__actions { flex-direction: column; }
	.shop-browse__actions .btn { width: 100%; }
}

@media (max-width: 480px) {
	ul.products.shop-shelf__track { grid-auto-columns: 46%; }
	.shop-shelf__more-link { padding: 16px; }
	.shop-shelf__head { flex-direction: column; gap: 8px; }
	.shop-shelf__all { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.shop-hero__slide .shop-hero__content > * { transform: none; opacity: 1; }
	ul.products.shop-shelf__track { scroll-behavior: auto; }
}
