/* Responsive Breakpoints */
@media (max-width: 991px) {
	.site-header {
		padding: 12px 0;
	}
	.main-navigation {
		display: none;
	}
	.header-actions .cta-button,
	.header-actions .catalog-button {
		display: none;
	}
	.mobile-menu-toggle {
		display: flex;
	}

	/* Front Page Responsive */
	.hero-title {
		font-size: 38px;
	}
	.section-title {
		font-size: 30px;
	}
	.directions-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.products-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.process-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.docs-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.custom-engineering-wrapper {
		grid-template-columns: 1fr;
		gap: 40px;
	}
	.custom-engineering-steps {
		padding: 30px;
	}
	.cta-title {
		font-size: 30px;
	}

	/* Shop Single Product Responsive */
	.product-layout {
		grid-template-columns: 1fr;
		gap: 32px;
	}
	.product-purchase-panel {
		position: static;
		padding: 24px;
	}
	.product-related-section ul.products {
		grid-template-columns: repeat(2, 1fr) !important;
	}

	/* Shop Catalog Archive Responsive */
	.shop ul.products,
	.catalog-products-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}

	/* Shop Checkout Responsive */
	form.shop-checkout {
		flex-direction: column !important;
		gap: 30px !important;
	}
	.checkout-contact-column,
	.checkout-review-column {
		width: 100% !important;
		flex: 1 1 100% !important;
	}
	.thankyou-order-meta {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 16px !important;
	}
}
@media (max-width: 768px) {
	.fp-section {
		padding: 60px 0;
	}
	.hero-title {
		font-size: 32px;
	}
	.hero-text {
		font-size: 16px;
	}
	.cta-title {
		font-size: 26px;
	}
	.product-title {
		font-size: 26px;
	}

	/* Shop Cart Responsive */
	.cart-page-layout {
		flex-direction: column !important;
		gap: 30px !important;
	}
	.shop-cart-form,
	.cart-collaterals {
		width: 100% !important;
		flex: 1 1 100% !important;
		padding: 20px !important;
	}
	.shop-cart-form table.shop_table.cart,
	.shop-cart-form table.shop_table.cart thead,
	.shop-cart-form table.shop_table.cart tbody,
	.shop-cart-form table.shop_table.cart tr,
	.shop-cart-form table.shop_table.cart td {
		display: block !important;
		width: 100% !important;
		box-sizing: border-box !important;
	}
	.shop-cart-form table.shop_table.cart thead {
		display: none !important;
	}
	.shop-cart-form table.shop_table.cart tr.cart_item,
	.shop-cart-form table.shop_table.cart tr.shop-cart-form__cart-item {
		position: relative !important;
		padding: 16px !important;
		background-color: #0F151B !important;
		border: 1px solid rgba(255, 255, 255, 0.05) !important;
		border-radius: 4px !important;
		margin-bottom: 16px !important;
		display: grid !important;
		grid-template-columns: 1fr !important;
		gap: 10px !important;
	}
	.shop-cart-form table.shop_table.cart tr.cart_item td {
		padding: 0 !important;
		border-bottom: none !important;
		text-align: left !important;
	}
	/* Hide standard Shop floated/unaligned table labels */
	.shop-page table.shop_table_responsive tr td::before,
	.shop table.shop_table_responsive tr td::before,
	.shop-cart-form table.shop_table.cart tr.cart_item td::before {
		display: none !important;
		content: "" !important;
	}
	.shop-cart-form table.shop_table.cart tr.cart_item td.product-name,
	.shop-cart-form table.shop_table.cart tr.shop-cart-form__cart-item td.product-name {
		grid-column: 1 !important;
		grid-row: 1 !important;
		margin-bottom: 6px !important;
		padding-right: 48px !important;
		text-align: left !important;
	}
	.shop-cart-form table.shop_table.cart tr.cart_item td.product-name .cart-product-info-wrapper,
	.shop-cart-form table.shop_table.cart tr.shop-cart-form__cart-item td.product-name .cart-product-info-wrapper {
		padding-right: 48px !important;
		align-items: flex-start !important;
		text-align: left !important;
	}
	/* Style category link inside cart row to secondary text color instead of orange */
	.shop-cart-form table.shop_table.cart tr.cart_item td.product-name .cart-product-categories a {
		color: var(--color-text-secondary) !important;
		text-decoration: none !important;
	}
	.shop-cart-form table.shop_table.cart tr.cart_item td.product-name .cart-product-categories a:hover {
		color: var(--rusted-iron) !important;
	}
	.shop-cart-form table.shop_table.cart tr.cart_item td.product-price {
		grid-column: 1 !important;
		grid-row: 2 !important;
		font-size: 13px !important;
		margin-bottom: 6px !important;
		text-align: left !important;
	}
	.shop-cart-form table.shop_table.cart tr.cart_item td.product-quantity {
		grid-column: 1 !important;
		grid-row: 3 !important;
		display: flex !important;
		align-items: center !important;
		justify-content: flex-start !important;
		gap: 8px !important;
		margin-top: 0 !important;
		margin-bottom: 8px !important;
		text-align: left !important;
	}
	.shop-cart-form table.shop_table.cart tr.cart_item td.product-quantity::before {
		display: inline-block !important;
		content: "Кількість: " !important;
		font-family: var(--font-mono) !important;
		font-size: 11px !important;
		text-transform: uppercase !important;
		color: var(--color-text-secondary) !important;
		margin-right: 8px !important;
	}
	.shop-cart-form table.shop_table.cart tr.cart_item td.product-subtotal {
		grid-column: 1 !important;
		grid-row: 4 !important;
		display: flex !important;
		align-items: center !important;
		justify-content: flex-start !important;
		gap: 8px !important;
		border-top: 1px dashed rgba(255, 255, 255, 0.05) !important;
		padding-top: 8px !important;
		margin-top: 4px !important;
		text-align: left !important;
	}
	.shop-cart-form table.shop_table.cart tr.cart_item td.product-subtotal::before {
		display: inline-block !important;
		content: "Всього: " !important;
		font-family: var(--font-mono) !important;
		font-size: 11px !important;
		text-transform: uppercase !important;
		color: var(--color-text-secondary) !important;
		margin-right: 8px !important;
	}
	.shop-cart-form table.shop_table.cart tr.cart_item td.product-remove,
	.shop-cart-form table.shop_table.cart tr.shop-cart-form__cart-item td.product-remove,
	.shop-page .shop-cart-form table.shop_table.cart tr.cart_item td.product-remove,
	.shop-page .shop-cart-form table.shop_table.cart tr.shop-cart-form__cart-item td.product-remove {
		position: absolute !important;
		top: 16px !important;
		right: 16px !important;
		width: auto !important;
		height: auto !important;
		z-index: 99 !important;
		grid-column: 1 / -1 !important;
		grid-row: 1 / -1 !important;
		display: block !important;
		padding: 0 !important;
		margin: 0 !important;
		border: none !important;
	}
	.shop-cart-form table.shop_table.cart tr.cart_item td.product-remove a.remove,
	.shop-cart-form table.shop_table.cart tr.shop-cart-form__cart-item td.product-remove a.remove,
	.shop-page .shop-cart-form table.shop_table.cart tr.cart_item td.product-remove a.remove,
	.shop-page .shop-cart-form table.shop_table.cart tr.shop-cart-form__cart-item td.product-remove a.remove {
		display: flex !important;
		width: 28px !important;
		height: 28px !important;
		align-items: center !important;
		justify-content: center !important;
		background-color: rgba(255, 255, 255, 0.08) !important;
		border: 1px solid rgba(255, 255, 255, 0.15) !important;
		border-radius: 50% !important;
		color: #8A99AD !important;
		font-size: 18px !important;
		line-height: 1 !important;
		text-decoration: none !important;
		transition: all 0.2s ease !important;
	}
	.shop-cart-form table.shop_table.cart tr.cart_item td.product-remove a.remove:hover,
	.shop-cart-form table.shop_table.cart tr.shop-cart-form__cart-item td.product-remove a.remove:hover,
	.shop-page .shop-cart-form table.shop_table.cart tr.cart_item td.product-remove a.remove:hover,
	.shop-page .shop-cart-form table.shop_table.cart tr.shop-cart-form__cart-item td.product-remove a.remove:hover {
		background-color: rgba(248, 81, 73, 0.15) !important;
		border-color: #F85149 !important;
		color: #F85149 !important;
	}
	.shop-cart-form table.shop_table.cart td.actions {
		display: flex !important;
		flex-direction: column !important;
		gap: 16px !important;
		padding: 16px 0 0 0 !important;
	}
	.shop-cart-form table.shop_table.cart td.actions .coupon {
		width: 100% !important;
		flex-direction: column !important;
		align-items: stretch !important;
	}
	.shop-cart-form table.shop_table.cart td.actions .coupon input.input-text {
		width: 100% !important;
		margin-bottom: 8px !important;
	}
	.shop-cart-form table.shop_table.cart td.actions .coupon .btn {
		width: 100% !important;
		justify-content: center !important;
	}
	.shop-cart-form table.shop_table.cart td.actions .update-cart-btn {
		width: 100% !important;
		justify-content: center !important;
		float: none !important;
	}
}

