/* Home order builder (square, navy + orange, home container) */
.ob-shell { background: var(--surface); border: var(--border); padding: clamp(20px, 3vw, 40px); box-shadow: 0 30px 60px -44px rgb(var(--c-ink) / .45); }
.ob-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--sp-20); }
.ob-title { margin-top: var(--sp-14); font-size: var(--fs-h3); font-weight: var(--fw-regular); letter-spacing: var(--tracking-tighter); line-height: var(--lh-tight); color: var(--navy); }
.ob-sub { margin-top: var(--sp-8); color: var(--muted); font-size: var(--fs-md); }
.ob-top-r { display: flex; align-items: center; gap: var(--sp-14); }
.ob-saved { display: inline-flex; align-items: center; gap: var(--sp-6); padding: var(--sp-6) var(--sp-12); background: var(--green-50); color: var(--green-700); font-size: var(--fs-xs); font-weight: var(--fw-semibold); opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s var(--ease); }
.ob-saved.on { opacity: 1; transform: none; }
.ob-saved i { font-size: var(--fs-base); }

/* stepper */
.ob-steps { list-style: none; margin: var(--sp-28) 0 var(--sp-24); padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.ob-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--sp-8); font-size: var(--fs-sm); color: var(--muted); cursor: pointer; }
.ob-step:not(:last-child)::after { content: ""; position: absolute; top: 20px; left: calc(50% + 26px); right: calc(-50% + 26px); height: 2px; background: var(--line); }
.ob-step.done:not(:last-child)::after { background: var(--accent); }
.ob-step-n { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border: 2px solid var(--line); background: var(--surface); font: var(--fw-semibold) var(--fs-md)/var(--lh-none) var(--font-mono); color: var(--muted); transition: all .3s var(--ease); }
.ob-step-n em { font-style: normal; }
.ob-step-n i { position: absolute; font-size: var(--fs-lg); opacity: 0; }
.ob-step.on .ob-step-n { background: var(--navy); border-color: var(--navy); color: var(--white); box-shadow: 0 0 0 5px rgb(var(--c-navy) / .1); }
.ob-step.on { color: var(--navy); font-weight: var(--fw-semibold); }
.ob-step.done .ob-step-n { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--white); }
.ob-step.done .ob-step-n em { opacity: 0; }
.ob-step.done .ob-step-n i { opacity: 1; }

/* panel header */
.ob-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--sp-10); margin-bottom: var(--sp-16); }
.ob-bar h3 { font-size: var(--fs-xl); font-weight: var(--fw-semibold); color: var(--navy); }
.ob-count { font-size: var(--fs-sm); color: var(--accent-strong); font-weight: var(--fw-semibold); }
.ob-hint { font-size: var(--fs-xs); color: var(--muted); }
.ob-tools { display: flex; flex-wrap: wrap; gap: var(--sp-10); margin-bottom: var(--sp-14); }
.ob-search { flex: 1 1 260px; position: relative; display: flex; align-items: center; }
.ob-search i { position: absolute; left: 14px; color: var(--muted); }
.ob-search input { width: 100%; height: 46px; padding: 0 var(--sp-14) 0 var(--sp-40); border: var(--border); background: var(--bg); font-size: var(--fs-md); }
.ob-search input:focus { outline: none; border-color: var(--accent-strong); }
.ob-chips { display: flex; flex-wrap: wrap; gap: var(--sp-8); }
.ob-chip { height: 46px; padding: 0 var(--sp-16); border: var(--border); background: var(--surface); font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--ink-2); cursor: pointer; transition: all .2s; }
.ob-chip:hover { border-color: var(--navy); }
.ob-chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* sample grid */
.ob-grid { max-height: 560px; overflow-y: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-12); padding: var(--sp-4) var(--sp-6) var(--sp-4) 0; scrollbar-width: thin; }
.ob-card { position: relative; display: flex; flex-direction: column; text-align: left; padding: var(--sp-10); background: var(--surface); border: var(--border); cursor: pointer; transition: border-color .25s, box-shadow .3s var(--ease); }
.ob-card[hidden] { display: none; }
.ob-card:hover { border-color: var(--ink-2); }
.ob-img { aspect-ratio: 1 / 1; background: var(--white); display: grid; place-items: center; overflow: hidden; border: var(--border); }
.ob-img img { width: 100%; height: 100%; object-fit: cover; }
.ob-card[data-ob-cat="hangers"] .ob-img img, .ob-img img[src*="cutouts"] { object-fit: contain; padding: var(--sp-10); }
.ob-img-custom { background: var(--accent-soft); color: var(--accent-strong); font-size: var(--fs-6xl); border-style: dashed; border-color: var(--accent); }
.ob-toggle { position: absolute; right: 18px; top: 18px; width: 34px; height: 34px; display: grid; place-items: center; background: var(--white); color: var(--navy); box-shadow: 0 4px 12px rgb(var(--c-ink) / .2); font-size: var(--fs-base); transition: background-color .25s, color .25s, transform .3s var(--ease); }
.ob-toggle .ph-check { display: none; }
.ob-card:hover .ob-toggle { transform: scale(1.08); }
.ob-name { margin-top: var(--sp-10); font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--navy); line-height: var(--lh-snug); }
.ob-cat { margin-top: var(--sp-2); font: var(--fw-semibold) var(--fs-3xs)/var(--lh-snug) var(--font-mono); letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--muted); }
.ob-added { display: none; margin-top: var(--sp-2); align-items: center; gap: var(--sp-4); font-size: var(--fs-2xs); font-weight: var(--fw-semibold); color: var(--accent-strong); }
.ob-card.on { border-color: var(--accent-strong); box-shadow: 0 0 0 1px var(--accent-strong); }
.ob-card.on .ob-toggle { background: var(--accent-strong); color: var(--white); }
.ob-card.on .ob-toggle .ph-plus { display: none; }
.ob-card.on .ob-toggle .ph-check { display: block; }
.ob-card.on .ob-cat { display: none; }
.ob-card.on .ob-added { display: inline-flex; }
.ob-empty { grid-column: 1 / -1; padding: var(--sp-40) var(--sp-16); text-align: center; color: var(--muted); }
.ob-empty i { font-size: var(--fs-4xl); color: var(--accent); }
.ob-linkbtn { border: 0; background: none; padding: 0; color: var(--accent-strong); font: inherit; font-weight: var(--fw-semibold); text-decoration: underline; cursor: pointer; }

