/* Site audit layer: cookie banner, checkout consent, a11y helpers. */

/* ---- Cookie banner ------------------------------------------------------ */
.fb-cookie {
	position: fixed;
	left: 50%;
	bottom: 16px;
	z-index: 99999;
	width: calc(100% - 32px);
	max-width: 560px;
	margin: 0;
	padding: 16px 18px;
	box-sizing: border-box;
	background: #23231e;
	color: #ffffff;
	border-radius: 14px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
	font-family: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.45;
	opacity: 0;
	transform: translate(-50%, 12px);
	transition: opacity .25s ease, transform .25s ease;
}
.fb-cookie.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}
.fb-cookie__text {
	margin: 0 0 12px;
	color: #ffffff;
}
.fb-cookie__text a {
	color: #ffd39a;
	text-decoration: underline;
}
.fb-cookie__text a:hover,
.fb-cookie__text a:focus {
	color: #ffffff;
}
.fb-cookie__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
.fb-cookie .fb-cookie__btn {
	/* the Elementor kit styles every <button>; pin our own look */
	appearance: none;
	border: 0 !important;
	border-radius: 10px !important;
	padding: 10px 22px !important;
	background: #e05f38 !important;
	color: #ffffff !important;
	font: inherit !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	cursor: pointer;
	min-height: 44px;
}
.fb-cookie .fb-cookie__btn:hover,
.fb-cookie .fb-cookie__btn:focus {
	background: #9d4327 !important;
	color: #ffffff !important;
}
.fb-cookie__btn:focus-visible,
.fb-cookie__text a:focus-visible {
	outline: 3px solid #ffd39a;
	outline-offset: 2px;
}
@media (max-width: 767px) {
	.fb-cookie {
		/* keep clear of the Chaty bubble and the sticky funnel bars */
		bottom: 84px;
		width: calc(100% - 16px);
		max-width: none;
		padding: 14px 14px;
		font-size: 13px;
	}
	.fb-cookie__btn {
		width: 100%;
	}
}

/* ---- Checkout: personal data consent ----------------------------------- */
.fb-pd-consent {
	margin: 12px 0 16px;
	padding: 0;
}
.fb-pd-consent label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
	line-height: 1.4;
	color: #23231e;
	cursor: pointer;
}
.fb-pd-consent input[type="checkbox"] {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	accent-color: #e05f38;
}
.fb-pd-consent a {
	color: #e05f38;
	text-decoration: underline;
}
.fb-pd-consent abbr.required {
	border: 0;
	color: #e05f38;
	text-decoration: none;
}

/* ---- Accessibility helpers --------------------------------------------- */
/* Visible keyboard focus for interactive elements (Elementor resets outlines). */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 3px solid #3c5eec;
	outline-offset: 2px;
}
/* Placeholder text on form fields must reach 4.5:1 as well. */
.elementor-field-textual::placeholder,
.woocommerce-input-wrapper input::placeholder {
	color: #7b7b70;
	opacity: 1;
}

/* ---- Performance: skip layout of off-screen sections ------------------- */
/* Elementor pages are one long document (1.6k DOM nodes on the home page);
   content-visibility lets the browser defer style/layout of sections that are
   not near the viewport, which is the main cost of first paint on mobile. */
[data-elementor-type="wp-post"] > .e-parent:nth-child(n+3),
[data-elementor-type="wp-page"] > .e-parent:nth-child(n+3),
[data-elementor-type="product"] > .e-parent:nth-child(n+3),
[data-elementor-type="single-page"] > .e-parent:nth-child(n+3),
[data-elementor-type="single-post"] > .e-parent:nth-child(n+3),
[data-elementor-type="archive"] > .e-parent:nth-child(n+3),
[data-elementor-type="product-archive"] > .e-parent:nth-child(n+3),
.elementor-location-footer > .e-parent {
	content-visibility: auto;
	contain-intrinsic-size: auto 600px;
}

/* Entrance animations on the first screen delay LCP by the whole fade-in
   duration (Chrome reports LCP when an opacity animation finishes). Keep the
   animations below the fold, show the first two sections immediately. */
[data-elementor-type]:not([data-elementor-type="popup"]) > .e-parent:nth-child(-n+2).elementor-invisible,
[data-elementor-type]:not([data-elementor-type="popup"]) > .e-parent:nth-child(-n+2) .elementor-invisible {
	visibility: visible !important;
}
[data-elementor-type]:not([data-elementor-type="popup"]) > .e-parent:nth-child(-n+2).animated,
[data-elementor-type]:not([data-elementor-type="popup"]) > .e-parent:nth-child(-n+2) .animated {
	animation: none !important;
}

/* Elementor 4.x loads the Swiper stylesheet lazily (after the first
   interaction when JS is delayed); until then nested carousels spill their
   slides past the viewport and the whole page pans sideways on touch. */
.swiper,
.e-n-carousel,
.elementor-swiper .swiper-container {
	overflow: hidden;
}
