/*
 * preloved-bazaar — marketplace.css
 *
 * Shared marketplace design-system surface used by the homepage,
 * catalog, PDP, brand pages and seller profiles.
 *
 * Rule (banked: feedback_plugin-not-theme): this file MUST NOT consume
 * `var(--wp--preset--*)` tokens. Every colour / spacing / radius / font
 * value resolves through `--pb-*` tokens defined in tokens.css, which
 * the plugin owns and emits regardless of the active theme (Motta in
 * production, but anything else is supported).
 *
 * Surfaces owned here:
 *   - .pb-hero            (full-bleed photo hero)
 *   - .pb-pillbar         (centred search pillbox)
 *   - .pb-strip           (curated horizontal-scroll tile strip)
 *   - .pb-promo           (editorial 2-col promo band)
 *   - .pb-sellers         (sellers strip — placeholders for now)
 *   - .pb-card-rail       (mobile snap-scroll rail used by "new in")
 *   - .pb-marketplace-btn (primary / ghost / pill buttons)
 *   - .pb-stickybuy       (mobile sticky buy-now drawer)
 *   - .pb-home            (homepage layout container; was home.css)
 *
 * Cross-checked against:
 *   - vinted-catalog.png + vinted-items-new.png + vinted-item-detail-buyer.png
 *   - depop-home.png      (full-bleed lifestyle photo with overlay text)
 *   - banked feedback `feedback_design-quality-vinted-bar`.
 *
 * Performance:
 *   - Hero block uses background-image + cover so the LCP image paints fast.
 *   - content-visibility: auto on every below-the-fold section.
 */

/* ============================================================
 * 0. Home layout container (was home.css)
 * ============================================================ */

.pb-home {
	background: var(--pb-base);
	padding-bottom: clamp(48px, 7vw, 96px);
}

.pb-section,
.pb-promo,
.pb-trust-band {
	content-visibility: auto;
	contain-intrinsic-size: 1px 480px;
}

.pb-trust-band {
	contain-intrinsic-size: 1px 320px;
}

.pb-newin__empty {
	padding: 32px;
	text-align: center;
	color: var(--pb-muted);
	background: var(--pb-surface);
	border: 1px dashed var(--pb-subtle);
	border-radius: var(--pb-radius-lg);
}

.pb-section__link-wrap p {
	margin: 0;
}

/* ============================================================
 * 1. Full-bleed photo hero
 * ============================================================ */

.pb-hero {
	position: relative;
	width: 100%;
	min-height: clamp(420px, 60vw, 640px);
	background: var(--pb-brand-green);
	color: #fff;
	overflow: hidden;
	isolation: isolate;
}

.pb-hero__media,
.pb-hero__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
}

.pb-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		135deg,
		rgba(15, 30, 25, 0.78) 0%,
		rgba(15, 30, 25, 0.45) 45%,
		rgba(15, 30, 25, 0.15) 100%
	);
	z-index: 1;
}

.pb-hero__inner {
	position: relative;
	z-index: 2;
	max-width: 1280px;
	margin: 0 auto;
	padding: clamp(48px, 9vw, 112px) clamp(20px, 5vw, 64px) clamp(96px, 12vw, 144px);
	display: flex;
	flex-direction: column;
	gap: clamp(16px, 2vw, 24px);
	align-items: flex-start;
}

.pb-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border-radius: var(--pb-radius-pill);
	background: rgba(255, 255, 255, 0.14);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #fff;
}

.pb-hero__eyebrow::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--pb-brand-pink-accent);
}

.pb-hero__h1 {
	margin: 0;
	font-family: var(--pb-font-display);
	font-size: clamp(2.25rem, 6vw, 4rem);
	font-weight: 500;
	line-height: 1.05;
	letter-spacing: -0.025em;
	color: #fff;
	max-width: 18ch;
	text-wrap: balance;
}

.pb-hero__sub {
	margin: 0;
	font-size: clamp(1rem, 1.25vw, 1.125rem);
	line-height: 1.55;
	max-width: 44ch;
	color: rgba(255, 255, 255, 0.92);
}

.pb-hero__ctas {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 8px;
}

.pb-hero__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 52px;
	padding: 14px 28px;
	border-radius: var(--pb-radius-pill);
	font-family: var(--pb-font-inter);
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform 200ms ease, background-color 200ms ease, color 200ms ease;
}