/* requirements */
.ob-items { display: grid; gap: var(--sp-12); }
.ob-item { border: var(--border); background: var(--bg); }
.ob-item-head { display: flex; align-items: center; gap: var(--sp-12); padding: var(--sp-12) var(--sp-14); border-bottom: var(--border); background: var(--surface); }
.ob-item-head img, .ob-item-ic, .ob-rlist img { width: 48px; height: 48px; object-fit: contain; background: var(--white); border: var(--border); flex-shrink: 0; }
.ob-item-ic { display: block; background: var(--accent-soft); }
.ob-item-head b { display: block; color: var(--navy); }
.ob-item-head small { color: var(--muted); font-size: var(--fs-xs); }
.ob-rm { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: var(--fs-xs); text-decoration: underline; cursor: pointer; }
.ob-rm:hover { color: var(--red-600); }
.ob-item-fields { display: grid; grid-template-columns: 1.1fr .8fr 1fr 1fr; gap: var(--sp-12); padding: var(--sp-14); }
.ob-item-fields label { display: flex; flex-direction: column; gap: var(--sp-6); font-size: var(--fs-xs); font-weight: var(--fw-strong); color: var(--ink); }
.ob-item-fields input, .ob-item-fields select, .ob-global input, .ob-global select { height: 44px; padding: 0 var(--sp-12); border: var(--border-strong); background: var(--surface); font-size: var(--fs-sm); }
.ob-item-fields input:focus, .ob-item-fields select:focus { outline: none; border-color: var(--accent-strong); }
.ob-item-fields label.bad input { border-color: var(--red-600); box-shadow: 0 0 0 3px rgb(var(--c-danger) / .1); }
.ob-check { flex-direction: row !important; align-items: center; gap: var(--sp-10) !important; grid-column: span 1; }
.ob-check input { width: 18px; height: 18px; accent-color: var(--accent-strong); }
.ob-note { grid-column: span 3; }
.ob-global { margin-top: var(--sp-16); display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-14); }
.ob-form { grid-template-columns: 1fr 1fr; }

/* review */
.ob-rlist { list-style: none; margin: 0; padding: 0; border-top: var(--border); }
.ob-rlist li { display: flex; align-items: center; gap: var(--sp-14); padding: var(--sp-12) 0; border-bottom: var(--border); }
.ob-rlist b { display: block; color: var(--navy); }
.ob-rlist small { color: var(--muted); font-size: var(--fs-xs); }
.ob-rq { margin-left: auto; font: var(--fw-semibold) var(--fs-sm)/var(--lh-none) var(--font-mono); color: var(--accent-strong); white-space: nowrap; }
.ob-rdet { margin-top: var(--sp-16); display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--sp-10); }
.ob-rdet div { padding: var(--sp-12) var(--sp-14); background: var(--bg); border: var(--border); }
.ob-rdet small { display: block; font-size: var(--fs-2xs); color: var(--muted); }
.ob-rdet b { font-weight: var(--fw-strong); color: var(--ink); word-break: break-word; }

/* nav + done */
.ob-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-12); margin-top: var(--sp-20); padding-top: var(--sp-16); border-top: var(--border); }
.ob-nav [data-ob-next], .ob-send { margin-left: auto; }
.ob-send { display: inline-flex; flex-wrap: wrap; gap: var(--sp-10); }
.ob-send[hidden] { display: none; }
.ob-msg { font-size: var(--fs-sm); color: var(--red-600); }
.ob-done { padding: var(--sp-48) var(--sp-16); text-align: center; }
.ob-done i { font-size: var(--fs-7xl); color: var(--green-600); }
.ob-done h3 { margin: var(--sp-12) 0 var(--sp-6); font-size: var(--fs-3xl); font-weight: var(--fw-medium); color: var(--navy); }
.ob-done p { color: var(--muted); margin-bottom: var(--sp-20); }

@media (max-width: 1000px) { .ob-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ob-item-fields { grid-template-columns: 1fr 1fr; } .ob-note { grid-column: 1 / -1; } }
@media (max-width: 640px) {
  .ob-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 520px; }
  .ob-steps .ob-step span:last-child { font-size: var(--fs-2xs); text-align: center; }
  .ob-step:not(:last-child)::after { left: calc(50% + 22px); right: calc(-50% + 22px); }
  .ob-global, .ob-form { grid-template-columns: 1fr; }
  .ob-top-r { width: 100%; justify-content: space-between; }
}
.ob-shell [hidden] { display: none !important; }
.ob-card.on .ob-toggle { opacity: 1; }
.ob-card.on .ob-toggle i { color: var(--white); }
.ob-saved { white-space: nowrap; }

