/* Quick Buy & AJAX Cart Pro - frontend styles
   Primary colors/sizes are applied as direct inline style="" attributes on
   the markup itself (see QBAC_Settings token helpers), so they always show
   up even if a caching/optimization plugin strips a dynamically injected
   <style> block. The CSS below is a secondary layer for hover/focus states,
   layout, and animation - plus !important fallbacks on the few properties
   that matter most, to win against aggressive theme/page-builder resets. */

:root {
	--qbac-btn-bg: #ff6600;
	--qbac-btn-text: #ffffff;
	--qbac-btn-radius: 8px;
	--qbac-btn-padding: 11px 20px;
	--qbac-btn-fontsize: 14px;
	--qbac-icon-display: inline-flex;
	--qbac-modal-bg: #ffffff;
	--qbac-modal-accent: #ff6600;
	--qbac-modal-radius: 16px;
	--qbac-overlay-alpha: 0.6;
}

/* ------------------------------------------------------------------ */
/* Buttons                                                            */
/* ------------------------------------------------------------------ */

.qbac-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: var(--qbac-btn-padding);
	margin: 0;
	border-radius: var(--qbac-btn-radius);
	border: 1px solid transparent;
	font-size: var(--qbac-btn-fontsize);
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none !important;
	text-align: center;
	background-color: var(--qbac-btn-bg);
	color: var(--qbac-btn-text);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
	transition: transform .12s ease, box-shadow .12s ease, opacity .15s ease, filter .15s ease;
	position: relative;
	overflow: hidden;
	white-space: nowrap;
}
.qbac-btn:hover,
.qbac-btn:focus-visible {
	color: var(--qbac-btn-text) !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(0, 0, 0, .14);
	filter: brightness(1.05);
}
.qbac-btn:active {
	transform: translateY(0);
	filter: brightness(.97);
}
.qbac-btn-icon {
	display: var(--qbac-icon-display);
	align-items: center;
	line-height: 0;
}
.qbac-btn-icon svg {
	display: block;
}

/* Brief green "Added!" confirmation flash (class toggled by JS, no markup swap) */
.qbac-btn.qbac-just-added {
	background-color: #1ea34c !important;
	border-color: #1ea34c !important;
}

/* Loading state: text dims slightly, a small spinner appears on the right */
.qbac-btn.qbac-loading,
.qbac-cart-widget.qbac-loading {
	pointer-events: none;
}
.qbac-btn.qbac-loading {
	color: transparent !important;
}
.qbac-btn.qbac-loading::after {
	content: "";
	position: absolute;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, .55);
	border-top-color: #ffffff;
	animation: qbac-spin .7s linear infinite;
}
@keyframes qbac-spin {
	to { transform: rotate(360deg); }
}

.qbac-see-options-btn {
	background-color: #2b2f38 !important;
	border-color: #2b2f38 !important;
	color: #ffffff !important;
}

/* ------------------------------------------------------------------ */
/* Persistent "[ - qty + ] [ Add to Cart ]" widget                    */
/* ------------------------------------------------------------------ */

.qbac-cart-widget {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin: 6px 0 0;
}

.qbac-qty-stepper {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid #e2e2e2;
	border-radius: var(--qbac-btn-radius);
	overflow: hidden;
	background: #fafafa;
	flex-shrink: 0;
}
.qbac-qty-stepper.qbac-loading {
	opacity: .55;
	pointer-events: none;
}
.qbac-qty-btn {
	border: none !important;
	background-color: var(--qbac-btn-bg);
	color: var(--qbac-btn-text) !important;
	width: 36px;
	min-height: 38px;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	transition: filter .12s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}
.qbac-qty-btn:hover {
	filter: brightness(1.08);
}
.qbac-qty-btn:active {
	filter: brightness(.95);
}
.qbac-qty-value {
	min-width: 38px;
	text-align: center;
	font-weight: 700;
	font-size: 14px;
	padding: 0 4px;
	color: #222222;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #ffffff;
}

