/* Cart and checkout conversion tweaks. Body class apex-checkout-cro / apex-cart-cro. */

/* Distraction-free checkout: logo + short note, no mega menu, nav, or footer. */
body.woocommerce-checkout.apex-checkout-cro .header-col.header-center,
body.woocommerce-checkout.apex-checkout-cro .header-col.header-right,
body.woocommerce-checkout.apex-checkout-cro .mobile-toggle,
body.woocommerce-checkout.apex-checkout-cro .mobile-nav-wrap,
body.woocommerce-checkout.apex-checkout-cro #nav-panel,
body.woocommerce-checkout.apex-checkout-cro #mini-cart,
body.woocommerce-checkout.apex-checkout-cro .mini-cart,
body.woocommerce-checkout.apex-checkout-cro .share-links,
body.woocommerce-checkout.apex-checkout-cro #footer,
body.woocommerce-checkout.apex-checkout-cro .footer,
body.woocommerce-checkout.apex-checkout-cro .header-top,
body.woocommerce-checkout.apex-checkout-cro .apex-currency-switcher {
	display: none !important;
}

body.woocommerce-checkout.apex-checkout-cro .header-wrapper,
body.woocommerce-checkout.apex-checkout-cro #header,
body.woocommerce-checkout.apex-checkout-cro .header-main,
body.woocommerce-checkout.apex-checkout-cro .header-row {
	min-height: 0;
	box-shadow: none;
}

body.woocommerce-checkout.apex-checkout-cro .header-col.header-left {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: nowrap;
	gap: 10px 14px;
	padding: 10px 12px;
}

body.woocommerce-checkout.apex-checkout-cro .logo {
	margin: 0;
	flex: 0 0 auto;
}

body.woocommerce-checkout.apex-checkout-cro .logo img {
	max-height: 48px;
	width: auto;
}

.apex-checkout-secure-note {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #333;
	white-space: nowrap;
	line-height: 1.2;
	flex: 0 0 auto;
}

.apex-checkout-secure-note .apex-checkout-secure-icon {
	width: 1em;
	height: 1em;
	flex: 0 0 1em;
	display: block;
}

@media (min-width: 768px) {
	body.woocommerce-checkout.apex-checkout-cro .header-col.header-left {
		gap: 8px 20px;
		padding: 10px 16px;
	}

	.apex-checkout-secure-note {
		font-size: 15px;
	}
}

/* Trust row above Place Order */
.apex-checkout-trust {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px 22px;
	margin: 0 0 16px;
	padding: 12px 8px 14px;
	border-top: 1px solid #e6e6e6;
	color: #333;
	font-size: 13px;
	text-align: center;
}

.apex-checkout-trust-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

.apex-checkout-trust-logos img {
	display: block;
	height: 22px;
	width: auto;
}

.apex-checkout-sezzle td,
.apex-checkout-sezzle th {
	border-top: 0 !important;
	padding-top: 0 !important;
	color: #555;
	font-weight: 400;
	font-size: 13px;
	line-height: 1.3;
}
.apex-checkout-sezzle td {
	text-align: right;
}

/* Cart coupon collapsed behind Have a code? */
body.apex-cart-cro .apex-cart-coupon-toggle {
	margin: 0 0 8px;
	font-size: 14px;
}

body.apex-cart-cro .apex-cart-coupon-toggle a {
	color: inherit;
	text-decoration: underline;
}

body.apex-cart-cro .coupon.apex-cart-coupon-panel {
	display: none;
}

body.apex-cart-cro .coupon.apex-cart-coupon-panel.is-open {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

/* Cart add-ons */
.apex-cart-addons {
	margin: 28px 0 8px;
	padding: 20px 0 0;
	border-top: 1px solid #e6e6e6;
}

.apex-cart-addons-heading {
	font-size: 1.15rem;
	margin: 0 0 12px;
}

.apex-cart-addons-for {
	margin: 0 0 10px;
	font-size: 13px;
	color: #666;
}

.apex-cart-addon {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 0;
	border-bottom: 1px solid #f0f0f0;
}

.apex-cart-addon-thumb img {
	width: 64px;
	height: 64px;
	object-fit: contain;
	background: #fff;
}

.apex-cart-addon-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.apex-cart-addon-name {
	font-weight: 600;
	color: inherit;
}

.apex-cart-addon-var {
	max-width: 100%;
	width: auto;
	min-width: 180px;
}

.apex-cart-addon-price del {
	opacity: 0.65;
	margin-right: 6px;
}

.apex-cart-addon-price ins {
	text-decoration: none;
	font-weight: 600;
}

.apex-cart-addon-add {
	white-space: nowrap;
}

.apex-cart-addon.is-disabled {
	opacity: 0.55;
	pointer-events: none;
}

.apex-cart-addon-msg {
	margin: 8px 0 0;
	font-size: 13px;
	color: #a33;
}

@media (max-width: 767px) {
	.apex-cart-addon {
		flex-wrap: wrap;
	}
	.apex-cart-addon-add {
		margin-left: 78px;
	}
	.apex-checkout-trust {
		gap: 8px 14px;
	}
}

.apex-checkout-trust-logos {
	flex-direction: column;
	gap: 4px;
}
.apex-checkout-trust-more {
	font-size: 12px;
	color: #666;
}

/* Keep company hidden if a country change re-injects it. */
body.apex-checkout-cro #billing_company_field,
body.apex-checkout-cro #shipping_company_field {
	display: none !important;
}