.pb-hero__cta--primary {
	background: var(--pb-brand-green);
	color: #fff;
	box-shadow: 0 6px 16px rgba(15, 30, 25, 0.4);
}

.pb-hero__cta--primary:hover {
	transform: translateY(-1px);
	background: #1c5b46;
	color: #fff;
}

.pb-hero__cta--secondary {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.5);
}

.pb-hero__cta--secondary:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: #fff;
	color: #fff;
}

.pb-hero__cta:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

/* ============================================================
 * 2. Sticky-overlap search pillbox
 * ============================================================ */

.pb-pillbar {
	position: relative;
	z-index: 3;
	max-width: 1280px;
	margin: -32px auto 0;
	padding: 0 clamp(16px, 4vw, 32px);
}

.pb-pillbar--standalone {
	margin-top: clamp(24px, 4vw, 48px);
}

.pb-pillbar__form {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 8px 8px 8px 20px;
	background: var(--pb-surface);
	border-radius: var(--pb-radius-pill);
	box-shadow: 0 8px 24px rgba(15, 30, 25, 0.12), 0 2px 4px rgba(15, 30, 25, 0.06);
	border: 1px solid var(--pb-subtle);
}

.pb-pillbar__form:focus-within {
	border-color: var(--pb-brand-green);
	box-shadow: 0 8px 24px rgba(15, 30, 25, 0.16), 0 0 0 3px rgba(33, 106, 82, 0.16);
}

.pb-pillbar__icon {
	flex-shrink: 0;
	color: var(--pb-brand-green-mid);
	display: inline-flex;
}

.pb-pillbar__input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	font-family: var(--pb-font-inter);
	font-size: 1rem;
	color: var(--pb-contrast);
	min-height: 44px;
}

.pb-pillbar__input::placeholder {
	color: var(--pb-muted);
}

.pb-pillbar__btn {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 44px;
	padding: 0 18px;
	border: 0;
	border-radius: var(--pb-radius-pill);
	background: var(--pb-brand-green);
	color: #fff;
	font-weight: 600;
	font-size: 0.9375rem;
	cursor: pointer;
}

.pb-pillbar__btn:hover {
	background: var(--pb-brand-green-mid);
}

.pb-pillbar__btn:focus-visible {
	outline: 2px solid var(--pb-brand-blue);
	outline-offset: 2px;
}

.pb-pillbar__btn-label {
	display: none;
}

@media (min-width: 600px) {
	.pb-pillbar__btn-label {
		display: inline;
	}
}

/* ============================================================
 * 3. Section heading rows (shared across home + catalog)
 * ============================================================ */

.pb-section {
	max-width: 1280px;
	margin: clamp(40px, 6vw, 72px) auto 0;
	padding: 0 clamp(16px, 4vw, 32px);
}

.pb-section + .pb-section {
	margin-top: clamp(48px, 7vw, 88px);
}

.pb-section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 20px;
}

.pb-section__title {
	margin: 0;
	font-family: var(--pb-font-display);
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 500;
	color: var(--pb-contrast);
	letter-spacing: -0.015em;
}

.pb-section__link {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--pb-brand-green);
	text-decoration: none;
	white-space: nowrap;
}

.pb-section__link:hover {
	color: var(--pb-brand-green-mid);
	text-decoration: underline;
}

/* ============================================================
 * 4. Curated category strip (photo tiles, scroll-snap)
 * ============================================================ */

.pb-strip {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 78%;
	gap: 12px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	padding-bottom: 12px;
	margin: 0 calc(-1 * clamp(16px, 4vw, 32px));
	padding-left: clamp(16px, 4vw, 32px);
	padding-right: clamp(16px, 4vw, 32px);
	scrollbar-width: thin;
}

.pb-strip__tile {
	display: block;
	width: 100%;
	scroll-snap-align: start;
	position: relative;
	aspect-ratio: 4 / 3;
	border-radius: var(--pb-radius-lg);
	overflow: hidden;
	text-decoration: none;
	background: var(--pb-brand-green-soft);
	isolation: isolate;
	transition: transform 250ms ease;
}

.pb-strip__tile:hover {
	transform: translateY(-3px);
}

.pb-strip__tile:focus-visible {
	outline: 2px solid var(--pb-brand-blue);
	outline-offset: 3px;
}

.pb-strip__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
	transition: transform 400ms ease;
}

.pb-strip__tile:hover .pb-strip__img {
	transform: scale(1.04);
}

