/* ============================================================
   IMX Quick Order v2.1.0 — front-end styles
   Changes vs v2.0:
   - Light-blue placeholder tile is the product image (no photos needed)
   - No unit/case dropdown (unit pricing only)
   - Category chips on their own full-width row; controls on row 2
   - "Order again" is one whole-last-order card
   - Members see discounted price (+ strikethrough), never "Member $X"
   - List view: badges render AFTER image + title
   ============================================================ */

.imx-quick-order {
	--imx-qo-navy: #002e70;
	--imx-qo-blue: #1a6ee0;
	--imx-qo-blue-dark: #0f56b8;
	--imx-qo-tile: #e9f4fd;
	--imx-qo-amber: #ffc233;
	--imx-qo-green: #1d9e57;
	--imx-qo-green-bg: #e7f6ee;
	--imx-qo-red: #d64545;
	--imx-qo-ink: #16233b;
	--imx-qo-mut: #5a6b85;
	--imx-qo-border: #dde6f2;
	--imx-qo-bg: #f5f8fc;
	--imx-qo-card: #ffffff;

	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--imx-qo-ink);
	display: flex;
	align-items: flex-start;
	gap: 26px;
	max-width: 1360px;
	width: 100%;
	margin: 0 auto;
	padding: 26px 18px 90px;
	box-sizing: border-box;
}
.imx-quick-order *,
.imx-quick-order *::before,
.imx-quick-order *::after { box-sizing: border-box; }

.imx-quick-order h1, .imx-quick-order h2, .imx-quick-order h3, .imx-quick-order h4 {
	font-family: "Poppins", "Inter", sans-serif;
	color: var(--imx-qo-navy);
	margin: 0;
}
.imx-quick-order button { font-family: inherit; }

/* ---------------- Sidebar ---------------- */
.imx-qo-sidebar {
	width: 290px;
	flex: 0 0 290px;
	position: sticky;
	top: 20px;
}
.imx-qo-sidebar-top { display: flex; gap: 8px; margin-bottom: 16px; }
.imx-qo-sidebar-top .imx-qo-search { flex: 1; margin-bottom: 0; min-width: 0; }
.imx-qo-filters-btn {
	display: none; /* mobile only */
	align-items: center; gap: 7px; flex: 0 0 auto;
	border: 1px solid var(--imx-qo-border); background: var(--imx-qo-card);
	border-radius: 12px; padding: 10px 14px; cursor: pointer;
	font-size: 14px; font-weight: 600; color: var(--imx-qo-navy);
}
.imx-qo-filters-count {
	background: var(--imx-qo-blue); color: #fff;
	font-size: 11px; font-weight: 700; border-radius: 999px;
	min-width: 18px; height: 18px; line-height: 18px; text-align: center; padding: 0 5px;
}
.imx-qo-search {
	display: flex; align-items: center; gap: 8px;
	background: var(--imx-qo-card);
	border: 1px solid var(--imx-qo-border);
	border-radius: 12px;
	padding: 10px 12px;
	margin-bottom: 16px;
	color: var(--imx-qo-mut);
}
.imx-qo-search input {
	border: none; outline: none; flex: 1; font-size: 14px;
	background: transparent; color: var(--imx-qo-ink);
}

