/**
 * Eskimo B2B Public Stylesheet - Responsive Multi-Device & Mobile Optimized
 */
.eskimo-b2b-matrix-order-wrap {
	background: var(--eskimo-b2b-bg, #ffffff);
	padding: 24px;
	padding-bottom: 120px; /* Room for fixed bottom floating bar */
	border-radius: 12px;
	box-shadow: 0 4px 16px rgba(0,0,0,0.06);
	margin: 20px 0;
	position: relative;
	box-sizing: border-box;
}

.eskimo-b2b-portal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	border-bottom: 2px solid #f0f0f0;
	padding-bottom: 15px;
	flex-wrap: wrap;
	gap: 15px;
}

.eskimo-b2b-portal-header h2 {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
}

.eskimo-b2b-actions-toolbar {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.eskimo-b2b-search-filter input {
	width: 100%;
	max-width: 400px;
	padding: 12px 14px;
	font-size: 15px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	box-sizing: border-box;
}

/* Horizontal Responsive Scroll Wrapper for 2D Grid & Tables */
.eskimo-grid-matrix-wrapper,
.eskimo-table-responsive-wrapper {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: 8px;
	margin: 10px 0;
}

.eskimo-b2b-matrix-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 650px; /* Ensures clean alignment on tablet/desktop while enabling smooth touch scroll on mobile */
}

.eskimo-b2b-matrix-table th {
	background: #f8fafc;
	padding: 12px 16px;
	text-align: left;
	font-weight: 600;
	color: #475569;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.eskimo-b2b-matrix-table td {
	padding: 12px 16px;
	vertical-align: middle;
	border-bottom: 1px solid #f1f5f9;
}

/* Numeric Quantity Inputs with Visible Spin Buttons & Mobile Touch Target */
.eskimo-qty-input[type=number] {
	width: 75px !important;
	text-align: center;
	padding: 6px 8px !important;
	font-weight: 700;
	font-size: 15px !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 8px !important;
	background-color: #ffffff;
	box-sizing: border-box;
	min-height: 38px;
	-moz-appearance: textfield;
}

.eskimo-qty-input[type=number]::-webkit-inner-spin-button,
.eskimo-qty-input[type=number]::-webkit-outer-spin-button {
	opacity: 1 !important;
	height: 30px;
	cursor: pointer;
}

.eskimo-matrix-row:hover {
	background-color: #f9fbfd;
}

.stock-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	background: #e2e8f0;
	color: #475569;
}

.stock-badge.in-stock {
	background: #dcfce7;
	color: #166534;
}

.stock-badge.out-of-stock {
	background: #fee2e2;
	color: #991b1b;
}

/* Guaranteed Fixed Floating Bottom Order Totals Bar */
.eskimo-matrix-footer-sticky {
	position: fixed !important;
	bottom: 0 !important;
	left: 0 !important;
	right: 0 !important;
	width: 100% !important;
	z-index: 999999 !important;
	background: #0f172a !important;
	color: #ffffff !important;
	padding: 16px 32px !important;
	box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.35) !important;
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	border-top: 3px solid #2563eb !important;
	box-sizing: border-box !important;
}

.eskimo-matrix-footer-sticky h3 {
	color: #ffffff !important;
	margin: 0 !important;
}

.eskimo-b2b-grid-matrix-table td {
	padding: 8px !important;
}

.eskimo-b2b-registration-form-wrap {
	max-width: 600px;
	margin: 0 auto;
	padding: 30px;
	background: #ffffff;
	border-radius: 8px;
	box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* ==========================================================================
   MOBILE & SMALL SCREEN RESPONSIVE MEDIA QUERIES (< 768px)
   ========================================================================== */
@media (max-width: 768px) {
	.eskimo-b2b-matrix-order-wrap {
		padding: 16px;
		padding-bottom: 160px; /* Extra room for stacked mobile bottom bar */
		margin: 10px 0;
		border-radius: 6px;
	}

	.eskimo-b2b-portal-header {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.eskimo-b2b-portal-header h2 {
		font-size: 20px;
		text-align: center;
	}

	.eskimo-b2b-actions-toolbar {
		flex-direction: column;
		width: 100%;
		gap: 8px;
	}

	.eskimo-b2b-view-switcher {
		width: 100%;
		justify-content: center;
		display: flex !important;
	}

	.eskimo-b2b-view-switcher button {
		flex: 1;
		text-align: center;
		padding: 8px 12px !important;
	}

	.eskimo-b2b-actions-toolbar button {
		width: 100%;
		padding: 10px !important;
	}

	.eskimo-b2b-search-filter input {
		max-width: 100% !important;
		font-size: 16px !important; /* Prevents auto-zoom on iOS Safari */
	}

	/* Responsive Mobile Footer Bar */
	.eskimo-matrix-footer-sticky {
		flex-direction: column !important;
		gap: 12px !important;
		padding: 14px 18px !important;
		text-align: center;
	}

	.eskimo-matrix-footer-sticky .eskimo-grand-total h3 {
		font-size: 16px !important;
	}

	.eskimo-matrix-footer-sticky .eskimo-buttons {
		width: 100%;
	}

	.eskimo-matrix-footer-sticky button#eskimo-b2b-bulk-add-cart-btn {
		width: 100% !important;
		padding: 14px !important;
		font-size: 15px !important;
		min-height: 48px !important; /* Touch friendly tap height */
	}

	/* 2D Grid Cell Sizing on Mobile */
	.eskimo-grid-matrix-table th,
	.eskimo-grid-matrix-table td {
		min-width: 80px;
		padding: 6px !important;
	}

	.eskimo-qty-input[type=number] {
		width: 65px !important;
		font-size: 16px !important; /* Touch friendly font size */
		min-height: 40px !important;
	}
}

/* Tablet Optimizations (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
	.eskimo-b2b-matrix-order-wrap {
		padding: 20px;
		padding-bottom: 120px;
	}

	.eskimo-matrix-footer-sticky {
		padding: 16px 24px !important;
	}
}
