/* Luxntek global mobile optimizations */

@media only screen and (max-width: 991.98px) {
	.template-collection .sidebar,
	.template-collection .filter-sidebar,
	.template-collection .collection-sidebar,
	.template-collection .sidebar_tags {
		width: 100% !important;
		max-width: 100% !important;
	}

	.template-collection .collection-toolbar,
	.template-collection .filters-toolbar-wrapper,
	.template-collection .toolbar {
		display: flex;
		flex-wrap: wrap;
		gap: 10px;
		align-items: center;
	}

	.template-collection .filters-toolbar__product-count,
	.template-collection .filters-toolbar__sort,
	.template-collection .filters-toolbar__view {
		width: 100%;
	}

	.breadcrumbs,
	.breadcrumb {
		display: flex;
		flex-wrap: wrap;
		gap: 4px 8px;
		white-space: normal !important;
		overflow-wrap: anywhere;
	}

	.site-footer .footer-top .row > [class*="col-"],
	.site-footer .footer-middle .row > [class*="col-"],
	.site-footer .footer-bottom .row > [class*="col-"] {
		flex: 0 0 100%;
		max-width: 100%;
		margin-bottom: 18px;
	}

	.modal-dialog,
	#content_quickview .modal-dialog {
		width: calc(100vw - 20px) !important;
		max-width: calc(100vw - 20px) !important;
		margin: 10px auto !important;
	}

	.modal-content,
	#content_quickview .modal-content {
		max-height: calc(100dvh - 24px);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}
}

