/* ==========================================================================
   Dream Landing v2 — Sales Landing Styles
   Współpracuje z systemem glass z theme.css (dream-glass, dream-btn, zmienne).
   Limit backdrop-filter: nawigacja + 2 panele (fitment, group buy).
   Animujemy wyłącznie transform/opacity.
   ========================================================================== */

/* 1. Wrapper */
.landing-v2 {
	overflow-x: clip;
}

.l2-section {
	position: relative;
	padding: 96px 0;
}

.l2-section-alt {
	background: rgba(255, 255, 255, 0.02);
	border-top: 1px solid var(--dream-glass-border);
	border-bottom: 1px solid var(--dream-glass-border);
}

.l2-section-head {
	max-width: 720px;
	margin: 0 auto 48px;
	text-align: center;
}

.l2-eyebrow {
	color: var(--dream-accent);
	margin-bottom: 14px;
}

.l2-section-title {
	font-size: clamp(28px, 3.4vw, 44px);
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: #fff;
	margin-bottom: 16px;
}

.l2-lead {
	color: rgba(228, 225, 233, 0.75);
	font-size: 16px;
	line-height: 1.7;
}

/* Punkty kotwiczne pod stałym headerem */
.l2-section,
#hero {
	scroll-margin-top: 90px;
}

/* 2. Hero */
.l2-hero {
	position: relative;
	min-height: 92vh;
	display: flex;
	align-items: center;
	overflow: hidden;
	background: #02020a;
}

.l2-hero-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 120%;
	object-fit: cover;
	object-position: center;
	z-index: 0;
}

.l2-hero-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		linear-gradient(to right, rgba(2, 2, 10, 0.92) 0%, rgba(2, 2, 10, 0.55) 55%, rgba(2, 2, 10, 0.35) 100%),
		linear-gradient(to top, rgba(2, 2, 10, 0.95) 0%, transparent 45%);
}

.l2-hero-inner {
	position: relative;
	z-index: 2;
	padding-top: 120px;
	padding-bottom: 120px;
}

.l2-hero-content {
	max-width: 760px;
}

.l2-hero-title {
	font-size: clamp(34px, 5.4vw, 64px);
	line-height: 1.08;
	letter-spacing: -0.03em;
	color: #fff;
	margin-bottom: 22px;
}

.l2-hero-sub {
	font-size: 16px;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.78);
	max-width: 620px;
	margin-bottom: 36px;
}

.l2-hero-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

/* 3. Selektor dopasowania (fitment) */
.l2-fitment-form {
	padding: 40px;
	border-radius: 0;
}

.l2-fitment-fields {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin-bottom: 28px;
}

.l2-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.l2-field label {
	color: rgba(228, 225, 233, 0.65);
}

.landing-v2 select,
.landing-v2 input[type="email"],
.landing-v2 input[type="text"] {
	width: 100%;
	padding: 14px 16px;
	background: rgba(0, 5, 54, 0.55);
	border: 1px solid var(--dream-glass-border);
	border-radius: 0;
	color: var(--dream-text);
	font-family: var(--dream-font-body);
	font-size: 15px;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.3s var(--dream-transition);
}

.landing-v2 select {
	background-image: linear-gradient(45deg, transparent 50%, var(--dream-accent) 50%), linear-gradient(135deg, var(--dream-accent) 50%, transparent 50%);
	background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%;
	background-size: 6px 6px;
	background-repeat: no-repeat;
	padding-right: 40px;
	cursor: pointer;
}

.landing-v2 select:focus,
.landing-v2 input:focus {
	outline: none;
	border-color: var(--dream-accent);
}

.landing-v2 select:focus-visible,
.landing-v2 input:focus-visible,
.landing-v2 a:focus-visible,
.landing-v2 button:focus-visible,
.landing-v2 .l2-faq-summary:focus-visible {
	outline: 2px solid var(--dream-accent);
	outline-offset: 2px;
}

.l2-fitment-submit {
	width: 100%;
	justify-content: center;
}

.l2-fitment-notice {
	margin: -24px 0 28px;
	text-align: center;
	color: rgba(247, 197, 4, 0.85);
}

/* 4. Polecane produkty */
.l2-products-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