.pb-strip__tile::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(15, 30, 25, 0) 35%, rgba(15, 30, 25, 0.72) 100%);
	z-index: 1;
}

.pb-strip__label {
	position: absolute;
	z-index: 2;
	bottom: 16px;
	left: 18px;
	right: 18px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	color: #fff;
}

.pb-strip__name {
	font-family: var(--pb-font-display);
	font-size: clamp(1.125rem, 1.75vw, 1.5rem);
	font-weight: 500;
	letter-spacing: -0.01em;
	line-height: 1.1;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.pb-strip__count {
	font-size: 0.8125rem;
	color: rgba(255, 255, 255, 0.86);
	font-weight: 500;
}

.pb-strip__tile--placeholder {
	background: linear-gradient(135deg,
		var(--pb-brand-green-soft) 0%,
		var(--pb-brand-pink-soft) 100%);
}

@media (min-width: 600px) {
	.pb-strip {
		grid-auto-columns: 40%;
	}
}

@media (min-width: 960px) {
	.pb-strip {
		grid-auto-columns: 1fr;
		grid-template-columns: repeat(6, 1fr);
		overflow-x: visible;
		padding-left: 0;
		padding-right: 0;
		margin-left: 0;
		margin-right: 0;
	}
}

/* ============================================================
 * 5. Card rail (new-in horizontal scroll)
 * ============================================================ */

.pb-card-rail {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 48%;
	gap: 12px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	padding-bottom: 16px;
	margin: 0 calc(-1 * clamp(16px, 4vw, 32px));
	padding-left: clamp(16px, 4vw, 32px);
	padding-right: clamp(16px, 4vw, 32px);
	scrollbar-width: thin;
}

.pb-card-rail > * {
	scroll-snap-align: start;
}

@media (min-width: 600px) {
	.pb-card-rail {
		grid-auto-columns: 30%;
	}
}

@media (min-width: 960px) {
	.pb-card-rail {
		grid-auto-flow: row;
		grid-auto-columns: auto;
		grid-template-columns: repeat(4, 1fr);
		overflow-x: visible;
		padding-left: 0;
		padding-right: 0;
		margin-left: 0;
		margin-right: 0;
	}
}

/* "Grid" layout variant for the recent-listings shortcode when used as a
 * proper bottomless grid instead of a horizontal rail. */
.pb-card-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

@media (min-width: 600px) {
	.pb-card-grid { gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
	.pb-card-grid { gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1536px) {
	.pb-card-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ============================================================
 * 6. Editorial promo strip (wedding edit)
 * ============================================================ */

.pb-promo {
	max-width: 1280px;
	margin: clamp(48px, 7vw, 88px) auto 0;
	padding: 0 clamp(16px, 4vw, 32px);
}

.pb-promo__card {
	display: grid;
	grid-template-columns: 1fr;
	background: var(--pb-brand-pink-soft);
	border-radius: var(--pb-radius-lg);
	overflow: hidden;
}

@media (min-width: 720px) {
	.pb-promo__card {
		grid-template-columns: 1.1fr 1fr;
		align-items: stretch;
	}
}

.pb-promo__media {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--pb-brand-pink-accent);
}

@media (min-width: 720px) {
	.pb-promo__media {
		aspect-ratio: auto;
		min-height: 380px;
	}
}

.pb-promo__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pb-promo__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 14px;
	padding: clamp(24px, 4vw, 48px);
}

.pb-promo__eyebrow {
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--pb-brand-pink);
	margin: 0;
}

.pb-promo__title {
	margin: 0;
	font-family: var(--pb-font-display);
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	font-weight: 500;
	color: var(--pb-contrast);
	line-height: 1.15;
	letter-spacing: -0.015em;
}

.pb-promo__body p {
	margin: 0;
	color: var(--pb-muted);
	line-height: 1.6;
	max-width: 38ch;
}

.pb-promo__cta {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
	padding: 12px 24px;
	border-radius: var(--pb-radius-pill);
	background: var(--pb-brand-pink);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	transition: transform 200ms ease, background-color 200ms ease;
}

.pb-promo__cta:hover {
	transform: translateY(-1px);
	background: #872f4d;
	color: #fff;
}

/* ============================================================
 * 7. Sellers strip (placeholder until profiles ship)
 * ============================================================ */

.pb-sellers {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

@media (min-width: 600px) {
	.pb-sellers { grid-template-columns: repeat(4, 1fr); }
}

.pb-seller {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 18px;
	background: var(--pb-surface);
	border: 1px solid var(--pb-subtle);
	border-radius: var(--pb-radius-lg);
	text-decoration: none;
	color: inherit;
	transition: border-color 200ms ease, transform 200ms ease;
}

.pb-seller:hover {
	border-color: var(--pb-brand-green-mid);
	transform: translateY(-2px);
}

.pb-seller__avatar {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	object-fit: cover;
	background: linear-gradient(135deg,
		var(--pb-brand-green-soft),
		var(--pb-brand-pink-soft));
	display: grid;
	place-items: center;
	font-family: var(--pb-font-display);
	font-size: 1.25rem;
	color: var(--pb-brand-green);
	font-weight: 500;
}

.pb-seller__name {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--pb-contrast);
	text-align: center;
}

.pb-seller__meta {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--pb-muted);
}

