/* FluentCart Funnel Builder – frontend styles
   Structural only. All colors/spacing are driven by Elementor Style controls
   so store owners keep full visual control. */

/* Scroll lock while an overlay is open */
.pxfcf-scroll-locked {
	overflow: hidden !important;
}

/* ------------------------------------------------------------------ */
/* Base widget wrapper                                                 */
/* ------------------------------------------------------------------ */
.pxfcf-widget {
	position: relative;
}

.pxfcf-cart-continue {
	margin-top: 16px;
}

.pxfcf-thankyou-headline {
	margin: 0 0 8px;
}

.pxfcf-thankyou-sub {
	margin: 0 0 24px;
}

/* ------------------------------------------------------------------ */
/* Modal checkout                                                      */
/* ------------------------------------------------------------------ */
.pxfcf-modal-root {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
}

.pxfcf-modal-root.is-open {
	display: block;
}

.pxfcf-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.55);
	backdrop-filter: blur(2px);
}

.pxfcf-modal-dialog {
	position: relative;
	z-index: 1;
	max-width: 720px;
	width: calc(100% - 32px);
	max-height: calc(100vh - 64px);
	margin: 32px auto;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	animation: pxfcf-modal-in 0.22s ease;
}

@keyframes pxfcf-modal-in {
	from { transform: translateY(16px); opacity: 0; }
	to   { transform: translateY(0);    opacity: 1; }
}

.pxfcf-modal-close {
	position: sticky;
	top: 8px;
	float: right;
	margin: 8px 8px 0 0;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: #f3f4f6;
	color: #111827;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.pxfcf-modal-close:hover {
	background: #e5e7eb;
}

.pxfcf-modal-body {
	padding: 8px 24px 28px;
}

.pxfcf-modal-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 220px;
}

.pxfcf-modal-error {
	padding: 40px 16px;
	text-align: center;
	color: #b91c1c;
}

.pxfcf-spinner {
	width: 34px;
	height: 34px;
	border: 3px solid #e5e7eb;
	border-top-color: #111827;
	border-radius: 50%;
	animation: pxfcf-spin 0.7s linear infinite;
}

@keyframes pxfcf-spin {
	to { transform: rotate(360deg); }
}

/* Modal trigger button (base look; colors from controls) */
.pxfcf-modal-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	cursor: pointer;
	color: #fff;
	background: #111827;
	padding: 14px 28px;
	border-radius: 8px;
	font: inherit;
	transition: opacity 0.15s ease;
}

.pxfcf-modal-trigger:hover {
	opacity: 0.92;
}

/* ------------------------------------------------------------------ */
/* Mini cart                                                           */
/* ------------------------------------------------------------------ */
.pxfcf-minicart {
	display: inline-block;
}

.pxfcf-minicart-trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	position: relative;
	border: 0;
	background: transparent;
	cursor: pointer;
	padding: 4px;
	color: inherit;
	text-decoration: none;
	font: inherit;
}

.pxfcf-minicart-icon {
	display: inline-flex;
	line-height: 0;
}

.pxfcf-minicart-icon svg {
	width: 24px;
	height: 24px;
}

.pxfcf-minicart-badge {
	position: absolute;
	top: -6px;
	right: -8px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: #ef4444;
	color: #fff;
	font-size: 11px;
	line-height: 18px;
	text-align: center;
	font-weight: 600;
}

.pxfcf-minicart-total {
	font-weight: 600;
}

/* Drawer */
.pxfcf-minicart-drawer {
	position: fixed;
	inset: 0;
	z-index: 99998;
	display: none;
}

.pxfcf-minicart-drawer.is-open {
	display: block;
}

.pxfcf-minicart-drawer-overlay {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.5);
}

.pxfcf-minicart-drawer-panel {
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	width: 400px;
	max-width: 90vw;
	background: #fff;
	box-shadow: -12px 0 40px rgba(0, 0, 0, 0.2);
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.26s ease;
}

.pxfcf-minicart-drawer.is-open .pxfcf-minicart-drawer-panel {
	transform: translateX(0);
}

.pxfcf-minicart-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid #eef0f3;
}

.pxfcf-minicart-drawer-title {
	font-weight: 600;
	font-size: 16px;
}

.pxfcf-minicart-drawer-close {
	border: 0;
	background: transparent;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #6b7280;
}

.pxfcf-minicart-drawer-body {
	flex: 1;
	overflow: auto;
	padding: 16px 20px;
	-webkit-overflow-scrolling: touch;
}

.pxfcf-minicart-drawer-foot {
	padding: 16px 20px;
	border-top: 1px solid #eef0f3;
}

.pxfcf-minicart-viewcart {
	display: block;
	text-align: center;
	text-decoration: none;
}

/* ------------------------------------------------------------------ */
/* Editor placeholder                                                  */
/* ------------------------------------------------------------------ */
.pxfcf-editor-placeholder {
	padding: 28px;
	border: 1px dashed #c7ccd4;
	border-radius: 8px;
	text-align: center;
	color: #6b7280;
	background: #f9fafb;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.pxfcf-modal-dialog,
	.pxfcf-minicart-drawer-panel,
	.pxfcf-spinner {
		animation: none;
		transition: none;
	}
}