@media only screen and (max-width: 767.98px) {
	/* Override overly narrow legacy blog/login containers */
	body.template-blog #page-content > .container,
	body.template-blog #page-content > .page .page-width,
	body.template-blog #page-content > .bredcrumbWrap .breadcrumbs,
	body.template-login #page-content > .container,
	body.template-register #page-content > .container,
	body.template-forgot-password #page-content > .container,
	body.template-reset-password #page-content > .container,
	body.page-template #page-content > .container {
		max-width: 100% !important;
		width: 100% !important;
		padding-left: max(14px, env(safe-area-inset-left)) !important;
		padding-right: max(14px, env(safe-area-inset-right)) !important;
	}

	body.page-template #page-content h1,
	body.page-template #page-content h2,
	body.page-template #page-content p,
	body.page-template #page-content .rte-setting,
	body.template-blog #page-content h1,
	body.template-blog #page-content h2,
	body.template-blog #page-content p,
	body.template-blog #page-content .rte,
	body.template-blog #page-content .publish-detail,
	body.template-blog #page-content .blog-nav {
		width: 100% !important;
		max-width: 100% !important;
	}

	.template-reset-password #page-content .main-col .contact-form,
	.template-login #page-content .contact-form,
	.template-register #page-content .contact-form {
		max-width: 100% !important;
	}

	/* Product page */
	.template-product .product-single,
	.template-product .product-details-img,
	.template-product .product-information,
	.template-product .product-single__meta,
	.template-product .product-form__item--submit,
	.template-product .tabs-listing,
	.template-product .product-accordion {
		width: 100% !important;
		max-width: 100% !important;
	}

	.template-product .product-details-img .product-buttons {
		flex-wrap: wrap;
		justify-content: flex-start;
	}

	.template-product .product-form__item--submit .btn,
	.template-product .product-form__item--submit button,
	.template-product .product-form__item--submit .wrapQtyBtn {
		width: 100%;
		max-width: 100%;
	}

	.template-product .tabs-listing .tab-container,
	.template-product .product-accordion .tab-content {
		overflow-x: hidden;
	}

	.template-product .product-specifications-table,
	.template-product .product-specifications-table tbody,
	.template-product .product-specifications-table tr,
	.template-product .product-specifications-table td {
		display: block;
		width: 100% !important;
	}

	.template-product .product-specifications-table tr {
		margin-bottom: 0;
		border-bottom: 1px solid #dbe4ef;
	}

	.template-product .product-specifications-table .product-specification-section-row td {
		padding: 12px 14px !important;
	}

	.template-product .product-specifications-table .product-specification-label {
		width: 100% !important;
		padding: 10px 14px 4px !important;
		border-bottom: 0 !important;
	}

	.template-product .product-specifications-table tr:not(.product-specification-section-row) td:last-child {
		padding: 0 14px 12px !important;
	}

	.template-product .related-product .item,
	.template-product .related-product .col-md-3,
	.template-product .related-product .col-sm-6 {
		flex: 0 0 50%;
		max-width: 50%;
	}

	/* Shop grid */
	.template-collection .grid-products .item.col-md-3,
	.template-collection .grid-products .item.col-lg-3 {
		flex: 0 0 50%;
		max-width: 50%;
	}

	.template-collection .productList .grid-products .item {
		flex: 0 0 100% !important;
		max-width: 100% !important;
	}

	/* Account */
	.template-account .account-sidebar,
	.template-account .account-content,
	.template-account .list-group,
	.template-account .account-page .row > [class*="col-"] {
		width: 100% !important;
		max-width: 100% !important;
		flex: 0 0 100%;
	}

	.template-account .account-sidebar {
		margin-bottom: 18px;
	}

	.template-account .orders-table,
	.template-account .wishlist-table {
		min-width: 0 !important;
	}

	/* Checkout / cart */
	.template-checkout .checkout-wrapper,
	.template-checkout .checkout-form,
	.template-checkout .order-summary,
	.template-checkout .row > [class*="col-"],
	.template-cart .cart__footer,
	.template-cart .main-col {
		width: 100% !important;
		max-width: 100% !important;
		flex: 0 0 100%;
	}

	.template-checkout .checkout-wrapper .row,
	.template-cart .cart.style2 tbody tr {
		margin-left: 0;
		margin-right: 0;
	}

	.template-cart .cart.style2 tbody tr {
		padding: 14px;
		margin-bottom: 12px;
		border: 1px solid #e8edf0;
	}

	/* Contact / registration forms */
	.contact-template .contact-form,
	.contact-template .contact-details,
	.page-template .formFeilds,
	.page-template .product-registration-form,
	.page-template .registration-form {
		width: 100% !important;
		max-width: 100% !important;
	}

	.page-template .formFeilds .row > [class*="col-"],
	.page-template .product-registration-form .row > [class*="col-"] {
		width: 100% !important;
		max-width: 100% !important;
		flex: 0 0 100%;
	}

	/* Generic tables */
	.table-responsive > .table:not(.orders-table):not(.cart.style2) {
		min-width: 0;
	}

	.table-responsive > .table.table-bordered:not(.orders-table) thead {
		display: none;
	}

	.table-responsive > .table.table-bordered:not(.orders-table) tbody tr {
		display: block;
		margin-bottom: 12px;
		border: 1px solid #e8edf0;
		padding: 10px 12px;
		background: #fff;
	}

	.table-responsive > .table.table-bordered:not(.orders-table) tbody td {
		display: block;
		width: 100% !important;
		border: 0 !important;
		padding: 6px 0 !important;
		text-align: left !important;
		white-space: normal !important;
	}

	/* Floating controls safe area */
	#site-scroll,
	#whatsapp-button,
	.chatbot-widget {
		bottom: calc(16px + env(safe-area-inset-bottom)) !important;
	}

	.chatbot-window {
		bottom: calc(134px + env(safe-area-inset-bottom)) !important;
	}
}

@media only screen and (max-width: 480px) {
	.grid-products .item,
	.template-collection .grid-products .item,
	.template-product .related-product .item {
		flex: 0 0 100% !important;
		max-width: 100% !important;
	}

	.template-product .product-single__title,
	.template-product .product-single__price {
		font-size: clamp(20px, 6vw, 28px);
		line-height: 1.2;
	}

	.top-header .customer-links {
		width: min(92vw, 220px) !important;
		right: max(8px, env(safe-area-inset-right)) !important;
	}
}