/* ============================================================
 * 8. Trust band (re-skinned)
 * ============================================================ */

.pb-trust-band {
	max-width: 1280px;
	margin: clamp(56px, 8vw, 96px) auto 0;
	padding: clamp(32px, 5vw, 48px) clamp(16px, 4vw, 32px);
	background: var(--pb-surface);
	border: 1px solid var(--pb-subtle);
	border-radius: var(--pb-radius-lg);
}

.pb-trust-band__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}

@media (min-width: 720px) {
	.pb-trust-band__grid { grid-template-columns: repeat(3, 1fr); }
}

.pb-trust-band__col {
	display: flex;
	flex-direction: row;
	gap: 16px;
	align-items: flex-start;
}

@media (min-width: 720px) {
	.pb-trust-band__col {
		flex-direction: column;
		gap: 12px;
	}
}

.pb-trust-band__icon {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: var(--pb-radius-pill);
}

.pb-trust-band__col--green .pb-trust-band__icon {
	background: var(--pb-brand-green-soft);
	color: var(--pb-brand-green-mid);
}
.pb-trust-band__col--pink .pb-trust-band__icon {
	background: var(--pb-brand-pink-soft);
	color: var(--pb-brand-pink);
}
.pb-trust-band__col--blue .pb-trust-band__icon {
	background: var(--pb-brand-blue-soft);
	color: var(--pb-brand-blue);
}

.pb-trust-band__title {
	font-family: var(--pb-font-display);
	font-size: 1.0625rem;
	font-weight: 500;
	margin: 0 0 4px;
	color: var(--pb-contrast);
}

.pb-trust-band__body {
	margin: 0;
	color: var(--pb-muted);
	line-height: 1.55;
	font-size: 0.9375rem;
}

/* ============================================================
 * 9. Shared button variants
 * Kept here so removing pdp.css off a page doesn't break unrelated CTAs.
 * ============================================================ */

.pb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 20px;
	border-radius: var(--pb-radius-pill);
	font-size: 1rem;
	font-weight: 600;
	font-family: var(--pb-font-inter);
	border: 1px solid transparent;
	background: transparent;
	color: inherit;
	cursor: pointer;
	min-height: 48px;
	text-decoration: none;
	transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.pb-btn:focus-visible {
	outline: 2px solid var(--pb-brand-blue);
	outline-offset: 2px;
}

.pb-btn:active { transform: translateY(1px); }

.pb-btn--primary {
	background: var(--pb-brand-green);
	color: #fff;
}
.pb-btn--primary:hover {
	background: #1a5642;
	color: #fff;
}

.pb-btn--outline {
	background: transparent;
	color: var(--pb-brand-pink);
	border-color: var(--pb-brand-pink);
}
.pb-btn--outline:hover {
	background: var(--pb-brand-pink-soft);
	color: var(--pb-brand-pink);
}

.pb-btn--ghost {
	background: transparent;
	color: var(--pb-brand-blue);
	border-color: transparent;
}
.pb-btn--ghost:hover {
	background: var(--pb-brand-blue-soft);
	color: var(--pb-brand-blue);
}

/* ============================================================
 * 10. Reduced motion + utility
 * ============================================================ */

@media (prefers-reduced-motion: reduce) {
	.pb-hero__cta,
	.pb-strip__tile,
	.pb-strip__img,
	.pb-card-rail > *,
	.pb-promo__cta,
	.pb-seller {
		transition: none !important;
	}
	.pb-strip__tile:hover,
	.pb-seller:hover,
	.pb-promo__cta:hover,
	.pb-hero__cta:hover {
		transform: none !important;
	}
}

.pb-sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}