@media (max-width: 575px) {
	.hero-actions,
	.cta-actions {
		flex-direction: column;
		width: 100%;
	}
	.hero-actions .btn,
	.cta-actions .btn {
		width: 100%;
		justify-content: center;
	}
	.directions-grid,
	.products-grid,
	.process-grid,
	.docs-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	.custom-engineering-steps {
		padding: 20px;
	}
	.cta-inner-panel {
		padding: 40px 20px;
	}

	/* Shop Single Product Mobile */
	.product-gallery-grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	.product-related-section ul.products {
		grid-template-columns: 1fr !important;
	}
	.product-gallery-item-main {
		aspect-ratio: 4 / 3;
		padding: 10px;
	}
	.product-gallery-item {
		padding: 6px;
	}
	.shop form.cart:not(.variations_form) {
		flex-direction: column;
		align-items: stretch;
	}
	.shop form.cart:not(.variations_form) .quantity {
		width: 100%;
		margin-bottom: 8px;
	}
	.shop form.cart:not(.variations_form) .quantity input.qty {
		width: 100%;
	}

	/* Shop Catalog Archive Mobile */
	.shop ul.products,
	.catalog-products-grid {
		grid-template-columns: 1fr !important;
	}
	.catalog-sorting-results {
		flex-direction: column !important;
		align-items: flex-start !important;
		gap: 12px !important;
	}
	.shop ul.products li.product .product-card-actions,
	.catalog-products-grid .product-card-actions {
		flex-direction: column !important;
	}

	/* Shop Checkout Mobile */
	.shop-checkout .form-row-first,
	.shop-checkout .form-row-last {
		width: 100% !important;
		float: none !important;
		margin-right: 0 !important;
	}
	.shop-order-received-wrapper {
		padding: 30px 16px !important;
	}
	.thankyou-order-meta {
		grid-template-columns: 1fr !important;
		gap: 12px !important;
	}

	/* Scroll safety and font wrap optimizations */
	.cart_totals table.shop_table,
	table.shop-checkout-review-order-table {
		width: 100% !important;
	}

	.cart_totals table.shop_table td,
	.cart_totals table.shop_table th,
	table.shop-checkout-review-order-table td,
	table.shop-checkout-review-order-table th {
		padding: 8px 4px !important;
		font-size: 12px !important;
		word-break: normal !important;
		overflow-wrap: break-word !important;
	}

	#order_review {
		width: 100% !important;
		overflow-x: auto !important;
		-webkit-overflow-scrolling: touch !important;
	}

	.cart-empty-state .empty-state-actions .btn {
		width: 100% !important;
		justify-content: center !important;
	}
}

/* Mobile logo and header spacing refinements */
@media (max-width: 480px) {
	.logo-title {
		font-size: 16px !important;
	}
	.logo-subtitle {
		font-size: 8px !important;
		letter-spacing: 1px !important;
	}
	.logo-img {
		height: 30px !important;
		max-height: 30px !important;
	}
	.site-header {
		padding: 10px 0 !important;
	}
	.mobile-drawer-header {
		margin-bottom: 24px !important;
	}
	.container {
		padding-right: 16px !important;
		padding-left: 16px !important;
	}
	.logo-link {
		gap: 8px !important;
	}
	.header-actions {
		gap: 8px !important;
	}
}