/* ------------------------------------------------------------------ */
/* Single-product widgets                                             */
/* ------------------------------------------------------------------ */
.pxfcf-product-title { margin: 0; }
.pxfcf-price-compare del { opacity: 0.6; margin-right: 6px; }
.pxfcf-price-current { font-weight: 700; }

.pxfcf-product-image img { display: block; height: auto; max-width: 100%; }

.pxfcf-meta-list { display: flex; flex-direction: column; gap: 6px; }
.pxfcf-meta-row { display: flex; gap: 6px; }
.pxfcf-meta-label { font-weight: 600; }
.pxfcf-in-stock { color: #16a34a; }
.pxfcf-out-stock { color: #dc2626; }

.pxfcf-preview-btn {
	display: inline-flex;
	align-items: center;
	border: 0;
	cursor: pointer;
	padding: 12px 24px;
	border-radius: 6px;
	background: #111827;
	color: #fff;
	font: inherit;
}

/* Gallery */
.pxfcf-gallery { display: flex; flex-direction: column; gap: 12px; }
.pxfcf-gallery-main img { width: 100%; height: auto; display: block; }
.pxfcf-gallery-thumbs {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
}
.pxfcf-gallery-thumb {
	border: 2px solid transparent;
	padding: 0;
	background: none;
	cursor: pointer;
	border-radius: 6px;
	overflow: hidden;
	line-height: 0;
}
.pxfcf-gallery-thumb.is-active { border-color: #111827; }
.pxfcf-gallery-thumb img { width: 100%; height: auto; display: block; }

/* ------------------------------------------------------------------ */
/* Nav menu                                                           */
/* ------------------------------------------------------------------ */
.pxfcf-nav { position: relative; }
.pxfcf-nav-menu {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 24px;
	align-items: center;
}
.pxfcf-nav--vertical .pxfcf-nav-menu { flex-direction: column; align-items: flex-start; }
.pxfcf-nav-menu li { position: relative; }
.pxfcf-nav-menu a { text-decoration: none; display: block; }

/* Sub-menus */
.pxfcf-nav-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(0,0,0,0.12);
	border-radius: 8px;
	padding: 8px 0;
	list-style: none;
	margin: 0;
	display: none;
	z-index: 50;
}
.pxfcf-nav-menu li:hover > .sub-menu { display: block; }
.pxfcf-nav-menu .sub-menu a { padding: 8px 16px; }

/* Toggle button (hidden on desktop) */
.pxfcf-nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	border: 0;
	background: transparent;
	cursor: pointer;
	color: #111827;
}
.pxfcf-nav-toggle-bar {
	display: block;
	width: 24px;
	height: 2px;
	background: currentColor;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Collapse below the configured breakpoint (default 768px) */
@media (max-width: 768px) {
	.pxfcf-nav-toggle { display: flex; }
	.pxfcf-nav .pxfcf-nav-menu {
		display: none;
		flex-direction: column;
		align-items: flex-start;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: #fff;
		box-shadow: 0 12px 30px rgba(0,0,0,0.14);
		border-radius: 8px;
		padding: 12px 16px;
		z-index: 60;
	}
	.pxfcf-nav.is-open .pxfcf-nav-menu { display: flex; }
	.pxfcf-nav-menu .sub-menu {
		position: static;
		box-shadow: none;
		display: block;
		padding-left: 12px;
	}
}

/* Theme builder header/footer wrappers */
.pxfcf-tb-header, .pxfcf-tb-footer { width: 100%; }

/* Variation selector */
.pxfcf-variation-selector { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.pxfcf-variation-label { font-weight: 600; font-size: 14px; }
.pxfcf-variation-select {
	padding: 10px 12px;
	border: 1px solid #d5d8dc;
	border-radius: 6px;
	font-size: 14px;
	background: #fff;
	max-width: 320px;
}
.pxfcf-variation-radios { display: flex; flex-wrap: wrap; gap: 10px; }
.pxfcf-variation-radio-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: 1px solid #d5d8dc;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
}
.pxfcf-variation-radio-label:has(.pxfcf-variation-radio:checked) {
	border-color: currentColor;
	background: rgba(0,0,0,0.03);
}

/* Quantity stepper */
.pxfcf-qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid #d5d8dc;
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 14px;
}
.pxfcf-qty-step {
	background: transparent;
	border: none;
	width: 36px;
	height: 40px;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}
.pxfcf-qty-step:hover { background: rgba(0,0,0,0.05); }
.pxfcf-qty-input {
	width: 48px;
	height: 40px;
	border: none;
	border-left: 1px solid #d5d8dc;
	border-right: 1px solid #d5d8dc;
	text-align: center;
	font-size: 14px;
	-moz-appearance: textfield;
}
.pxfcf-qty-input::-webkit-outer-spin-button,
.pxfcf-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Dynamic add-to-cart button (transient states) */
.pxfcf-dynamic-add-to-cart[disabled] { opacity: 0.7; cursor: default; }