/* ---------- v2: split box, no stepper ---------- */
.ob-steps, .ob-nav { display: none !important; }
.ob-stage { margin-top: var(--sp-28); display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 340px); gap: 0; border: var(--border); }
.ob-main { padding: clamp(18px, 2vw, 26px); min-width: 0; }
.ob-side { padding: clamp(18px, 2vw, 24px); background: var(--bg); border-left: var(--border); display: flex; flex-direction: column; gap: var(--sp-14); }
.ob-side-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: var(--sp-12); border-bottom: var(--border); }
.ob-side-head h3, .ob-bar h3 { font-size: var(--fs-lg); font-weight: var(--fw-semibold); color: var(--navy); }
.ob-bar { align-items: center; }
.ob-bar .ob-linkbtn { display: inline-flex; align-items: center; gap: var(--sp-6); text-decoration: none; }
.ob-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 600px; }
.ob-cart { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-8); max-height: 360px; overflow-y: auto; scrollbar-width: thin; }
.ob-cart li { display: flex; align-items: center; gap: var(--sp-10); padding: var(--sp-8); background: var(--surface); border: var(--border); animation: ob-pop .35s var(--ease); }
@keyframes ob-pop { from { opacity: 0; transform: translateX(8px); } }
.ob-cart img, .ob-cart .ob-item-ic { width: 44px; height: 44px; object-fit: contain; background: var(--white); border: var(--border); flex-shrink: 0; }
.ob-cart b { display: block; font-size: var(--fs-sm); color: var(--navy); line-height: var(--lh-snug); }
.ob-cart small { font-size: var(--fs-2xs); color: var(--muted); }
.ob-x { margin-left: auto; width: 28px; height: 28px; flex-shrink: 0; border: var(--border); background: var(--surface); color: var(--muted); font-size: var(--fs-base); line-height: var(--lh-none); cursor: pointer; }
.ob-x:hover { border-color: var(--red-600); color: var(--red-600); }
.ob-cart-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-8); padding: var(--sp-24) var(--sp-8); text-align: center; color: var(--muted); font-size: var(--fs-sm); border: 1px dashed var(--line); }
.ob-cart-empty i { font-size: var(--fs-4xl); color: var(--accent); }
.ob-next { margin-top: auto; width: 100%; justify-content: center; }
.ob-next:disabled { background: var(--slate-300); color: var(--white); cursor: not-allowed; }
.ob-side .ob-msg, .ob-msg { min-height: 1em; margin: 0; font-size: var(--fs-xs); color: var(--red-600); }
.ob-items .ob-item-fields { grid-template-columns: 1.1fr .8fr 1fr 1fr; }
.ob-contact .field { gap: var(--sp-6); }
.ob-contact .field input { height: 44px; }
.ob-send-row { display: grid; grid-template-columns: 1fr; gap: var(--sp-10); margin-top: var(--sp-4); }
.ob-send-row .f-btn { justify-content: center; }
.ob-done { border: var(--border); margin-top: var(--sp-28); }
@media (max-width: 1100px) { .ob-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ob-items .ob-item-fields { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .ob-stage { grid-template-columns: 1fr; }
  .ob-side { border-left: 0; border-top: var(--border); }
  .ob-stage[data-ob-stage="pick"] .ob-side { position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -10px 24px -16px rgb(var(--c-ink) / .35); }
  .ob-stage[data-ob-stage="pick"] .ob-cart { max-height: 150px; }
  .ob-stage[data-ob-stage="pick"] .ob-cart-empty { display: none; }
}
/* fit requirement fields inside the left column */
.ob-item { min-width: 0; }
.ob-item-fields > * { min-width: 0; }
.ob-item-fields input, .ob-item-fields select { width: 100%; min-width: 0; }
.ob-item-head > div { min-width: 0; }
.ob-rm { flex-shrink: 0; }
/* header: copy left, controls right */
@media (min-width: 861px) { .ob-top { flex-wrap: nowrap; } .ob-top-r { flex-shrink: 0; } }
.ob-item-fields .ob-check input { width: 18px; height: 18px; flex: none; } .ob-check { align-self: end; padding-bottom: var(--sp-12); white-space: nowrap; }

/* ---------- v3: flat layout, lines instead of nested boxes ---------- */
.ob-shell { background: none; border: 0; box-shadow: none; padding: 0; }
.ob-stage { margin-top: var(--sp-32); border: 0; border-top: var(--border); }
.ob-main { padding: var(--sp-28) var(--sp-32) 0 0; }
.ob-side { background: none; border-left: var(--border); padding: var(--sp-28) 0 0 var(--sp-32); }
.ob-side-head { border-bottom: 0; padding-bottom: 0; }
.ob-cart { gap: 0; border-top: var(--border); }
.ob-cart li { border: 0; border-bottom: var(--border); background: none; padding: var(--sp-10) 0; }
.ob-cart-empty { border: 0; background: none; padding: var(--sp-32) var(--sp-8); }
.ob-items { gap: 0; border-top: var(--border); }
.ob-item { border: 0; border-bottom: var(--border); background: none; }
.ob-item-head { background: none; border-bottom: 0; padding: var(--sp-16) 0 var(--sp-6); }
.ob-item-fields { padding: var(--sp-8) 0 var(--sp-16); }
.ob-done { border: 0; border-top: var(--border); }
@media (max-width: 860px) {
  .ob-main { padding: var(--sp-20) 0 0; }
  .ob-side { border-left: 0; border-top: var(--border); padding: var(--sp-16) 0 0; background: var(--bg); }
  .ob-stage[data-ob-stage="pick"] .ob-side { padding: var(--sp-14) 0; }
}
.ob-img { border: 0; background: var(--bg); }
@media (min-width: 861px) {
  .ob-stage[data-ob-stage="pick"] .ob-side { position: sticky; top: calc(var(--header-h) + 16px); align-self: start; }
  .ob-next { margin-top: var(--sp-8); }
  .ob-cart-empty { padding: var(--sp-24) var(--sp-8); }
}
@media (min-width: 861px) {
  .ob-side { border-left: 0; }
  .ob-main { border-right: var(--border); padding-bottom: var(--sp-8); }
}
/* outer frame restored; inside stays flat (lines only) */
.ob-shell { background: var(--surface); border: var(--border); box-shadow: 0 30px 60px -44px rgb(var(--c-ink) / .45); padding: clamp(20px, 3vw, 40px); }
/* side panel: full height, empty note centred, Next pinned to the bottom */
@media (min-width: 861px) {
  .ob-stage[data-ob-stage="pick"] .ob-side { position: static; align-self: stretch; padding-bottom: var(--sp-8); }
  .ob-stage[data-ob-stage="pick"] .ob-cart-empty { flex: 1; justify-content: center; padding: var(--sp-24) var(--sp-8); }
  .ob-stage[data-ob-stage="pick"] .ob-next { margin-top: auto; position: sticky; bottom: 16px; z-index: 2; box-shadow: 0 10px 24px -12px rgb(var(--c-ink) / .45); }
  .ob-stage[data-ob-stage="pick"] .ob-msg:empty { display: none; }
}
/* details stage: requirements list scrolls inside the left column, same height as the product grid */
@media (min-width: 861px) {
  .ob-items { max-height: 600px; overflow-y: auto; padding-right: var(--sp-10); scrollbar-width: thin; }
}
/* delivery fields now head the right column */
.ob-global-side { margin-top: 0; grid-template-columns: 1fr 1fr; gap: var(--sp-10); padding-bottom: var(--sp-14); border-bottom: var(--border); }
.ob-global-side .field { gap: var(--sp-6); }
.ob-global-side input, .ob-global-side select { width: 100%; min-width: 0; height: 44px; }
@media (min-width: 861px) { .ob-items { max-height: 680px; } }
.ob-global-side { grid-template-columns: 1fr; }
/* side panel v3: list fills the panel above Next; Next is a normal block at the panel bottom */
@media (min-width: 861px) {
  .ob-stage[data-ob-stage="pick"] { align-items: stretch; }
  .ob-stage[data-ob-stage="pick"] .ob-side { position: relative; display: flex; flex-direction: column; min-height: 0; background: none; padding-bottom: 0; }
  .ob-stage[data-ob-stage="pick"] .ob-cart { flex: 1 1 0; min-height: 0; max-height: none; overflow-y: auto; }
  .ob-stage[data-ob-stage="pick"] .ob-cart:empty { flex: 0 0 auto; border-top: 0; }
  .ob-stage[data-ob-stage="pick"] .ob-next { position: static; margin-top: var(--sp-16); box-shadow: none; flex-shrink: 0; }
}
/* panel height = left column height; panel content laid out absolutely inside it so it never stretches the row */
@media (min-width: 861px) {
  .ob-stage[data-ob-stage="pick"] .ob-side { position: relative; padding: 0; }
  .ob-stage[data-ob-stage="pick"] .ob-side-in { position: absolute; inset: 28px 0 8px 32px; display: flex; flex-direction: column; gap: var(--sp-14); }
  .ob-stage[data-ob-stage="pick"] .ob-cart-empty { flex: 1 1 0; min-height: 0; }
}
.ob-cart { align-content: start; grid-auto-rows: max-content; }
@media (min-width: 861px) { .ob-stage[data-ob-stage="pick"] .ob-side { top: auto; } }

/* details rows: product (image + name) on the left, full row height; fields on the right */
@media (min-width: 641px) {
  .ob-item { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: var(--sp-20); padding: var(--sp-16) 0; align-items: stretch; }
  .ob-item-head { flex-direction: column; align-items: stretch; gap: var(--sp-10); padding: 0; height: 100%; }
  .ob-item-media { flex: 1; min-height: 110px; display: grid; place-items: center; background: var(--white); border: var(--border); }
  .ob-item-media img, .ob-item-media .ob-item-ic { width: 100%; height: 100%; max-height: 150px; object-fit: contain; border: 0; padding: var(--sp-10); }
  .ob-item-media .ob-item-ic { background: var(--accent-soft); }
  .ob-item-name b { font-size: var(--fs-md); line-height: var(--lh-snug); }
  .ob-item-name small { display: block; margin-top: var(--sp-2); }
  .ob-item-head .ob-rm { margin-left: 0; align-self: flex-start; padding: 0; }
  .ob-item-fields { padding: 0; grid-template-columns: 1.1fr .8fr 1fr 1fr; align-content: start; }
}
@media (min-width: 641px) and (max-width: 1100px) { .ob-item-fields { grid-template-columns: 1fr 1fr; } }
@media (min-width: 641px) {
  /* row height comes from the fields; the left column fills it and the image flexes */
  .ob-item { grid-template-columns: 150px minmax(0, 1fr); }
  .ob-item-head { height: auto; min-height: 0; position: relative; }
  .ob-item-media { min-height: 0; flex: 1 1 0; }
  .ob-item-media img, .ob-item-media .ob-item-ic { max-height: none; }
  .ob-item-name b { font-size: var(--fs-sm); }
  .ob-item-name small { font-size: var(--fs-2xs); }
  .ob-item-head .ob-rm { font-size: var(--fs-2xs); }
  .ob-item-fields { grid-template-columns: 1fr .8fr 1fr 1fr; }
  .ob-item-fields .ob-check { grid-column: 1 / 2; }
  .ob-item-fields .ob-note { grid-column: 2 / -1; }
}
@media (min-width: 641px) {
  .ob-item-media { position: relative; overflow: hidden; min-height: 64px; }
  .ob-item-media img, .ob-item-media .ob-item-ic { position: absolute; inset: 0; width: 100%; height: 100%; padding: var(--sp-8); }
}

/* ---------- details: one card per product ---------- */
.ob-items { border-top: 0; display: grid; gap: var(--sp-12); }
.ob-item.ob-card2 { display: block; padding: 0; background: var(--surface); border: var(--border); }
.ob-c2-top { display: flex; align-items: center; gap: var(--sp-12); padding: var(--sp-12) var(--sp-14); border-bottom: var(--border); }
.ob-c2-img { width: 52px; height: 52px; flex-shrink: 0; display: grid; place-items: center; background: var(--white); border: var(--border); overflow: hidden; }
.ob-c2-img img, .ob-c2-img .ob-item-ic { width: 100%; height: 100%; object-fit: contain; padding: var(--sp-4); border: 0; }
.ob-c2-img .ob-item-ic { background: var(--accent-soft); }
.ob-c2-name { flex: 1; min-width: 0; }
.ob-c2-name b { display: block; font-size: var(--fs-md); color: var(--navy); line-height: var(--lh-snug); }
.ob-c2-name small { display: block; margin-top: var(--sp-2); font-size: var(--fs-2xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-logo-chip { flex-shrink: 0; cursor: pointer; }
.ob-logo-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ob-logo-chip span { display: inline-flex; align-items: center; gap: var(--sp-6); height: 34px; padding: 0 var(--sp-12); border: var(--border); background: var(--bg); font-size: var(--fs-xs); font-weight: var(--fw-strong); color: var(--ink-2); transition: background-color .25s, color .25s, border-color .25s; white-space: nowrap; }
.ob-logo-chip span i { font-size: var(--fs-md); }
.ob-logo-chip:hover span { border-color: var(--ink-2); }
.ob-logo-chip input:checked + span { background: var(--accent-soft); border-color: var(--accent-strong); color: var(--accent-strong); }
.ob-logo-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.ob-c2-rm { flex-shrink: 0; width: 34px; height: 34px; display: grid; place-items: center; border: var(--border); background: var(--surface); color: var(--muted); font-size: var(--fs-base); cursor: pointer; transition: all .2s; }
.ob-c2-rm:hover { border-color: var(--red-600); color: var(--red-600); background: var(--red-50); }
.ob-c2-fields { display: grid; grid-template-columns: 1.1fr .8fr 1fr 1fr; gap: var(--sp-12); padding: var(--sp-14); }
.ob-c2-fields label { display: flex; flex-direction: column; gap: var(--sp-6); min-width: 0; font-size: var(--fs-xs); font-weight: var(--fw-strong); color: var(--ink); }
.ob-c2-fields input, .ob-c2-fields select { width: 100%; min-width: 0; height: 42px; padding: 0 var(--sp-12); border: var(--border-strong); background: var(--surface); font-size: var(--fs-sm); }
.ob-c2-fields input:focus, .ob-c2-fields select:focus { outline: none; border-color: var(--accent-strong); }
.ob-c2-fields label.bad input { border-color: var(--red-600); box-shadow: 0 0 0 3px rgb(var(--c-danger) / .1); }
.ob-c2-fields .ob-note { grid-column: 1 / -1; }
@media (max-width: 1100px) { .ob-c2-fields { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) {
  .ob-c2-top { flex-wrap: wrap; }
  .ob-c2-name { flex-basis: calc(100% - 64px - 46px); }
  .ob-logo-chip { order: 5; margin-left: var(--sp-64); }
}

/* ---------- details card v3: image column left; title/remove, fields+logo, notes on the right ---------- */
.ob-item.ob-card3 { display: grid; grid-template-columns: 120px minmax(0, 1fr); padding: 0; background: var(--surface); border: var(--border); }
.ob-c3-img { position: relative; overflow: hidden; background: var(--white); border-right: var(--border); }
.ob-c3-img img, .ob-c3-img .ob-item-ic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: var(--sp-12); border: 0; }
.ob-c3-img .ob-item-ic { background: var(--accent-soft); }
.ob-c3-body { padding: var(--sp-14) var(--sp-16); display: grid; gap: var(--sp-12); min-width: 0; }
.ob-c3-r1 { display: flex; align-items: flex-start; gap: var(--sp-12); }
.ob-c3-r2 { display: grid; grid-template-columns: 1.1fr .8fr 1fr 1fr auto; gap: var(--sp-10); align-items: end; }
.ob-c3-r2 label, .ob-c3-r3 { display: flex; flex-direction: column; gap: var(--sp-6); min-width: 0; font-size: var(--fs-xs); font-weight: var(--fw-strong); color: var(--ink); }
.ob-c3-r2 input, .ob-c3-r2 select, .ob-c3-r3 input { width: 100%; min-width: 0; height: 42px; padding: 0 var(--sp-12); border: var(--border-strong); background: var(--surface); font-size: var(--fs-sm); }
.ob-c3-r2 input:focus, .ob-c3-r2 select:focus, .ob-c3-r3 input:focus { outline: none; border-color: var(--accent-strong); }
.ob-c3-r2 label.bad input, .ob-c3-r3.bad input { border-color: var(--red-600); box-shadow: 0 0 0 3px rgb(var(--c-danger) / .1); }
.ob-card3 .ob-logo-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ob-card3 .ob-lc-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-6); height: 42px; padding: 0 var(--sp-14); border: var(--border-strong); background: var(--bg); font-size: var(--fs-xs); font-weight: var(--fw-strong); color: var(--ink-2); white-space: nowrap; transition: all .2s; }
.ob-card3 .ob-logo-chip:hover .ob-lc-btn { border-color: var(--ink-2); }
.ob-card3 .ob-logo-chip input:checked + .ob-lc-btn { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--white); }
.ob-card3 .ob-logo-chip input:focus-visible + .ob-lc-btn { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 1100px) { .ob-c3-r2 { grid-template-columns: 1fr 1fr; } .ob-card3 .ob-logo-chip { grid-column: 1 / -1; } }
@media (max-width: 520px) { .ob-item.ob-card3 { grid-template-columns: 76px minmax(0, 1fr); } .ob-c3-body { padding: var(--sp-12); } }
.ob-card3 .ob-logo-chip .ob-lc-cap { display: block; height: auto; padding: 0; border: 0; background: none; font-size: var(--fs-xs); font-weight: var(--fw-strong); color: var(--ink); }
.ob-card3 .ob-logo-chip { display: flex; flex-direction: column; gap: var(--sp-6); }