body.apex-checkout-cro #billing_address_2_field,
body.apex-checkout-cro #shipping_address_2_field {
	display: block !important;
}


/* Cart: one shipping estimate, calculator behind Change address. */
body.apex-cart-cro ul.woocommerce-shipping-methods {
	display: none !important;
}
body.apex-cart-cro #shipping-calculator-form {
	display: none !important;
}
body.apex-cart-cro #shipping-calculator-form.apex-open {
	display: block !important;
}
.apex-cart-shipping-estimate {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin: 0 0 6px;
	font-size: 15px;
}
.apex-cart-shipping-amount {
	font-weight: 600;
}
.apex-cart-change-address {
	margin: 0 0 10px;
	font-size: 13px;
}
.apex-cart-change-address a {
	color: inherit;
	text-decoration: underline;
}


/* Official Sezzle price-widget / installment promo (the 5-payment line). Keep our .apex-checkout-sezzle row and the Sezzle payment method. */
body.apex-cart-cro .sezzle-shopify-info-container,
body.apex-checkout-cro .sezzle-shopify-info-container,
body.apex-cart-cro .sezzle-shopify-info-button,
body.apex-checkout-cro .sezzle-shopify-info-button,
body.apex-cart-cro .sezzle-button-wrapper,
body.apex-checkout-cro .sezzle-button-wrapper,
body.apex-cart-cro .cart_totals [class*="sezzle-"]:not(.payment_method_sezzlepay):not(.payment_method_sezzlepay *),
body.apex-checkout-cro .woocommerce-checkout-review-order [class*="sezzle-"]:not(.payment_method_sezzlepay):not(.payment_method_sezzlepay *):not(.payment_box):not(.payment_box *) {
	display: none !important;
}
/* Hide PayPal Pay Later and Stripe BNPL promo lines only. Keep the gateways. */
body.apex-cart-cro .ppcp-messages,
body.apex-checkout-cro .ppcp-messages,
body.apex-cart-cro .wc-stripe-bnpl-cart-message,
body.apex-checkout-cro .wc-stripe-bnpl-cart-message,
body.apex-cart-cro #wc-stripe-bnpl-cart-msg,
body.apex-checkout-cro #wc-stripe-bnpl-cart-msg,
body.apex-cart-cro [data-pp-message],
body.apex-checkout-cro [data-pp-message] {
	display: none !important;
}

/* Empty cart actions: square orange buttons below the empty message */
.cart-empty-page .return-to-shop {
	display: none !important;
}
.apex-empty-cart-actions {
	margin: 22px 0 25px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 12px;
	text-align: center;
}
.apex-empty-cart-actions a.button,
.apex-empty-cart-actions a.apex-empty-cart-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 22px;
	margin: 0;
	font: 600 15px/1 "Barlow", system-ui, sans-serif;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #fff !important;
	background: #EC582D !important;
	border: 2px solid #EC582D !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	text-decoration: none !important;
	float: none !important;
	height: auto !important;
	white-space: nowrap;
}
.apex-empty-cart-actions a.button:hover,
.apex-empty-cart-actions a.button:focus,
.apex-empty-cart-actions a.apex-empty-cart-btn:hover,
.apex-empty-cart-actions a.apex-empty-cart-btn:focus {
	background: #15181C !important;
	border-color: #15181C !important;
	color: #fff !important;
}
@media (max-width: 375px) {
	.apex-empty-cart-actions {
		gap: 10px;
		padding: 0 12px;
	}
	.apex-empty-cart-actions a.button,
	.apex-empty-cart-actions a.apex-empty-cart-btn {
		min-height: 44px;
		padding: 10px 16px;
		font-size: 13px;
	}
}