/* Karty produktów BEZ backdrop-filter (limit warstw blur) */
.l2-product-card {
	background: rgba(10, 10, 15, 0.72);
	border: 1px solid var(--dream-glass-border);
	box-shadow: var(--dream-card-shadow);
	display: flex;
	flex-direction: column;
	transition: border-color 0.4s var(--dream-transition), box-shadow 0.4s var(--dream-transition), transform 0.4s var(--dream-transition);
}

.l2-product-card:hover {
	border-color: rgba(255, 255, 255, 0.15);
	box-shadow: 0 8px 32px 0 rgba(247, 197, 4, 0.08);
	transform: translateY(-4px);
}

.l2-product-media {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.03);
}

.l2-product-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s var(--dream-transition);
}

.l2-product-card:hover .l2-product-media img {
	transform: scale(1.04);
}

.l2-product-body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 24px;
	flex: 1;
}

.l2-product-title {
	font-size: 19px;
	line-height: 1.3;
}

.l2-product-title a {
	color: #fff;
}

.l2-product-title a:hover {
	color: var(--dream-accent);
}

.l2-product-fits {
	color: var(--dream-accent);
	font-size: 11px;
}

.l2-product-price {
	font-size: 18px;
	font-weight: 500;
	color: var(--dream-text);
}

.l2-product-price del {
	opacity: 0.5;
}

.l2-product-price ins {
	text-decoration: none;
	color: var(--dream-accent);
}

.l2-product-cta {
	margin-top: auto;
	justify-content: center;
	width: 100%;
}

.l2-empty {
	text-align: center;
	color: rgba(228, 225, 233, 0.7);
	padding: 40px;
}

/* 5. Group buy */
.l2-groupbuy-panel {
	max-width: 860px;
	margin: 0 auto;
	padding: 56px 48px;
	border-radius: 0;
}

.l2-gb-counter-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 32px 0 12px;
}

.l2-gb-counter {
	font-size: 14px;
	color: var(--dream-text);
}

.l2-gb-count {
	color: var(--dream-accent);
	font-size: 18px;
	font-weight: 700;
}

.l2-gb-progress-label {
	color: rgba(228, 225, 233, 0.6);
}

.l2-progress {
	height: 14px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid var(--dream-glass-border);
	overflow: hidden;
}

.l2-progress-fill {
	height: 100%;
	width: 100%;
	background: var(--dream-accent);
	transform: scaleX(var(--l2-p, 0));
	transform-origin: left center;
	transition: transform 0.6s var(--dream-transition);
}

.l2-gb-price {
	margin: 20px 0 28px;
	color: rgba(228, 225, 233, 0.85);
	font-size: 15px;
	line-height: 1.6;
}

.l2-gb-price.is-reached {
	color: var(--dream-accent);
	font-weight: 500;
}

.l2-gb-form-row {
	display: flex;
	align-items: flex-end;
	gap: 16px;
}

.l2-gb-email-field {
	flex: 1;
}

.l2-gb-submit {
	white-space: nowrap;
}

.l2-gb-status {
	min-height: 22px;
	margin-top: 16px;
	font-size: 14px;
	color: var(--dream-accent);
}

/* Honeypot — niewidoczny dla ludzi, widoczny dla botów */
.l2-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* 6. Jak to działa */
.l2-steps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.l2-step {
	background: rgba(10, 10, 15, 0.72);
	border: 1px solid var(--dream-glass-border);
	padding: 32px 28px;
}

.l2-step-num {
	display: block;
	color: var(--dream-accent);
	font-size: 14px;
	margin-bottom: 18px;
}

.l2-step-title {
	font-size: 22px;
	color: #fff;
	margin-bottom: 10px;
}

.l2-step-desc {
	color: rgba(228, 225, 233, 0.72);
	font-size: 15px;
	line-height: 1.65;
}

/* 7. Zaufanie */
.l2-trust-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.l2-trust-item {
	padding: 28px 24px;
	border: 1px solid var(--dream-glass-border);
	background: rgba(10, 10, 15, 0.72);
}

.l2-trust-item svg {
	width: 32px;
	height: 32px;
	color: var(--dream-accent);
	margin-bottom: 16px;
}

.l2-trust-title {
	font-size: 17px;
	color: #fff;
	margin-bottom: 8px;
}

.l2-trust-desc {
	color: rgba(228, 225, 233, 0.72);
	font-size: 14px;
	line-height: 1.6;
}

/* 8. FAQ (details/summary — działa bez JS) */
.l2-faq-container {
	max-width: 860px;
}