/* ---------- details card v4: square image, info rows matched to its height ---------- */
.ob-items { container-type: inline-size; container-name: obitems; }
.ob-card3 { --sq: 178px; }
.ob-item.ob-card3 { grid-template-columns: var(--sq) minmax(0, 1fr); }
.ob-c3-img { height: var(--sq); align-self: start; }
.ob-c3-body { padding: var(--sp-10) var(--sp-12); gap: var(--sp-6); height: var(--sq); align-content: space-between; }
.ob-c3-r1 { align-items: center; }
.ob-c3-r1 .ob-c2-name b { font-size: var(--fs-sm); }
.ob-c3-r1 .ob-c2-name small { font-size: var(--fs-2xs); }
.ob-c3-r1 .ob-c2-rm { width: 30px; height: 30px; font-size: var(--fs-md); }
.ob-c3-r2, .ob-c3-r2[class] { grid-template-columns: 1.15fr .85fr 1.05fr 1fr auto; gap: var(--sp-8); }
.ob-card3 .ob-c3-r2 .ob-logo-chip { grid-column: auto; }
.ob-c3-r2 label, .ob-c3-r3 { gap: var(--sp-4); }
.ob-c3-r2 label > span, .ob-c3-r3 > span, .ob-card3 .ob-lc-cap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-3xs); }
.ob-c3-r2 input, .ob-c3-r2 select, .ob-c3-r3 input, .ob-card3 .ob-lc-btn { height: 34px; font-size: var(--fs-xs); }
.ob-c3-r2 input, .ob-c3-r3 input { padding: 0 var(--sp-10); }
.ob-c3-r2 select { padding: 0 var(--sp-4) 0 var(--sp-8); }
.ob-card3 .ob-lc-btn { padding: 0 var(--sp-12); }
.ob-c3-r2 label > span, .ob-c3-r3 > span, .ob-card3 .ob-lc-cap { line-height: 15px; }
.ob-card3 .ob-logo-chip { gap: var(--sp-4); }
/* logo: caption plus a plain checkbox */
.ob-card3 .ob-logo-chip .ob-lc-cap { font-size: var(--fs-3xs); }
.ob-card3 .ob-c3-r2 .ob-lc-box { display: grid; place-items: center; width: 34px; height: 34px; overflow: visible; border: var(--border-strong); background: var(--surface); color: transparent; font-size: var(--fs-lg); line-height: var(--lh-none); cursor: pointer; transition: background-color .2s, border-color .2s, color .2s; }
.ob-card3 .ob-logo-chip:hover .ob-lc-box { border-color: var(--ink-2); }
.ob-card3 .ob-logo-chip input:checked + .ob-lc-box { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--white); }
.ob-card3 .ob-logo-chip input:focus-visible + .ob-lc-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.ob-c3-r1 .ob-c2-name { line-height: var(--lh-snug); }

