/**
 * AxonFit — mobile browser UI fixes (max-width: 767px and tablet progress).
 * Scope: layout overflow, My Account, checkout/cart blocks, order progress, PDP, auth.
 */

html {
	overflow-x: clip;
}

body {
	overflow-x: clip;
	-webkit-text-size-adjust: 100%;
}

@media (max-width: 991px) {
	/* Order progress — avoid 5-column crush between 768px and 960px */
	.axonfit-view-order-steps {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.axonfit-view-order-steps::before,
	.axonfit-view-order-steps::after {
		display: none;
	}

	.axonfit-view-order-step {
		flex-direction: row;
		align-items: center;
		text-align: left;
	}

	.axonfit-view-order-step-label {
		text-align: left;
	}
}

@media (max-width: 767px) {
	/* Safe area + chat widget */
	body {
		padding-bottom: env(safe-area-inset-bottom, 0);
	}

	/* Elementor section padding */
	.elementor-section.elementor-section-boxed > .elementor-container {
		padding-left: 16px;
		padding-right: 16px;
	}

	.e-con > .e-con-inner {
		--padding-left: 16px;
		--padding-right: 16px;
	}

	/* My Account — floated layout from Woo */
	.woocommerce-account.axonfit-account-page .woocommerce::after {
		content: "";
		display: table;
		clear: both;
	}

	.axonfit-account-page .woocommerce-MyAccount-content {
		float: none !important;
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
		overflow-x: hidden;
	}

	.axonfit-account-page .woocommerce-MyAccount-navigation {
		float: none !important;
		width: 100% !important;
		max-width: none !important;
		margin: 0 0 1.25rem !important;
	}

	.axonfit-account-page .woocommerce-MyAccount-navigation ul {
		margin-bottom: 0;
		padding-bottom: 0;
	}

	.axonfit-dashboard-stats,
	.axonfit-dashboard-quick,
	.axonfit-dashboard-order {
		grid-template-columns: 1fr !important;
	}

	/* Orders filters */
	.axonfit-orders-tabs {
		display: flex;
		flex-wrap: nowrap;
		gap: 8px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 6px;
		margin-bottom: 12px;
		scrollbar-width: thin;
	}

	.axonfit-orders-tab {
		flex: 0 0 auto;
		white-space: nowrap;
	}

	.axonfit-orders-hero,
	.axonfit-orders-empty {
		padding-left: 16px;
		padding-right: 16px;
		box-sizing: border-box;
	}

	/* Edit account / addresses cards */
	.axonfit-edit-account-card,
	.axonfit-addresses-card,
	.axonfit-addresses-form-card,
	.axonfit-view-order-card,
	.axonfit-view-order-progress-card,
	.axonfit-order-progress--compact {
		padding-left: 18px !important;
		padding-right: 18px !important;
		box-sizing: border-box;
	}

	.axonfit-edit-account-grid--profile-row-2 {
		grid-template-columns: 1fr !important;
	}

	.axonfit-edit-account-title {
		font-size: clamp(1.35rem, 5.5vw, 1.65rem);
	}

	.axonfit-edit-account-email-box__content .axonfit-edit-account-email-value {
		word-break: break-word;
	}

	/* Checkout & cart (blocks) */
	.wc-block-checkout,
	.wc-block-cart {
		padding-left: 12px !important;
		padding-right: 12px !important;
		box-sizing: border-box;
	}

	.wc-block-components-form,
	.wc-block-components-sidebar-layout {
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	.wc-block-components-totals-coupon__form {
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 10px;
	}

	.wc-block-components-totals-coupon__input {
		width: 100% !important;
	}

	.wc-block-components-totals-coupon__button {
		width: 100% !important;
	}

	.wc-block-cart .wc-block-cart-item__wrap {
		row-gap: 8px;
	}

	/* Product detail */
	.single-product .product_title,
	.single-product .entry-title {
		font-size: clamp(1.3rem, 5vw, 1.75rem) !important;
		line-height: 1.25 !important;
		word-break: break-word;
	}

	.single-product .nova-woocommerce-tabs .tabs.wc-tabs,
	.single-product .nova-woocommerce-tabs ul.tabs {
		display: flex;
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		gap: 6px;
		padding-bottom: 4px;
	}

	.single-product .nova-woocommerce-tabs .tabs li a {
		white-space: nowrap;
		padding: 10px 14px !important;
		font-size: 13px !important;
	}

	/* Auth split layout */
	.axonfit-auth-shell {
		margin-left: 12px;
		margin-right: 12px;
		width: auto;
		max-width: 100%;
	}

	.axonfit-auth-shell__visual {
		min-height: 180px;
		max-height: 220px;
	}

	.axonfit-auth-shell__panel {
		padding: 22px 16px 28px !important;
	}

	/* Promo marquee — must not widen viewport */
	.axonfit-promo-marquee {
		max-width: 100%;
	}

	/* Page heroes (Elementor) — reduce excessive banner height on phone */
	.elementor-1413 > .e-con.e-parent:first-child,
	.elementor-1414 > .e-con.e-parent:first-child {
		min-height: 260px !important;
	}

	.elementor-20 > .e-con.e-parent:first-child {
		min-height: 220px !important;
	}

	/* Wishlist table scroll */
	.axonfit-wishlist-page .kitify-wishlist-table-wrap,
	.post-type-archive .kitify-wishlist-table-wrap {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	/* Payment methods */
	.axonfit-payment-methods-grid {
		grid-template-columns: 1fr !important;
	}

	/* Address form actions */
	.axonfit-addresses-form-actions {
		flex-direction: column;
	}

	.axonfit-addresses-form-actions .button {
		width: 100% !important;
		justify-content: center;
	}

	/* View order title row */
	.axonfit-view-order-title-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.axonfit-view-order-meta {
		word-break: break-word;
	}

	/* Classic shop tables */
	.woocommerce table.shop_table {
		font-size: 14px;
	}

	.woocommerce table.shop_table td,
	.woocommerce table.shop_table th {
		padding: 10px 8px;
	}
}

@media (max-width: 481px) {
	.elementor-8208 .elementor-element.elementor-element-5815280 .elementor-heading-title {
		font-size: 40px;
	}
	body.home .axonfit-home-accessories > .e-con-inner > .elementor-widget-icon-box .elementor-icon-box-wrapper {
		padding: 0px 0px !important;
	}
}
@media (max-width: 390px) {
	.elementor-122 .elementor-widget-woocommerce-multi-currency select.wmc-nav {
		min-width: 76px;
		font-size: 11px;
	}

	.axonfit-orders-total {
		width: 100%;
	}
}