.imx-qo-cart {
	background: var(--imx-qo-card);
	border: 2px solid var(--imx-qo-blue);
	border-radius: 14px;
	padding: 16px;
	margin-bottom: 16px;
}
.imx-qo-cart-head {
	display: flex; justify-content: space-between; align-items: baseline;
	font-family: "Poppins", sans-serif; font-weight: 700; font-size: 14px;
	letter-spacing: 0.04em; text-transform: uppercase; color: var(--imx-qo-navy);
	margin-bottom: 10px;
}
.imx-qo-cart-count { color: var(--imx-qo-blue); font-size: 13px; text-transform: none; letter-spacing: 0; }
.imx-qo-cart-list { list-style: none; margin: 0 0 10px; padding: 0; max-height: 220px; overflow: auto; }
.imx-qo-cart-list li {
	display: flex; justify-content: space-between; gap: 10px;
	font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--imx-qo-border);
}
.imx-qo-cart-list li .imx-qo-cart-rm {
	border: none; background: none; color: var(--imx-qo-mut); cursor: pointer;
	font-size: 14px; line-height: 1; padding: 0 2px;
}
.imx-qo-cart-list li .imx-qo-cart-rm:hover { color: var(--imx-qo-red); }
.imx-qo-cart-empty { color: var(--imx-qo-mut); border-bottom: none !important; }
.imx-qo-cart-total {
	display: flex; justify-content: space-between; font-size: 15px;
	font-weight: 700; color: var(--imx-qo-navy); padding: 8px 0 10px;
}
.imx-qo-member-nudge {
	background: var(--imx-qo-green-bg); color: var(--imx-qo-green);
	font-size: 12.5px; font-weight: 600; border-radius: 10px;
	padding: 9px 11px; margin-bottom: 10px; line-height: 1.45;
}
.imx-qo-member-nudge a { color: inherit; text-decoration: underline; font-weight: 700; }
.imx-qo-addall {
	width: 100%; border: none; border-radius: 12px; cursor: pointer;
	background: var(--imx-qo-blue); color: #fff;
	font-size: 15px; font-weight: 700; padding: 12px;
}
.imx-qo-addall:hover { background: var(--imx-qo-blue-dark); }
.imx-qo-addall:disabled { opacity: 0.6; cursor: default; }
.imx-qo-clear {
	width: 100%; margin-top: 8px; border: none; background: none;
	color: var(--imx-qo-mut); font-size: 12.5px; text-decoration: underline; cursor: pointer;
}
.imx-qo-status { font-size: 12.5px; margin-top: 8px; color: var(--imx-qo-mut); min-height: 1em; }

.imx-qo-toggle-row {
	display: flex; align-items: center; gap: 9px;
	background: var(--imx-qo-green-bg);
	border: 1px solid #cdeadb; border-radius: 12px;
	padding: 11px 13px; margin-bottom: 16px;
	font-size: 14px; font-weight: 600; color: var(--imx-qo-green); cursor: pointer;
}
.imx-qo-sidebar-title {
	font-family: "Poppins", sans-serif; font-weight: 700; font-size: 12.5px;
	letter-spacing: 0.06em; text-transform: uppercase; color: var(--imx-qo-navy);
	margin: 14px 0 8px;
}
.imx-qo-pill-list { list-style: none; margin: 0; padding: 0; }
.imx-qo-pill-list li { margin-bottom: 6px; }
.imx-qo-pill-list label {
	display: flex; align-items: center; gap: 8px;
	font-size: 13.5px; cursor: pointer; color: var(--imx-qo-ink);
}

/* Category tree (hierarchy with + expanders) */
.imx-qo-cattree { list-style: none; margin: 0; padding: 0; }
.imx-qo-cattree-item { margin: 0; }
.imx-qo-cattree-row {
	display: flex; align-items: center; gap: 2px;
	padding: 3px 4px; border-radius: 8px;
}
.imx-qo-cattree-row:hover { background: var(--imx-qo-tile); }
.imx-qo-cattree-row label {
	display: flex; align-items: center; gap: 8px; flex: 1;
	font-size: 13.5px; cursor: pointer; color: var(--imx-qo-ink);
}
.imx-qo-cattree-expand {
	width: 22px; height: 22px; flex: 0 0 22px;
	border: 1px solid var(--imx-qo-border); border-radius: 6px;
	background: var(--imx-qo-card); color: var(--imx-qo-navy);
	font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer;
	display: flex; align-items: center; justify-content: center; padding: 0;
}
.imx-qo-cattree-expand:hover { border-color: var(--imx-qo-blue); color: var(--imx-qo-blue); }
.imx-qo-cattree-spacer { width: 22px; flex: 0 0 22px; }
.imx-qo-cattree-sub {
	margin-left: 15px; padding-left: 12px;
	border-left: 2px solid var(--imx-qo-tile);
}
.imx-qo-cattree-sub .imx-qo-cattree-row label { font-size: 13px; color: var(--imx-qo-mut); }
.imx-qo-cattree-sub .imx-qo-cattree-row label span { color: inherit; }