/* medium cards: colour and logo drop beside the notes so every field keeps its width; still three rows */
@container obitems (max-width: 900px) {
  .ob-c3-body { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--sp-8); }
  .ob-c3-r1 { grid-column: 1 / -1; }
  .ob-c3-r2[class] { display: contents; }
  .ob-c3-r2 > label:nth-child(1) { grid-area: 2 / 1 / 3 / 5; }
  .ob-c3-r2 > label:nth-child(2) { grid-area: 2 / 5 / 3 / 9; }
  .ob-c3-r2 > label:nth-child(3) { grid-area: 2 / 9 / 3 / 13; }
  .ob-c3-r2 > label:nth-child(4) { grid-area: 3 / 1 / 4 / 5; }
  .ob-card3 .ob-c3-r2 .ob-logo-chip { grid-area: 3 / 11 / 4 / 13; }
  .ob-c3-r3 { grid-area: 3 / 5 / 4 / 11; }
}
/* small cards: square thumb beside the title, fields full width below */
@container obitems (max-width: 520px) {
  .ob-card3 { --sq: 76px; }
  .ob-item.ob-card3 { gap: var(--sp-12); padding: var(--sp-12); }
  .ob-c3-img { border: var(--border); }
  .ob-c3-body { display: contents; }
  .ob-c3-r1 { grid-column: 2; grid-row: 1; align-self: center; }
  .ob-c3-r2[class] { display: grid; grid-column: 1 / -1; grid-template-columns: 1fr 1fr; gap: var(--sp-10); }
  .ob-card3 .ob-c3-r2 > label { grid-area: auto; }
  .ob-card3 .ob-c3-r2 .ob-logo-chip { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: flex-start; gap: var(--sp-10); margin-left: 0; }
  .ob-card3 .ob-lc-cap { flex: none; }
  .ob-c3-r3 { grid-column: 1 / -1; }
}