/* Cart totals CHECKOUT button */
body.apex-cart-cro .wc-proceed-to-checkout a.apex-cart-checkout-btn {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	width: 100%;
	max-width: none;
	box-sizing: border-box;
	min-height: 48px;
	padding: 12px 22px;
	margin: 0;
	font: 600 15px/1 "Barlow", system-ui, sans-serif;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #fff !important;
	background: #EC582D !important;
	border: 2px solid #EC582D !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	text-decoration: none !important;
	float: none !important;
	height: auto !important;
	white-space: nowrap;
}
body.apex-cart-cro .wc-proceed-to-checkout a.apex-cart-checkout-btn:hover,
body.apex-cart-cro .wc-proceed-to-checkout a.apex-cart-checkout-btn:focus {
	background: #15181C !important;
	border-color: #15181C !important;
	color: #fff !important;
}
body.apex-cart-cro .wc-proceed-to-checkout a.apex-cart-checkout-btn .apex-checkout-secure-icon {
	width: 1em;
	height: 1em;
	flex: 0 0 1em;
	display: block;
}
body.apex-cart-cro .wc-proceed-to-checkout a.apex-cart-checkout-btn .vc_btn3-icon,
body.apex-cart-cro .wc-proceed-to-checkout a.apex-cart-checkout-btn .fa-arrow-right {
	display: none !important;
}

/* Even spacing for the cart totals button stack */
body.apex-cart-cro .wc-proceed-to-checkout {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
}
body.apex-cart-cro .wc-proceed-to-checkout > wc-order-attribution-inputs {
	display: none !important;
}
body.apex-cart-cro .wc-proceed-to-checkout > div,
body.apex-cart-cro .wc-proceed-to-checkout > .ppc-button-wrapper,
body.apex-cart-cro .wc-proceed-to-checkout > .wc-stripe-cart-checkout-container {
	width: 100%;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
body.apex-cart-cro .ppc-button-wrapper,
body.apex-cart-cro #ppc-button-ppcp-gateway-v6,
body.apex-cart-cro #ppc-button-ppcp-gateway-v6 > div {
	width: 100%;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
body.apex-cart-cro #ppc-button-ppcp-gateway-v6 .paypal-buttons,
body.apex-cart-cro #ppc-button-ppcp-gateway-v6 [class*="paypal-buttons-layout-vertical"],
body.apex-cart-cro #ppc-button-ppcp-gateway-v6 [class*="paypal-button-layout-vertical"] {
	display: flex !important;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	margin: 0;
}
body.apex-cart-cro #ppc-button-ppcp-gateway-v6 .paypal-button-row,
body.apex-cart-cro #ppc-button-ppcp-gateway-v6 [data-funding-source] {
	width: 100%;
	margin: 0 !important;
	min-height: 48px;
}
body.apex-cart-cro .wc-stripe-cart-checkout-container,
body.apex-cart-cro .wc_stripe_cart_payment_methods {
	width: 100%;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
}
body.apex-cart-cro .wc-stripe-payment-method {
	width: 100%;
	margin: 0 !important;
	padding: 0 !important;
	--wc-stripe-express-btn-h: 48px;
}
body.apex-cart-cro .wc-stripe-payment-method .payment-box,
body.apex-cart-cro .wc-stripe-payment-method [id$="-cart-button"] {
	width: 100%;
	margin: 0;
	padding: 0;
	min-height: 48px;
	box-sizing: border-box;
}
body.apex-cart-cro .wc-stripe-cart-or {
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1.2;
	text-align: center;
}
body.apex-cart-cro li.wc-stripe-payment-method.or .payment-box,
body.apex-cart-cro li.wc-stripe-payment-method.or {
	min-height: 0;
}

/* Places autocomplete list */
.apex-places-suggestions {
	position: absolute;
	z-index: 40;
	left: 0;
	right: 0;
	top: 100%;
	margin: 0;
	padding: 4px 0;
	list-style: none;
	background: #fff;
	border: 1px solid #ddd;
	box-shadow: 0 8px 20px rgba(0,0,0,0.08);
	max-height: 240px;
	overflow: auto;
}
.apex-places-suggestions[hidden] {
	display: none !important;
}
.apex-places-suggestion {
	display: block;
	width: 100%;
	text-align: left;
	background: none;
	border: 0;
	padding: 8px 12px;
	font: inherit;
	cursor: pointer;
}
.apex-places-suggestion:hover,
.apex-places-suggestion:focus {
	background: #f4f4f4;
}
