:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f6fb;
  color: #17233a;
  font-synthesis: none;
  --blue: #155fd1;
  --blue-dark: #0b449c;
  --blue-soft: #eaf2ff;
  --ink: #17233a;
  --muted: #6a7588;
  --line: #dce3ef;
  --white: #ffffff;
  --green: #17844b;
  --shadow: 0 18px 50px rgba(36, 58, 98, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 2% 4%, rgba(21, 95, 209, 0.08), transparent 24rem),
    #f3f6fb;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px clamp(18px, 4vw, 52px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(220, 227, 239, 0.9);
  backdrop-filter: blur(14px);
}

.brand, .profile-button { display: flex; align-items: center; }
.brand { gap: 12px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: white;
  background: linear-gradient(145deg, var(--blue), #20a0e3);
  border-radius: 14px 14px 14px 5px;
  font-weight: 850;
  letter-spacing: -0.04em;
}
.brand strong, .brand span { display: block; }
.brand strong { font-size: 1rem; }
.brand span { margin-top: 2px; color: var(--muted); font-size: 0.78rem; }

.profile-button {
  gap: 10px;
  min-width: 180px;
  padding: 7px 10px 7px 7px;
  color: var(--ink);
  background: #f5f8fc;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: left;
}
.profile-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-radius: 11px;
  font-size: 0.76rem;
  font-weight: 800;
}
.profile-copy { flex: 1; min-width: 0; }
.profile-copy strong, .profile-copy small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-copy strong { font-size: 0.82rem; }
.profile-copy small { margin-top: 2px; color: var(--muted); font-size: 0.72rem; }

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 32px clamp(18px, 4vw, 52px) 56px;
}

.catalog-panel { min-width: 0; scroll-margin-top: 88px; }
.catalog-back { display: inline-flex; align-items: center; min-height: 44px; margin: -10px 0 12px; text-decoration: none; }
.intro-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: clamp(1.75rem, 3vw, 2.35rem); letter-spacing: -0.04em; }
h2 { margin-bottom: 0; font-size: 1.25rem; letter-spacing: -0.025em; }
.intro-note, .modal-note { margin-bottom: 0; color: var(--muted); line-height: 1.5; }
.intro-note { font-size: 0.9rem; }

.delivery-card {
  min-width: 190px;
  padding: 14px 16px;
  background: var(--blue-soft);
  border: 1px solid #cfe0fa;
  border-radius: 16px;
}
.delivery-card span, .delivery-card strong, .delivery-card small { display: block; }
.delivery-card span { color: var(--muted); font-size: 0.74rem; }
.delivery-card strong { margin: 4px 0; color: var(--blue-dark); font-size: 1rem; }
.delivery-card small { color: var(--muted); font-size: 0.72rem; }