/* ---------- pick grid: 4 / 3 / 2 columns; custom part as its own strip below ---------- */
.ob-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) { .ob-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ob-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-10); } }
.ob-card.ob-custom { flex-direction: row; align-items: center; gap: var(--sp-16); width: 100%; margin-top: var(--sp-14); padding: var(--sp-14) var(--sp-16); background: var(--secondary); border-color: var(--secondary); color: var(--white); }
.ob-card.ob-custom:hover { border-color: var(--secondary); }
.ob-cu-ic { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border: 1px dashed rgb(var(--c-white) / .35); background: rgb(var(--c-white) / .07); color: var(--accent); font-size: var(--fs-2xl); }
.ob-cu-txt { flex: 1; display: grid; gap: var(--sp-2); min-width: 0; }
.ob-cu-txt b { font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.ob-cu-txt small { font-size: var(--fs-xs); color: rgb(var(--c-white) / .65); }
.ob-cu-act { flex: none; }
.ob-cu-act > span { display: inline-flex; align-items: center; gap: var(--sp-8); height: 40px; padding: 0 var(--sp-16); font-size: var(--fs-xs); font-weight: var(--fw-semibold); white-space: nowrap; transition: background-color .2s, color .2s; }
.ob-cu-add { background: var(--accent-strong); color: var(--white); }
.ob-custom:hover .ob-cu-add { background: var(--orange-700); }
.ob-cu-act .ob-cu-on { display: none; background: var(--white); color: var(--accent-strong); }
.ob-custom.on .ob-cu-add { display: none; }
.ob-custom.on .ob-cu-on { display: inline-flex; }
.ob-card.ob-custom.on { border-color: var(--accent-strong); box-shadow: 0 0 0 1px var(--accent-strong); }
@media (max-width: 640px) {
  .ob-card.ob-custom { flex-wrap: wrap; gap: var(--sp-12); }
  .ob-cu-txt { flex-basis: calc(100% - 62px); }
  .ob-cu-act, .ob-cu-act > span { width: 100%; justify-content: center; }
}
.ob-item-ic[class] { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); font-size: var(--fs-2xl); }
.ob-c3-img .ob-item-ic { font-size: var(--fs-6xl); }

