:root {
  --brand: #1479b8;
  --brand-dark: #0b5f98;
  --brand-soft: #e8f5fb;
  --orange: var(--brand);
  --orange-dark: var(--brand-dark);
  --orange-soft: var(--brand-soft);
  --ink: #1b2c35;
  --muted: #62747e;
  --line: #dbe7ed;
  --surface: #fff;
  --canvas: #f2f7f9;
  --green: #27805c;
  --green-dark: #176047;
  --green-soft: #e7f5ed;
  --red: #d9342b;
  --page: 1440px;
  font-family: "Microsoft JhengHei", "PingFang HK", "PingFang TC", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; letter-spacing: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--canvas); font-size: 14px; line-height: 1.5; }
body.drawer-open { overflow: hidden; }
.customer-login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(0,1fr); place-items: center; padding: 24px; background: #edf7fb; }
.customer-login-shell { width: min(440px,100%); min-width: 0; padding: 38px; border: 1px solid #ccdee7; border-radius: 6px; background: white; box-shadow: 0 18px 60px rgba(26,76,103,.12); overflow-wrap: anywhere; }
.customer-login-brand { display: flex; align-items: center; gap: 12px; }
.customer-login-brand > div { display: grid; min-width: 0; grid-template-columns: minmax(0,1fr); }
.customer-login-brand strong { font-size: 22px; }
.customer-login-brand small { margin-top: 2px; color: var(--muted); font: 700 9px Arial,sans-serif; }
.customer-login-copy { margin: 44px 0 24px; }
.customer-login-copy > span { color: var(--brand); font-size: 11px; font-weight: 800; }
.customer-login-copy h1 { margin: 7px 0 4px; font-size: 28px; }
.customer-login-copy p { margin: 0; color: var(--muted); font-size: 12px; }
.customer-login-shell form { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; }
.customer-login-shell form > label { margin-top: 8px; font-size: 12px; font-weight: 700; }
.customer-login-field { min-width: 0; height: 48px; display: flex; align-items: center; border: 1px solid #cbdbe3; border-radius: 4px; background: white; }
.customer-login-field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20,121,184,.12); }
.customer-login-field svg { width: 18px; flex: 0 0 18px; margin-left: 14px; color: #687b85; }
.customer-login-field input { flex: 1; min-width: 0; height: 100%; padding: 0 13px; border: 0; outline: 0; }
.customer-login-shell form > button { height: 48px; display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding: 0 17px; border: 0; border-radius: 4px; color: white; background: var(--brand); font-weight: 800; cursor: pointer; }
.customer-login-shell form > button:hover { background: var(--brand-dark); }
.customer-login-shell form > button svg { width: 18px; }
.customer-login-error { margin: 5px 0 0; color: var(--red); font-size: 12px; }
button, input, select { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(20,121,184,.25); outline-offset: 2px; }
.page-width { width: min(calc(100% - 40px), var(--page)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.topbar { height: 34px; color: #526771; background: #f3f8fb; border-bottom: 1px solid #e2edf2; font-size: 12px; }
.sales-tool-banner { position: fixed; right: 0; bottom: 0; left: 0; z-index: 90; min-height: 58px; display: flex; align-items: center; justify-content: center; gap: 24px; padding: 8px max(16px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); color: white; background: #173c50; box-shadow: 0 -4px 18px rgba(16,45,60,.2); }
.sales-tool-banner > span { min-width: 0; display: grid; gap: 2px; }
.sales-tool-banner strong { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.sales-tool-banner small { color: #d9e8ef; font-size: 11px; line-height: 1.4; }
.sales-tool-banner button { min-height: 42px; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 1px solid #9fc4d5; border-radius: 6px; color: #173c50; background: white; font: inherit; font-weight: 800; cursor: pointer; }
.sales-tool-banner button svg { width: 18px; height: 18px; }
.sales-tool-banner button.attention { outline: 3px solid #f2a23a; outline-offset: 2px; }
.sales-tool-banner button:disabled { opacity: .6; cursor: wait; }
body.sales-tool-session { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
body.sales-tool-session #customer-logout,
body.sales-tool-session #mobile-customer-logout,
body.sales-tool-session #mobile-portal-logout,
body.sales-tool-session [data-account-switch],
body.sales-tool-session .mobile-nav { display: none !important; }
body.sales-tool-session.drawer-open .sales-tool-banner { display: none; }
body.sales-quick-tool #storefront > .topbar,
body.sales-quick-tool #storefront > .site-header,
body.sales-quick-tool #storefront > main,
body.sales-quick-tool #storefront > .site-footer { display: none; }
body.sales-quick-tool .quick-order-dialog > .dialog-close svg { pointer-events: none; }
.topbar-inner { height: 100%; display: flex; align-items: center; gap: 20px; }
.topbar nav { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.topbar a:hover, .text-button:hover { color: var(--orange); }
.sync-note { display: flex; align-items: center; gap: 6px; color: var(--green); }
.sync-note::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.text-button { padding: 0; border: 0; background: transparent; cursor: pointer; }
.customer-account-badge { max-width: 260px; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; color: var(--ink); background: transparent; font-weight: 700; cursor: pointer; }
.customer-account-badge svg { width: 15px; flex: 0 0 15px; color: var(--brand); }
.customer-account-badge span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-account-badge:hover { color: var(--brand); }

.site-header { position: relative; z-index: 20; background: white; border-bottom: 1px solid var(--line); }
.header-main-slot { min-height: 104px; }
.header-main { min-height: 104px; display: grid; grid-template-columns: 250px minmax(320px,720px) 328px; align-items: center; justify-content: space-between; gap: 24px; }
.header-main.is-stuck { position: fixed; top: 0; right: 0; left: 0; z-index: 70; width: 100%; min-height: 72px; padding: 8px max(20px,calc((100% - var(--page))/2)); grid-template-columns: 210px minmax(320px,720px) 328px; gap: 24px; background: white; border-bottom: 1px solid var(--line); box-shadow: 0 5px 18px rgba(20,58,78,.12); }
.header-main.is-stuck .brand-logo { width: 46px; height: 44px; flex-basis: 46px; }
.header-main.is-stuck .brand-copy strong { font-size: 20px; }
.header-main.is-stuck .brand-copy small { display: none; }
.header-main.is-stuck .header-icon-button { width: 104px; height: 46px; }
.brand, .footer-brand { display: flex; align-items: center; min-width: 0; gap: 12px; }
.brand-logo { flex: 0 0 54px; width: 54px; height: 52px; object-fit: contain; border-radius: 4px; background: white; }
.brand-copy { min-width: 0; display: flex; flex-direction: column; }
.brand-copy strong { white-space: nowrap; font-size: 25px; line-height: 1.2; font-weight: 800; }
.brand-copy small { margin-top: 4px; color: #777; white-space: nowrap; font: 700 9px Arial,sans-serif; }
.search-slot { min-width: 0; height: 48px; }
.search-sticky-bar { width: 100%; }
.search-sticky-bar.is-stuck { position: fixed; top: 0; right: 0; left: 0; z-index: 70; padding: 8px 20px; border-bottom: 1px solid var(--line); background: white; box-shadow: 0 5px 18px rgba(20,58,78,.12); }
.search-sticky-bar.is-stuck .search-form { width: min(720px,100%); margin-inline: auto; }
.search-form { position: relative; height: 48px; display: flex; align-items: center; border: 2px solid var(--orange); border-radius: 6px; background: white; }
.search-form > svg { flex: 0 0 auto; width: 20px; margin-left: 16px; color: #888; }
.search-form input { width: 100%; min-width: 0; height: 100%; padding: 0 14px 0 10px; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-form input::placeholder { color: #999; }
.search-form > button { align-self: stretch; min-width: 92px; border: 0; border-radius: 0 3px 3px 0; color: white; background: var(--orange); font-weight: 700; cursor: pointer; }
.search-form > button:hover { background: var(--orange-dark); }
.search-suggestions { position: absolute; top: calc(100% + 7px); right: -2px; left: -2px; z-index: 55; max-height: min(62vh,480px); overflow-y: auto; border: 1px solid #c7dae4; border-radius: 6px; background: white; box-shadow: 0 16px 38px rgba(20,58,78,.18); }
.search-suggestion { width: 100%; min-height: 66px; display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: white; text-align: left; cursor: pointer; }
.search-suggestion:last-child { border-bottom: 0; }
.search-suggestion:hover, .search-suggestion.active { background: var(--brand-soft); }
.search-suggestion > img, .search-suggestion-placeholder { width: 48px; height: 48px; object-fit: contain; border: 1px solid #e3ebef; border-radius: 4px; background: #f5f9fb; }
.search-suggestion-placeholder { display: grid; place-items: center; color: #8ba0ab; }
.search-suggestion-placeholder svg { width: 19px; }
.search-suggestion-copy, .search-suggestion-side { min-width: 0; display: flex; flex-direction: column; }
.search-suggestion-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.search-suggestion-copy small { display: -webkit-box; margin-top: 4px; overflow: hidden; color: var(--muted); white-space: normal; font-size: 9px; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.search-suggestion-side { align-items: flex-end; padding-left: 8px; }
.search-suggestion-side > strong { color: var(--brand); font: 800 12px Arial,sans-serif; }
.search-suggestion-side small { margin-top: 4px; color: var(--green); font-size: 9px; font-weight: 700; }
.search-suggestion-side small.out-of-stock { color: var(--red); }
.search-suggestion-empty { padding: 18px; color: var(--muted); text-align: center; font-size: 12px; }
.header-actions { display: flex; justify-content: flex-end; gap: 10px; }
.mobile-customer-badge { display: none; padding: 0; border: 0; background: transparent; cursor: pointer; }
.mobile-logout-button { display: none; padding: 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.mobile-logout-button:hover { color: var(--red); }
.mobile-logout-button svg { width: 17px; }
.header-icon-button { position: relative; width: 104px; height: 56px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; color: #444; background: white; cursor: pointer; }
.header-icon-button svg { width: 22px; color: var(--orange); }
.header-icon-button:hover { color: var(--orange); border-color: var(--orange); }
.action-label { overflow: hidden; max-width: 100%; text-align: center; white-space: nowrap; font-size: 12px; line-height: 1.2; }
.count-badge { position: absolute; top: -7px; right: -7px; min-width: 21px; height: 21px; display: grid; place-items: center; padding: 0 5px; border: 2px solid white; border-radius: 11px; color: white; background: var(--red); font-size: 10px; font-weight: 700; }

.primary-nav { border-top: 1px solid #f0f0f0; }
.primary-nav-inner { height: 46px; display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.primary-nav-inner::-webkit-scrollbar { display: none; }
.primary-category-links { display: flex; flex: 0 0 auto; align-items: stretch; }
.primary-nav button { flex: 0 0 auto; padding: 0 25px; border: 0; background: transparent; font-weight: 700; cursor: pointer; }
.primary-nav button:hover { color: var(--orange); }
.primary-nav .all-category-link { width: 220px; display: flex; align-items: center; gap: 10px; padding: 0 18px; color: white; background: var(--orange); }
.all-category-link svg { width: 19px; }

.hero { height: 382px; display: grid; grid-template-columns: 220px minmax(0,1fr) 248px; gap: 12px; margin-top: 14px; }
.category-rail { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: white; }
.category-rail-title { height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); font-weight: 800; }
.category-rail-title svg { width: 18px; color: var(--orange); }
.category-rail-list { display: flex; flex-direction: column; }
.category-rail-list button { min-height: 39px; display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 0 14px; border: 0; color: #4a4a4a; background: white; text-align: left; cursor: pointer; }
.category-rail-list button:hover { color: var(--orange); background: var(--orange-soft); }
.category-rail-list button svg { width: 17px; }
.category-rail-list button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-rail-list button small { color: #aaa; font-size: 10px; }

.hero-stage { position: relative; min-width: 0; overflow: hidden; border-radius: 6px; color: white; background: var(--orange); isolation: isolate; }
.hero-stage::after { content: ""; position: absolute; right: 0; bottom: 0; width: 44%; height: 100%; background: #9ed9e5; clip-path: polygon(42% 0,100% 0,100% 100%,0 100%); z-index: -1; }
.hero-copy { position: absolute; z-index: 3; top: 54px; left: 52px; width: min(calc(47% - 52px),420px); }
.hero-kicker { display: inline-block; margin-bottom: 8px; padding: 5px 10px; border: 1px solid rgba(255,255,255,.8); border-radius: 3px; font-size: 12px; font-weight: 700; }
.hero-copy h1 { margin: 0; font-size: 48px; line-height: 1.16; font-weight: 900; }
.hero-copy p { max-width: 400px; margin: 13px 0 22px; font-size: 16px; line-height: 1.75; }
.hero-cta { height: 43px; display: inline-flex; align-items: center; gap: 9px; padding: 0 19px; border: 2px solid white; border-radius: 4px; color: var(--ink); background: white; font-weight: 800; cursor: pointer; }
.hero-cta:hover { color: var(--orange); }
.hero-cta svg { width: 18px; }
/* Give every recommendation its own space; reserve the lower area for the stamp. */
.hero-products { position: absolute; right: 2%; top: 14px; bottom: 126px; width: 49%; display: grid; grid-template: repeat(2, minmax(0, 1fr)) / minmax(0, 3fr) minmax(0, 2fr); gap: 10px; }
.hero-product { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; filter: drop-shadow(0 8px 6px rgba(21,76,105,.16)); }
.hero-product-main { grid-row: 1 / -1; }
.hero-product-top, .hero-product-bottom { grid-column: 2; }
.hero-stamp { position: absolute; right: 28px; bottom: 23px; z-index: 4; width: 94px; height: 94px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px solid white; border-radius: 50%; color: white; background: #174b63; text-align: center; }
.hero-stamp strong { font-size: 26px; line-height: 1; }
.hero-stamp span { width: 60px; margin-top: 5px; font-size: 9px; line-height: 1.25; }
.hero-side { display: grid; grid-template-rows: 1fr 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: white; }
.member-welcome { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; border-bottom: 1px solid var(--line); text-align: center; }
.member-icon { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 9px; border-radius: 50%; color: var(--orange); background: var(--orange-soft); }
.member-icon svg { width: 22px; }
.member-welcome strong { font-size: 15px; }
.member-welcome span { margin: 3px 0 12px; color: var(--muted); font-size: 11px; }
.member-welcome button { width: 100%; height: 34px; border: 1px solid var(--orange); border-radius: 4px; color: var(--orange); background: white; font-weight: 700; cursor: pointer; }
.member-welcome button:hover { color: white; background: var(--orange); }
.bulletin { padding: 15px 18px; }
.bulletin-title { display: flex; justify-content: space-between; margin-bottom: 7px; }
.bulletin-title span { color: var(--orange); font-size: 11px; }
.bulletin p { position: relative; margin: 7px 0; padding-left: 11px; overflow: hidden; color: #555; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.bulletin p::before { content: ""; position: absolute; top: 7px; left: 0; width: 4px; height: 4px; border-radius: 50%; background: var(--orange); }

.service-strip { margin-top: 14px; border-block: 1px solid var(--line); background: white; }
.service-strip-inner { min-height: 84px; display: grid; grid-template-columns: repeat(4,1fr); align-items: center; }
.service-strip-inner > div { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 13px; border-right: 1px solid var(--line); }
.service-strip-inner > div:last-child { border-right: 0; }
.service-strip svg { width: 30px; height: 30px; color: var(--orange); }
.service-strip span { display: flex; flex-direction: column; }
.service-strip strong { font-size: 14px; }
.service-strip small { color: var(--muted); font-size: 11px; }

.department-section { padding-block: 44px 48px; }
.section-heading, .catalog-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.section-kicker { color: var(--orange); font: 800 11px Arial,sans-serif; }
.section-heading h2, .catalog-heading h2 { margin: 3px 0 0; font-size: 26px; line-height: 1.25; }
.view-all-button { display: flex; align-items: center; gap: 4px; padding: 5px 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.view-all-button:hover { color: var(--orange); }
.view-all-button svg { width: 17px; }
.department-grid { display: grid; grid-template-columns: repeat(8,1fr); gap: 10px; }
.department-card { position: relative; min-width: 0; min-height: 146px; overflow: hidden; padding: 18px 14px; border: 1px solid var(--line); border-radius: 6px; background: white; text-align: left; cursor: pointer; }
.department-card:hover { border-color: var(--orange); transform: translateY(-2px); }
.department-card svg { width: 28px; height: 28px; margin-bottom: 22px; color: var(--orange); }
.department-card strong, .department-card span { position: relative; z-index: 2; display: block; }
.department-card strong { overflow-wrap: anywhere; font-size: 14px; }
.department-card span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.department-card b { position: absolute; right: -6px; bottom: -29px; color: #f4f4f4; font: 76px/1 Arial,sans-serif; z-index: 0; }

.catalog-section { padding-block: 45px 64px; background: #eaf1f4; }
.catalog-heading { align-items: center; }
.catalog-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.catalog-toolbar { display: flex; align-items: center; gap: 12px; }
.mode-switch { height: 38px; display: flex; padding: 3px; border: 1px solid #dedede; border-radius: 5px; background: white; }
.mode-switch button { min-width: 60px; padding: 0 12px; border: 0; border-radius: 3px; background: transparent; cursor: pointer; }
.mode-switch button.active { color: white; background: var(--orange); font-weight: 700; }
.sort-control { height: 38px; display: flex; align-items: center; gap: 8px; padding-left: 12px; border: 1px solid #dedede; border-radius: 5px; background: white; }
.sort-control span { color: var(--muted); font-size: 11px; }
.sort-control select { height: 100%; padding: 0 28px 0 0; border: 0; outline: 0; background: white; font-size: 12px; cursor: pointer; }
.catalog-category-control { width: 100%; max-width: 420px; min-height: 42px; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding-left: 12px; border: 1px solid var(--line); border-radius: 5px; background: white; }
.catalog-category-control > span { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.catalog-category-control select { width: 100%; min-width: 0; height: 42px; padding: 0 8px; border: 0; border-radius: 5px; color: var(--ink); background: white; font-size: 16px; cursor: pointer; }
.active-filter-bar { min-height: 40px; display: flex; align-items: center; gap: 8px; margin: -5px 0 18px; color: var(--orange); font-size: 12px; }
.active-filter-bar button { width: 25px; height: 25px; display: grid; place-items: center; padding: 0; border: 1px solid #d8d8d8; border-radius: 50%; background: white; cursor: pointer; }
.active-filter-bar svg { width: 13px; }

.product-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; }
.product-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid transparent; border-radius: 6px; background: white; transition: border-color .16s, box-shadow .16s, transform .16s; }
.product-card:hover { border-color: var(--orange); box-shadow: 0 8px 24px rgba(40,40,40,.09); transform: translateY(-2px); }
.product-image-button { position: relative; width: 100%; aspect-ratio: 1/1; display: block; overflow: hidden; padding: 0; border: 0; background: #fafafa; cursor: pointer; }
.product-image-button img { width: 100%; height: 100%; object-fit: contain; padding: 10px; mix-blend-mode: multiply; }
.product-card.out-of-stock .product-image-button::after { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(78,78,78,.16); pointer-events: none; }
.product-card.out-of-stock .product-image-button img { filter: grayscale(.25); opacity: .88; }
.product-card.wholesale-suspended .product-image-button img { filter: grayscale(.55); opacity: .68; }
.product-gallery-count { position: absolute; right: 8px; bottom: 8px; z-index: 2; height: 24px; display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border-radius: 3px; color: white; background: rgba(20,20,20,.72); font: 10px Arial,sans-serif; }
.product-gallery-count svg { width: 13px; height: 13px; }
.product-stock-badge { position: absolute; left: 8px; bottom: 8px; z-index: 2; min-width: 40px; height: 24px; display: grid; place-items: center; padding: 0 7px; border-radius: 3px; color: white; background: #c83c2f; font-size: 10px; font-weight: 800; }
.image-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #607381; background: #f5f5f5; }
.image-placeholder svg { width: 34px; height: 34px; }
.image-placeholder span { font-size: 10px; }
.product-detail-media .image-placeholder span { font-size: 14px; text-align: center; }
.detail-gallery-thumb .image-placeholder { gap: 0; }
.detail-gallery-thumb .image-placeholder svg { width: 20px; height: 20px; }
.detail-gallery-thumb .image-placeholder span { display: none; }
.product-tag { position: absolute; top: 9px; left: 9px; z-index: 2; max-width: calc(100% - 55px); padding: 4px 7px; overflow: hidden; border-radius: 3px; color: white; background: rgba(34,34,34,.86); text-overflow: ellipsis; white-space: nowrap; font-size: 9px; font-weight: 700; }
.product-tag.frozen { background: #176d9d; }
.favorite-toggle { position: absolute; top: 8px; right: 8px; z-index: 3; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid #ececec; border-radius: 50%; color: #555; background: rgba(255,255,255,.94); cursor: pointer; }
.favorite-toggle svg { width: 17px; }
.favorite-toggle:hover, .favorite-toggle.active { color: var(--red); border-color: #f2b8b5; }
.favorite-toggle.active svg { fill: currentColor; }
.product-info { padding: 12px 13px 14px; }
.product-name { height: 42px; display: -webkit-box; margin: 0; overflow: hidden; color: #333; font-size: 13px; font-weight: 600; line-height: 1.55; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-name button { padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.product-name button:hover { color: var(--orange); }
.product-code { display: block; min-height: 15px; max-height: 30px; margin-top: 5px; overflow: hidden; color: #999; white-space: normal; font: 10px/1.45 Arial,sans-serif; }
.product-price-row { min-height: 49px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 8px; }
.price-block { min-width: 0; color: var(--orange); }
.price-block span { font-size: 11px; font-weight: 700; }
.price-block strong { overflow-wrap: anywhere; font: 22px/1 Arial,sans-serif; }
.price-block small { display: block; margin-top: 4px; color: #999; font-size: 9px; font-weight: 400; }
.price-block.unavailable { color: var(--red); }
.price-block.unavailable strong { font-size: 17px; font-weight: 800; }
.add-cart-button:disabled, .detail-add:disabled { cursor: not-allowed; opacity: .4; }
.add-cart-button { flex: 0 0 36px; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: white; background: var(--orange); cursor: pointer; }
.add-cart-button:hover { background: var(--orange-dark); }
.add-cart-button svg { width: 18px; }
.add-cart-button.added, .detail-add.added { background: var(--green); animation: cart-confirm .6s ease; }
.product-status { min-height: 14px; display: flex; align-items: flex-start; gap: 5px; margin-top: 9px; color: var(--green); font-size: 9px; line-height: 1.45; }
.product-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.product-status strong { flex: 0 0 auto; }
.product-status span { color: #777; }
.product-status.out-of-stock { color: #c23b2e; }
.product-status.stock-review { color: #a45d18; }
.product-status.out-of-stock { display: grid; grid-template-columns: 5px minmax(0,1fr); column-gap: 5px; row-gap: 1px; }
.product-status.out-of-stock::before { align-self: center; }
.product-status.out-of-stock .stock-arrival-message { grid-column: 2; }
.stock-status-copy { display: inline-flex; flex-direction: column; vertical-align: top; min-width: 0; max-width: 100%; white-space: normal; line-height: 1.45; overflow-wrap: anywhere; }
.stock-status-copy.out-of-stock { color: var(--red); }
.stock-status-copy.stock-review { color: #a45d18; }
.stock-arrival-message { display: block; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.sales-confirmation-note { display: block; margin-top: 4px; color: #a45d18; font-size: 10px; font-weight: 700; }
.product-status.delayed span { color: #a52f25; }
.load-more-button { min-width: 200px; height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 28px auto 0; padding: 0 24px; border: 1px solid #d4d4d4; border-radius: 5px; color: #444; background: white; cursor: pointer; }
.load-more-button:hover { color: var(--orange); border-color: var(--orange); }
.load-more-button svg { width: 17px; }
.empty-state { min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state svg { width: 48px; height: 48px; color: #b0b0b0; }
.empty-state h3 { margin: 16px 0 4px; font-size: 18px; }
.empty-state p { margin: 0 0 18px; color: var(--muted); }
.empty-state button { height: 38px; padding: 0 17px; border: 1px solid var(--orange); border-radius: 4px; color: var(--orange); background: white; cursor: pointer; }

.site-footer { border-top: 4px solid var(--brand); color: #cbd8de; background: #17313e; }
.footer-inner { min-height: 132px; display: flex; align-items: center; gap: 40px; }
.footer-brand .brand-logo { width: 44px; height: 42px; flex-basis: 44px; padding: 2px; }
.footer-brand > div { display: flex; flex-direction: column; }
.footer-brand strong { color: white; font-size: 16px; }
.footer-brand span { font-size: 9px; }
.footer-inner p { margin: 0; }
.footer-inner > span { margin-left: auto; color: #8c8c8c; font-size: 11px; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.45); }
.cart-drawer { position: fixed; inset: 0; z-index: 80; width: 100%; height: 100vh; height: 100dvh; padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); display: grid; grid-template-rows: auto auto minmax(0,auto) minmax(0,1fr) auto; background: white; box-shadow: -12px 0 30px rgba(0,0,0,.16); transform: translateX(105%); transition: transform .25s; }
.cart-drawer > .draft-toolbar { grid-row: 2; }
/* A large-font input must not enlarge the full-screen grid's implicit column. */
.cart-drawer { grid-template-columns: minmax(0,1fr); }
.cart-drawer > * { min-width: 0; }
.cart-drawer > .cart-add-products { grid-row: 3; }
.cart-drawer > .cart-scroll { grid-row: 4; }
.cart-drawer.open { transform: translateX(0); }
.drawer-header { position: sticky; top: 0; z-index: 4; min-height: 82px; display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); background: white; }
.cart-drawer > .drawer-header { min-height: 64px; padding-block: 10px; }
.drawer-back-button { min-width: 88px; min-height: 40px; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 7px; padding: 0 10px; border: 1px solid #cbdce5; border-radius: 4px; color: var(--brand-dark); background: #f3f8fa; font-size: 12px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.drawer-back-button:hover { color: white; border-color: var(--brand); background: var(--brand); }
.drawer-back-button svg { width: 16px; height: 16px; }
.drawer-header > div { min-width: 0; }
.drawer-header span { color: var(--orange); font: 800 9px/1.2 Arial,sans-serif; }
.drawer-header h2 { margin: 2px 0 0; font-size: 21px; line-height: 1.35; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: white; cursor: pointer; }
.icon-button:hover { color: var(--orange); border-color: var(--orange); }
.icon-button svg { width: 18px; }
.cart-add-products { position: relative; z-index: 2; min-height: 0; padding: 12px 20px; border-bottom: 1px solid var(--line); background: #f6f9fa; }
.cart-add-search { height: 42px; display: flex; align-items: center; border: 1px solid #bfd2dc; border-radius: 5px; background: white; }
.cart-add-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20,121,184,.1); }
.cart-add-search > svg { flex: 0 0 17px; width: 17px; margin-left: 12px; color: var(--brand); }
.cart-add-search input { flex: 1; min-width: 0; height: 100%; padding: 0 9px; border: 0; outline: 0; background: transparent; font-size: 12px; }
.cart-add-search input::-webkit-search-cancel-button { display: none; }
.cart-add-search button { flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.cart-add-search button svg { width: 15px; }
.cart-add-results { max-height: min(240px,28vh); margin-top: 8px; overflow-y: auto; border: 1px solid #bfd2dc; border-radius: 5px; background: white; }
.cart-add-result { min-height: 66px; display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.cart-add-result:last-child { border-bottom: 0; }
.cart-add-result:hover { background: var(--brand-soft); }
.cart-add-result-image { width: 48px; height: 48px; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: #f7f7f7; }
.cart-add-result-image img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.cart-add-result-image .image-placeholder { height: 100%; }
.cart-add-result-image .image-placeholder svg { width: 18px; }
.cart-add-result-copy { min-width: 0; }
.cart-add-result-copy strong, .cart-add-result-copy small { display: block; overflow: hidden; text-overflow: ellipsis; }
.cart-add-result-copy strong { font-size: 11px; line-height: 1.4; }
.cart-add-result-copy small { margin-top: 3px; color: var(--muted); white-space: normal; font-size: 8px; line-height: 1.45; }
.ieat-code { display: inline; color: #174f86 !important; font-family: Arial,sans-serif; font-size: 1.12em; font-weight: 800; line-height: inherit; letter-spacing: 0; white-space: nowrap; }
.ieat-code > span { color: #91a0aa; font-size: .9em; font-weight: 600; }
.ieat-code-value { color: #174f86; font-size: 14px !important; font-weight: 800 !important; letter-spacing: 0; }
.order-line-code .ieat-code { display: block; margin-top: 3px; }
.ieat-non-sale-warning { display: flex; align-items: flex-start; gap: 4px; margin-top: 4px; color: #9a3d27; font-size: 9px; font-weight: 800; line-height: 1.35; white-space: normal; }
.ieat-non-sale-warning svg { width: 12px; height: 12px; flex: 0 0 12px; margin-top: 1px; }
.cart-add-result-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.cart-add-result-meta span { color: var(--brand); font: 800 10px/1.2 Arial,sans-serif; }
.cart-add-result-meta em { overflow: hidden; color: var(--green); text-overflow: ellipsis; white-space: nowrap; font-size: 8px; font-style: normal; font-weight: 700; line-height: 1.2; }
.cart-add-result-meta em.out-of-stock { color: var(--red); }
.cart-add-result-meta .stock-status-copy { max-width: 120px; font-size: 9px; line-height: 1.45; text-align: right; }
.cart-add-result-meta .stock-status-copy span { color: inherit; font: inherit; }
.search-suggestion-side .stock-status-copy { max-width: 120px; text-align: right; }
.cart-add-result button { position: relative; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid var(--brand); border-radius: 4px; color: white; background: var(--brand); cursor: pointer; }
.cart-add-result button:hover { background: var(--brand-dark); }
.cart-add-result button:disabled { border-color: #d7e0e4; color: #a4b0b6; background: #edf2f4; cursor: not-allowed; }
.cart-add-result button svg { width: 16px; }
.cart-add-result button b { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; border: 2px solid white; border-radius: 9px; color: white; background: var(--red); font-size: 8px; }
.cart-add-status { min-height: 72px; display: grid; place-items: center; padding: 14px; color: var(--muted); text-align: center; font-size: 11px; }
.cart-scroll { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; }
.cart-items { min-width: 0; flex: 0 0 auto; padding: 0 20px; }
.cart-scroll > .cart-discount-details { flex: 0 0 auto; margin: 12px 20px; }
.cart-item { min-width: 0; display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 9px 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-item-image { width: 64px; height: 64px; grid-row: 1 / 3; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: #f7f7f7; }
.cart-item-image img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.cart-item-info { min-width: 0; }
.cart-item-info strong { display: -webkit-box; overflow: hidden; font-size: 12px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cart-item-info > span:not(.ieat-non-sale-warning) { display: block; margin-top: 3px; color: #999; font-size: 9px; line-height: 1.35; }
.stock-shortage-detail { min-width: 0; display: grid; grid-template-columns: 15px minmax(0,1fr); gap: 6px; margin-top: 7px; padding: 7px 8px; border-left: 3px solid #c94b3e; color: #8f3027; background: #fff3f1; text-align: left; overflow-wrap: anywhere; }
.stock-shortage-detail.limited { border-left-color: #d17b1f; color: #884b0d; background: #fff7eb; }
.stock-shortage-detail.review { border-left-color: #b06a16; color: #78460d; background: #fff6e6; }
.stock-shortage-detail > svg { width: 14px; height: 14px; margin-top: 1px; }
.stock-shortage-detail > span { min-width: 0; display: block; margin: 0; color: inherit; }
.stock-shortage-detail strong, .stock-shortage-detail small { display: block; white-space: normal; overflow-wrap: anywhere; letter-spacing: 0; }
.stock-shortage-detail strong { font-size: 10px; line-height: 1.35; }
.stock-shortage-detail small { margin-top: 2px; color: #695d58; font-size: 9px; font-weight: 500; line-height: 1.45; }
.cart-unit-select { width: min(128px,100%); height: 27px; margin-top: 7px; padding: 0 25px 0 7px; border: 1px solid #cfdbe1; border-radius: 4px; color: var(--ink); background: white; font-size: 10px; }
.cart-unit-select.unit-static { display: inline-grid; place-items: center; width: auto; min-width: 42px; padding: 0 8px; color: var(--muted); background: #f6f9fa; }
.cart-item-price { margin-top: 8px; color: var(--orange); font: 800 13px/1.2 Arial,sans-serif; }
.cart-special-item { grid-template-columns: 44px minmax(0,1fr); background: #fbfcfc; }
.cart-special-icon { width: 44px; height: 44px; display: grid; place-items: center; grid-row: 1; border: 1px solid #d8e1dd; border-radius: 4px; color: var(--green-dark); background: #edf6f1; }
.cart-special-icon svg { width: 20px; height: 20px; }
.cart-special-item .cart-item-info > small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.cart-special-item .cart-item-price { margin-top: 7px; }
.cart-special-item[data-cart-special-item="RD001"] .cart-special-icon { color: #8a4c20; border-color: #ead4c2; background: #fff5ed; }
.line-amount { min-width: 0; display: inline-flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.line-amount strong { color: var(--orange); font: 800 13px/1.2 Arial,sans-serif; }
.line-amount del { color: var(--red); font: 700 9px/1.2 Arial,sans-serif; }
.line-amount em { color: var(--green-dark); font-size: 8px; font-style: normal; font-weight: 800; white-space: nowrap; }
.cart-line-controls { min-width: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.quantity-control { height: 32px; display: flex; align-items: center; justify-self: start; border: 1px solid #dcdcdc; border-radius: 4px; overflow: hidden; }
.quantity-control button { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; background: white; cursor: pointer; }
.quantity-control svg { width: 13px; }
.quantity-control input { width: 52px; height: 30px; padding: 0 3px; border: 0; border-inline: 1px solid #dcdcdc; outline: 0; text-align: center; font-size: 11px; font-weight: 800; }
.quantity-control input::-webkit-inner-spin-button { appearance: none; }
.quantity-input { touch-action: manipulation; }
.cart-unit-toggle, .quick-order-unit-toggle { flex: 0 0 auto; height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; padding: 0 8px; border: 1px solid #b8d4e2; border-radius: 4px; color: var(--brand); background: #eef8fc; font-size: 10px; font-weight: 900; cursor: default; touch-action: manipulation; user-select: none; }
.cart-unit-toggle { min-width: 56px; }
.cart-unit-toggle.switchable, .quick-order-unit-toggle.switchable { cursor: pointer; }
.cart-unit-toggle.stock-limited, .quick-order-unit-toggle.stock-limited { cursor: pointer; color: #9a3f35; border-color: #e5b8b2; background: #fff6f4; }
.cart-unit-toggle svg, .quick-order-unit-toggle svg { width: 12px; height: 12px; }
.cart-unit-toggle.unit-static, .quick-order-unit-toggle.unit-static { color: var(--muted); border-color: #d9e0e3; background: #f6f9fa; }
.cart-empty { flex: 1 0 auto; min-height: 160px; padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.cart-empty svg { width: 46px; height: 46px; margin-bottom: 13px; color: #bcbcbc; }
.cart-empty strong { color: var(--ink); }
.cart-empty span { margin-top: 4px; font-size: 11px; }
.cart-footer { padding: 14px 20px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: white; }
.cart-discount-progress { min-width: 0; display: flex; align-items: center; gap: 9px; margin-bottom: 10px; padding: 9px 11px; border-left: 3px solid #d26a2e; color: #833d1e; background: #fff3eb; }
.cart-discount-progress > svg { width: 17px; height: 17px; flex: 0 0 17px; }
.cart-discount-progress > div { min-width: 0; }
.cart-discount-progress strong, .cart-discount-progress span { display: block; }
.cart-discount-progress strong { font-size: 10px; }
.cart-discount-progress span { margin-top: 2px; font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; }
.cart-discount-details { margin-bottom: 12px; padding: 10px 12px; border-left: 3px solid var(--green); color: var(--green-dark); background: var(--green-soft); }
.cart-discount-progress.discount-attention, .cart-discount-details.discount-attention { animation: discount-attention 1.15s ease-out both; transform-origin: center; }
.cart-discount-progress.discount-attention > svg, .cart-discount-details.discount-attention .cart-discount-heading svg { animation: discount-attention-icon .8s ease-out both; }
.cart-discount-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cart-discount-heading > span { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 900; }
.cart-discount-heading svg { width: 15px; height: 15px; }
.cart-discount-heading > strong { flex: 0 0 auto; font-size: 10px; }
.cart-discount-details ul { display: grid; gap: 5px; padding: 8px 0 0; margin: 8px 0 0; border-top: 1px solid rgba(39,128,92,.2); list-style: none; }
.cart-discount-details li { min-width: 0; display: grid; grid-template-columns: 14px minmax(0,1fr) auto; align-items: start; gap: 6px; font-size: 9px; line-height: 1.4; }
.cart-discount-details li svg { width: 13px; height: 13px; margin-top: 1px; }
.cart-discount-details li span { min-width: 0; overflow-wrap: anywhere; }
.cart-discount-details li strong { padding-left: 6px; white-space: nowrap; font-size: 9px; }
.cart-total-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cart-total-row > span { min-width: 0; color: var(--muted); font-size: 11px; line-height: 1.35; }
.cart-total-row > div { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; margin-left: auto; }
.cart-total-row > div > span { color: var(--muted); font-size: 10px; line-height: 1.3; }
.cart-total-row > div > strong { color: var(--orange); white-space: nowrap; font: 22px/1.15 Arial,sans-serif; }
.cart-footer > button { width: 100%; min-height: 58px; display: grid; grid-template-columns: 20px minmax(0,1fr) 18px; align-items: center; gap: 10px; padding: 7px 15px; border: 0; border-radius: 5px; color: white; background: var(--orange); text-align: left; cursor: pointer; }
.cart-footer > button svg { width: 18px; height: 18px; }
.cart-footer > button > svg:last-child { width: 17px; height: 17px; justify-self: end; }
.cart-next-copy { min-width: 0; display: grid; gap: 1px; color: white; }
.cart-next-copy strong, .cart-next-copy small { display: block; color: inherit; letter-spacing: 0; }
.cart-next-copy strong { font-size: 13px; line-height: 1.3; }
.cart-next-copy small { font-size: 9px; font-weight: 700; line-height: 1.35; opacity: .92; }
.cart-footer > button:hover { background: var(--orange-dark); }
.cart-footer > button:disabled { color: #999; background: #e7e7e7; cursor: not-allowed; }

dialog { padding: 0; border: 0; border-radius: 7px; color: var(--ink); background: white; box-shadow: 0 22px 70px rgba(0,0,0,.28); }
dialog::backdrop { background: rgba(0,0,0,.55); }
.product-dialog { width: min(920px,calc(100% - 32px)); max-height: calc(100vh - 40px); overflow: auto; }
.dialog-close { position: absolute; top: 14px; right: 14px; z-index: 3; }
.catalog-order-dialog { width: min(430px,calc(100% - 24px)); max-height: calc(100vh - 32px); overflow-y: auto; }
.catalog-order-form { padding: 28px; }
.catalog-order-form > header { padding-right: 42px; }
.catalog-order-form h2 { margin: 4px 0 0; font-size: 22px; }
.catalog-order-product { min-width: 0; display: grid; grid-template-columns: 64px minmax(0,1fr); align-items: center; gap: 12px; margin: 22px 0; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.catalog-order-image { width: 64px; height: 64px; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: #f7f7f7; }
.catalog-order-image img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.catalog-order-image .image-placeholder { height: 100%; }
.catalog-order-product > div:last-child { min-width: 0; }
.catalog-order-product strong { display: -webkit-box; overflow: hidden; font-size: 13px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.catalog-order-product span { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.catalog-order-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.catalog-order-fieldset legend, .catalog-order-quantity-row > label { margin-bottom: 8px; color: var(--muted); font-size: 10px; font-weight: 800; }
.catalog-order-units { min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 3px; padding: 3px; border: 1px solid #c9dbe4; border-radius: 5px; background: #f3f8fa; }
.catalog-order-units button { min-width: 0; height: 38px; padding: 0 10px; overflow: hidden; border: 0; border-radius: 3px; color: #55707d; background: transparent; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 800; cursor: pointer; }
.catalog-order-units button.active { color: white; background: var(--brand); }
.catalog-order-units button.stock-limited, .detail-unit-picker button.stock-limited { color: #9a3f35; background: #fff1ee; }
.catalog-order-units button:only-child { grid-column: 1 / -1; cursor: default; }
.catalog-order-quantity-row { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-top: 18px; }
.catalog-order-quantity-row > label { margin-bottom: 0; }
.catalog-order-quantity { width: 154px; height: 40px; display: grid; grid-template-columns: 40px 72px 40px; border: 1px solid #cfdbe1; border-radius: 4px; overflow: hidden; }
.catalog-order-quantity button { display: grid; place-items: center; padding: 0; border: 0; background: #f4f8fa; cursor: pointer; }
.catalog-order-quantity button svg { width: 15px; }
.catalog-order-quantity input { min-width: 0; width: 72px; padding: 0 4px; border: 0; border-inline: 1px solid #cfdbe1; outline: 0; text-align: center; font-size: 13px; font-weight: 900; }
.catalog-order-quantity input::-webkit-inner-spin-button { appearance: none; }
.catalog-order-total { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 20px -28px 0; padding: 16px 28px; border-block: 1px solid var(--line); background: #f6f9fa; }
.catalog-order-total span { color: var(--muted); font-size: 10px; }
.catalog-order-total strong { color: var(--orange); font: 800 21px Arial,sans-serif; }
.catalog-order-submit { width: 100%; height: 46px; display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 18px; border: 0; border-radius: 5px; color: white; background: var(--orange); font-weight: 900; cursor: pointer; }
.catalog-order-submit:hover { background: var(--orange-dark); }
.catalog-order-submit svg { width: 17px; }
.product-detail { display: grid; grid-template-columns: 46% 54%; min-height: 520px; }
.product-detail-media { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 24px; background: #f7f7f7; }
.product-detail-media > .image-placeholder { min-height: 430px; }
.detail-gallery-stage { position: relative; width: 100%; aspect-ratio: 1; max-height: 390px; overflow: hidden; background: white; touch-action: pan-y; }
.detail-gallery-image { position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0; min-height: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; }
.detail-gallery-image > img { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; padding: 12px; mix-blend-mode: multiply; }
.detail-gallery-image > .image-placeholder { width: 100%; height: 100%; }
.detail-gallery-nav { position: absolute; top: 50%; width: 36px; height: 42px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(0,0,0,.08); border-radius: 4px; color: #444; background: rgba(255,255,255,.9); box-shadow: 0 2px 8px rgba(0,0,0,.08); transform: translateY(-50%); cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  .detail-gallery-nav:hover { color: #333; background: #f3f3f3; }
}
.detail-gallery-nav:active { background: #e8e8e8; }
.detail-gallery-nav.previous { left: 8px; }
.detail-gallery-nav.next { right: 8px; }
.detail-gallery-nav svg { width: 19px; height: 19px; }
.detail-gallery-count { position: absolute; right: 10px; bottom: 10px; min-width: 42px; height: 24px; display: grid; place-items: center; padding: 0 7px; border-radius: 3px; color: white; background: rgba(0,0,0,.65); font: 10px Arial,sans-serif; }
.detail-gallery-thumbnails { width: 100%; display: flex; gap: 8px; margin-top: 12px; padding-bottom: 3px; overflow-x: auto; scrollbar-width: thin; }
.detail-gallery-thumb { width: 58px; height: 58px; flex: 0 0 58px; overflow: hidden; padding: 3px; border: 1px solid #d8d8d8; border-radius: 3px; background: white; cursor: pointer; }
.detail-gallery-thumb:hover, .detail-gallery-thumb.active { border: 2px solid var(--orange); padding: 2px; }
.detail-gallery-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.detail-gallery-original { display: inline-block; margin-top: 10px; padding: 8px 0; color: #526574; font-size: 13px; text-underline-offset: 3px; }
.product-image-notice { margin: 10px 0 0; color: #526574; font-size: 12px; line-height: 1.6; }
img[data-product-image][data-original-src] { mix-blend-mode: normal; }
.product-detail-info { min-width: 0; padding: 48px 45px 38px; }
.detail-category { display: inline-block; margin-bottom: 12px; padding: 4px 8px; border-radius: 3px; color: var(--orange); background: var(--orange-soft); font-size: 10px; font-weight: 700; }
.product-detail-info h2 { margin: 0 0 8px; overflow-wrap: anywhere; font-size: 23px; line-height: 1.5; }
.detail-code { color: var(--muted); font: 11px Arial,sans-serif; }
.detail-price { margin: 24px 0; padding: 18px; border-left: 4px solid var(--orange); color: var(--orange); background: #f7f7f7; }
.detail-price span { font-size: 13px; font-weight: 700; }
.detail-price strong { font: 34px Arial,sans-serif; }
.detail-price small { margin-left: 8px; color: var(--muted); }
.detail-unit-picker { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 12px; margin: -10px 0 20px; }
.detail-unit-picker > span { color: var(--muted); font-size: 10px; font-weight: 700; }
.detail-unit-picker > div { display: inline-grid; grid-template-columns: repeat(2,minmax(0,1fr)); max-width: 240px; padding: 3px; border: 1px solid #c9dbe4; border-radius: 5px; background: #f3f8fa; }
.detail-unit-picker button { min-width: 0; height: 32px; padding: 0 12px; overflow: hidden; border: 0; border-radius: 3px; color: #55707d; background: transparent; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 800; cursor: pointer; }
.detail-unit-picker button.active { color: white; background: var(--brand); }
.detail-stock-notice { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 10px; margin-top: 18px; padding: 11px 13px; border-left: 4px solid #d04a37; color: #9b3026; background: #fff0ed; }
.detail-stock-notice.scheduled { border-color: #d06b16; color: #9b530f; background: #fff3e7; }
.detail-stock-notice.stock-review { border-color: #c27a18; color: #95500d; background: #fff6e7; }
.detail-stock-notice svg { width: 20px; height: 20px; justify-self: center; }
.detail-stock-notice strong, .detail-stock-notice span { display: block; }
.detail-stock-notice strong { font-size: 12px; }
.detail-stock-notice span { margin-top: 3px; color: #6e625d; font-size: 10px; }
.detail-shortage { color: #c23b2e; }
.stock-review { color: #a45d18; }
.detail-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; border-top: 1px solid var(--line); }
.detail-list div { min-width: 0; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); font-size: 10px; }
.detail-list dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 700; }
.detail-actions { display: grid; grid-template-columns: 50px 1fr; gap: 10px; margin-top: 24px; }
.detail-actions .favorite-toggle { position: static; width: 50px; height: 46px; border-radius: 5px; }
.detail-add { height: 46px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 5px; color: white; background: var(--orange); font-weight: 800; cursor: pointer; }
.detail-add svg { width: 19px; }
.detail-recommendations { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.detail-recommendations > span { color: var(--brand); font-size: 9px; font-weight: 900; }
.detail-recommendations h3 { margin: 4px 0 12px; font-size: 15px; }
.detail-recommendation-list { display: grid; gap: 5px; }
.detail-recommendation-list > button { width: 100%; min-width: 0; min-height: 54px; display: grid; grid-template-columns: 44px minmax(0,1fr) 16px; align-items: center; gap: 9px; padding: 5px 7px; border: 1px solid transparent; border-radius: 4px; color: var(--ink); background: #f6f9fa; text-align: left; cursor: pointer; }
.detail-recommendation-list > button:hover { border-color: #c7dce7; background: var(--brand-soft); }
.detail-recommendation-image { width: 44px; height: 44px; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; overflow: hidden; background: white; }
.detail-recommendation-image img { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; mix-blend-mode: multiply; }
.detail-recommendation-list button > span:nth-child(2) { min-width: 0; }
.detail-recommendation-list strong, .detail-recommendation-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-recommendation-list strong { font-size: 10px; }
.detail-recommendation-list small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.detail-recommendation-list svg { width: 15px; color: var(--brand); }

.order-dialog { width: min(860px,calc(100% - 32px)); max-height: calc(100vh - 40px); overflow: auto; }
.order-dialog-nav { position: sticky; top: 0; z-index: 5; min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.order-dialog-nav > [data-order-close] { margin-left: auto; }
.order-dialog-content { padding: 24px 42px 42px; }
.order-dialog h2 { margin: 4px 0 3px; font-size: 25px; }
.order-dialog-content > p { margin: 0 0 22px; color: var(--muted); font-size: 11px; }
.order-table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.order-table-wrap table { width: 100%; min-width: 620px; border-collapse: collapse; text-align: left; font-size: 11px; }
.order-table-wrap th, .order-table-wrap td { padding: 11px 12px; border-bottom: 1px solid var(--line); }
.order-table-wrap th { color: #555; background: #f4f4f4; }
.order-table-wrap tbody tr:last-child td { border-bottom: 0; }
.order-table-wrap td:nth-last-child(-n+3), .order-table-wrap th:nth-last-child(-n+3) { text-align: right; }
.order-mobile-values { display: none; }
.order-standard-price { white-space: nowrap; }
.order-discount-price { display: inline-grid; grid-template-columns: auto auto; align-items: baseline; justify-content: end; gap: 3px 7px; white-space: nowrap; }
.order-discount-price del { grid-column: 1 / -1; color: var(--muted); font-size: 9px; }
.order-discount-price strong { color: var(--green-dark); font-size: 12px; }
.order-discount-price small { color: var(--green); font-size: 8px; font-weight: 800; }
.order-full-discount { margin-top: 20px; padding: 11px 13px; border-left: 3px solid var(--green); color: var(--green-dark); background: var(--green-soft); }
.order-full-discount-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 11px; font-weight: 800; }
.order-full-discount-heading strong { color: var(--green-dark); white-space: nowrap; font: 800 15px Arial,sans-serif; }
.order-full-discount ul { display: grid; gap: 5px; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid rgba(39,128,92,.2); list-style: none; }
.order-full-discount li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 10px; line-height: 1.4; }
.order-full-discount li span { min-width: 0; overflow-wrap: anywhere; }
.order-full-discount li strong { flex: 0 0 auto; white-space: nowrap; font-size: 10px; }
.order-total { display: flex; align-items: baseline; justify-content: flex-end; gap: 16px; margin-top: 20px; }
.order-total span { color: var(--muted); }
.order-total strong { color: var(--orange); font: 28px Arial,sans-serif; }
.order-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.primary-button, .secondary-button { height: 42px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border-radius: 4px; font-weight: 700; cursor: pointer; }
.primary-button { border: 1px solid var(--orange); color: white; background: var(--orange); }
.secondary-button { border: 1px solid #d3d3d3; background: white; }
.primary-button svg, .secondary-button svg { width: 17px; }
.checkout-form { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.checkout-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.checkout-heading span { font-size: 14px; font-weight: 800; }
.checkout-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.delivery-address-fieldset { min-width: 0; margin: 0 0 14px; padding: 0; border: 0; }
.delivery-address-fieldset legend { margin-bottom: 7px; padding: 0; font-size: 10px; font-weight: 700; }
.delivery-address-search { height: 40px; display: flex; align-items: center; margin-bottom: 8px; border: 1px solid #cbd8de; border-radius: 3px; background: white; }
.delivery-address-search[hidden] { display: none; }
.delivery-address-search svg { width: 16px; margin-left: 11px; color: var(--brand); }
.delivery-address-search input { flex: 1; min-width: 0; height: 100%; padding: 0 10px; border: 0; outline: 0; background: transparent; }
.delivery-address-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20,121,184,.1); }
.delivery-address-list { display: grid; gap: 8px; }
.delivery-address-list.scrollable { max-height: min(420px,45vh); overflow-y: auto; padding-right: 4px; }
.delivery-address-option { min-width: 0; display: grid; grid-template-columns: 20px minmax(0,1fr); align-items: start; gap: 10px; padding: 11px 12px; border: 1px solid #cbd8de; border-radius: 4px; background: white; cursor: pointer; }
.delivery-address-option:hover { border-color: var(--brand); background: #f7fbfd; }
.delivery-address-option:has(input:checked) { border-color: var(--brand); background: #eef7fb; box-shadow: 0 0 0 2px rgba(20,121,184,.08); }
.delivery-address-option input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); }
.delivery-address-option-copy { min-width: 0; display: grid; gap: 4px; }
.delivery-address-option strong { color: var(--brand-dark); font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.delivery-address-option small { color: #4e5d65; font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.delivery-address-custom-option { border-style: dashed; }
.delivery-address-empty { margin: 0; padding: 11px 12px; border-left: 3px solid var(--orange); color: #6d4b18; background: #fff8eb; font-size: 11px; line-height: 1.5; }
.custom-delivery-address-field { display: grid; gap: 6px; margin-top: 10px; }
.custom-delivery-address-field[hidden] { display: none; }
.custom-delivery-address-field > span { font-size: 10px; font-weight: 700; }
.custom-delivery-address-field textarea { width: 100%; min-height: 82px; padding: 10px; border: 1px solid #cbd8de; border-radius: 3px; outline: 0; resize: vertical; background: white; }
.custom-delivery-address-field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20,121,184,.1); }
.custom-delivery-address-field small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.checkout-fields { display: grid; grid-template-columns: 1.2fr .8fr .8fr .8fr; gap: 12px; }
.checkout-fields label { display: grid; gap: 6px; }
.checkout-fields label > span { font-size: 10px; font-weight: 700; }
.checkout-fields input, .checkout-fields textarea { width: 100%; border: 1px solid #d2d2d2; border-radius: 3px; background: white; padding: 9px 10px; outline: 0; resize: vertical; }
.checkout-fields input { height: 39px; }
.checkout-fields input:focus, .checkout-fields textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20,121,184,.1); }
.checkout-remarks { grid-column: 1 / -1; }
.checkout-delivery-fields { grid-template-columns: minmax(220px,.7fr) minmax(0,1.3fr); }
.checkout-delivery-fields .checkout-remarks { grid-column: auto; }
.order-success { margin-top: 22px; padding: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; color: #145f3b; background: #eaf7ef; border: 1px solid #bee2cd; }
.order-success > svg { width: 32px; flex: 0 0 32px; }
.order-success span, .order-success strong, .order-success p { display: block; }
.order-success span { font-size: 11px; }
.order-success strong { margin-top: 4px; font-size: 18px; }
.order-success p { margin: 4px 0 0; color: #46705a; font-size: 10px; }
.sales-order-followup { width: 100%; display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid #bee2cd; }
.sales-order-followup > strong { margin: 0; color: #173c50; font-size: 16px; }
.sales-order-followup > div { display: flex; flex-wrap: wrap; gap: 10px; }
.sales-order-followup button { min-height: 44px; flex: 1 1 180px; }
.customer-profile-dialog { width: min(560px,calc(100% - 32px)); max-height: calc(100vh - 40px); overflow-y: auto; }
.customer-profile-shell { padding: 36px; }
.customer-profile-shell > header { padding-right: 38px; }
.customer-profile-shell > header > span { color: var(--brand); font-size: 9px; font-weight: 900; }
.customer-profile-shell h2 { margin: 4px 0 3px; font-size: 24px; }
.customer-profile-shell header p { margin: 0; color: var(--muted); font-size: 11px; }
.customer-profile-identity { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 20px; margin: 22px -36px 0; padding: 15px 36px; border-block: 1px solid var(--line); background: #f5f9fb; }
.customer-profile-identity > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.customer-profile-identity > div:last-child { text-align: right; }
.customer-profile-identity span { color: var(--muted); font-size: 9px; }
.customer-profile-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.customer-profile-dialog form { margin-top: 20px; }
.customer-profile-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.customer-profile-fields label { min-width: 0; display: grid; gap: 6px; }
.customer-profile-fields label:nth-child(n+3) { grid-column: 1 / -1; }
.customer-profile-fields label > span { font-size: 10px; font-weight: 700; }
.customer-profile-fields input { width: 100%; height: 41px; min-width: 0; padding: 0 10px; border: 1px solid #cbd8de; border-radius: 3px; outline: 0; }
.customer-profile-fields input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20,121,184,.1); }
.customer-profile-hint { margin: 8px 0 0; color: var(--muted); font-size: 9px; }
.customer-profile-error { margin: 10px 0 0; color: var(--red); font-size: 11px; }
.customer-profile-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.customer-profile-actions button { min-width: 0; min-height: 42px; height: auto; padding: 9px 12px; }
.customer-profile-actions button svg { flex-shrink: 0; }
.customer-profile-actions .primary-button { border-color: var(--brand); background: var(--brand); }
.customer-profile-actions button:disabled { opacity: .55; cursor: wait; }
.active-orders-dialog { position: fixed; inset: 0; width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); overflow: hidden; border-radius: 0; }
.active-orders-dialog > .dialog-close { top: calc(14px + env(safe-area-inset-top)); right: calc(14px + env(safe-area-inset-right)); }
/* Fullscreen quick ordering keeps its fixed tools and product scroller. */
.quick-order-dialog { position: fixed; inset: 0; width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); overflow: hidden; border-radius: 0; }
.quick-order-dialog > .dialog-close { top: calc(14px + env(safe-area-inset-top)); right: calc(14px + env(safe-area-inset-right)); }
.quick-order-shell { height: 100%; display: grid; grid-template-areas: "heading" "tools" "list" "footer"; grid-template-rows: auto auto minmax(0,1fr) auto; padding: 34px 34px 0; }
.quick-order-shell { grid-template-columns: minmax(0,1fr); }
/* Fixed controls above and below a shared draft/product scroll area. Search
   results occupy only the middle layer, never covering filters or next step. */
.quick-order-tools { grid-area: tools; min-width: 0; background: white; }
.quick-order-scroll > .draft-toolbar { margin-block: 8px; padding: 8px; }
.quick-order-heading { grid-area: heading; display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-right: 38px; }
.quick-order-heading > div { min-width: 0; }
.quick-order-heading span, .active-orders-shell > header > span { color: var(--brand); font-size: 9px; font-weight: 900; }
.quick-order-heading h2, .active-orders-shell h2 { margin: 3px 0 0; font-size: 24px; }
.quick-order-heading > strong { color: var(--brand); font-size: 14px; }
.quick-order-search-wrap { position: relative; z-index: 8; min-width: 0; grid-area: search; }
.quick-order-search { height: 42px; display: flex; align-items: center; margin: 18px 0 12px; border: 1px solid #c8d9e2; border-radius: 4px; background: white; }
.quick-order-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20,121,184,.1); }
.quick-order-search > svg { width: 17px; margin-left: 12px; color: var(--brand); }
.quick-order-search input { flex: 1; min-width: 0; height: 100%; padding: 0 10px; border: 0; outline: 0; background: transparent; }
.quick-order-search button { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.quick-order-search button svg { width: 16px; }
.quick-order-search-results { position: relative; grid-area: list; z-index: 10; min-width: 0; min-height: 0; max-height: 100%; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #bfd2dc; border-radius: 4px; background: white; box-shadow: 0 12px 28px rgba(20,58,78,.18); }
.quick-order-search-results .quick-order-list-heading { z-index: 3; }
.quick-order-search-results .quick-order-row { background: white; }
.quick-order-search-results .quick-order-row:hover { background: #f4fbfe; }
.quick-order-search-result { position: relative; min-height: 90px; }
.quick-order-search-result.drafting { background: #f4fbfe; box-shadow: inset 3px 0 var(--brand); }
.quick-order-search-result .quick-order-search-controls { padding-top: 30px; }
.quick-order-search-add { position: absolute; top: 7px; right: 8px; height: 27px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 10px; border: 0; border-radius: 4px; color: white; background: var(--brand); font-size: 10px; font-weight: 900; cursor: pointer; }
.quick-order-search-add:hover { background: var(--brand-dark); }
.quick-order-search-add:disabled { color: #89969c; background: #e8edef; cursor: not-allowed; }
.quick-order-search-add svg { width: 13px; height: 13px; }
.quick-order-search-status { min-height: 58px; display: grid; place-items: center; padding: 12px; color: var(--muted); font-size: 10px; }
.quick-order-tip { min-height: 34px; display: flex; align-items: center; gap: 7px; margin-bottom: 8px; padding: 7px 10px; border-left: 3px solid var(--brand); color: #315769; background: var(--brand-soft); font-size: 10px; line-height: 1.4; }
.quick-order-tip svg { width: 15px; height: 15px; flex: 0 0 15px; color: var(--brand); }
.quick-order-tabs { grid-area: tabs; width: 100%; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 3px; margin-bottom: 8px; padding: 3px; border: 1px solid #c9dbe4; border-radius: 5px; background: #f3f8fa; }
.quick-order-tabs button { min-width: 0; height: 34px; padding: 0 10px; border: 0; border-radius: 3px; color: #55707d; background: transparent; font-size: 11px; font-weight: 800; cursor: pointer; }
.quick-order-tabs button.active { color: white; background: var(--brand); }
.quick-order-scroll { min-width: 0; min-height: 0; grid-area: list; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; scrollbar-gutter: stable; -webkit-overflow-scrolling: touch; }
.quick-order-list { min-width: 0; border-top: 1px solid var(--line); }
.quick-order-list-heading { position: sticky; top: 0; z-index: 2; min-height: 30px; display: grid; grid-template-columns: minmax(0,1fr) 112px 190px; align-items: center; gap: 10px; padding: 0 8px; border-bottom: 1px solid var(--line); color: var(--muted); background: #f6f9fa; font-size: 9px; font-weight: 800; }
.quick-order-list-heading span:nth-child(n+2) { text-align: right; }
.quick-order-row { min-width: 0; min-height: 96px; display: grid; grid-template-columns: minmax(0,1fr) 112px 190px; align-items: center; gap: 10px; padding: 8px; border-bottom: 1px solid var(--line); transition: background-color .15s, box-shadow .15s; }
.quick-order-row.selected { background: #eef8fc; box-shadow: inset 3px 0 var(--brand); }
.quick-order-row.unavailable { background: #fffafa; }
.quick-order-name { min-width: 0; display: grid; grid-template-columns: 64px minmax(0,1fr); align-items: center; gap: 12px; padding: 5px 0; border: 0; background: transparent; text-align: left; cursor: pointer; touch-action: manipulation; }
.quick-order-thumbnail { width: 64px; height: 64px; display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: #f7f7f7; }
.quick-order-thumbnail > img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.quick-order-thumbnail .image-placeholder { gap: 0; }
.quick-order-thumbnail .image-placeholder svg { width: 24px; height: 24px; }
.quick-order-thumbnail .image-placeholder span { display: block; font-size: 10px; line-height: 1.2; text-align: center; }
.quick-order-copy { min-width: 0; }
.quick-order-copy strong { display: -webkit-box; overflow: hidden; white-space: normal; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.quick-order-copy small { display: block; overflow: hidden; white-space: normal; }
.quick-order-name strong { font-size: 13px; }
.quick-order-name small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.quick-order-name small span { color: var(--green); font-weight: 700; }
.quick-order-name small span.out-of-stock { color: var(--red); }
.quick-order-name small .quick-order-discount-excluded { margin-left: 6px; color: #9a3d27; }
.quick-order-unit { width: 108px; height: 32px; min-width: 0; padding: 0 25px 0 8px; border: 1px solid #cfdbe1; border-radius: 4px; color: var(--ink); background: white; font-size: 10px; font-weight: 700; }
.quick-order-unit.unit-static { display: grid; place-items: center; padding: 0 8px; color: var(--muted); background: #f6f9fa; }
.quick-order-price { min-width: 0; display: flex; flex-direction: column; align-items: flex-end; color: var(--brand); text-align: right; }
.quick-order-price small { max-width: 100%; overflow: hidden; color: var(--muted); font-size: 8px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.quick-order-price strong { margin-top: 3px; font: 800 12px Arial,sans-serif; }
.quick-order-line-total { min-width: 0; margin-top: 3px; }
.quick-order-line-total .line-amount { justify-content: flex-end; }
.quick-order-line-total .line-amount strong { color: var(--brand); font-size: 12px; }
.quick-order-controls { width: 190px; display: flex; align-items: flex-end; justify-content: flex-end; gap: 8px; }
.quick-order-quantity-wrap { position: relative; width: 120px; flex: 0 0 120px; padding-top: 21px; }
.quick-order-case-offer { position: absolute; top: 0; right: 0; left: 0; height: 18px; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #8a3f20; font-size: 10px; font-weight: 900; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.quick-order-case-offer.applied { color: var(--green-dark); }
.quick-order-quantity { height: 34px; display: grid; grid-template-columns: 34px 52px 34px; border: 1px solid #cfdbe1; border-radius: 4px; overflow: hidden; }
.quick-order-quantity button { display: grid; place-items: center; padding: 0; border: 0; background: #f4f8fa; cursor: pointer; }
.quick-order-quantity button:disabled { color: #a9b3b8; cursor: not-allowed; }
.quick-order-quantity button svg { width: 14px; }
.quick-order-quantity input { min-width: 0; width: 52px; border: 0; border-inline: 1px solid #cfdbe1; outline: 0; text-align: center; font-weight: 800; }
.quick-order-quantity input::-webkit-inner-spin-button { appearance: none; }
.quick-order-unit-toggle { width: 60px; height: 34px; }
.quick-order-empty { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); }
.quick-order-empty svg { width: 34px; }
.quick-order-footer { grid-area: footer; min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-inline: -34px; padding: 14px 34px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #f6f9fa; }
.quick-order-footer > div { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.quick-order-footer span { color: var(--muted); font-size: 9px; }
.quick-order-footer em { margin-top: 2px; color: var(--green); font-size: 10px; font-style: normal; line-height: 1.35; overflow-wrap: anywhere; }
.quick-order-footer strong { margin-top: 2px; color: var(--brand); font-size: 19px; }
.quick-order-heading small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.quick-order-policy { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; padding: 8px 10px; border-left: 3px solid var(--green); color: var(--green-dark); background: var(--green-soft); font-size: 10px; line-height: 1.4; }
.quick-order-policy svg { width: 15px; height: 15px; flex: 0 0 15px; }
.quick-order-policy[data-state="progress"] { border-left-color: var(--orange); color: #8a3f20; background: #fff3eb; }
.order-discount-summary { margin: 0 0 16px; padding: 10px 12px; border-left: 3px solid var(--green); color: var(--green-dark); background: var(--green-soft); font-size: 11px; line-height: 1.45; }
.quick-order-footer button { height: 42px; display: inline-flex; align-items: center; gap: 7px; padding: 0 16px; border: 0; border-radius: 4px; color: white; background: var(--brand); font-weight: 800; cursor: pointer; }
.quick-order-footer button { flex: 0 0 auto; }
.quick-order-footer button svg { width: 17px; }
.active-orders-shell { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 34px 34px calc(34px + env(safe-area-inset-bottom)); }
.active-orders-shell > header { padding-right: 38px; margin-bottom: 20px; }
.active-order-tabs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; margin: 0 0 8px; padding: 4px; border: 1px solid var(--line); border-radius: 5px; background: #f3f7f9; }
.order-list-pagination { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-block: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 4px; background: #f3f7f9; }
.order-list-pagination span { min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
.order-list-pagination button, [data-invoice-retry] { min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; color: var(--brand-dark); background: white; cursor: pointer; }
.order-list-pagination button:disabled { opacity: .45; cursor: default; }
.draft-toolbar { flex-shrink: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #f3f8fb; }
.draft-toolbar label { display: flex; align-items: center; gap: 10px; color: var(--brand-dark); font-size: 12px; font-weight: 700; }
.draft-toolbar input { flex: 1; min-width: 0; width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 4px; background: white; font-size: 16px; }
.draft-toolbar p { margin: 6px 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.draft-toolbar .draft-error { color: #a12626; }
.collaboration-status { display: flex; gap: 6px 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 12px; color: #174f86; }
.collaboration-tools { margin-block: 4px; min-width: 0; }
.collaboration-tools > summary { cursor: pointer; color: #174f86; font-size: 12px; line-height: 24px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.collaboration-tools[open] > summary { white-space: normal; }
@media (max-height: 420px) {
  .quick-order-scroll > .draft-toolbar > [data-draft-status] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
.collaboration-status span { min-width: 0; overflow-wrap: anywhere; }
.collaboration-status button { flex-shrink: 0; border: 1px solid var(--line); border-radius: 4px; background: white; padding: 6px 8px; color: #174f86; }
.collaboration-actions:has(button:not([hidden])), [data-lease-requests]:not(:empty) { margin-block: 6px; }
[data-lease-requests] { color: #8a480c; font-size: 12px; }
.collaboration-dialog { width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 24px); box-sizing: border-box; padding: 18px; border: 1px solid var(--line); border-radius: 10px; overflow: auto; overscroll-behavior: contain; overflow-wrap: anywhere; }
.collaboration-dialog::backdrop { background: rgba(10,30,45,.48); }
.collaboration-dialog h2 { font-size: 20px; margin: 12px 0; }
.collaboration-dialog p { font-size: 13px; line-height: 1.5; }
.collaboration-dialog label { display: grid; gap: 6px; margin-block: 14px; font-size: 14px; }
.collaboration-dialog input, .collaboration-dialog select { min-width: 0; width: 100%; box-sizing: border-box; padding: 10px; font-size: 16px; border: 1px solid var(--line); border-radius: 5px; }
.collaboration-dialog button { padding: 9px 12px; border: 1px solid var(--line); border-radius: 5px; background: #f3f8fb; color: #174f86; }
.collaboration-dialog [data-operator-error] { color: #a12626; }
.draft-audit-entry { padding-block: 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.draft-audit-entry p { margin: 4px 0; }
.draft-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.draft-actions button { min-height: 36px; padding: 6px 12px; border: 1px solid #b8d3e4; border-radius: 4px; background: white; color: var(--brand-dark); font: inherit; font-size: 12px; cursor: pointer; }
.draft-actions button:hover { background: #e1f1fb; }
.draft-actions [data-draft-delete-current] { color: #a12626; border-color: #dfbcbc; }
.draft-actions [data-draft-delete-current]:hover { background: #fff1f1; }
.draft-actions [data-draft-delete-current]:disabled { opacity: .45; cursor: not-allowed; }
/* Keep cart text sizes while giving the product list more vertical space. */
.cart-drawer > .draft-toolbar { padding: 6px 14px; line-height: 1.3; }
.cart-drawer > .draft-toolbar label { gap: 8px; }
.cart-drawer > .draft-toolbar input { padding: 4px 9px; line-height: 1.3; }
.cart-drawer > .draft-toolbar p { margin-block: 3px; }
.cart-drawer > .draft-toolbar .collaboration-tools { margin-block: 2px; }
.cart-drawer > .draft-toolbar .collaboration-tools > summary { line-height: 20px; }
.cart-drawer > .draft-toolbar .draft-actions { gap: 4px 7px; }
.cart-drawer > .draft-toolbar .draft-actions button { min-height: 30px; padding-block: 4px; }
.draft-delete-dialog { width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 28px; border-radius: 16px; overflow: auto; overscroll-behavior: contain; }
.draft-delete-dialog::backdrop { background: rgba(15, 30, 42, .5); }
.draft-delete-dialog form { margin: 0; }
.draft-delete-close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 8px; color: #657482; background: transparent; font: inherit; font-size: 26px; cursor: pointer; }
.draft-delete-close:hover { background: #f1f5f8; }
.draft-delete-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 18px; border-radius: 14px; background: #fff0ef; color: #ba3333; }
.draft-delete-dialog h2 { margin: 0 0 8px; font-size: 22px; line-height: 1.4; }
.draft-delete-intro { margin: 0; color: #657482; font-size: 14px; }
.draft-delete-summary { display: grid; gap: 6px; margin: 20px 0 16px; padding: 14px 16px; border: 1px solid #e3e9ee; border-radius: 10px; background: #f7f9fb; overflow-wrap: anywhere; }
.draft-delete-summary strong { font-size: 16px; line-height: 1.5; }
.draft-delete-summary span { color: #657482; font-size: 13px; }
#draft-delete-warning { margin: 0; color: #8d4b46; font-size: 13px; line-height: 1.7; }
.draft-delete-actions { display: flex; gap: 12px; margin-top: 24px; }
.draft-delete-actions button { flex: 1; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid #cbd5df; border-radius: 8px; background: white; color: #354656; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.draft-delete-actions button:hover { background: #f1f5f8; }
.draft-delete-actions .draft-delete-confirm { border-color: #b72f2f; background: #b72f2f; color: white; }
.draft-delete-actions .draft-delete-confirm:hover { border-color: #9f2424; background: #9f2424; }
.draft-delete-dialog button:focus-visible { outline: 3px solid #3176a5; outline-offset: 3px; }
@media (max-width: 480px) { .draft-delete-dialog { padding: 24px; } }
.draft-list-toolbar { margin-bottom: 12px; }
.draft-order-card p, .draft-item-summary { margin: 10px 14px; font-size: 12px; overflow-wrap: anywhere; }
.draft-order-card footer { flex-wrap: wrap; gap: 8px; }
.draft-cart-issue { display: flex; align-items: center; gap: 8px; margin: 8px 0; padding: 10px; background: #fff3eb; color: #8a3f20; font-size: 12px; overflow-wrap: anywhere; }
.draft-cart-issue button { flex-shrink: 0; padding: 8px; border: 1px solid #d8b29b; background: white; color: inherit; border-radius: 4px; cursor: pointer; }
.draft-connection-error { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 16px; background: #fff3eb; color: #8a3f20; }
.draft-connection-error button { margin-left: 12px; padding: 8px; }
.active-order-tabs button { min-width: 0; min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px; padding: 8px 12px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; font-weight: 800; cursor: pointer; }
.active-order-tabs button.active { color: white; background: var(--brand); box-shadow: 0 3px 8px rgba(20,121,184,.18); }
.active-order-tabs button svg { width: 17px; height: 17px; }
.active-order-tabs button b, .active-order-group > h3 span, .mobile-nav b { min-width: 17px; height: 17px; display: grid; place-items: center; flex-shrink: 0; padding: 0 4px; border-radius: 9px; color: white; background: var(--red); font-size: 8px; }
.active-orders-meta { min-height: 17px; margin: 0 0 12px; color: var(--muted); font-size: 9px; text-align: right; }
.active-order-group + .active-order-group { margin-top: 24px; }
.active-order-group > h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; }
.active-order-card { border: 1px solid var(--line); border-radius: 5px; background: white; }
.active-order-card.sap-order-card { border-left: 3px solid var(--brand); }
.active-order-card + .active-order-card { margin-top: 10px; }
.active-order-card > header, .active-order-card > footer { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; background: #f6f9fa; }
.active-order-card > header div { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.active-order-card > header span, .active-order-card > footer span { color: var(--muted); font-size: 9px; }
.order-state { padding: 3px 7px; color: var(--brand-dark); background: var(--brand-soft); font-size: 9px; }
.order-state.delivering { color: #176047; background: #e7f5ed; }
.order-state.processing { color: #8a5600; background: #fff1d6; }
.order-state.cancelled { color: #962f2f; background: #fae9e9; }
.active-order-lines { padding: 4px 12px; }
.active-order-lines > div { min-height: 34px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid #edf2f4; font-size: 10px; }
.active-order-lines > div:last-child { border-bottom: 0; }
.active-order-lines span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.active-order-lines span > strong, .active-order-lines span > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.active-order-lines span > small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.active-order-delivery { display: grid; gap: 5px; padding: 9px 12px; border-top: 1px solid #edf2f4; color: var(--muted); font-size: 9px; }
.active-order-delivery span { min-width: 0; display: flex; align-items: flex-start; gap: 6px; overflow-wrap: anywhere; }
.active-order-delivery svg { width: 13px; height: 13px; flex: 0 0 auto; color: var(--brand); }
.active-order-footer-actions { display: flex; align-items: center; gap: 10px; }
.active-order-footer-actions > strong { color: var(--brand); white-space: nowrap; }
.repeat-order-button { height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 10px; border: 1px solid var(--brand); border-radius: 4px; color: white; background: var(--brand); font-size: 10px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.repeat-order-button:hover { background: var(--brand-dark); }
.repeat-order-button:disabled { cursor: wait; opacity: .7; }
.active-order-card > footer .repeat-order-button span { color: white; font-size: 10px; }
.repeat-order-button svg { width: 14px; height: 14px; }
.repeat-order-button[aria-busy="true"] svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.active-order-card.delivery-invoice-card + .active-order-card.delivery-invoice-card { margin-top: 10px; }
.active-orders-empty, .active-orders-loading { min-height: 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); text-align: center; }
.active-orders-empty span { font-size: 9px; }
.active-orders-empty svg { width: 38px; }
.toast { position: fixed; inset: auto auto 34px 50%; z-index: 110; width: max-content; max-width: min(90vw,460px); display: grid; grid-template-columns: 22px minmax(0,1fr); align-items: center; gap: 10px; margin: 0; padding: 11px 15px; border: 0; border-radius: 5px; color: white; background: #252525; box-shadow: 0 9px 25px rgba(0,0,0,.18); opacity: 0; pointer-events: none; transform: translate(-50%,12px); transition: opacity .18s, transform .18s; }
.toast.success { background: #18754a; }
.toast.error { background: #a52c26; }
.toast svg { width: 22px; height: 22px; }
.toast span { min-width: 0; }
.toast strong, .toast small { display: block; overflow-wrap: anywhere; letter-spacing: 0; }
.toast strong { font-size: 13px; }
.toast small { max-width: 390px; margin-top: 2px; color: rgba(255,255,255,.84); font-size: 10px; line-height: 1.35; }
.toast.stock-limit { width: min(calc(100vw - 32px),460px); }
.toast.stock-limit small { white-space: normal; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
@keyframes cart-confirm { 50% { transform: scale(.9); } }
@keyframes discount-attention {
  0% { opacity: .45; transform: translateY(5px) scale(.985); box-shadow: 0 0 0 rgba(20,121,184,0); }
  38% { opacity: 1; transform: translateY(0) scale(1.012); box-shadow: 0 7px 18px rgba(20,121,184,.16); }
  68% { transform: scale(.997); box-shadow: 0 3px 9px rgba(20,121,184,.1); }
  100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 rgba(20,121,184,0); }
}
@keyframes discount-attention-icon {
  0% { transform: scale(.7) rotate(-12deg); }
  45% { transform: scale(1.22) rotate(7deg); }
  100% { transform: scale(1) rotate(0); }
}
.mobile-nav { display: none; }
.ieat-pending-warning { display: block; margin-top: 6px; padding: 7px 8px; border-left: 3px solid #ce7b22; background: #fff4e4; color: #854b13 !important; font-size: 12px !important; line-height: 1.55; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.ieat-checkout-warning { margin: 12px 0; padding: 12px; border: 1px solid #e8c897; border-radius: 6px; background: #fff7ec; color: #71450f; font-size: 13px; }
.ieat-checkout-warning p { margin: 7px 0; }
.ieat-checkout-warning ul { max-height: 180px; overflow-y: auto; margin: 8px 0; padding-left: 20px; }
.ieat-checkout-warning li span, .ieat-duplicate-dialog li span { display: block; margin-top: 4px; }
.ieat-duplicate-dialog { width: min(560px,calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 22px; border: 0; border-radius: 10px; color: var(--ink); }
.ieat-duplicate-dialog::backdrop { background: rgba(0,0,0,.5); }
.ieat-duplicate-dialog h2 { margin: 0 0 14px; color: #854b13; font-size: 20px; }
.ieat-duplicate-dialog p, .ieat-duplicate-dialog li { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.ieat-duplicate-dialog ul { max-height: 45dvh; overflow-y: auto; margin: 12px 0; padding-left: 22px; }
.ieat-duplicate-dialog li { margin-bottom: 12px; }
.ieat-duplicate-dialog footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.ieat-duplicate-dialog button { min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 5px; background: white; font: inherit; cursor: pointer; }
.ieat-duplicate-dialog #ieat-duplicate-proceed { color: white; background: var(--brand); border-color: var(--brand); }
.skeleton-card { min-height: 330px; overflow: hidden; border-radius: 6px; background: white; }
.skeleton-image { aspect-ratio: 1/1; background: #e6e6e6; animation: skeleton-pulse 1.4s ease-in-out infinite; }
.skeleton-line { height: 11px; margin: 14px 14px 0; border-radius: 3px; background: #ebebeb; animation: skeleton-pulse 1.4s ease-in-out infinite; }
.skeleton-line.short { width: 45%; }
@keyframes skeleton-pulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }

.mobile-portal, .mobile-price-view, .mobile-discovery-intro { display: none; }

@media (max-width: 1240px) {
  .header-main, .header-main.is-stuck { grid-template-columns: 215px minmax(320px,1fr) 276px; gap: 18px; }
  .header-main.is-stuck { padding-inline: max(20px,calc((100% - var(--page))/2)); }
  .header-icon-button, .header-main.is-stuck .header-icon-button { width: 88px; height: 56px; display: grid; grid-template-columns: 1fr; grid-template-rows: 22px auto; align-content: center; justify-items: center; gap: 3px; padding: 4px 5px; }
  .header-icon-button svg { width: 20px; }
  .action-label { line-height: 1.15; }
  .hero { grid-template-columns: 210px minmax(0,1fr); }
  .hero-side { display: none; }
  .product-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .department-grid { grid-template-columns: repeat(4,1fr); }
}

@media (max-width: 900px) {
  .page-width { width: min(calc(100% - 24px),var(--page)); }
  .topbar { display: none; }
  .header-main-slot { min-height: 126px; }
  .header-main { min-height: 126px; grid-template-columns: 1fr auto; grid-template-rows: 64px 48px; gap: 0 12px; }
  .brand-logo { width: 44px; height: 42px; flex-basis: 44px; }
  .brand-copy strong { font-size: 20px; }
  .brand-copy small { display: none; }
  .header-actions { grid-column: 2; grid-row: 1; align-items: center; gap: 8px; }
  .desktop-quick-order { display: none; }
  .mobile-customer-badge { max-width: 106px; display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-size: 10px; font-weight: 800; }
  .mobile-customer-badge svg { width: 15px; flex: 0 0 15px; color: var(--brand); }
  .mobile-customer-badge span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-logout-button { width: 30px; height: 42px; display: grid; place-items: center; }
  .header-icon-button { width: 42px; height: 42px; display: grid; grid-template-columns: 1fr; padding: 0; }
  .header-icon-button:first-child, .action-label { display: none; }
  .search-slot { grid-column: 1/-1; grid-row: 2; height: 50px; padding-bottom: 8px; }
  .search-form { height: 42px; }
  .search-form > button { min-width: 68px; }
  .primary-nav-inner { width: 100%; }
  .primary-nav .all-category-link { width: auto; }
  .primary-nav button { padding: 0 18px; }
  .hero { height: 330px; grid-template-columns: 1fr; }
  .category-rail { display: none; }
  .hero-copy { top: 42px; left: 36px; width: calc(47% - 36px); }
  .hero-copy h1 { font-size: 40px; }
  .hero-copy p { font-size: 14px; }
  .hero-stamp { right: 18px; bottom: 16px; width: 78px; height: 78px; }
  .service-strip-inner { grid-template-columns: repeat(2,1fr); padding: 8px 0; }
  .service-strip-inner > div { min-height: 62px; }
  .service-strip-inner > div:nth-child(2) { border-right: 0; }
  .product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .footer-inner { flex-wrap: wrap; gap: 16px 30px; padding-block: 28px; }
  .footer-inner > span { width: 100%; margin-left: 0; }
}

@media (max-width: 640px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  body.sales-tool-session { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .sales-tool-banner { min-height: 62px; justify-content: space-between; gap: 10px; padding-block: 7px calc(7px + env(safe-area-inset-bottom)); }
  .sales-tool-banner > span { max-width: calc(100% - 126px); }
  .sales-tool-banner strong { font-size: 12px; }
  .sales-tool-banner small { font-size: 10px; }
  .sales-tool-banner button { min-height: 44px; padding-inline: 10px; font-size: 12px; }
  input, select, textarea { font-size: 16px !important; }
  body.mobile-home-view, body.mobile-price-view-active { background: #f7f8fb; }
  body.mobile-home-view .site-header,
  body.mobile-home-view main > .hero,
  body.mobile-home-view main > .service-strip,
  body.mobile-home-view main > .department-section,
  body.mobile-home-view main > .catalog-section,
  body.mobile-price-view-active .site-header,
  body.mobile-price-view-active main > .hero,
  body.mobile-price-view-active main > .service-strip,
  body.mobile-price-view-active main > .department-section,
  body.mobile-price-view-active main > .catalog-section { display: none; }
  body.mobile-discovery-view main > .hero,
  body.mobile-discovery-view main > .service-strip { display: none; }
  body.mobile-home-view .mobile-portal { min-height: calc(100dvh - 64px - env(safe-area-inset-bottom)); display: flex; }
  body.mobile-price-view-active .mobile-price-view { display: block; }
  body.mobile-discovery-view .mobile-discovery-intro { display: block; }

  .mobile-portal { width: 100%; flex-direction: column; padding: calc(18px + env(safe-area-inset-top)) 16px 12px; background: #f7f8fb; }
  .mobile-portal-header { min-height: 104px; display: flex; align-items: flex-start; justify-content: center; padding: 3px 0 8px; text-align: center; }
  .mobile-portal-brand { min-width: 0; display: grid; justify-items: center; }
  .mobile-portal-brand img { width: 58px; height: 56px; object-fit: contain; border-radius: 4px; background: white; }
  .mobile-portal-brand div { min-width: 0; }
  .mobile-portal-brand span { display: block; margin-top: 2px; color: var(--brand); font: 800 8px/1.2 Arial,sans-serif; }
  .mobile-portal-brand h1 { margin: 4px 0 0; color: #17252d; font-size: 19px; line-height: 1.3; }
  .mobile-portal-session { min-height: 36px; display: grid; grid-template-columns: minmax(0,1fr) 40px; align-items: center; margin: -2px 0 8px; border-bottom: 1px solid #dce6eb; }
  .mobile-portal-session button { min-width: 0; height: 36px; padding: 0; border: 0; color: #52656f; background: transparent; }
  .mobile-portal-session > button:first-child { display: grid; grid-template-columns: 20px minmax(0,auto) 14px; align-items: center; justify-content: start; gap: 6px; text-align: left; }
  .mobile-portal-session > button:first-child > svg:first-child { width: 19px; height: 19px; color: var(--brand); }
  .mobile-portal-session > button:first-child > svg:last-child { width: 13px; height: 13px; color: #91a0a7; }
  .mobile-portal-session span { min-width: 0; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-portal-session strong { color: var(--ink); font-size: 11px; }
  .mobile-portal-session > button:last-child { display: grid; place-items: center; color: #6c7d85; }
  .mobile-portal-session > button:last-child svg { width: 17px; height: 17px; }
  .mobile-portal-search { width: 100%; height: 46px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border: 1px solid #d0dde4; border-radius: 8px; color: #7b8a92; background: white; box-shadow: 0 4px 12px rgba(31,63,79,.07); text-align: left; }
  .mobile-portal-search svg { width: 21px; height: 21px; flex: 0 0 21px; }
  .mobile-portal-search span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-portal-actions { display: grid; gap: 11px; margin-top: 15px; }
  .mobile-portal-action { width: 100%; min-height: 116px; display: grid; grid-template-columns: 66px minmax(0,1fr) 18px; align-items: center; gap: 14px; padding: 16px 14px; border: 1px solid #e0e7eb; border-radius: 8px; color: var(--ink); background: white; box-shadow: 0 8px 20px rgba(31,63,79,.11); text-align: left; }
  .mobile-portal-action > svg { width: 18px; height: 18px; color: #9aa8ae; }
  .mobile-portal-action-icon { width: 66px; height: 66px; display: grid; place-items: center; border-radius: 8px; }
  .mobile-portal-action-icon svg { width: 34px; height: 34px; }
  .mobile-portal-action.quick .mobile-portal-action-icon { color: #286d9c; background: #e8f3fa; }
  .mobile-portal-action.quote .mobile-portal-action-icon { color: #287a58; background: #e7f3ec; }
  .mobile-portal-action.featured .mobile-portal-action-icon { color: #c33b34; background: #fbeceb; }
  .mobile-portal-action-copy { min-width: 0; display: grid; gap: 5px; }
  .mobile-portal-action-copy strong { overflow-wrap: anywhere; color: #17252d; font-size: 18px; line-height: 1.3; }
  .mobile-portal-action-copy small { color: #6c7a82; font-size: 10px; line-height: 1.5; }
  .mobile-portal-services { min-height: 62px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin-top: auto; padding-top: 13px; }
  .mobile-portal-services span { min-width: 0; display: grid; justify-items: center; align-content: center; gap: 3px; border-right: 1px solid #dfe7eb; color: #527486; text-align: center; }
  .mobile-portal-services span:last-child { border-right: 0; }
  .mobile-portal-services svg { width: 19px; height: 19px; }
  .mobile-portal-services strong { white-space: nowrap; font-size: 8px; }

  .mobile-price-view { min-height: calc(100dvh - 64px - env(safe-area-inset-bottom)); padding: calc(10px + env(safe-area-inset-top)) 12px 24px; background: #f7f8fb; }
  .mobile-view-header { min-height: 58px; display: grid; grid-template-columns: 40px minmax(0,1fr) 40px; align-items: center; gap: 8px; }
  .mobile-view-header > button { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; color: var(--ink); background: transparent; }
  .mobile-view-header > button svg { width: 21px; height: 21px; }
  .mobile-view-header > div { grid-column: 2; min-width: 0; text-align: center; }
  .mobile-view-header span { display: block; color: var(--brand); font: 800 8px/1.2 Arial,sans-serif; }
  .mobile-view-header h1 { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 18px; line-height: 1.3; }
  .mobile-price-search { height: 44px; display: flex; align-items: center; margin: 8px 0 10px; border: 1px solid #cedce3; border-radius: 6px; background: white; }
  .mobile-price-search > svg { width: 18px; margin-left: 13px; color: #74868f; }
  .mobile-price-search input { min-width: 0; flex: 1; height: 100%; padding: 0 10px; border: 0; outline: 0; background: transparent; }
  .mobile-price-search button { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; color: #788890; background: transparent; }
  .mobile-price-search button svg { width: 16px; }
  .mobile-price-tabs, .mobile-discovery-tabs { height: 40px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border: 1px solid #cbdbe3; border-radius: 6px; background: white; }
  .mobile-price-tabs button, .mobile-discovery-tabs button { min-width: 0; padding: 0 8px; border: 0; border-right: 1px solid #cbdbe3; background: transparent; font-size: 11px; font-weight: 800; }
  .mobile-price-tabs button:last-child, .mobile-discovery-tabs button:last-child { border-right: 0; }
  .mobile-price-tabs button.active, .mobile-discovery-tabs button.active { color: white; background: var(--brand); }
  .mobile-price-summary { min-height: 35px; display: flex; align-items: center; color: var(--muted); font-size: 10px; }
  .mobile-price-table-heading, .mobile-price-row { display: grid; grid-template-columns: minmax(0,1fr) 76px 92px; gap: 8px; }
  .mobile-price-table-heading { padding: 7px 9px; color: #647780; background: #e9f0f3; font-size: 9px; font-weight: 800; }
  .mobile-price-table-heading span:nth-child(n+2) { text-align: right; }
  .mobile-price-list { border: 1px solid #d9e4e9; border-top: 0; background: white; }
  .mobile-price-row { width: 100%; min-height: 67px; align-items: center; padding: 9px; border: 0; border-bottom: 1px solid #e5ecef; background: white; text-align: left; }
  .mobile-price-row:last-child { border-bottom: 0; }
  .mobile-price-product, .mobile-price-amount, .mobile-price-stock { min-width: 0; display: grid; }
  .mobile-price-product strong { overflow: hidden; font-size: 11px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-price-product small { margin-top: 3px; color: var(--muted); white-space: normal; font: 700 8px/1.4 Arial,sans-serif; }
  .mobile-price-amount, .mobile-price-stock { justify-items: end; text-align: right; }
  .mobile-price-amount strong { color: var(--brand-dark); white-space: nowrap; font: 800 11px/1.2 Arial,sans-serif; }
  .mobile-price-amount small, .mobile-price-stock small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.3; }
  .mobile-price-stock strong { color: var(--green-dark); font-size: 9px; }
  .mobile-price-stock.out-of-stock strong, .mobile-price-stock.wholesale-suspended strong { color: var(--red); }
  .mobile-price-stock.stock-review strong { color: #9a5b00; }
  .mobile-price-stock small { overflow-wrap: anywhere; }
  .mobile-price-empty { min-height: 210px; display: grid; place-items: center; align-content: center; gap: 6px; color: var(--muted); text-align: center; }
  .mobile-price-empty svg { width: 34px; height: 34px; color: #8399a4; }
  .mobile-price-empty strong { color: var(--ink); }
  .mobile-price-empty span { font-size: 10px; }

  .mobile-discovery-intro { padding: calc(8px + env(safe-area-inset-top)) 10px 0; background: white; }
  .mobile-discovery-intro .mobile-view-header { min-height: 52px; }
  .mobile-discovery-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 4px 0 8px; }
  .mobile-discovery-actions button { min-width: 0; height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 10px; border: 1px solid #d7e2e7; border-radius: 6px; color: var(--ink); background: white; }
  .mobile-discovery-actions button > span { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 6px; }
  .mobile-discovery-actions button svg { width: 18px; height: 18px; }
  .mobile-discovery-actions button strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-discovery-actions .quick > span { color: #286d9c; background: #e8f3fa; }
  .mobile-discovery-actions .quote > span { color: #287a58; background: #e7f3ec; }
  .mobile-discovery-tabs button { display: flex; align-items: center; justify-content: center; gap: 6px; }
  .mobile-discovery-tabs svg { width: 15px; height: 15px; }
  body.mobile-discovery-view .department-section { padding-top: 24px; }
  body.mobile-discovery-view .catalog-section { padding-top: 26px; }
  .customer-login-screen { min-height: 100dvh; padding-top: calc(24px + env(safe-area-inset-top)); padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .page-width { width: calc(100% - 20px); }
  .brand { gap: 8px; }
  .brand-copy strong { font-size: 17px; }
  .mobile-customer-badge { max-width: 76px; }
  .search-sticky-bar.is-stuck { padding: calc(8px + env(safe-area-inset-top)) 10px 8px; }
  .search-suggestions { max-height: min(54vh,390px); }
  .search-suggestion { grid-template-columns: 42px minmax(0,1fr) auto; gap: 9px; padding: 7px 8px; }
  .search-suggestion > img, .search-suggestion-placeholder { width: 42px; height: 42px; }
  .search-suggestion-side > strong { font-size: 11px; }
  .primary-nav { display: none; }
  .hero { width: 100%; height: 286px; margin-top: 0; }
  .hero-stage { border-radius: 0; }
  .hero-stage::after { width: 55%; }
  .hero-copy { top: 34px; left: 20px; width: calc(54% - 24px); }
  .hero-kicker { margin-bottom: 6px; padding: 3px 6px; font-size: 9px; }
  .hero-copy h1 { font-size: 34px; }
  .hero-copy p { margin: 8px 0 15px; font-size: 12px; line-height: 1.6; }
  .hero-cta { height: 37px; padding: 0 13px; font-size: 12px; }
  .hero-products { right: 2%; bottom: 14px; width: 42%; gap: 6px; }
  .hero-stamp { display: none; }
  .service-strip { margin-top: 0; }
  .service-strip-inner { width: 100%; grid-template-columns: repeat(4,1fr); padding: 0 4px; }
  .service-strip-inner > div { min-height: 70px; flex-direction: column; gap: 4px; text-align: center; }
  .service-strip svg { width: 22px; height: 22px; }
  .service-strip strong { font-size: 10px; }
  .service-strip small { display: none; }
  .department-section { padding-block: 30px 34px; }
  .section-heading { margin-bottom: 15px; }
  .section-heading h2, .catalog-heading h2 { font-size: 22px; }
  .department-grid { grid-template-columns: repeat(4,1fr); gap: 7px; }
  .department-card { min-height: 92px; padding: 12px 7px; text-align: center; }
  .department-card svg { width: 23px; height: 23px; margin: 0 auto 8px; }
  .department-card strong { font-size: 10px; }
  .department-card span, .department-card b { display: none; }
  .catalog-section { padding-block: 32px 40px; }
  .catalog-heading { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 16px; }
  .catalog-toolbar { width: 100%; align-items: stretch; }
  .mode-switch { flex: 1 1 auto; }
  .mode-switch button { min-width: 0; flex: 1; padding: 0 8px; }
  .sort-control { flex: 0 0 auto; padding-left: 8px; }
  .sort-control span { display: none; }
  .sort-control select { max-width: 110px; }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .product-info { padding: 10px 10px 12px; }
  .product-name { height: 38px; font-size: 11px; line-height: 1.65; }
  .price-block strong { font-size: 19px; }
  .add-cart-button { width: 33px; height: 33px; flex-basis: 33px; }
  .product-status { margin-top: 6px; }
  .site-footer { display: none; }
  .product-dialog, .order-dialog { max-height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .product-dialog, .order-dialog, .cart-scroll, .quick-order-scroll { -webkit-overflow-scrolling: touch; }
  .catalog-order-dialog { width: 100%; max-width: none; max-height: calc(92dvh - env(safe-area-inset-top)); margin: auto 0 0; border-radius: 7px 7px 0 0; }
  .catalog-order-form { padding: 24px 16px calc(18px + env(safe-area-inset-bottom)); }
  .catalog-order-form h2 { font-size: 20px; }
  .catalog-order-product { margin: 18px 0; }
  .catalog-order-total { margin-inline: -16px; padding-inline: 16px; }
  .catalog-order-total strong { font-size: 19px; }
  .product-detail { grid-template-columns: 1fr; }
  .product-detail-media { padding: 18px; }
  .product-detail-media > .image-placeholder { min-height: 280px; }
  .detail-gallery-stage { max-height: 300px; }
  .detail-gallery-thumb { width: 52px; height: 52px; flex-basis: 52px; }
  .product-detail-info { padding: 28px 22px; }
  .product-detail-info h2 { padding-right: 22px; font-size: 18px; }
  .detail-price { margin: 18px 0; }
  .detail-price strong { font-size: 28px; }
  .order-dialog-nav { min-height: 54px; padding: 8px 10px; }
  .order-dialog-content { padding: 20px 18px 22px; }
  .order-table-wrap { overflow-x: hidden; }
  .order-table-wrap table { min-width: 0; table-layout: fixed; }
  .order-table-wrap thead { display: none; }
  .order-table-wrap tbody { display: block; }
  .order-table-wrap tbody tr { display: grid; grid-template-columns: minmax(72px,auto) minmax(0,1fr); align-items: baseline; column-gap: 10px; padding: 11px 10px; border-bottom: 1px solid var(--line); }
  .order-table-wrap tbody tr:last-child { border-bottom: 0; }
  .order-table-wrap tbody td { display: block; min-width: 0; padding: 0; border: 0; }
  .order-line-code { grid-column: 1; grid-row: 1; color: #555; font-weight: 700; overflow-wrap: anywhere; }
  .order-line-name { grid-column: 2; grid-row: 1; line-height: 1.45; overflow-wrap: anywhere; }
  .order-table-wrap .order-line-quantity { grid-column: 1 / -1; grid-row: 2; margin-top: 10px; text-align: right; }
  .order-desktop-value, .order-line-unit-price, .order-line-subtotal { display: none !important; }
  .order-mobile-values { width: 100%; display: grid; grid-template-columns: repeat(3,minmax(0,max-content)); align-items: start; justify-content: end; gap: 8px; }
  .order-mobile-value { min-width: 0; display: grid; justify-items: end; gap: 4px; }
  .order-mobile-value > small { color: var(--muted); font-size: 8px; font-weight: 700; }
  .order-mobile-value > strong { white-space: nowrap; font: 800 11px/1.2 Arial,sans-serif; }
  .order-mobile-value .order-discount-price { gap: 2px 4px; }
  .order-mobile-value .order-discount-price del { font-size: 8px; }
  .order-mobile-value .order-discount-price strong { font-size: 11px; }
  .order-mobile-value .order-discount-price small { font-size: 7px; }
  .checkout-heading { display: grid; gap: 4px; }
  .delivery-address-option { padding: 12px 10px; }
  .delivery-address-option strong, .delivery-address-option small { font-size: 12px; }
  .delivery-address-search input { font-size: 16px; }
  .delivery-address-list.scrollable { max-height: 42vh; }
  .custom-delivery-address-field textarea { min-height: 96px; font-size: 16px; }
  .checkout-fields { grid-template-columns: 1fr; }
  .checkout-remarks { grid-column: auto; }
  .order-actions { display: grid; grid-template-columns: 1fr; }
  .order-actions .primary-button { width: 100%; min-height: 48px; }
  .drawer-back-button { width: 84px; flex-basis: 84px; }
  .cart-footer > button { min-height: 56px; padding-inline: 13px; }
  .customer-profile-dialog { width: 100%; max-width: none; max-height: 92dvh; margin: auto 0 0; border-radius: 7px 7px 0 0; }
  .customer-profile-shell { padding: 24px 16px calc(20px + env(safe-area-inset-bottom)); }
  .customer-profile-shell h2 { font-size: 20px; }
  .customer-profile-identity { gap: 10px; margin: 18px -16px 0; padding: 12px 16px; }
  .customer-profile-fields { grid-template-columns: 1fr; gap: 10px; }
  .customer-profile-fields label:nth-child(n+3) { grid-column: auto; }
  .customer-profile-actions { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,140px),1fr)); }
  .quick-order-shell { padding: 20px 12px 0; }
  .quick-order-heading { align-items: center; gap: 10px; padding-right: 36px; }
  .quick-order-heading h2, .active-orders-shell h2 { font-size: 20px; }
  .quick-order-heading > strong { flex: 0 0 auto; font-size: 12px; white-space: nowrap; }
  .quick-order-heading small { max-width: 210px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .quick-order-search { margin: 12px 0 8px; }
  .quick-order-tip { min-height: 32px; gap: 6px; margin-bottom: 6px; padding: 6px 8px; font-size: 9px; }
  .quick-order-tip svg { width: 14px; height: 14px; flex-basis: 14px; }
  .quick-order-tabs { margin-bottom: 6px; }
  .quick-order-tabs button { height: 32px; font-size: 10px; }
  .quick-order-policy { margin: 6px 0; padding: 7px 8px; font-size: 9px; }
  .quick-order-scroll { scrollbar-gutter: auto; }
  .quick-order-list-heading { grid-template-columns: minmax(0,1fr) auto; min-height: 28px; padding-inline: 7px; }
  .quick-order-list-heading span:nth-child(2) { display: none; }
  .quick-order-row { min-height: 134px; grid-template-columns: minmax(0,1fr) 156px; grid-template-rows: auto auto; align-items: end; column-gap: 8px; row-gap: 8px; padding: 10px 7px; }
  .quick-order-search-result { min-height: 142px; }
  .quick-order-search-result .quick-order-name { padding-right: 68px; }
  .quick-order-search-result .quick-order-search-controls { padding-top: 0; }
  .quick-order-search-add { top: 8px; right: 7px; height: 26px; padding-inline: 8px; font-size: 9px; }
  .quick-order-name { grid-column: 1 / -1; grid-row: 1; grid-template-columns: 64px minmax(0,1fr); align-items: center; gap: 10px; padding: 0; }
  .quick-order-thumbnail { width: 64px; height: 64px; }
  .quick-order-name strong { font-size: 13px; }
  .quick-order-name small { font-size: 9px; }
  .stock-shortage-detail { grid-template-columns: 14px minmax(0,1fr); }
  .stock-shortage-detail strong { font-size: 9px; }
  .stock-shortage-detail small { font-size: 8px; line-height: 1.45; }
  .quick-order-price { grid-column: 1; grid-row: 2; align-self: end; align-items: flex-end; justify-self: end; max-width: 100%; overflow: hidden; font-size: 11px; text-align: right; }
  .quick-order-price small { font-size: 8px; }
  .quick-order-line-total .line-amount { justify-content: flex-end; gap: 4px; }
  .quick-order-line-total .line-amount del { font-size: 8px; }
  .quick-order-line-total .line-amount em { font-size: 8px; }
  .quick-order-controls { grid-column: 2; grid-row: 2; width: 156px; gap: 4px; justify-self: end; align-self: end; }
  .quick-order-quantity-wrap { width: 100px; flex-basis: 100px; padding-top: 20px; }
  .quick-order-case-offer { height: 17px; font-size: 9px; line-height: 17px; }
  .quick-order-quantity { width: 100px; height: 36px; grid-template-columns: 32px 36px 32px; justify-self: end; align-self: start; }
  .quick-order-quantity input { width: 36px; padding: 0; font-size: 11px; }
  .quick-order-unit-toggle { width: 52px; height: 36px; padding: 0 5px; font-size: 9px; }
  .quick-order-footer { min-height: 76px; gap: 8px; margin-inline: -12px; padding: 9px 12px calc(9px + env(safe-area-inset-bottom)); }
  .quick-order-footer em { display: -webkit-box; overflow: hidden; font-size: 8px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .quick-order-footer strong { font-size: 16px; }
  .quick-order-footer button { height: 40px; padding: 0 9px; font-size: 10px; white-space: nowrap; }
  .active-orders-shell { padding: 24px 14px calc(18px + env(safe-area-inset-bottom)); }
  .active-orders-shell > header { padding-right: 36px; margin-bottom: 16px; }
  .active-order-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .active-order-tabs button { min-height: 42px; gap: 5px; padding-inline: 7px; font-size: 10px; }
  .active-order-tabs button svg { width: 15px; }
  .active-orders-meta { margin-bottom: 8px; }
  .active-order-card { padding: 12px; }
  .active-order-card header, .active-order-card footer { gap: 8px; }
  .active-order-card footer { align-items: flex-start; }
  .active-order-footer-actions { flex-direction: column; align-items: flex-end; gap: 6px; }
  .repeat-order-button { height: 34px; padding-inline: 9px; }
  .active-order-lines div { grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
  .mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 60; height: calc(62px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5,1fr); padding-right: env(safe-area-inset-right); padding-bottom: env(safe-area-inset-bottom); padding-left: env(safe-area-inset-left); border-top: 1px solid var(--line); background: white; box-shadow: 0 -4px 16px rgba(0,0,0,.07); }
  .mobile-nav a, .mobile-nav button { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; border: 0; color: #666; background: white; font-size: 9px; }
  .mobile-nav .active { color: var(--brand); }
  .mobile-nav svg { width: 20px; height: 20px; }
  .mobile-nav .mobile-search-primary { align-self: end; height: 72px; color: white; background: transparent; }
  .mobile-nav .mobile-search-primary::before { position: absolute; z-index: -1; top: 0; width: 52px; height: 52px; border: 4px solid white; border-radius: 50%; background: var(--brand); box-shadow: 0 4px 12px rgba(20,121,184,.28); content: ""; }
  .mobile-nav .mobile-search-primary svg { width: 23px; height: 23px; margin-top: 3px; }
  .mobile-nav .mobile-search-primary span { color: var(--brand); font-weight: 800; transform: translateY(6px); }
  .mobile-nav b { position: absolute; top: 5px; left: calc(50% + 7px); }
  .toast, .toast.success, .toast.error { bottom: calc(76px + env(safe-area-inset-bottom)); width: fit-content; min-width: 0; max-width: min(calc(100vw - 112px),232px); grid-template-columns: 14px minmax(0,1fr); gap: 5px; padding: 5px 7px; border: 1px solid #d8e2e7; border-left: 2px solid var(--brand); color: var(--ink); background: rgba(255,255,255,.98); box-shadow: 0 4px 12px rgba(20,58,78,.14); }
  .toast.success { border-left-color: var(--green); }
  .toast.error { border-left-color: var(--red); }
  .toast svg { width: 14px; height: 14px; color: var(--brand); }
  .toast.success svg { color: var(--green); }
  .toast.error svg { color: var(--red); }
  .toast span { overflow: hidden; }
  .toast strong, .toast small { overflow: hidden; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
  .toast strong { font-size: 10px; }
  .toast small { display: block; max-width: none; margin-top: 0; color: var(--muted); font-size: 8px; }
  .toast.error strong { display: -webkit-box; white-space: normal; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .toast.stock-limit { top: calc(12px + env(safe-area-inset-top)); bottom: auto; width: calc(100vw - 32px); max-width: 360px; grid-template-columns: 18px minmax(0,1fr); gap: 8px; padding: 10px 12px; }
  .toast.stock-limit svg { width: 18px; height: 18px; }
  .toast.stock-limit strong { display: block; overflow: visible; font-size: 12px; line-height: 1.3; text-overflow: clip; white-space: normal; }
  .toast.stock-limit small { display: block; overflow: visible; margin-top: 3px; font-size: 11px; line-height: 1.4; text-overflow: clip; white-space: normal; }
  .quantity-input { font-size: 16px; font-variant-numeric: tabular-nums; letter-spacing: 0; }
}

/* Compact tools for short Android viewports (landscape or keyboard open).
   The cart's outer panel scrolls while keeping its action visible. */
@media (max-height: 700px) {
  .quick-order-scroll > .draft-toolbar { margin-block: 5px; padding: 6px 8px; }
  .quick-order-shell .draft-toolbar label { flex-wrap: wrap; gap: 4px 8px; }
  .quick-order-shell .draft-toolbar input { width: auto; padding: 5px 8px; }
  .quick-order-shell .draft-toolbar p { margin-block: 3px; }
  .cart-drawer { overflow-y: auto; overscroll-behavior-y: contain; grid-template-rows: auto auto auto minmax(180px,1fr) auto; scroll-padding-top: 86px; scroll-padding-bottom: 150px; }
  .cart-footer { position: sticky; bottom: 0; z-index: 5; }
}

/* Leave usable product space with fixed controls in landscape/short viewports. */
@media (max-height: 420px) {
  .quick-order-shell { padding: 8px 12px 0; }
  .quick-order-heading { min-height: 32px; align-items: center; gap: 8px; padding-right: 40px; }
  .quick-order-heading span, .quick-order-heading small { display: none; }
  .quick-order-heading h2 { margin: 0; font-size: 18px; }
  .quick-order-heading > strong { font-size: 12px; }
  .quick-order-dialog > .dialog-close { top: calc(6px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right)); width: 32px; height: 32px; }
  .quick-order-search { height: 36px; margin: 6px 0; }
  .quick-order-search button { width: 34px; height: 34px; }
  .quick-order-tabs { margin-bottom: 4px; }
  .quick-order-tabs button { height: 28px; }
  .quick-order-footer { min-height: 60px; margin-inline: -12px; padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); }
  .quick-order-footer button { height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .cart-discount-progress.discount-attention, .cart-discount-details.discount-attention, .cart-discount-progress.discount-attention > svg, .cart-discount-details.discount-attention .cart-discount-heading svg { animation: none !important; }
}
:root { --order-merge-blue: #174f86; }
.order-sales-hint, .order-merge-note { margin: 12px 0; padding: 12px; border-radius: 10px; background: #eef6fb; color: #174f86; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.order-sales-hint p { margin: 6px 0; }
.order-sales-hint summary { cursor: pointer; }
.order-merge-dialog { width: min(720px, calc(100vw - 24px)); max-width: 100%; max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 16px; color: #203548; }
.order-merge-dialog[open] { display: flex; flex-direction: column; }
.order-merge-dialog::backdrop { background: #132a4866; }
.order-merge-dialog > header, .order-merge-dialog > footer { flex: 0 0 auto; display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 14px 18px; background: #f3f8fc; }
.order-merge-dialog h2 { font-size: 19px; margin: 0; }
.order-merge-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 18px 16px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.order-merge-dialog button { min-height: 42px; border: 1px solid #bad1df; border-radius: 8px; padding: 9px 12px; background: white; color: #174f86; cursor: pointer; }
.order-merge-dialog button:disabled { opacity: .5; cursor: wait; }
.order-merge-dialog [data-merge-confirm], .order-merge-dialog [data-merge-preview], .order-merge-dialog [data-merge-retry] { background: #174f86; color: white; }
.merge-source-list { display: grid; gap: 8px; }
.merge-source { display: flex; align-items: flex-start; gap: 10px; border: 1px solid #cddde7; border-radius: 10px; padding: 12px; cursor: pointer; }
.merge-source input { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 4px; }
.merge-source > span { min-width: 0; }
.merge-source span span, .merge-source small, .merge-summary-row small { display: block; }
.merge-address-label { display: grid; gap: 6px; margin: 15px 0; }
.merge-address-label select { width: 100%; min-width: 0; min-height: 44px; font-size: 16px; }
.merge-summary-row, .merge-totals > div { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 7px 0; border-bottom: 1px solid #dce6ed; }
.merge-summary-row > strong { flex: 0 0 auto; }
.merge-totals { background: #eef7f4; padding: 12px; border-radius: 10px; margin-top: 14px; }
.merge-warning, [data-merge-error] { color: #a33721; }
@media (max-width: 480px) {
  .order-merge-dialog { width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; }
  .order-merge-dialog > footer { flex-wrap: wrap; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .order-merge-dialog > footer button { flex: 1 1 130px; }
  #order-merge-toolbar { flex-wrap: wrap; font-size: 12px; }
}
.checkout-stock-dialog { max-height: calc(100dvh - 32px); overflow: auto; }
.checkout-stock-details { padding: 0; margin: 16px 0; list-style: none; max-height: 40dvh; overflow: auto; }
.checkout-stock-details li { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid #e3e8e5; overflow-wrap: anywhere; }
.checkout-stock-details span { color: #9b3b23; }
.checkout-stock-details small { color: #626b66; }
.checkout-stock-dialog p { line-height: 1.7; }
.checkout-stock-dialog footer { flex-wrap: wrap; }
.checkout-stock-dialog footer button { min-height: 44px; flex: 1 1 130px; }
.checkout-stock-dialog #checkout-stock-proceed { color: white; background: var(--brand); border-color: var(--brand); }

/* Image buttons keep the existing order row geometry. */
.cart-item-image, .quick-order-thumbnail { padding: 0; color: inherit; cursor: zoom-in; }
.quick-order-copy { padding: 0; border: 0; color: inherit; background: transparent; text-align: inherit; cursor: pointer; }

body.sales-tool-embedded { padding-bottom: 0; }
body.sales-tool-embedded .sales-tool-banner { display: none !important; }
body.sales-tool-embedded #storefront > .topbar,
body.sales-tool-embedded #storefront > .site-footer { display: none; }
body.sales-tool-embedded .quick-order-dialog > .dialog-close { display: none; }
body.sales-tool-embedded .quick-order-shell { padding: 10px 20px 0; }
body.sales-tool-embedded .quick-order-heading { min-height: 22px; align-items: center; padding-right: 0; }
body.sales-tool-embedded .quick-order-heading > div { display: none; }
body.sales-tool-embedded .quick-order-search { margin-top: 8px; }
@media (max-width: 640px) {
  body.sales-tool-embedded .quick-order-shell { padding: 7px 10px 0; }
}

/* Keep the full procurement brand readable at narrow viewport widths. */
@media (min-width: 901px) and (max-width: 1240px) {
  .brand-copy strong { font-size: 21px; }
}
@media (max-width: 640px) {
  .customer-login-shell { padding: 28px 24px; }
}
@media (max-width: 480px) {
  .header-main .brand-logo { width: 32px; height: 32px; flex-basis: 32px; }
  .header-main .brand { gap: 6px; }
  .header-main .brand-copy strong { font-size: 15px; }
}