.brand-showcase { margin-top: 22px; padding: 20px 20px 18px; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: 19px; box-shadow: 0 10px 30px rgba(32, 55, 93, .045); }
.brand-showcase-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.brand-showcase-heading h2 { font-size: 1.125rem; line-height: 1.35; }
.brand-showcase-controls { display: flex; gap: 8px; flex: 0 0 auto; }
.brand-showcase-controls button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--blue-dark); background: var(--blue-soft); border: 1px solid #cfe0fa; border-radius: 12px; font-size: 1.375rem; line-height: 1; }
.brand-showcase-controls button:disabled { opacity: .35; cursor: default; }
.brand-track { display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; }
.brand-track::-webkit-scrollbar { display: none; }
.brand-tile { display: flex; flex: 0 0 clamp(152px, 25vw, 196px); flex-direction: column; justify-content: center; gap: 10px; min-height: 128px; padding: 13px; color: var(--ink); text-align: left; background: #f7f9fd; border: 1px solid var(--line); border-radius: 15px; scroll-snap-align: start; }
.brand-logo { display: block; width: 100%; height: 68px; object-fit: contain; object-position: left center; }
.brand-tile-more { flex-direction: row; align-items: center; justify-content: center; gap: 8px; color: var(--blue-dark); background: var(--blue-soft); }
.brand-tile-more span { font-size: 1.375rem; line-height: 1; }
.brand-tile:hover, .brand-tile[aria-pressed="true"] { color: var(--blue-dark); background: var(--blue-soft); border-color: #a9c6f0; }
.brand-tile[aria-pressed="true"] { box-shadow: inset 0 0 0 1px #a9c6f0; }
.brand-tile strong { font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
.brand-tile:focus-visible, .brand-showcase-controls button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.toolbar { margin: 28px 0 18px; }
.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  height: 50px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(38, 60, 97, 0.04);
}
.search-field span { color: var(--muted); font-size: 1.4rem; }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 1rem; }
.search-field input::placeholder { color: #98a2b2; }
.search-modal { width: min(580px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
.search-modal .modal-card { padding: 26px 20px; }
.search-modal h2 { padding-right: 48px; }
.search-modal-field { margin: 20px 0 10px; }
.search-modal-count { margin: 0 0 12px; color: var(--muted); font-size: .875rem; }
.search-modal-results { display: grid; gap: 8px; max-height: min(55dvh, 480px); overflow-y: auto; overscroll-behavior: contain; }
.search-result { display: grid; gap: 5px; width: 100%; min-height: 58px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #f8faff; text-align: left; font: inherit; }
.search-result span { font-weight: 700; line-height: 1.35; }
.search-result small { color: var(--muted); font-size: .875rem; }
.search-result:active { background: var(--blue-soft); }
.search-empty { margin: 8px 0; color: var(--muted); font-size: .9375rem; }

.top-sku-filter {
  grid-column: 1 / -1;
  min-height: 46px;
  margin-top: 12px;
  padding: 0 15px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border: 1px solid #b9d1f4;
  border-radius: 13px;
  font-size: .875rem;
  font-weight: 800;
  white-space: nowrap;
}
.top-sku-filter[aria-pressed="true"] {
  color: white;
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 8px 18px rgba(21, 95, 209, .2);
}
.promotion-filter { color:#9a3412; background:#fff4e8; border-color:#f2c18d; }
.promotion-filter[aria-pressed="true"] { color:white; background:#c65b12; border-color:#c65b12; box-shadow:0 8px 18px rgba(198,91,18,.2); }

.category-list { display: flex; gap: 8px; overflow-x: auto; padding: 12px 1px 4px; scrollbar-width: none; }
.category-list::-webkit-scrollbar { display: none; }
.category-chip {
  flex: 0 0 auto;
  padding: 9px 13px;
  color: #536078;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}
.category-chip.active { color: white; background: var(--blue); border-color: var(--blue); }

.catalog-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: var(--muted); font-size: 0.78rem; }
.link-button { padding: 4px; color: var(--blue); background: none; border: 0; font-size: 0.78rem; font-weight: 700; }

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.product-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  min-height: 164px;
  padding: 17px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 19px;
  box-shadow: 0 10px 30px rgba(32, 55, 93, 0.045);
}
.product-card.in-cart { border-color: #90b5ed; box-shadow: 0 10px 30px rgba(21, 95, 209, 0.09); }
.product-info { display: flex; flex-direction: column; min-width: 0; }
.product-code { color: var(--muted); font-size: 0.69rem; }
.product-labels { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; }
.product-labels .supplier-label { margin-bottom: 0; }
.top-sku-badge {
  padding: 3px 7px;
  color: #0d6b3b;
  background: #e5f7ed;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
}
.promotion-sku-badge { padding:4px 10px; color:#fff; background:linear-gradient(110deg,#d9480f,#f08c00); border-radius:999px; box-shadow:0 3px 8px rgba(196,65,9,.2); font-size:.8125rem; font-weight:850; letter-spacing:.035em; }
.product-card.promotion-product { border:2px solid #e76b12; border-left-width:6px; background:linear-gradient(125deg,#fff0d1 0%,#fff8eb 28%,#fff 72%); box-shadow:0 10px 26px rgba(204,91,13,.14); }
.product-card.promotion-product.in-cart { border-color:#d9570b; box-shadow:0 10px 28px rgba(204,91,13,.2); }
.promotion-product .price strong { color:#b94705; }
.promotion-product .add-button { color:#fff; background:#d9570b; box-shadow:0 4px 10px rgba(185,71,5,.18); }
.promotion-product .add-button:hover { background:#b94705; }
.promotion-product .product-labels { gap:8px; }
.product-name { margin: 5px 0 8px; font-size: 0.92rem; line-height: 1.34; }
.product-pack { color: var(--muted); font-size: 0.75rem; }
.product-buy { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; }
.price strong, .price small { display: block; }
.price strong { font-size: 1rem; }
.price small { margin-top: 2px; color: var(--muted); font-size: 0.67rem; }
.add-button {
  min-width: 98px;
  height: 38px;
  padding: 0 12px;
  color: var(--blue);
  background: var(--blue-soft);
  border: 0;
  border-radius: 11px;
  font-size: 0.79rem;
  font-weight: 800;
}
.stepper { display: flex; align-items: center; height: 38px; background: var(--blue); border-radius: 11px; overflow: hidden; color: white; }
.stepper button { width: 34px; height: 100%; color: white; background: transparent; border: 0; font-size: 1.15rem; }
.stepper strong { min-width: 30px; text-align: center; font-size: 0.82rem; }
.no-results { grid-column: 1 / -1; padding: 48px; color: var(--muted); background: white; border: 1px dashed var(--line); border-radius: 18px; text-align: center; }

.cart-panel {
  position: sticky;
  top: 102px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 130px);
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.cart-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.cart-count { display: grid; place-items: center; width: 34px; height: 34px; color: var(--blue-dark); background: var(--blue-soft); border-radius: 11px; font-weight: 850; }
.cart-empty { display: grid; place-items: center; gap: 7px; flex: 1; min-height: 230px; color: var(--muted); text-align: center; font-size: 0.82rem; }
.cart-empty strong { color: var(--ink); font-size: 0.95rem; }
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; color: var(--blue); background: var(--blue-soft); border-radius: 16px; font-size: 1.5rem; }
.cart-items { overflow-y: auto; margin: 8px -6px 0; padding-right: 3px; }
.cart-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px 6px; border-bottom: 1px solid #edf1f6; }
.cart-item strong, .cart-item small { display: block; }
.cart-item strong { font-size: 0.8rem; line-height: 1.35; }
.cart-item small { margin-top: 4px; color: var(--muted); font-size: 0.69rem; }
.cart-item-price { white-space: nowrap; font-size: 0.8rem; font-weight: 800; }
.cart-summary { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.cart-summary > div { display: flex; justify-content: space-between; margin: 7px 0; color: var(--muted); font-size: 0.78rem; }
.cart-summary > div strong { color: var(--ink); }
.cart-summary .summary-total { align-items: baseline; margin: 14px 0; color: var(--ink); font-size: 0.95rem; }
.cart-summary .summary-total strong { font-size: 1.35rem; }
.primary-button {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  color: white;
  background: linear-gradient(135deg, var(--blue), #0b7dd4);
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(21, 95, 209, 0.22);
}
.primary-button:disabled { cursor: not-allowed; opacity: 0.42; box-shadow: none; }

.mobile-cart { display: none; }

.modal {
  width: min(620px, calc(100vw - 24px));
  padding: 0;
  background: transparent;
  border: 0;
}
.modal::backdrop { background: rgba(14, 28, 51, 0.56); backdrop-filter: blur(5px); }
.account-nav { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.account-nav .catalog-back { margin: 0; }
.account-nav .secondary-button { width: auto; min-height: 44px; padding: 10px 18px; font-size: 1rem; }
.history-modal { width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); }
.history-modal .modal-card { padding: 24px 18px; }
.history-modal .modal-close { width: 44px; height: 44px; }
.history-modal h2 { padding-right: 48px; }
.history-note { font-size: .875rem; }
.sales-store-filter { display: grid; gap: 7px; margin: 0 0 16px; font-size: .875rem; font-weight: 600; }
.sales-store-filter[hidden] { display: none; }
.sales-store-filter select { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-size: 1rem; }
.history-tabs { display: flex; gap: 8px; margin: 18px 0; border-bottom: 1px solid var(--line); }
.history-tabs button { min-height: 44px; padding: 10px 12px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: .875rem; cursor: pointer; }
.history-tabs button[aria-selected="true"] { border-bottom-color: var(--blue); color: var(--blue); font-weight: 700; }
.history-list { display: grid; gap: 18px; }
.history-order { border: 1px solid var(--line); border-radius: 16px; padding: 16px; overflow-wrap: anywhere; }
.history-order header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.history-order h3 { margin: 0; font-size: 1rem; line-height: 1.5; }
.history-saved { font-size: .875rem; color: var(--blue); }
.history-id { margin: 6px 0 16px; color: var(--muted); font-size: .875rem; }
.history-store { font-size: .875rem; line-height: 1.6; color: var(--muted); }
.history-store strong { color: var(--ink); font-weight: 600; }
.history-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 14px; padding: 14px; background: var(--blue-soft); border-radius: 10px; }
.history-summary span { color: var(--muted); font-size: .875rem; }
.history-summary strong { display: block; color: var(--ink); margin-top: 4px; font-size: 1rem; }
.history-order summary { min-height: 44px; padding: 16px 0 4px; cursor: pointer; color: var(--blue); font-size: 1rem; font-weight: 600; }
.history-products { list-style: none; padding: 0; margin: 12px 0 0; }
.history-products li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 14px; padding: 14px 0; border-top: 1px solid var(--line); line-height: 1.5; }
.history-products li > div { flex: 1 1 210px; }
.history-products strong { font-size: 1rem; font-weight: 600; }
.history-products small { display: block; margin-top: 5px; font-size: .875rem; color: var(--muted); }
.history-products li > span { font-size: 1rem; }
.history-weight { font-size: .875rem; line-height: 1.6; color: var(--muted); }
.history-more { margin-top: 20px; width: 100%; }
.recommendation-modal { width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); }
.recommendation-modal .modal-card { padding: 24px 18px; }
.recommendation-modal h2 { padding-right: 48px; }
.recommendation-list { display: grid; gap: 12px; margin: 18px 0; }
.recommendation-row { border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.recommendation-choice { display: flex; align-items: flex-start; gap: 12px; line-height: 1.5; cursor: pointer; }
.recommendation-choice input { width: 20px; height: 20px; flex: none; margin-top: 3px; accent-color: var(--blue); }
.recommendation-choice strong { display: block; font-size: 1rem; }
.recommendation-choice small { display: block; margin-top: 5px; color: var(--muted); font-size: .875rem; }
.recommendation-terms { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin: 12px 0 0 32px; }
.recommendation-terms label { display: grid; gap: 5px; font-size: .875rem; }
.recommendation-terms input { width: 110px; min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 1rem; }
.recommendation-terms span { color: var(--muted); font-size: .875rem; }
.recommendation-summary { line-height: 1.5; font-weight: 600; }
.recommendation-modal .primary-button { width: 100%; }
#resultTitle { overflow-wrap: anywhere; }
.modal-card { position: relative; padding: 28px; background: white; border-radius: 23px; box-shadow: var(--shadow); }
.modal-close { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 34px; height: 34px; color: var(--muted); background: #f1f4f8; border: 0; border-radius: 11px; font-size: 1.3rem; }
.modal-note { margin: 8px 0 20px; font-size: 0.84rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; }
.form-grid label { color: #465269; font-size: 0.75rem; font-weight: 750; }
.form-grid label.wide { grid-column: 1 / -1; }
.form-grid input, .form-grid textarea {
  width: 100%;
  margin-top: 7px;
  padding: 12px 13px;
  color: var(--ink);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  resize: vertical;
}
.form-grid input:focus, .form-grid textarea:focus { border-color: #7daae8; box-shadow: 0 0 0 3px rgba(21, 95, 209, 0.1); }
.checkout-store { display: grid; grid-template-columns: 1fr 1.25fr; gap: 12px; margin-top: 18px; padding: 14px; background: var(--blue-soft); border-radius: 14px; }
.checkout-store span, .checkout-store strong { display: block; }
.checkout-store span { color: var(--muted); font-size: 0.68rem; }
.checkout-store strong { margin-top: 4px; font-size: 0.81rem; line-height: 1.35; }
.checkout-total { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 0; }
.checkout-total span { color: var(--muted); }
.checkout-total strong { font-size: 1.5rem; }
.prototype-note { margin: 12px 0 0; color: var(--muted); font-size: 0.7rem; line-height: 1.45; text-align: center; }

.toast {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  left: 50%;
  bottom: 24px;
  width: min(520px, calc(100vw - 32px));
  padding: 14px 18px;
  color: white;
  background: #173152;
  border-radius: 14px;
  box-shadow: var(--shadow);
  transform: translate(-50%, 130%);
  opacity: 0;
  transition: 220ms ease;
  font-size: 0.84rem;
  line-height: 1.4;
}
.toast.visible { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; }
  .product-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar { min-height: 68px; padding: 10px 14px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand strong { font-size: 0.92rem; }
  .brand span { font-size: 0.7rem; }
  .profile-button { min-width: auto; border: 0; background: transparent; padding: 4px; }
  .profile-copy, .profile-button > span:last-child { display: none; }
  .app-shell { display: block; padding: 22px 14px 104px; }
  .intro-row { align-items: stretch; flex-direction: column; gap: 15px; }
  .delivery-card { display: grid; grid-template-columns: 1fr auto; align-items: center; min-width: 0; }
  .delivery-card strong { grid-row: 1 / 3; grid-column: 2; }
  .delivery-card small { margin-top: 2px; }
  .brand-showcase { padding: 16px 14px; }
  .brand-showcase-heading h2 { font-size: 1rem; }
  .brand-tile { flex-basis: 156px; }
  .toolbar { margin-top: 20px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card { min-height: 154px; padding: 15px; }
  .cart-panel {
    position: fixed;
    z-index: 35;
    inset: 78px 10px 10px;
    max-height: none;
    transform: translateY(115%);
    transition: 240ms ease;
  }
  .cart-panel.open { transform: translateY(0); }
  .mobile-cart {
    position: fixed;
    z-index: 40;
    left: 14px;
    right: 14px;
    bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 0 18px;
    color: white;
    background: #173152;
    border: 0;
    border-radius: 17px;
    box-shadow: 0 14px 35px rgba(18, 39, 68, 0.28);
    font-weight: 750;
  }
  .mobile-cart:disabled { display: none; }
  .modal-card { padding: 24px 18px; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .form-grid label.wide { grid-column: auto; }
  .checkout-store { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .product-card { grid-template-columns: 54px minmax(0, 1fr); gap: 11px; }
  .add-button { min-width: 88px; }
}

/* Real-catalog ordering controls; preserve the existing blue visual identity. */
[hidden] { display: none !important; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #155fd1;
  outline-offset: 3px;
}
select { font: inherit; }
.brand span, .profile-copy strong, .profile-copy small { font-size: .875rem; }
.profile-button { max-width: 290px; }
.intro-row { align-items: flex-start; }
.intro-note, .modal-note { font-size: 1rem; }
.eyebrow { font-size: .75rem; }
.delivery-card { min-width: 230px; }
.delivery-card span, .delivery-card small { font-size: .875rem; line-height: 1.5; }
.reception-status { margin: 16px 0 0; font-size: .875rem; color: #465269; line-height: 1.5; }
.reception-status.closed { padding: 10px 14px; background: #fff2d6; border-radius: 10px; color: #684400; }
.toolbar { margin-top: 18px; }
.catalog-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.reset-filters { margin-top: 10px; min-height: 36px; text-align: left; }
.group-picker { display: grid; gap: 8px; margin-top: 16px; font-size: .875rem; color: #465269; font-weight: 700; }
.group-picker select, .form-grid select { min-width: 0; width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-size: 1rem; }
.form-grid select { margin-top: 7px; background: #f8fafc; }
.catalog-source { margin: 12px 0 8px; font-size: .8125rem; color: var(--muted); line-height: 1.5; }
.catalog-notes { color: #526078; font-size: .875rem; line-height: 1.5; }
.catalog-notes summary { cursor: pointer; padding: 6px 0; color: var(--blue-dark); }
.catalog-notes p { margin: 8px 0; }
.catalog-meta, .link-button { font-size: .875rem; }
.catalog-meta { gap: 12px; flex-wrap: wrap; }
.product-card { display: block; min-height: 200px; }
.product-info { height: 100%; }
.product-heading { min-width: 0; }
.has-photo .product-heading { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start; }
.product-details { min-width: 0; }
.supplier-label { display: block; width: fit-content; color: var(--blue-dark); background: var(--blue-soft); border-radius: 6px; padding: 3px 7px; font-size: .875rem; line-height: 1.4; margin-bottom: 7px; }
.product-photo { margin: 0; width: 112px; }
.product-photo-button { display: block; width: 100%; padding: 0; overflow: hidden; background: white; border: 0; border-radius: 8px; cursor: zoom-in; }
.product-photo img { display: block; width: 112px; height: 132px; object-fit: contain; background: white; border-radius: 8px; }
.product-photo-button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.photo-viewer { position: fixed; inset: 0; width: min(760px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); margin: auto; padding: 58px 12px 12px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.photo-viewer::backdrop { background: rgba(14, 28, 51, .78); backdrop-filter: blur(4px); }
.photo-viewer img { display: block; width: 100%; max-height: calc(100dvh - 100px); object-fit: contain; }
.photo-viewer-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; z-index: 1; }
.product-group-heading { grid-column: 1 / -1; margin: 14px 0 2px; display: flex; align-items: baseline; gap: 12px; font-size: 1.125rem; }
.product-group-heading span { font-weight: 400; font-size: .875rem; color: var(--muted); }
.product-name { font-size: 1rem; font-weight: 650; line-height: 1.5; margin: 7px 0 10px; overflow-wrap: anywhere; }
.product-code { font-size: .8125rem; }
.product-pack { display: flex; flex-wrap: wrap; gap: 2px 6px; font-size: .875rem; line-height: 1.5; }
.product-shelf { display: block; margin-top: 5px; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.product-buy { align-items: center; flex-wrap: wrap; padding-top: 15px; }
.price strong { font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.price small { font-size: .8125rem; line-height: 1.5; }
.add-button { height: 44px; min-width: 100px; font-size: .9375rem; }
.stepper { height: 44px; }
.stepper button { width: 38px; min-width: 38px; }
.stepper input { width: 76px; min-width: 0; height: 100%; text-align: center; border: 2px solid var(--blue); border-radius: 6px; color: var(--ink); background: white; font-size: 1rem; appearance: textfield; -moz-appearance: textfield; padding: 6px 2px; font-variant-numeric: tabular-nums; }
.stepper button:disabled { opacity: .45; cursor: default; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.quantity-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.quantity-label { font-size: .875rem; color: var(--muted); }
.unavailable-label { display: inline-block; border-radius: 10px; padding: 10px; font-size: .875rem; background: #f0f3f7; color: #5e6778; }
.unpriced { background: #f8fafc; box-shadow: none; }
.product-weight { margin: 10px 0 0; color: #765112; font-size: .8125rem; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 18px; text-decoration: none; color: var(--blue-dark); border: 1px solid #c3d6f1; background: #eaf2ff; border-radius: 13px; font-weight: 700; font-size: 1rem; text-align: center; }
.show-more { width: 100%; margin-top: 18px; }
.cart-panel { align-self: start; min-height: 405px; }
.cart-heading { gap: 12px; }
.cart-heading > div { flex: 1; }
.cart-close { display: none; border: 0; width: 40px; height: 40px; border-radius: 10px; color: var(--ink); background: #edf3fa; font-size: 1.5rem; }
.cart-empty { font-size: 1rem; min-height: 210px; padding: 20px 0; }
.cart-empty strong { font-size: 1rem; }
.cart-items { min-height: 0; }
.cart-item { grid-template-columns: minmax(0, 1fr) auto; align-items: center; row-gap: 12px; }
.cart-item strong { font-size: .875rem; line-height: 1.5; }
.cart-item small { font-size: .8125rem; }
.cart-item-name { overflow-wrap: anywhere; }
.cart-item-price { font-size: .875rem; font-variant-numeric: tabular-nums; }
.cart-item .quantity-wrap { gap: 5px; }
.cart-item .stepper button { width: 32px; min-width: 32px; }
.cart-item .stepper input { width: 55px; }
.remove-item { align-self: start; border: 0; background: #f2f5fa; color: #556078; width: 32px; height: 32px; border-radius: 9px; font-size: 1.25rem; }
.cart-summary { flex-shrink: 0; }
.cart-summary > div { font-size: .875rem; }
.cart-summary .summary-total { flex-wrap: wrap; gap: 5px; }
.cart-cutoff { font-size: .8125rem; color: #526078; line-height: 1.5; margin: 12px 0 0; }
.weight-note { background: #fff3d9; color: #684400; padding: 10px; border-radius: 10px; font-size: .875rem; line-height: 1.5; margin: 12px 0; }
.form-grid label { font-size: .875rem; }
.form-grid input, .form-grid textarea { font-size: 1rem; }
.checkout-store span { font-size: .8125rem; }
.checkout-store strong { font-size: .9375rem; }
.email-notice { background: #f0f5fc; padding: 14px; border: 1px solid var(--line); border-radius: 14px; margin-top: 16px; overflow-wrap: anywhere; }
.email-notice strong { display: block; font-size: .875rem; }
.email-notice p { margin: 8px 0 0; font-size: .875rem; color: #465269; line-height: 1.5; }
.date-rule, .prototype-note { font-size: .875rem; color: #526078; line-height: 1.5; }
.form-error { color: #a32020; background: #fff0f0; padding: 12px; border-radius: 10px; font-size: .9375rem; line-height: 1.5; }
.result-actions { display: grid; gap: 10px; margin-top: 20px; }
.modal { max-height: calc(100dvh - 32px); }
.modal h2 { padding-right: 24px; overflow-wrap: anywhere; }
.checkout-total { flex-wrap: wrap; gap: 10px; }
.toast { font-size: .9375rem; }

@media (max-width: 760px) {
  .brand strong { font-size: 1rem; }
  .brand span { font-size: .8125rem; }
  .delivery-card { grid-template-columns: 1fr; gap: 2px; }
  .delivery-card strong { grid-column: auto; grid-row: auto; font-size: 1.125rem; }
  .product-card { min-height: 185px; }
  .cart-panel {
    top: 78px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    height: calc(100vh - 90px - env(safe-area-inset-bottom));
    height: calc(100dvh - 90px - env(safe-area-inset-bottom));
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
  .cart-heading { flex-shrink: 0; }
  .cart-items { flex: 1 1 auto; overscroll-behavior-y: contain; }
  .cart-close { display: block; }
  .cart-empty { min-height: 100px; }
  .mobile-cart { bottom: calc(12px + env(safe-area-inset-bottom)); gap: 8px; }
  .mobile-cart[aria-expanded="true"] { display: none; }
  .mobile-cart strong { font-size: .875rem; }
  .app-shell { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .modal { width: calc(100vw - 20px); max-height: calc(100dvh - 28px); }
  .modal-card { padding-top: 26px; }
  .weight-note { font-size: .8125rem; }
  .catalog-filters { grid-template-columns: 1fr; gap: 0; }
}

@media (min-width: 761px) and (max-width: 1250px), (max-width: 390px) {
  .has-photo .product-heading { grid-template-columns: 84px minmax(0, 1fr); gap: 10px; }
  .product-photo, .product-photo img { width: 84px; }
  .product-photo img { height: 112px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* The empty state is a short bottom status bar; populated-cart styles stay unchanged. */
.cart-is-empty .app-shell {
  grid-template-columns: minmax(0, 1fr);
  padding-bottom: calc(86px + env(safe-area-inset-bottom));
}
.empty-cart-bar {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(480px, calc(100% - 28px));
  min-height: 48px;
  padding: 12px 16px;
  color: #526078;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(18, 39, 68, .1);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}
.empty-cart-bar svg { flex: 0 0 auto; }
#storeSelector { display:grid;gap:8px;margin:16px 0;max-width:480px;font-size:16px; }
#storeSelector[hidden] { display:none; }
.address-bar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:20px 0; padding:18px; border:1px solid var(--line); border-radius:16px; background:#f4f8ff; }
.address-bar div { display:grid; gap:6px; min-width:0; }
.address-bar span, .address-bar small { color:var(--muted); }
.address-bar strong { overflow-wrap:anywhere; }
.address-bar button { flex-shrink:0; }
.address-choices { display:grid; gap:12px; padding:0; margin:20px 0; border:0; }
.address-choice { display:flex; align-items:center; gap:12px; padding:16px; border:1px solid var(--line); border-radius:12px; cursor:pointer; }
.address-choice:has(input:checked) { border-color:var(--blue); background:#f0f6ff; }
.address-choice input { width:20px; height:20px; min-height:20px; flex-shrink:0; accent-color:var(--blue); }
.address-choice span { display:grid; gap:6px; overflow-wrap:anywhere; }
.address-choice small { color:var(--muted); }
#addressSave { width:100%; }
@media (max-width:540px) { .address-bar { align-items:stretch; flex-direction:column; } }
#storeSelect,.form-grid select { width:100%;font:inherit;font-size:16px;min-height:48px;padding:10px 12px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#192234; }
#minimumNote { font-size:14px;line-height:1.5; }

.quantity-unit { width: 100%; max-width: 210px; min-height: 38px; margin: 4px 0 8px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; font: inherit; font-size: .875rem; }
.quantity-conversion, .pack-price { display: block; margin-top: 5px; font-size: .875rem; line-height: 1.4; color: var(--muted); }
.quantity-conversion:empty { display: none; }

.quantity-wrap { min-width: 0; }
.cart-item .quantity-conversion, .cart-item .pack-price { font-size: .875rem; }

.back-to-top {
  position: fixed;
  z-index: 30;
  right: 24px;
  bottom: 24px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #fff;
  background: var(--blue);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(15, 53, 110, .28);
  transition: background-color .18s ease, transform .18s ease;
}
.back-to-top:hover { background: var(--blue-dark); transform: translateY(-2px); }
.back-to-top:active { transform: translateY(0); }
.back-to-top:focus-visible { outline-color: var(--blue-dark); }

.bottom-nav { display: none; }

@media (max-width: 760px) {
  .bottom-nav {
    position: fixed;
    z-index: 45;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    min-height: calc(72px + env(safe-area-inset-bottom));
    padding: 5px 4px env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, .97);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 26px rgba(18, 39, 68, .12);
    backdrop-filter: blur(14px);
  }
  .bottom-nav-item {
    position: relative;
    display: grid;
    grid-template-rows: 24px 26px 12px;
    min-width: 0;
    width: 100%;
    height: 100%;
    min-height: 62px;
    padding: 5px 3px 4px;
    align-content: center;
    justify-items: center;
    color: #667286;
    background: transparent;
    border: 0;
    border-radius: 11px;
    text-decoration: none;
    font-size: .7rem;
    font-weight: 700;
    line-height: 1.2;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .bottom-nav-item > * { pointer-events: none; }
  .bottom-nav-item svg { grid-row: 1; align-self: center; width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .bottom-nav-item span { grid-row: 2; display: flex; min-width: 0; max-width: 100%; align-items: center; justify-content: center; text-align: center; line-height: 1.1; }
  #navAccountButton span { max-width: 72px; font-size: .65rem; }
  .bottom-nav-item.is-active { color: var(--blue); background: var(--blue-soft); }
  .bottom-nav-item:disabled { color: #a3adbd; cursor: default; opacity: .68; }
  .bottom-nav-item.is-near-top { opacity: .72; }
  #navResetFiltersButton span { max-width: 58px; font-size: .56rem; line-height: 1.05; }
  .cart-panel:target { transform: translateY(0); }
  .bottom-nav-total { grid-row: 3; max-width: 100%; overflow: hidden; color: var(--blue-dark); font-size: .66rem; font-weight: 850; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-cart, .empty-cart-bar, .back-to-top { display: none !important; }
  .cart-panel { bottom: calc(78px + env(safe-area-inset-bottom)); height: calc(100dvh - 156px - env(safe-area-inset-bottom)); }
  .app-shell, .cart-is-empty .app-shell { padding-bottom: calc(102px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
}

/* Compact order list: keep product identity and quantity visible together. */
.cart-item { display: block; padding: 10px 6px; }
.cart-item-main { display: grid; grid-template-columns: 54px minmax(0, 1fr) 30px; align-items: center; gap: 9px; }
.cart-item-photo { display: grid; place-items: center; width: 54px; height: 64px; padding: 3px; border-radius: 9px; background: white; color: var(--blue); font-weight: 800; }
.cart-item-photo img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; object-position: center; }
.cart-item-name { min-width: 0; }
.cart-item-name strong { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: .82rem; line-height: 1.25; }
.cart-item-name small { margin-top: 3px; font-size: .72rem; line-height: 1.25; }
.cart-item .remove-item { width: 30px; height: 30px; }
.cart-item-bottom { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.cart-item .cart-quantity-wrap { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 3px 5px; }
.cart-item .quantity-unit { width: auto; max-width: 102px; min-height: 34px; margin: 0; padding: 4px 2px; font-size: .75rem; }
.cart-item .stepper { height: 34px; }
.cart-item .stepper button { width: 30px; min-width: 30px; }
.cart-item .stepper input { width: 46px; font-size: .875rem; }
.cart-item .quantity-conversion { flex-basis: 100%; margin: 0; font-size: .7rem; line-height: 1.2; }
.cart-item .cart-item-price { flex-shrink: 0; font-size: .82rem; }

@media (max-width: 760px) {
  .cart-panel {
    z-index: 55;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    max-height: none;
    padding: max(12px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom));
    overflow: hidden;
    border: 0;
    border-radius: 0;
  }
  .cart-heading { padding-bottom: 8px; }
  .cart-heading .eyebrow { margin-bottom: 2px; }
  .cart-heading h2 { font-size: 1.1rem; }
  .cart-items { flex: 1 1 auto; min-height: 0; margin-top: 2px; padding-right: 2px; }
  .cart-summary { margin-top: 0; padding-top: 5px; background: white; }
  .cart-summary > div:not(.summary-total) { display: none; }
  .cart-summary .summary-total { margin: 6px 0 8px; }
  .cart-summary .summary-total strong { font-size: 1.15rem; }
  .cart-summary .primary-button { min-height: 44px; }
  .cart-cutoff { margin-top: 5px; font-size: .72rem; line-height: 1.2; }
  .cart-summary .weight-note { margin: 5px 0; padding: 6px 8px; }
}