/* Brand / Tag filter panels: mini search + show-more */
.imx-qo-filterpanel { margin-bottom: 4px; }
.imx-qo-minisearch {
	display: flex; align-items: center; gap: 7px;
	background: var(--imx-qo-card);
	border: 1px solid var(--imx-qo-border); border-radius: 9px;
	padding: 6px 10px; margin-bottom: 8px;
	color: var(--imx-qo-mut);
}
.imx-qo-minisearch input {
	border: none; outline: none; flex: 1; min-width: 0;
	font-size: 13px; background: transparent; color: var(--imx-qo-ink);
}
.imx-qo-nomatch { color: var(--imx-qo-mut); font-size: 12.5px; font-style: italic; }
.imx-qo-showmore {
	border: none; background: none; padding: 2px 0; cursor: pointer;
	font-size: 12.5px; font-weight: 600; color: var(--imx-qo-blue);
}
.imx-qo-showmore:hover { text-decoration: underline; }

/* ---------------- Main column ---------------- */
.imx-qo-main { flex: 1; min-width: 0; }

.imx-qo-pagebar { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.imx-qo-pill {
	font-size: 13px; font-weight: 600; border-radius: 999px; padding: 8px 16px;
}
.imx-qo-pill-guest { background: var(--imx-qo-navy); color: #cfe0f7; }
.imx-qo-pill-guest a, .imx-qo-pill-guest em { color: var(--imx-qo-amber); font-style: normal; text-decoration: none; font-weight: 700; }
.imx-qo-pill-guest a:hover { text-decoration: underline; }
.imx-qo-pill-member { background: var(--imx-qo-green-bg); color: var(--imx-qo-green); }

/* ---------------- Order again (whole last order) ---------------- */
.imx-qo-again {
	display: flex; align-items: center; justify-content: space-between; gap: 18px;
	background: var(--imx-qo-card); border: 1px solid var(--imx-qo-border);
	border-radius: 14px; padding: 16px 20px; margin-bottom: 18px;
}
.imx-qo-again h2 {
	display: flex; align-items: center; gap: 8px;
	font-size: 17px; color: var(--imx-qo-navy); margin-bottom: 4px;
}
.imx-qo-again h2 svg { color: var(--imx-qo-blue); }
.imx-qo-again-meta { margin: 0 0 3px; font-size: 13.5px; font-weight: 600; color: var(--imx-qo-ink); }
.imx-qo-again-meta .woocommerce-Price-amount { color: var(--imx-qo-navy); }
.imx-qo-again-items { margin: 0; font-size: 12.5px; color: var(--imx-qo-mut); }
.imx-qo-again-add {
	flex-shrink: 0; border: none; cursor: pointer; border-radius: 12px;
	background: var(--imx-qo-blue); color: #fff;
	font-size: 14px; font-weight: 700; padding: 12px 20px;
}
.imx-qo-again-add:hover { background: var(--imx-qo-blue-dark); }

/* ---------------- Row 1: chips / Row 2: controls ---------------- */
.imx-qo-chipsrow {
	display: flex; flex-wrap: wrap; gap: 8px;
	margin-bottom: 10px;
}
.imx-qo-chip {
	border: 1px solid var(--imx-qo-border); background: var(--imx-qo-card);
	border-radius: 999px; padding: 8px 14px; cursor: pointer;
	font-size: 13.5px; font-weight: 600; color: var(--imx-qo-navy);
	white-space: nowrap;
}
.imx-qo-chip span { color: var(--imx-qo-mut); font-weight: 500; margin-left: 3px; }
.imx-qo-chip:hover { border-color: var(--imx-qo-blue); color: var(--imx-qo-blue); }

.imx-qo-controls {
	display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
	margin-bottom: 18px;
}
.imx-qo-sortwrap { display: contents; }
.imx-qo-sortlabel { display: none; }
.imx-qo-sheet-body .imx-qo-sortwrap {
	display: block;
	margin-bottom: 16px;
}
.imx-qo-sheet-body .imx-qo-sortlabel {
	display: block;
	font-family: "Poppins", sans-serif; font-weight: 700; font-size: 12.5px;
	letter-spacing: 0.06em; text-transform: uppercase; color: var(--imx-qo-navy);
	margin-bottom: 8px;
}
.imx-qo-sheet-body .imx-qo-sortwrap select {
	width: 100%;
	border: 1px solid var(--imx-qo-border); background: var(--imx-qo-card);
	border-radius: 10px; padding: 11px 13px; font-size: 14px; font-weight: 600;
	color: var(--imx-qo-ink);
}
.imx-qo-controls select,
.imx-qo-ctl {
	border: 1px solid var(--imx-qo-border); background: var(--imx-qo-card);
	border-radius: 10px; padding: 9px 13px; font-size: 13.5px; font-weight: 600;
	color: var(--imx-qo-ink); cursor: pointer;
}
.imx-qo-ctl:hover { border-color: var(--imx-qo-blue); color: var(--imx-qo-blue); }
.imx-qo-ctl-view { display: inline-flex; align-items: center; gap: 7px; margin-left: auto;
	background: var(--imx-qo-blue); border-color: var(--imx-qo-blue); color: #fff; }
.imx-qo-ctl-view:hover { background: var(--imx-qo-blue-dark); color: #fff; }

/* ---------------- Category sections ---------------- */
.imx-qo-cat {
	background: var(--imx-qo-card); border: 1px solid var(--imx-qo-border);
	border-radius: 14px; margin-bottom: 16px; overflow: hidden;
}
.imx-qo-cat-head {
	display: flex; align-items: center; gap: 12px; width: 100%;
	background: none; border: none; cursor: pointer; text-align: left;
	padding: 18px 20px;
}
.imx-qo-cat-head h3 { font-size: 19px; }
.imx-qo-cat-count { color: var(--imx-qo-mut); font-size: 13.5px; }
.imx-qo-chev { margin-left: auto; color: var(--imx-qo-navy); transition: transform 0.18s ease; }
.imx-qo-open .imx-qo-chev { transform: rotate(180deg); }
.imx-qo-cat-body { display: none; padding: 0 20px 20px; }
.imx-qo-open .imx-qo-cat-body { display: block; }

/* ---------------- Grid cards ---------------- */
.imx-qo-grid {
	display: grid;
	grid-template-columns: repeat(var(--imx-qo-cols, 3), 1fr);
	gap: 14px;
}
.imx-qo-card {
	position: relative;
	display: flex; flex-direction: column; gap: 8px;
	border: 1px solid var(--imx-qo-border); border-radius: 14px;
	padding: 12px; background: var(--imx-qo-card);
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.imx-qo-card:hover { box-shadow: 0 6px 18px rgba(0, 46, 112, 0.09); transform: translateY(-2px); }
.imx-qo-oos { opacity: 0.62; }

/* Product image: photo, or the light-blue tile with the name */
.imx-qo-im {
	background: var(--imx-qo-tile);
	border-radius: 10px;
	height: 96px;
	display: flex; align-items: center; justify-content: center;
	overflow: hidden; text-align: center; padding: 8px;
}
.imx-qo-im img { max-height: 100%; max-width: 100%; object-fit: contain; display: block; }
.imx-qo-im-label {
	font-family: "Poppins", sans-serif; font-weight: 700;
	font-size: 21px; line-height: 1.2; color: var(--imx-qo-navy);
	overflow-wrap: anywhere;
}
.imx-qo-im-label-long { font-size: 15px; }

.imx-qo-nm { font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--imx-qo-ink); }

/* Badges: DOM sits after the title (for list view); in grid view they
   overlay the top-left of the image tile. */
.imx-qo-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.imx-quick-order:not(.imx-qo-listview) .imx-qo-badges {
	position: absolute; top: 20px; left: 20px; z-index: 2;
}
.imx-qo-badge {
	font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 9px;
	line-height: 1.4; white-space: nowrap;
}
.imx-qo-badge-best { background: var(--imx-qo-amber); color: #4a3400; }
.imx-qo-badge-nut { background: var(--imx-qo-green); color: #fff; }

.imx-qo-stock { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.imx-qo-stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.imx-qo-in { color: var(--imx-qo-green); }
.imx-qo-in::before { background: var(--imx-qo-green); }
.imx-qo-out { color: var(--imx-qo-red); }
.imx-qo-out::before { background: var(--imx-qo-red); }

.imx-qo-price { text-align: center; margin-top: auto; }
.imx-qo-pr { display: block; font-size: 17px; font-weight: 700; color: var(--imx-qo-navy); }
.imx-qo-pr .woocommerce-Price-amount { color: inherit; font-weight: inherit; }
.imx-qo-was { display: block; font-size: 12.5px; color: var(--imx-qo-mut); }
.imx-qo-mp { display: block; font-size: 12.5px; font-weight: 600; color: var(--imx-qo-blue); }

.imx-qo-stepper {
	display: flex; align-items: stretch; height: 36px;
	border: 1px solid var(--imx-qo-border); border-radius: 10px; overflow: hidden;
}
.imx-qo-step {
	width: 38px; border: none; background: var(--imx-qo-bg);
	font-size: 17px; cursor: pointer; color: var(--imx-qo-navy); line-height: 1;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	user-select: none; -webkit-user-select: none;
}
.imx-qo-step:hover:not(:disabled) { background: var(--imx-qo-blue); color: #fff; }
.imx-qo-step:disabled { cursor: default; opacity: 0.5; }
.imx-qo-qty {
	width: 52px; flex: 1; border: none; text-align: center;
	font-size: 14px; font-weight: 600;
	border-left: 1px solid var(--imx-qo-border);
	border-right: 1px solid var(--imx-qo-border);
	-moz-appearance: textfield; appearance: textfield;
	touch-action: manipulation;
}
@media (max-width: 860px) {
	/* iOS zooms the page when focusing inputs under 16px — keep the
	   qty field at 16px on phones so tapping it never zooms. */
	.imx-qo-qty { font-size: 16px; }
}
.imx-qo-qty::-webkit-outer-spin-button,
.imx-qo-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.imx-qo-qty:focus { outline: 2px solid var(--imx-qo-blue); outline-offset: -2px; }

/* ---------------- Compact list view ----------------
   Row order = DOM order: image → title → badges → stock → price → stepper */
.imx-qo-listview .imx-qo-grid { display: block; }
.imx-qo-listview .imx-qo-card {
	flex-direction: row; align-items: center; gap: 14px;
	border-radius: 10px; margin-bottom: 8px; padding: 8px 12px;
}
.imx-qo-listview .imx-qo-card:hover { transform: none; }
.imx-qo-listview .imx-qo-im {
	height: 52px; width: 68px; flex: 0 0 68px; padding: 4px;
}
.imx-qo-listview .imx-qo-im-label { font-size: 10.5px; line-height: 1.15; }
.imx-qo-listview .imx-qo-im-label-long { font-size: 9.5px; }
.imx-qo-listview .imx-qo-nm { flex: 1 1 220px; min-width: 160px; }
.imx-qo-listview .imx-qo-badges { position: static; flex: 0 0 auto; }
.imx-qo-listview .imx-qo-stock { flex: 0 0 92px; }
.imx-qo-listview .imx-qo-price { margin: 0; text-align: right; flex: 0 0 auto; min-width: 96px; }
.imx-qo-listview .imx-qo-stepper { flex: 0 0 128px; }

/* ---------------- Mobile floating bar ---------------- */
.imx-qo-mobilebar {
	display: none;
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 999;
	background: var(--imx-qo-navy); color: #fff;
	padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
	align-items: center; gap: 12px;
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.18);
}
.imx-qo-mobilesum {
	flex: 1; min-width: 0;
	display: flex; align-items: center; justify-content: flex-start; gap: 8px;
	border: none; background: none; color: #fff; cursor: pointer;
	font-size: 14px; font-weight: 600; text-align: left; padding: 8px 0;
}
.imx-qo-mobilesum span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imx-qo-mobilesum svg { flex: 0 0 auto; opacity: 0.8; }
.imx-qo-addall-mobile { width: auto; padding: 11px 18px; flex: 0 0 auto; }

/* ---------------- Bottom sheets ---------------- */
body.imx-qo-noscroll { overflow: hidden; }
.imx-qo-sheet { position: fixed; inset: 0; z-index: 1000; }
.imx-qo-sheet-backdrop {
	position: absolute; inset: 0;
	background: rgba(6, 22, 48, 0.5);
	opacity: 0; transition: opacity 0.2s ease;
}
.imx-qo-sheet-panel {
	position: absolute; left: 0; right: 0; bottom: 0;
	background: var(--imx-qo-card);
	border-radius: 18px 18px 0 0;
	max-height: 84vh;
	display: flex; flex-direction: column;
	transform: translateY(100%); transition: transform 0.22s ease;
	padding-bottom: env(safe-area-inset-bottom);
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.imx-qo-sheet-open .imx-qo-sheet-backdrop { opacity: 1; }
.imx-qo-sheet-open .imx-qo-sheet-panel { transform: translateY(0); }
.imx-qo-sheet-grab {
	width: 40px; height: 4px; border-radius: 999px;
	background: var(--imx-qo-border);
	margin: 10px auto 2px;
}
.imx-qo-sheet-head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 8px 18px 10px;
	border-bottom: 1px solid var(--imx-qo-border);
}
.imx-qo-sheet-head h3 { font-size: 17px; }
.imx-qo-sheet-x {
	border: none; background: var(--imx-qo-bg); color: var(--imx-qo-navy);
	width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
	font-size: 19px; line-height: 1;
}
.imx-qo-sheet-body { overflow: auto; padding: 14px 18px; -webkit-overflow-scrolling: touch; }
.imx-qo-sheet-body .imx-qo-cart { border-width: 0; padding: 0; margin: 0; }
.imx-qo-sheet-body .imx-qo-cart-list { max-height: none; }
.imx-qo-sheet-foot {
	display: flex; gap: 10px;
	padding: 12px 18px;
	border-top: 1px solid var(--imx-qo-border);
}
.imx-qo-sheet-clear {
	border: 1px solid var(--imx-qo-border); background: var(--imx-qo-card);
	color: var(--imx-qo-navy); border-radius: 12px; cursor: pointer;
	font-size: 14px; font-weight: 600; padding: 12px 16px; flex: 0 0 auto;
}
.imx-qo-sheet-apply {
	flex: 1; border: none; border-radius: 12px; cursor: pointer;
	background: var(--imx-qo-blue); color: #fff;
	font-size: 15px; font-weight: 700; padding: 12px;
}
.imx-qo-sheet-apply:hover { background: var(--imx-qo-blue-dark); }

/* ---------------- Responsive ---------------- */
@media (max-width: 1100px) { .imx-qo-grid { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 860px) {
	.imx-quick-order {
		flex-direction: column;
		gap: 0;
		padding: 14px 12px 96px;
		/* Full-bleed: break out of any fixed-width theme wrapper so the
		   plugin is always exactly viewport-wide — no sideways cropping. */
		width: 100vw;
		max-width: 100vw;
		position: relative;
		left: 50%;
		margin-left: -50vw;
		margin-right: 0;
		overflow-x: hidden;
	}
	.imx-qo-main, .imx-qo-cat, .imx-qo-cat-body, .imx-qo-grid, .imx-qo-card { max-width: 100%; min-width: 0; }
	.imx-qo-sidebar { position: static; width: 100%; flex: 1 1 auto; }
	.imx-qo-sidebar-top { margin-bottom: 12px; }
	.imx-qo-filters-btn { display: inline-flex; }

	/* The cart and filter stack live in the bottom sheets on mobile;
	   this hides them pre-relocation so nothing flashes at the top. */
	.imx-qo-sidebar > .imx-qo-cart,
	.imx-qo-sidebar > .imx-qo-filters { display: none; }
	.imx-qo-sheet-body .imx-qo-cart,
	.imx-qo-sheet-body .imx-qo-filters { display: block; }

	.imx-qo-mobilebar { display: flex; }

	.imx-qo-pagebar { justify-content: flex-start; margin-bottom: 10px; }
	.imx-qo-pill { font-size: 12px; padding: 7px 12px; }

	.imx-qo-again { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; }
	.imx-qo-again-info { min-width: 0; }
	.imx-qo-again-add { width: 100%; }

	/* Jump chips are hidden on phones; sorting moves into the Filters
	   sheet (relocated by JS), leaving a slim controls row. */
	.imx-qo-chipsrow { display: none; }
	.imx-qo-controls .imx-qo-ctl { flex: 1; justify-content: center; padding: 9px 10px; }
	.imx-qo-ctl-view { margin-left: 0; }

	.imx-qo-cat-head { padding: 14px; }
	.imx-qo-cat-head h3 { font-size: 16px; }
	.imx-qo-cat-count { font-size: 12px; }
	.imx-qo-cat-body { padding: 0 10px 12px; }

	/* "In stock" is noise on a phone — only surface OUT of stock. */
	.imx-qo-stock.imx-qo-in { display: none; }

	/* Compact list rows: a strict grid that can never exceed the
	   viewport. Image | name (badges/stock underneath) | price stack;
	   the stepper gets its own full-width row. */
	.imx-qo-listview .imx-qo-card {
		display: grid;
		grid-template-columns: 44px minmax(0, 1fr) auto;
		grid-template-areas:
			"im nm     price"
			"im badges price"
			"im stock  price"
			"stepper stepper stepper";
		align-items: center;
		column-gap: 10px;
		row-gap: 2px;
		padding: 10px;
	}
	.imx-qo-listview .imx-qo-im { grid-area: im; height: 44px; width: 44px; flex: none; padding: 3px; align-self: start; }
	.imx-qo-listview .imx-qo-nm { grid-area: nm; min-width: 0; font-size: 13px; }
	.imx-qo-listview .imx-qo-badges { grid-area: badges; }
	.imx-qo-listview .imx-qo-badges:empty { display: none; }
	.imx-qo-listview .imx-qo-stock { grid-area: stock; font-size: 11px; }
	.imx-qo-listview .imx-qo-price {
		grid-area: price;
		display: flex; flex-direction: column; align-items: flex-end;
		justify-content: center; gap: 0; min-width: 0; text-align: right;
	}
	.imx-qo-listview .imx-qo-was { font-size: 11px; color: var(--imx-qo-mut); }
	.imx-qo-listview .imx-qo-pr { font-size: 15.5px; }
	.imx-qo-listview .imx-qo-stepper {
		grid-area: stepper;
		flex: none; width: 148px; height: 40px;
		justify-self: end;
	}
	.imx-qo-listview .imx-qo-step { width: 44px; }

	/* Real photos don't need the tile: drop the blue backdrop and
	   padding so the image uses the full slot edge to edge. */
	.imx-qo-listview .imx-qo-im.imx-qo-im-photo,
	.imx-qo-im.imx-qo-im-photo {
		background: transparent;
		padding: 0;
	}
	.imx-qo-im.imx-qo-im-photo img { width: 100%; height: 100%; object-fit: contain; }

	/* Coexistence with the IMX Floating WhatsApp Button (this stylesheet
	   only loads on the Quick Order page, so the button is untouched
	   elsewhere). Best practice: lift the FAB above the bottom order bar
	   instead of letting it cover "Add all to cart", and suppress it
	   entirely while a filter/order sheet is open so it never floats
	   over the modal backdrop. */
	.imx-wa-float {
		bottom: calc(82px + env(safe-area-inset-bottom)) !important;
		transition: opacity 0.15s ease, transform 0.15s ease !important;
	}
	body.imx-qo-noscroll .imx-wa-float {
		opacity: 0 !important;
		pointer-events: none !important;
	}
}

@media (max-width: 560px) {
	.imx-qo-grid { grid-template-columns: 1fr; }
	.imx-quick-order { padding: 12px 10px 96px; }
}

@media (prefers-reduced-motion: reduce) {
	.imx-quick-order *,
	.imx-qo-sheet * { transition: none !important; }
}

/* v2.6: the primary action is now a checkout LINK reusing the old
   add-all button style — make the anchor behave like the button. */
a.imx-qo-addall,
a.imx-qo-addall:visited {
	display: block;
	text-align: center;
	text-decoration: none;
	box-sizing: border-box;
	cursor: pointer;
}
a.imx-qo-addall-mobile {
	display: flex;
	align-items: center;
	justify-content: center;
}
