/* ===================================================================
   Universal Landing — base styles
   CSS custom properties are the theming hook the constructor UI will
   write into (colors / fonts / radius) without touching markup.
   =================================================================== */

:root {
	--ul-color-primary: #ff5a1f;
	--ul-color-primary-hover: #e64e15;
	--ul-color-text: #1a1a1a;
	--ul-color-muted: #6b6b6b;
	--ul-color-danger: #d92d20;
	--ul-color-bg: #ffffff;
	--ul-color-card-bg: #ffffff;
	--ul-color-border: #e4e4e4;
	--ul-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--ul-radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	padding: 0;
	font-family: var(--ul-font-family);
	color: var(--ul-color-text);
	background: var(--ul-color-bg);
	-webkit-font-smoothing: antialiased;
	/* The honeypot field (.order-form__hp below) hides itself with
	   left: -9999px — harmless under LTR, but under dir="rtl" (Arabic) the
	   browser's RTL scroll-origin semantics turn that huge negative offset
	   into a genuinely reachable horizontal scroll region (thousands of px
	   of blank space a visitor can swipe/scroll into), instead of just
	   clipping off-screen like it does in LTR. This is the standard,
	   safe guard against any such off-screen-positioning technique ever
	   creating reachable overflow, regardless of text direction. */
	overflow-x: hidden;
}

/* ---- landing blocks (existing markup — layout only, never change the HTML) ---- */

.block {
	display: block;
	width: 100%;
	line-height: 0;
}

.block img {
	display: block;
	width: 100%;
	height: auto;
}

a.interactive-block {
	cursor: pointer;
}

/* ---- order form section ---- */

.order-section {
	padding: 32px 16px 48px;
	background: var(--ul-color-bg);
}

.order-card {
	max-width: 420px;
	margin: 0 auto;
	padding: 24px;
	background: var(--ul-color-card-bg);
	border: 1px solid var(--ul-color-border);
	border-radius: var(--ul-radius);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	position: relative;
}

/* ---- popup CTA mode (data-mode="popup" on .order-section, set by the constructor) ---- */

.order-section[data-mode="popup"] {
	display: none;
}

.order-section[data-mode="popup"].is-open {
	display: flex;
	position: fixed;
	inset: 0;
	z-index: 1000;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.55);
}

.order-section[data-mode="popup"].is-open .order-card {
	max-height: 90vh;
	overflow-y: auto;
	width: 100%;
}

.order-popup-close {
	display: none;
	position: absolute;
	top: 10px;
	right: 12px;
	width: 32px;
	height: 32px;
	line-height: 1;
	font-size: 1.5rem;
	color: var(--ul-color-muted);
	background: none;
	border: none;
	cursor: pointer;
}

.order-section[data-mode="popup"] .order-popup-close {
	display: block;
}

.order-card__image {
	display: block;
	width: 100%;
	max-height: 220px;
	object-fit: contain;
	margin: 0 0 14px;
	border-radius: calc(var(--ul-radius) / 2);
}

.order-card__product {
	margin: 0 0 12px;
	font-size: 1.25rem;
	font-weight: 700;
	text-align: center;
}

.order-card__price {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 10px;
	margin-bottom: 20px;
	font-size: 1.1rem;
}

.order-card__price-old {
	color: var(--ul-color-muted);
	text-decoration: line-through;
}

.order-card__price-new {
	color: var(--ul-color-primary);
	font-weight: 700;
	font-size: 1.4rem;
}

.order-form__field {
	margin-bottom: 14px;
}

.order-form__field label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.875rem;
	color: var(--ul-color-muted);
}

.order-form__field input {
	width: 100%;
	padding: 12px 14px;
	font-size: 1rem;
	border: 1px solid var(--ul-color-border);
	border-radius: calc(var(--ul-radius) / 2);
	background: #fff;
	color: var(--ul-color-text);
}

.order-form__field input:focus {
	outline: none;
	border-color: var(--ul-color-primary);
	box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.15);
}

.order-form__field input.iti__tel-input,
.iti { width: 100%; }