.l2-faq-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.l2-faq-item {
	background: rgba(10, 10, 15, 0.72);
	border: 1px solid var(--dream-glass-border);
	transition: border-color 0.3s var(--dream-transition);
}

.l2-faq-item[open] {
	border-color: rgba(247, 197, 4, 0.35);
}

.l2-faq-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 20px 24px;
	cursor: pointer;
	list-style: none;
	color: var(--dream-text);
	font-size: 16px;
	font-weight: 500;
	transition: color 0.3s var(--dream-transition);
}

.l2-faq-summary::-webkit-details-marker {
	display: none;
}

.l2-faq-summary:hover {
	color: var(--dream-accent);
}

.l2-faq-icon {
	position: relative;
	width: 12px;
	height: 12px;
	flex-shrink: 0;
}

.l2-faq-icon::before,
.l2-faq-icon::after {
	content: '';
	position: absolute;
	background: var(--dream-accent);
	transition: transform 0.3s var(--dream-transition), opacity 0.3s var(--dream-transition);
}

.l2-faq-icon::before {
	top: 5px;
	left: 0;
	width: 12px;
	height: 2px;
}

.l2-faq-icon::after {
	top: 0;
	left: 5px;
	width: 2px;
	height: 12px;
}

.l2-faq-item[open] .l2-faq-icon::after {
	transform: scaleY(0);
	opacity: 0;
}

.l2-faq-answer {
	padding: 0 24px 24px;
	color: rgba(228, 225, 233, 0.78);
	font-size: 15px;
	line-height: 1.7;
}

/* 9. CTA końcowe */
.l2-cta-final {
	text-align: center;
	padding: 120px 0;
}

.l2-cta-inner {
	max-width: 720px;
}

.l2-cta-title {
	font-size: clamp(30px, 4vw, 52px);
	letter-spacing: -0.02em;
	color: #fff;
	margin-bottom: 18px;
}

.l2-cta-inner .l2-lead {
	margin-bottom: 36px;
}

.l2-cta-buttons {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 16px;
}

/* 10. Breakpointy */
@media (max-width: 1024px) {
	.l2-products-grid,
	.l2-trust-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.l2-fitment-fields {
		grid-template-columns: 1fr 1fr;
	}

	.l2-steps {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.l2-section {
		padding: 64px 0;
	}

	.l2-fitment-form,
	.l2-groupbuy-panel {
		padding: 28px 20px;
	}

	.l2-fitment-fields,
	.l2-products-grid,
	.l2-trust-grid {
		grid-template-columns: 1fr;
	}

	.l2-gb-form-row {
		flex-direction: column;
		align-items: stretch;
	}

	.l2-hero-cta .dream-btn,
	.l2-cta-buttons .dream-btn {
		width: 100%;
		justify-content: center;
	}
}

/* Wydajność: poniżej 600px wyłączamy blur — fallback na nieprzejrzyste rgba.
   Dotyczy także stałej nawigacji motywu na tej stronie. */
@media (max-width: 599px) {
	body.page-template-page-landing-v2 .dream-glass-nav,
	body.page-template-page-landing-v2 .dream-glass,
	.landing-v2 .dream-glass {
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
		background: rgba(10, 10, 15, 0.92);
	}

	body.page-template-page-landing-v2 .dream-glass-nav {
		background: rgba(2, 2, 10, 0.96);
	}
}

/* Dostępność ruchu: wyłączamy animacje */
@media (prefers-reduced-motion: reduce) {
	.landing-v2 *,
	.landing-v2 *::before,
	.landing-v2 *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* --- Dostępność produktu (magazyn / na zamówienie) --- */
.l2-stock {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0 0 .5rem;
  padding: .3rem .6rem;
  border-radius: 999px;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .82);
}

.l2-stock-dot {
  width: .42rem;
  height: .42rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.l2-stock--in_stock {
  color: #67e8a5;
  border-color: rgba(103, 232, 165, .28);
  background: rgba(103, 232, 165, .08);
}

.l2-stock--backorder {
  color: #f7c504;
  border-color: rgba(247, 197, 4, .3);
  background: rgba(247, 197, 4, .08);
}

.l2-stock--out,
.l2-stock--unknown {
  color: rgba(255, 255, 255, .55);
}

.l2-product-stock-detail {
  margin: 0 0 .75rem;
  font-size: .82rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, .58);
}