/* ==========================================================================
   Fit-to-screen layout (desktop): the whole builder is one viewport-high box.
   Header row stays compact, each stage fills the rest, and only the lists
   inside it scroll (product grid, cart, requirement cards, contact form).
   ========================================================================== */
@media (min-width: 1001px) {
  .ob-top { flex-wrap: nowrap; align-items: flex-end; gap: var(--sp-40); }
  .ob-top .ob-sub { max-width: 46ch; margin: 0; text-align: right; font-size: var(--fs-sm); line-height: var(--lh-normal); }
}
@media (min-width: 1181px) and (min-height: 640px) {
  .ob-shell { display: flex; flex-direction: column; height: calc(100vh - var(--header-h) - 40px); min-height: 600px; max-height: 900px; padding: var(--sp-24) var(--sp-32) 0; }
  .ob-top { flex: none; }
  .ob-title { margin-top: var(--sp-10); font-size: var(--fs-h3); }
  .ob-stage { flex: 1 1 0; min-height: 0; margin-top: var(--sp-20); }
  .ob-stage[data-ob-stage="pick"] { grid-template-columns: minmax(0, 1fr) 320px; }
  .ob-stage[data-ob-stage="details"] { grid-template-columns: minmax(0, 1fr) 380px; }
  .ob-stage > .ob-main { display: flex; flex-direction: column; min-height: 0; padding: var(--sp-16) var(--sp-28) 0 0; }

  /* pick: one toolbar row, grid fills the height, custom strip pinned under it */
  .ob-stage[data-ob-stage="pick"] .ob-bar { display: none; }
  .ob-tools { flex: none; flex-wrap: nowrap; align-items: center; margin-bottom: var(--sp-14); }
  .ob-search { flex: 1 1 150px; min-width: 150px; max-width: 340px; }
  .ob-search input { height: 42px; }
  .ob-chips { flex: 0 1 auto; min-width: 0; flex-wrap: nowrap; gap: var(--sp-6); overflow-x: auto; scrollbar-width: none; }
  .ob-chip { flex: none; height: 42px; padding: 0 var(--sp-12); font-size: var(--fs-xs); }
  .ob-grid { flex: 1 1 0; min-height: 0; max-height: none; align-content: start; }
  .ob-card.ob-custom { flex: none; margin: var(--sp-12) 0 var(--sp-16); padding: var(--sp-10) var(--sp-14); }
  .ob-cu-ic { width: 40px; height: 40px; font-size: var(--fs-xl); }
  .ob-cu-act > span { height: 38px; }
  .ob-stage[data-ob-stage="pick"] .ob-side-in { inset: 18px 0 18px 28px; }

  /* details: requirement cards scroll on the left; the contact form is a compact two-column panel */
  .ob-stage[data-ob-stage="details"] .ob-bar { flex: none; margin-bottom: var(--sp-14); }
  .ob-items { flex: 1 1 0; min-height: 0; max-height: none !important; padding-bottom: var(--sp-16); align-content: start; }
  .ob-side.ob-contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: var(--sp-12); min-height: 0; overflow-y: auto; padding: var(--sp-16) var(--sp-2) var(--sp-16) var(--sp-28); scrollbar-width: thin; }
  .ob-contact > .ob-side-head, .ob-contact > .ob-send-row, .ob-contact > .ob-msg { grid-column: 1 / -1; }
  .ob-contact > .ob-global-side { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: var(--sp-12); }
  .ob-contact .field { min-width: 0; }
  .ob-contact .field input, .ob-contact .field select { width: 100%; min-width: 0; }
  .ob-contact .field label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ob-contact .field input, .ob-contact .field select, .ob-global-side input, .ob-global-side select { height: 42px; }
  .ob-contact .field label { font-size: var(--fs-xs); }
  .ob-send-row { position: sticky; bottom: -18px; grid-template-columns: 1fr 1fr; margin: var(--sp-4) 0 0; padding: var(--sp-12) 0 var(--sp-16); background: var(--surface); }
  .ob-send-row .f-btn { min-width: 0; padding-inline: var(--sp-10); }
  .ob-contact > .ob-msg:empty { display: none; }

  .ob-done { margin: auto; border: 0; }
}
@media (min-width: 1181px) and (max-width: 1300px) and (min-height: 640px) {
  .ob-stage[data-ob-stage="pick"] { grid-template-columns: minmax(0, 1fr) 280px; }
  .ob-stage[data-ob-stage="details"] { grid-template-columns: minmax(0, 1fr) 360px; }
}