/* ------------------------------------------------------------------ */
/* Layout: Shop / Archive grid - full width, stacked                 */
/* ------------------------------------------------------------------ */

.qbac-loop-cart-wrap,
.qbac-loop-buy-now-wrap {
	display: block;
	width: 100%;
	margin-top: 8px;
}
.qbac-loop-cart-wrap:empty,
.qbac-loop-buy-now-wrap:empty {
	display: none;
	margin: 0;
}
.qbac-loop-cart-wrap .qbac-cart-widget {
	width: 100%;
	margin-top: 0;
}
.qbac-loop-cart-wrap .qbac-instant-add-btn {
	flex: 1 1 auto;
}
.qbac-loop-buy-now-wrap .qbac-btn,
.qbac-loop-buy-now-wrap .qbac-see-options-btn {
	width: 100%;
}

/* ------------------------------------------------------------------ */
/* Layout: Single product page - Add to Cart + Buy Now side by side  */
/* ------------------------------------------------------------------ */

.qbac-single-add-to-cart-wrap {
	display: inline-flex;
	vertical-align: top;
	margin: 0 10px 10px 0;
}
.qbac-single-buy-now-wrap {
	display: inline-flex;
	vertical-align: top;
	margin: 0 0 10px;
}
.qbac-single-buy-now-wrap:empty {
	display: none;
	margin: 0;
}

@media (max-width: 500px) {
	.qbac-single-add-to-cart-wrap,
	.qbac-single-buy-now-wrap {
		display: block;
		width: 100%;
		margin: 0 0 10px;
	}
	.qbac-single-add-to-cart-wrap .qbac-cart-widget {
		width: 100%;
	}
	.qbac-single-add-to-cart-wrap .qbac-instant-add-btn,
	.qbac-single-buy-now-wrap .qbac-btn {
		flex: 1 1 auto;
		width: auto;
	}
}

/* ------------------------------------------------------------------ */
/* Instant Popup Checkout                                            */
/* ------------------------------------------------------------------ */

.qbac-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	font-family: inherit;
}
.qbac-modal.qbac-modal-open {
	display: block;
}
.qbac-modal-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background-color: rgba(15, 17, 21, var(--qbac-overlay-alpha));
	backdrop-filter: blur(2px);
	animation: qbac-fade-in .18s ease;
}
.qbac-modal-box {
	position: relative;
	z-index: 2;
	max-width: 440px;
	width: 92%;
	margin: 4vh auto 0;
	padding: 0;
	background-color: var(--qbac-modal-bg);
	border-radius: var(--qbac-modal-radius);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3) !important;
	max-height: 92vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	animation: qbac-pop-in .22s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes qbac-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}