.order-form__submit {
	width: 100%;
	padding: 14px 18px;
	margin-top: 6px;
	font-size: 1.05rem;
	font-weight: 700;
	color: #fff;
	background: var(--ul-color-primary);
	border: none;
	border-radius: calc(var(--ul-radius) / 2);
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.order-form__submit:hover { background: var(--ul-color-primary-hover); }
.order-form__submit:disabled { opacity: 0.6; cursor: not-allowed; }

.order-form__error {
	margin: 12px 0 0;
	font-size: 0.9rem;
	color: var(--ul-color-danger);
	text-align: center;
}

.order-form__field--invalid input {
	border-color: var(--ul-color-danger);
}

/* Honeypot: still present in the accessibility tree layout (which is what
   tricks unsophisticated bots into filling it in), but visually hidden via
   the standard clip-based technique rather than a huge negative offset —
   an earlier version used `left: -9999px`, which is harmless under LTR but
   under dir="rtl" (Arabic) turned into a genuinely reachable ~10000px-wide
   horizontal scroll region (found while testing every supported language),
   since RTL scroll-origin semantics don't clip a large negative offset the
   same way LTR does. This pattern hides the element identically regardless
   of text direction, since it never moves the element off the layout flow
   at all — `clip` + a 1px box removes it from the visible/paintable area
   without needing any coordinate trick that could vary by direction. */
.order-form__hp {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---- floating CTA button (constructor toggle; harmless if unused) ---- */

.floating-cta {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 40;
	padding: 14px 22px;
	font-weight: 700;
	color: #fff;
	background: var(--ul-color-primary);
	border: none;
	border-radius: 999px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
	cursor: pointer;
}

.floating-cta:hover { background: var(--ul-color-primary-hover); }

/* ---- footer (generated per landing; see assets/js nothing — build-time only) ---- */

.ul-footer {
	padding: 24px 16px 32px;
	text-align: center;
	font-size: 0.78rem;
	line-height: 1.5;
	color: var(--ul-color-muted);
	border-top: 1px solid var(--ul-color-border);
}

.ul-footer p { margin: 0 0 6px; }
.ul-footer p:last-child { margin-bottom: 0; }

/* ---- countdown timer bar (constructor toggle) ---- */

.ul-timer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
	padding: 10px 16px;
	background: var(--ul-color-text);
	color: #fff;
	font-size: 0.85rem;
	text-align: center;
}

.ul-timer__digits {
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	letter-spacing: 0.02em;
}

/* Same countdown, shown inline inside the order card instead of as a full-width bar. */
.ul-timer--inline {
	background: none;
	color: var(--ul-color-danger);
	padding: 0 0 14px;
	font-size: 0.95rem;
}

/* ---- fake "recent order" toast (constructor toggle) ---- */

.ul-social-proof {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 50;
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 300px;
	padding: 10px 14px;
	background: #fff;
	color: var(--ul-color-text);
	border-radius: calc(var(--ul-radius) / 2);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	font-size: 0.82rem;
	line-height: 1.35;
	transform: translateY(120%);
	opacity: 0;
	transition: transform 0.35s ease, opacity 0.35s ease;
	pointer-events: none;
}

.ul-social-proof.is-visible {
	transform: translateY(0);
	opacity: 1;
}

.ul-social-proof__dot {
	flex: 0 0 8px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #2fb344;
}

/* ---- thank-you page ---- */

.thanks-page {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	background: #f5f5f7;
}

.thanks-card {
	width: 100%;
	max-width: 440px;
	padding: 40px 32px;
	background: var(--ul-color-card-bg);
	border-radius: calc(var(--ul-radius) * 1.4);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
	text-align: center;
	animation: thanksCardIn 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

@keyframes thanksCardIn {
	from { opacity: 0; transform: translateY(16px) scale(0.97); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.thanks-icon {
	width: 72px;
	height: 72px;
	margin: 0 auto 20px;
	border-radius: 50%;
	background: var(--ul-color-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	animation: thanksIconPop 0.6s 0.15s cubic-bezier(0.2, 0.9, 0.3, 1.4) both;
}

@keyframes thanksIconPop {
	from { opacity: 0; transform: scale(0.5); }
	to { opacity: 1; transform: scale(1); }
}

.thanks-icon svg {
	width: 34px;
	height: 34px;
}

.thanks-title {
	margin: 0 0 10px;
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--ul-color-text);
}

.thanks-message {
	margin: 0 0 24px;
	color: var(--ul-color-muted);
	font-size: 1rem;
	line-height: 1.5;
}

.thanks-details {
	margin: 0 0 28px;
	padding: 4px 18px;
	background: var(--ul-color-bg);
	border: 1px solid var(--ul-color-border);
	border-radius: var(--ul-radius);
	text-align: left;
}

[dir="rtl"] .thanks-details { text-align: right; }

.thanks-details__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 0;
}

.thanks-details__row + .thanks-details__row {
	border-top: 1px solid var(--ul-color-border);
}

.thanks-details__label {
	flex: 0 0 auto;
	color: var(--ul-color-muted);
	font-size: 0.85rem;
}

.thanks-details__value {
	font-weight: 700;
	color: var(--ul-color-text);
	text-align: right;
	word-break: break-word;
}

[dir="rtl"] .thanks-details__value { text-align: left; }

.thanks-back {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 14px 18px;
	font-size: 1rem;
	font-weight: 700;
	color: #fff;
	background: var(--ul-color-primary);
	border: none;
	border-radius: calc(var(--ul-radius) / 2);
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.thanks-back:hover { background: var(--ul-color-primary-hover); }

/* ---- video block templates (extra blocks: video-testimonial / video-carousel) ---- */

.ul-video-block {
	padding: 20px 16px;
}

.ul-video-block--single {
	max-width: 480px;
	margin: 0 auto;
}

.ul-video-block--carousel {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
}

.ul-video-block__item {
	flex: 0 0 auto;
	width: min(78vw, 320px);
	scroll-snap-align: start;
}

.ul-video-block--single .ul-video-block__item {
	width: 100%;
}

.ul-video-block__video {
	display: block;
	width: 100%;
	border-radius: var(--ul-radius);
	background: #000;
	aspect-ratio: 9 / 16;
	object-fit: cover;
}

.ul-video-block__caption {
	margin: 8px 0 0;
	font-size: 0.85rem;
	color: var(--ul-color-muted);
	text-align: center;
}