/* Flowing layout (tablet, phone, short screens): the box keeps its "All" size whatever the filter,
   and the details stage is at least as tall as the product stage (site sets --ob-stage-h). */
@media (max-width: 1180px), (max-height: 639px) {
  .ob-grid { height: 560px; max-height: none; align-content: start; }
  .ob-stage[data-ob-stage="details"] { min-height: var(--ob-stage-h, 0px); }
}
@media (max-width: 640px) { .ob-grid { height: 520px; } }

/* delivery address: sits in the delivery block's grid (country | division or state, then the address line) */
.ob-addr { display: contents; }
.ob-addr-line { grid-column: 1 / -1; }
#ob-country[readonly] { background: var(--bg); color: var(--ink-2); cursor: default; }

/* details panel: fields scroll in the middle, the send buttons stay at the bottom of the box */
.ob-cfields { display: grid; gap: var(--sp-14); align-content: start; }
.ob-cfields .field { min-width: 0; }
.ob-cfields input, .ob-cfields select { width: 100%; min-width: 0; height: 44px; }
.ob-send { display: grid; gap: var(--sp-10); }
.ob-send .ob-msg:empty { display: none; }
@media (min-width: 1181px) and (min-height: 640px) {
  .ob-side.ob-contact { display: flex; flex-direction: column; gap: var(--sp-14); overflow: hidden; padding: var(--sp-16) 0 var(--sp-20) var(--sp-28); }
  .ob-contact .ob-side-head { flex: none; }
  .ob-cfields { flex: 1 1 0; min-height: 0; overflow-y: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-12); padding-right: var(--sp-4); scrollbar-width: thin; }
  .ob-cfields .ob-wide { grid-column: 1 / -1; }
  .ob-cfields input, .ob-cfields select { height: 42px; }
  .ob-cfields .field label { font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ob-send { flex: none; padding-top: var(--sp-14); border-top: var(--border); }
  .ob-send .ob-send-row { position: static; margin: 0; padding: 0; background: none; grid-template-columns: 1fr 1fr; }
}
@media (min-width: 861px) { .ob-side.ob-contact { display: flex; flex-direction: column; } .ob-contact .ob-send { margin-top: auto; } }

/* product cards: the image sits flush against the card border; only the text keeps an inner margin */
.ob-card:not(.ob-custom) { padding: 0 0 var(--sp-12); }
.ob-card:not(.ob-custom) .ob-img { border: 0; border-bottom: var(--border); background: var(--white); }
.ob-card[data-ob-cat="hangers"]:not(.ob-custom) .ob-img img { padding: 0; }
.ob-card:not(.ob-custom) > :not(.ob-img):not(.ob-toggle) { margin-inline: var(--sp-12); }
.ob-card:not(.ob-custom) .ob-toggle { top: var(--sp-10); right: var(--sp-10); }

/* each product card carries a "View" link to its own product page (a link cannot sit inside the card button) */
.ob-cell { position: relative; display: flex; min-width: 0; }
.ob-cell > .ob-card { flex: 1; min-width: 0; }
.ob-cell:has(> .ob-card[hidden]) { display: none; }
.ob-cell > .ob-card:not(.ob-custom) { padding-bottom: var(--sp-12); }
.ob-cell > .ob-card .ob-name, .ob-cell > .ob-card .ob-cat, .ob-cell > .ob-card .ob-added { margin-right: 72px; }
.ob-view { position: absolute; right: var(--sp-12); bottom: var(--sp-12); display: inline-flex; align-items: center; gap: var(--sp-4); height: 28px; padding: 0 var(--sp-10); border: var(--border-strong); background: var(--surface); color: var(--navy); font-size: var(--fs-xs); font-weight: var(--fw-semibold); transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.ob-view:hover, .ob-view:focus-visible { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* one Submit button sends the request (to the admin panel once it exists) */
.ob-submit { width: 100%; justify-content: center; }
.ob-submit:disabled { opacity: .7; cursor: progress; }