@keyframes qbac-pop-in {
	from { opacity: 0; transform: translateY(14px) scale(.97); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.qbac-modal-head {
	position: relative !important;
	padding: 18px 50px 18px 20px !important;
	flex-shrink: 0;
}

/* Close button: a clean white circle on the colored header so it's always
   high-contrast and unmistakably a button, never a stray gray box.
   Positioning is hardened with !important on every box-model property to
   survive aggressive theme/page-builder CSS resets that target buttons
   inside headers. */
.qbac-modal-close {
	position: absolute !important;
	top: 14px !important;
	right: 14px !important;
	bottom: auto !important;
	left: auto !important;
	margin: 0 !important;
	float: none !important;
	z-index: 6 !important;
	background-color: rgba(255, 255, 255, .22) !important;
	border: none !important;
	width: 28px !important;
	height: 28px !important;
	min-width: 28px !important;
	border-radius: 50% !important;
	font-size: 17px !important;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	color: #ffffff !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	transition: background .15s ease, transform .15s ease;
}
.qbac-modal-close:hover {
	background-color: rgba(255, 255, 255, .32) !important;
	transform: scale(1.05);
}
.qbac-modal-title {
	margin: 0 !important;
	font-size: 18px;
	font-weight: 700;
	color: #ffffff !important;
}
.qbac-modal-subtitle {
	margin: 4px 0 0;
	font-size: 12.5px;
	color: rgba(255, 255, 255, .85) !important;
}

.qbac-modal-body {
	padding: 16px 20px 18px;
	overflow-y: auto;
}

.qbac-section-label {
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: #999999;
	margin: 14px 0 8px;
}

/* Icon-prefixed input fields: the icon sits in its own solid-colored block
   flush against the input's left edge (like a classic input-group addon) -
   only that block is colored, the input itself stays plain/white. Border
   radius is split so the two pieces visually read as one connected field. */
.qbac-icon-field .qbac-input-wrap {
	position: relative;
	display: flex;
	align-items: stretch;
	border: 1.5px solid #e2e2e2;
	border-radius: 10px;
	overflow: hidden;
	transition: border-color .15s ease;
}
.qbac-icon-field .qbac-input-wrap:focus-within {
	border-color: var(--qbac-modal-accent);
}
.qbac-icon-field .qbac-field-icon {
	flex-shrink: 0;
	width: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	background-color: var(--qbac-modal-accent);
}
.qbac-form-row.qbac-icon-field input {
	border: none !important;
	border-radius: 0 !important;
	flex: 1 1 auto;
	min-width: 0;
	padding-left: 12px !important;
}

/* Order summary card with quantity stepper */
.qbac-modal-summary {
	display: none;
	align-items: center;
	gap: 10px;
	background: #f7f7f8 !important;
	border-radius: 10px;
	padding: 10px 12px;
	margin-bottom: 12px;
}
.qbac-modal-summary.qbac-has-content {
	display: flex;
}
.qbac-cart-item-row {
	border: 1px solid #ececec;
}
.qbac-cart-items-list:empty {
	display: none;
}
.qbac-summary-thumb {
	width: 42px;
	height: 42px;
	border-radius: 8px;
	object-fit: cover;
	flex-shrink: 0;
	background: #ffffff;
}
.qbac-summary-info {
	flex: 1;
	min-width: 0;
}
.qbac-summary-top-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
}
.qbac-summary-name {
	font-size: 13px;
	font-weight: 600;
	color: #222222 !important;
	margin: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.qbac-summary-price {
	font-size: 12.5px;
	font-weight: 700;
	margin: 0;
	white-space: nowrap;
	color: var(--qbac-modal-accent);
}
.qbac-modal-qty-stepper {
	display: flex;
	align-items: center;
	border: 1.5px solid #e2e2e2;
	border-radius: 9px;
	overflow: hidden;
	background: #ffffff !important;
	flex-shrink: 0;
	width: fit-content;
}
.qbac-modal-qty-stepper.qbac-loading {
	opacity: .55;
	pointer-events: none;
}
.qbac-modal-qty-stepper .qbac-qty-btn {
	width: 32px;
	min-height: 32px;
	font-size: 16px;
	font-weight: 700;
	background-color: var(--qbac-modal-accent);
}
.qbac-modal-qty-stepper .qbac-qty-value {
	min-width: 32px;
	font-size: 13.5px;
	font-weight: 700;
	background: transparent;
}
.qbac-cart-summary-line {
	display: none;
	font-size: 12.5px;
	color: #555555 !important;
	background: #f7f7f8 !important;
	border-radius: 10px;
	padding: 9px 12px;
	margin-bottom: 12px;
}
.qbac-cart-summary-line.qbac-has-content {
	display: block;
}

/* Subtotal / Shipment / Total breakdown */
.qbac-totals-box {
	margin: 4px 0 12px;
}
.qbac-totals-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 6px 0;
	font-size: 12.5px;
}
.qbac-totals-row > span:first-child {
	color: #666666;
	flex-shrink: 0;
}
.qbac-totals-subtotal,
.qbac-totals-shipping {
	font-weight: 600;
	color: #222222;
}
.qbac-totals-total-row {
	font-size: 14px;
	font-weight: 700;
	border-top: 1px solid #ececec;
	margin-top: 4px;
	padding-top: 10px;
}
.qbac-totals-total-row > span:first-child {
	color: inherit;
	font-weight: 700;
}
.qbac-totals-total {
	font-weight: 800;
	font-size: 16px;
}

.qbac-shipping-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 6px;
}
.qbac-shipping-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	background: #ffffff;
	border: 1.5px solid #e6e6e6;
	border-radius: 10px;
	padding: 10px 12px;
	cursor: pointer;
	font-size: 13px;
	color: #333333;
	transition: border-color .15s ease, background .15s ease;
}
.qbac-shipping-option.qbac-selected {
	border-color: var(--qbac-modal-accent);
	background: color-mix(in srgb, var(--qbac-modal-accent) 7%, #ffffff);
}
.qbac-shipping-radio-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
}
.qbac-shipping-option input[type="radio"] {
	width: 17px;
	height: 17px;
	flex-shrink: 0;
	margin: 0;
}
.qbac-shipping-option-cost {
	font-weight: 700;
	color: #222222;
	white-space: nowrap;
}

