/* Multiply Manufacturing — catalog style. System fonts only: nothing to download. */
:root {
  --ink: #1b1b1b;
  --ink-2: #444444;
  --ink-3: #5c5c5c;
  --rule: #d0d0d0;
  --rule-strong: #bdbdbd;
  --rule-soft: #e6e6e6;
  --panel: #f3f3f3;
  --panel-2: #f8f8f8;
  --bar: #2b2b2b;
  --link: #0b4f9c;
  --link-hover: #06315f;
  --highlight: #fff4c2;
  --error: #a3160d;
  --error-bg: #fff1f0;
  --ok: #1d6b2c;
  --focus: #0b4f9c;
  --font: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.45 var(--font); color: var(--ink); background: #fff; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; }
button, input, select { font: inherit; color: inherit; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.narrow-only { display: none; }
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 20px; }

/* ---------------------------------------------------------------- header */
.top { background: var(--bar); color: #fff; }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding-top: 10px; padding-bottom: 10px; }
.logo { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }
.logo:hover { color: #fff; }
.logo-mark { width: 28px; height: 28px; border: 2px solid #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; line-height: 1; }
.logo-word { font-weight: 700; font-size: 19px; letter-spacing: 0.06em; }
.upload-bar { flex: 1 1 420px; min-width: 0; display: flex; align-items: stretch; background: #fff; color: var(--ink); min-height: 40px; cursor: pointer; }
.upload-bar > span:first-child { padding: 0 12px; color: var(--ink-3); flex: 1 1 auto; display: flex; align-items: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.upload-bar .btn-up { background: #e2e2e2; border-left: 1px solid var(--rule-strong); padding: 0 16px; display: flex; align-items: center; font-weight: 700; }
.upload-bar:hover .btn-up { background: #d6d6d6; }
.upload-bar:focus-within { outline: 2px solid #9cc3f2; outline-offset: 1px; }
.top nav { display: flex; gap: 20px; font-size: 14px; margin-left: auto; }
.top nav a { color: #fff; min-height: 40px; display: flex; align-items: center; }

.strip { border-bottom: 1px solid var(--rule); background: var(--panel); font-size: 13px; color: var(--ink-2); }
.strip .wrap { display: flex; flex-wrap: wrap; gap: 4px 24px; padding-top: 6px; padding-bottom: 6px; }

.demo { background: var(--highlight); border-bottom: 1px solid #e4d27a; font-size: 13px; }
.demo .wrap { padding-top: 6px; padding-bottom: 6px; }

/* ---------------------------------------------------------------- layout */
.layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding-top: 16px; padding-bottom: 48px; }
.side { flex: 1 1 200px; max-width: 220px; font-size: 14px; display: flex; flex-direction: column; gap: 18px; }
.side h2 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--rule); padding-bottom: 4px; }
.side div { display: flex; flex-direction: column; gap: 4px; }
.side a[aria-current="page"] { color: var(--ink); font-weight: 700; text-decoration: none; }
.content { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.content > section { display: flex; flex-direction: column; gap: 8px; }
h1.page { margin: 0; font-size: 28px; }
.lede { margin: 0; color: var(--ink-2); max-width: 760px; }
h2.sec { margin: 0; font-size: 18px; border-bottom: 2px solid var(--bar); padding-bottom: 4px; }
.note { margin: 0; font-size: 13px; color: var(--ink-3); }
.prose { max-width: 760px; }
.prose p, .prose li { color: var(--ink-2); }
.prose h2 { font-size: 18px; border-bottom: 2px solid var(--bar); padding-bottom: 4px; margin: 28px 0 8px; }
.prose h3 { font-size: 16px; margin: 20px 0 6px; }

/* ---------------------------------------------------------------- tables */
.box { border: 1px solid var(--rule-strong); }
.box-head { background: #e9e9e9; padding: 6px 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 700; font-size: 14px; }
.box-head a, .box-head button.linkish { font-weight: 400; }
.scroll { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th { text-align: left; font-weight: 700; padding: 6px 10px; background: var(--panel-2); border-bottom: 1px solid var(--rule-strong); white-space: nowrap; }
table.grid td { padding: 6px 10px; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.parts { min-width: 860px; }
table.parts tr.selected td { background: #f2f7fd; }
table.parts tr.err td { background: var(--error-bg); }
.thumb { width: 56px; height: 56px; border: 1px solid var(--rule); background: #fafafa; display: block; object-fit: contain; }
.fname { font-weight: 700; word-break: break-all; }
.dims { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.rowmsg { color: var(--error); font-size: 13px; }
.pending { color: var(--ink-3); }
select.sm, input.qty { padding: 4px 6px; min-height: 34px; border: 1px solid #8f8f8f; background: #fff; border-radius: 0; }
input.qty { width: 84px; text-align: right; font-variant-numeric: tabular-nums; }
.linkish { background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; cursor: pointer; min-height: 34px; }
.linkish:hover { color: var(--link-hover); }
.box-foot { padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: flex-end; background: var(--panel-2); border-top: 1px solid var(--rule-strong); }
.btn { font-weight: 700; background: var(--bar); color: #fff; border: 0; padding: 8px 20px; min-height: 40px; cursor: pointer; }
.btn:hover { background: #000; }
.btn[disabled] { background: #9a9a9a; cursor: default; }
.btn.big { font-size: 17px; padding: 12px 28px; min-height: 48px; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--ink); }


.swatch { display: inline-block; width: 14px; height: 14px; border: 1px solid #888; vertical-align: -2px; }
.swatches { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------------------------------------------------------------- empty state / drop */
.drop { border: 2px dashed #8f8f8f; background: var(--panel-2); padding: 36px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; cursor: pointer; }
.drop:hover, .drop:focus-within { background: #f0f0f0; }
.drop strong { font-size: 18px; }
.drop span { color: var(--ink-3); font-size: 14px; }
.drop-overlay { position: fixed; inset: 0; background: rgba(43,43,43,0.85); color: #fff; display: none; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; z-index: 50; pointer-events: none; }
body.dragging .drop-overlay { display: flex; }

/* ---------------------------------------------------------------- checkout */
.form-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 12px; padding: 12px; }
.form-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 700; }
.form-grid input, .form-grid select { font-weight: 400; font-size: 16px; padding: 7px 8px; min-height: 40px; border: 1px solid #8f8f8f; border-radius: 0; background: #fff; }
.c6 { grid-column: span 6; } .c4 { grid-column: span 4; } .c3 { grid-column: span 3; } .c2 { grid-column: span 2; }
.review { padding: 12px; display: flex; flex-direction: column; gap: 6px; max-width: 520px; margin-left: auto; width: 100%; }
.review .line { display: flex; justify-content: space-between; gap: 16px; }
.review .total { border-top: 1px solid var(--rule-strong); padding-top: 8px; font-size: 18px; font-weight: 700; }
.alert { padding: 8px 12px; background: var(--error-bg); color: var(--error); border: 1px solid #f0b7b2; font-size: 14px; }
.ok { color: var(--ok); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; border-top: 1px solid var(--rule); padding-top: 16px; font-size: 14px; }

/* ---------------------------------------------------------------- order status */
.steps { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--rule-strong); }
.steps li { list-style: none; flex: 1 1 140px; padding: 10px 12px; border-right: 1px solid var(--rule); font-size: 14px; color: var(--ink-3); }
.steps li:last-child { border-right: 0; }
.steps li.done { color: var(--ink); }
.steps li.now { background: var(--highlight); color: var(--ink); font-weight: 700; }
.steps { margin: 0; padding: 0; }

/* ---------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--rule); background: var(--panel); font-size: 13px; color: var(--ink-2); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ---------------------------------------------------------------- phone */
@media (max-width: 720px) {
  .wide-only { display: none; }
  .narrow-only { display: inline; }
  .wrap { padding: 0 14px; }
  .top .wrap { gap: 10px; }
  .logo { order: 1; }
  .top nav { order: 2; margin-left: auto; }
  .upload-bar { order: 3; flex-basis: 100%; min-height: 48px; }
  .side { display: none; }
  h1.page { font-size: 24px; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c6, .c4 { grid-column: span 2; } .c3 { grid-column: span 2; } .c2 { grid-column: span 1; }
  select.sm, input.qty, .pad-foot input.zip, .checkout input, .checkout select { min-height: 44px; font-size: 16px; }

  /* Parts table becomes stacked cards */
  table.parts { min-width: 0; }
  table.parts thead { display: none; }
  table.parts, table.parts tbody, table.parts tr, table.parts td { display: block; width: 100%; }
  table.parts tr { position: relative; padding: 10px 12px 10px 82px; border-bottom: 1px solid var(--rule-strong); min-height: 82px; }
  table.parts td { border: 0; padding: 3px 0; }
  table.parts td.c-thumb { position: absolute; left: 12px; top: 12px; width: auto; padding: 0; }
  table.parts td.c-mat, table.parts td.c-color, table.parts td.c-qty { display: inline-block; width: auto; margin-right: 8px; }
  table.parts td.n { text-align: left; }
  table.parts td.c-each::before { content: "Each "; color: var(--ink-3); }
  table.parts td.c-total::before { content: "Total "; color: var(--ink-3); }
  table.parts td.c-each, table.parts td.c-total { display: inline-block; width: auto; margin-right: 16px; }
  table.parts td.c-rm { position: absolute; right: 12px; top: 6px; width: auto; }
  .box-foot { justify-content: stretch; }
  .box-foot .btn { flex: 1 1 100%; }
}

/* ================================================================ F: three-column catalog */
body.dense { font-size: 13px; }
body.dense .top .wrap { padding-top: 8px; padding-bottom: 8px; }
body.dense .upload-bar { min-height: 34px; }
body.dense h1.page { font-size: 22px; }
body.dense h2.sec { font-size: 15px; padding-bottom: 3px; }
body.dense .lede { font-size: 14px; }

.layout.three { gap: 20px; padding-top: 10px; }
.layout.three .side { flex: 1 1 170px; max-width: 180px; font-size: 13px; gap: 14px; }
.layout.three .content { flex: 999 1 560px; gap: 18px; }
.view { display: flex; flex-direction: column; gap: 18px; }
.view[hidden] { display: none; }
.crumbs { font-size: 12px; color: var(--ink-2); }

.side-parts { display: flex; flex-direction: column; gap: 2px; }
.side-parts button { background: none; border: 0; padding: 0; text-align: left; color: var(--link); text-decoration: underline; cursor: pointer; word-break: break-all; font-size: 13px; }
.side-parts button[aria-current="true"] { color: var(--ink); text-decoration: none; font-weight: 700; }
.side-parts button[aria-current="true"]::before { content: "› "; }

.part-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; flex-direction: row !important; }
.part-pic { width: 150px; height: 150px; border: 1px solid var(--rule); background: #f4f4f4; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.part-pic img { width: 150px; height: 150px; object-fit: contain; }
.part-pic img:not([src]) { visibility: hidden; }
.part-info { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.part-info h1 { word-break: break-all; }
table.spec { border-collapse: collapse; width: auto; align-self: flex-start; }
#p-error { margin: 0; }
#p-error:empty { display: none; }
table.spec th { text-align: left; font-weight: 400; color: var(--ink-3); padding: 1px 16px 1px 0; }
table.spec td { padding: 1px 0; }
.qty-line { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 4px; }

table.compare { min-width: 640px; }
table.compare tr.group td { padding: 12px 8px 4px; border-bottom: 1px solid var(--rule-strong); background: #fff; }
table.compare tr.group strong { font-size: 14px; margin-right: 6px; }
table.compare tr.group span { color: var(--ink-2); }
table.compare tr.opt { cursor: pointer; }
table.compare tr.opt:hover td { background: #f6f9fd; }
table.compare tr.opt.on td { background: var(--highlight); }
table.compare tr.opt.on td.n { font-weight: 700; }
.pick { font: inherit; padding: 2px 12px; min-height: 28px; border: 1px solid #8f8f8f; background: #fff; cursor: pointer; }
.pick:hover { background: #f0f0f0; }
.picked { font-weight: 700; white-space: nowrap; }

.buy { flex: 1 1 270px; max-width: 300px; display: flex; flex-direction: column; gap: 12px; align-self: flex-start; }
.pad { border: 1px solid var(--rule-strong); font-size: 13px; }
.checkout { border: 1px solid var(--rule-strong); font-size: 13px; }
.checkout form { padding: 4px 10px 10px; display: flex; flex-direction: column; gap: 8px; }
.checkout fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.checkout legend { font-weight: 700; padding: 8px 0 2px; font-size: 13px; }
.checkout label { display: flex; flex-direction: column; gap: 2px; color: var(--ink-2, #444); }
.checkout input, .checkout select { font: inherit; font-size: 14px; padding: 5px 7px; min-height: 34px; border: 1px solid #8f8f8f; border-radius: 0; background: #fff; color: var(--ink); width: 100%; box-sizing: border-box; }
.checkout input:focus, .checkout select:focus { outline: 2px solid #9cc3f2; outline-offset: 0; }
.checkout .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checkout .note { margin: 0; font-size: 12px; }
.checkout .btn { width: 100%; }
.checkout .alert { margin: 0; }
.card-element { min-height: 20px; }
.card-element:empty { display: none; }
.pad-head { background: #e9e9e9; padding: 6px 10px; font-weight: 700; display: flex; justify-content: space-between; }
.pad-head span + span { font-weight: 400; }
.pad-row { padding: 8px 10px; border-bottom: 1px solid var(--rule-soft); display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.pad-row:hover { background: #f6f9fd; }
.pad-row.on { background: #f2f7fd; }
.pad-row .top-line { display: flex; justify-content: space-between; gap: 8px; }
.pad-row .nm { font-weight: 700; word-break: break-all; color: var(--link); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font-size: 13px; }
.pad-row.on .nm { color: var(--ink); }
.pad-row .sub { color: var(--ink-3); }
.pad-row .err { color: var(--error); }
.pad-empty { margin: 0; padding: 10px; color: var(--ink-3); }
.pad-add { display: block; padding: 8px 10px; color: var(--link); text-decoration: underline; cursor: pointer; border-bottom: 1px solid var(--rule-soft); }
.pad-foot { padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; background: var(--panel-2); }
.pad-foot .line { display: flex; justify-content: space-between; gap: 8px; }
.pad-foot .btn { width: 100%; }
.pad-foot .ship-line { align-items: center; }
.pad-foot input.zip { width: 92px; padding: 3px 6px; min-height: 30px; border: 1px solid #8f8f8f; border-radius: 0; font: inherit; text-align: right; font-variant-numeric: tabular-nums; }
.pad-foot .est-total { border-top: 1px solid var(--rule-soft); padding-top: 6px; }
.pad-foot .ship-arrive { margin: -2px 0 0; font-size: 12px; }
#ship-est.err { color: var(--error); }
.c1 { grid-column: span 1; }

@media (max-width: 1100px) {
  .layout.three .side { display: none; }
}
@media (max-width: 720px) {
  .buy { max-width: none; flex-basis: 100%; }
  .part-pic, .part-pic img { width: 96px; height: 96px; }
  .c1 { grid-column: span 1; }
  table.compare { min-width: 0; }
  table.compare .hide-sm { display: none; }
}

/* Phone: sticky order bar so "Place order" is always one tap away */
.mobile-bar { display: none; }
@media (max-width: 720px) {
  .mobile-bar:not([hidden]) { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--bar); color: #fff; padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); gap: 12px; align-items: center; justify-content: space-between; box-shadow: 0 -2px 8px rgba(0,0,0,.15); }
  .mobile-bar a { color: #fff; }
  .mobile-bar .btn { background: #fff; color: var(--ink); min-height: 44px; }
  body.has-bar { padding-bottom: 72px; }
}

/* Material rows + color swatch picker */
table.compare td.mat strong { display: block; font-size: 14px; }
table.compare td.mat span { color: var(--ink-2); font-size: 12px; }
.color-pick { display: flex; gap: 12px; align-items: flex-start; }
.color-pick .colors { flex: 1 1 auto; min-width: 0; }
.sample { margin: 0; flex: 0 0 80px; text-align: center; }
.sample img { display: block; width: 80px; height: 80px; object-fit: contain; }
.colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; }
.color-opt { display: flex; align-items: center; gap: 8px; padding: 4px 8px; min-height: 34px; border: 1px solid var(--rule); background: #fff; cursor: pointer; text-align: left; font-size: 13px; }
.color-opt:hover { border-color: #8f8f8f; }
.color-opt[aria-checked="true"] { border: 2px solid var(--ink); padding: 3px 7px; background: var(--highlight); font-weight: 700; }
.color-opt .swatch { width: 18px; height: 18px; flex: 0 0 auto; }
.color-opt .cp { margin-left: auto; color: var(--ink-3); font-weight: 400; font-size: 12px; }

/* Make the hidden attribute win over .side div { display:flex } */
.side [hidden] { display: none !important; }

.alert.info { background: #fff8d6; border-color: #e0c766; color: var(--ink); }

/* Main page without the left sidebar */
.layout.three.no-side .content { flex: 999 1 600px; }
.drop.drop-more { padding: 44px 20px; }

/* Part image with duplicate / delete */
.part-side { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.part-actions { display: flex; gap: 6px; }
.btn-sm { flex: 1 1 0; font: inherit; font-size: 13px; padding: 4px 8px; min-height: 30px; border: 1px solid #8f8f8f; background: #fff; color: var(--ink); cursor: pointer; }
.btn-sm:hover { background: #f0f0f0; }
.btn-sm.danger { color: var(--error); }
.btn-sm.danger:hover { background: var(--error-bg); }
.btn-sm:disabled { opacity: 0.5; cursor: default; }
@media (max-width: 720px) { .part-actions { flex-direction: column; } .btn-sm { min-height: 40px; } }

/* Accounts */
.notice { padding: 12px 14px; background: #eef6ee; border-color: #9cc59c; font-size: 14px; }
table.account-orders td { vertical-align: top; }
table.account-orders .sub { display: block; color: var(--ink-3); font-size: 12px; }
.pill { display: inline-block; padding: 1px 8px; font-size: 12px; font-weight: 700; border: 1px solid var(--rule-strong); background: #fff; white-space: nowrap; }
.pill.ok { background: #eef6ee; border-color: #9cc59c; }
.pill.wait { background: #fff8d6; border-color: #e0c766; }
.pill.bad { background: var(--error-bg); border-color: #f0b7b2; }