/* Static payment method display card */
.qbac-payment-card {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	border: 1.5px solid #e6e6e6;
	border-radius: 10px;
	padding: 10px 12px;
	margin-bottom: 14px;
}
.qbac-payment-dot {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	flex-shrink: 0;
	margin-top: 3px;
	background-color: var(--qbac-modal-accent);
	box-shadow: 0 0 0 3px rgba(0, 0, 0, .04);
}
.qbac-payment-title {
	font-size: 13px;
	font-weight: 700;
	margin: 0 0 2px;
	color: #222222;
}
.qbac-payment-desc {
	font-size: 11.5px;
	color: #888888;
	margin: 0;
}

.qbac-modal-error {
	background: #fdecec !important;
	color: #b3261e !important;
	padding: 9px 12px;
	border-radius: 8px;
	font-size: 12.5px;
	margin-bottom: 12px;
	display: none;
	align-items: center;
	gap: 8px;
}
.qbac-modal-error.qbac-visible {
	display: flex;
}
.qbac-modal-success {
	text-align: center;
	padding: 6px 4px 4px;
}
.qbac-modal-success-icon {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: #e8f7ee !important;
	color: #1ea34c !important;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 12px;
}
.qbac-modal-success-icon svg {
	width: 26px;
	height: 26px;
}
.qbac-modal-success-text {
	font-size: 14px;
	color: #222222 !important;
	line-height: 1.5;
}

.qbac-form-row {
	margin: 0 0 10px;
}
.qbac-form-row label {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
	font-size: 12px;
	color: #444444 !important;
	letter-spacing: .01em;
}
.qbac-form-row input,
.qbac-form-row textarea {
	width: 100% !important;
	padding: 10px 12px !important;
	border: 1.5px solid #e2e2e2 !important;
	border-radius: 9px !important;
	font-size: 14px !important;
	box-sizing: border-box !important;
	font-family: inherit !important;
	background-color: #ffffff !important;
	color: #222222 !important;
	transition: border-color .15s ease;
	box-shadow: none !important;
}
.qbac-form-row input::placeholder,
.qbac-form-row textarea::placeholder {
	color: #aaaaaa;
}
.qbac-form-row input:focus,
.qbac-form-row textarea:focus {
	outline: none !important;
	border-color: var(--qbac-modal-accent) !important;
}
.qbac-form-row textarea {
	resize: vertical;
	min-height: 48px;
}

.qbac-checkout-submit {
	width: 100%;
	padding: 12px;
	font-size: 14.5px;
	margin: 4px 0 0;
	background-color: var(--qbac-modal-accent);
	border-color: var(--qbac-modal-accent);
}
.qbac-modal-trust {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 11px;
	color: #999999;
	margin-top: 8px;
}
.qbac-modal-trust svg {
	color: #bbbbbb;
}

body.qbac-modal-no-scroll {
	overflow: hidden;
}

@media (max-width: 480px) {
	.qbac-modal-box {
		width: 100%;
		margin: 0;
		min-height: 100vh;
		max-height: 100vh;
		border-radius: 0 !important;
		justify-content: flex-end;
	}
}
