/* ============================================================
   Aspect V3 home - order builder (markup build.mjs §builder, behaviour v3/builder.js).
   Aspect's take on a quantity builder: a lit lab bench (fine azure grid, soft spotlight, glass
   shelf) where the chosen compound's real vials stand in a row, every second one stamped $0;
   a white order card prices Buy 1 Get 1 live, shows the per-vial price, the saving, free BAC
   water and the run to free priority shipping; four real Aspect offers sit underneath.
   MOTION: count change = new vials rise in from the shelf (70ms apart), removed ones sink out;
   compound change = row swaps and the laser reads every label once; $0 tags stamp; totals roll;
   shipping bar eases. Reduced motion: instant, static.
   ============================================================ */
.ob-head { margin-bottom: 22px; }
.ob { position: relative; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; padding: 18px; border-radius: 30px;
  background: linear-gradient(180deg, #f8fafd 0%, #edf2fa 100%); box-shadow: 0 0 0 1px rgba(11, 21, 49, .06), 0 26px 60px -40px rgba(11, 21, 49, .4); }
.ob-bench { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; min-width: 0; padding: 18px 20px 16px; border-radius: 22px;
  background: radial-gradient(60% 70% at 50% 62%, #ffffff 0%, rgba(255, 255, 255, .6) 40%, transparent 75%); }
.ob-grid { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .8;
  background-image: linear-gradient(rgba(21, 97, 220, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(21, 97, 220, .06) 1px, transparent 1px); background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(75% 70% at 50% 45%, #000 30%, transparent 85%); mask-image: radial-gradient(75% 70% at 50% 45%, #000 30%, transparent 85%); }
.ob-ctl { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 18px; max-width: 560px; }
.ob-k { margin: 0; font-family: var(--v-mono, var(--font-mono)); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #5a647d; }
.ob-select { position: relative; }
.ob-select select { width: 100%; height: 52px; padding: 0 44px 0 20px; border-radius: 999px; appearance: none; -webkit-appearance: none; cursor: pointer;
  border: 1px solid #d3dae6; background: #fff; color: #0b1531; font: 600 16px var(--font-sans); box-shadow: 0 6px 18px -12px rgba(11, 21, 49, .35); text-overflow: ellipsis; }
.ob-select svg { position: absolute; right: 18px; top: 50%; width: 18px; height: 18px; translate: 0 -50%; pointer-events: none; fill: none; stroke: #0b1531; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ob-select select:focus-visible { outline: none; border-color: #1561dc; box-shadow: 0 0 0 4px rgba(21, 97, 220, .16); }
.ob-counts { display: inline-flex; justify-self: start; gap: 4px; padding: 5px; border-radius: 999px; background: #fff; border: 1px solid #e1e6ef; box-shadow: 0 6px 18px -12px rgba(11, 21, 49, .3); }
.ob-n { min-width: 52px; height: 44px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: #3d475f; font: 600 15px var(--font-sans); cursor: pointer; transition: background-color 200ms, color 200ms; }
.ob-n[aria-checked="true"] { background: #0b1531; color: #fff; }

.ob-stage { position: relative; height: 300px; margin-top: 8px; }
.ob-row { position: absolute; left: 0; right: 0; bottom: 26px; height: var(--vh, 236px); display: flex; justify-content: center; align-items: flex-end; }
.ob-v { position: relative; flex: none; height: 100%; aspect-ratio: 345 / 760; margin-inline: calc(var(--vh, 236px) * -.035); }
.ob-v img { display: block; width: 100%; height: 100%; filter: drop-shadow(0 18px 16px rgba(11, 21, 49, .25)); }
.ob-v .ob-tag { position: absolute; z-index: 2; left: 50%; top: 17%; translate: -50% 0; padding: 4px 9px; border-radius: 999px; background: #5ee6a6; color: #04301c;
  font: 700 12px var(--v-mono, var(--font-mono)); letter-spacing: .04em; box-shadow: 0 8px 18px -8px rgba(4, 48, 28, .6); white-space: nowrap; }
.ob-more { position: relative; z-index: 3; align-self: center; margin-left: 10px; padding: 8px 12px; border-radius: 999px; background: #0b1531; color: #fff; font: 600 13px var(--font-sans); white-space: nowrap; }
.ob-shelf { position: absolute; left: 4%; right: 4%; bottom: 8px; height: 28px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(21, 97, 220, .22), rgba(21, 97, 220, .06) 70%, transparent); }
.ob-shelf::after { content: ""; position: absolute; left: 6%; right: 6%; top: 46%; height: 1px; background: linear-gradient(90deg, transparent, rgba(21, 97, 220, .45), transparent); }
.ob-laser { position: absolute; inset: 0 6% 26px; pointer-events: none; opacity: 0; }
.ob-laser i { position: absolute; left: 0; right: 0; top: 0; height: 100%; translate: 0 36%; }
.ob-laser i::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, #4f8dff 10%, #e6f0ff 50%, #4f8dff 90%, transparent); box-shadow: 0 0 14px 3px rgba(79, 141, 255, .7); }
.ob-lot { margin: 4px 0 0; text-align: center; font-family: var(--v-mono, var(--font-mono)); font-size: 11px; letter-spacing: .06em; color: #5a647d; min-height: 18px; }
.ob-lot b { color: #0b7f4f; font-weight: 600; }
.ob-lot button { margin-left: 6px; padding: 0; border: 0; background: none; color: #1561dc; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- order card ---------- */
.ob-card { display: flex; flex-direction: column; min-width: 0; padding: 24px; border-radius: 22px; background: #fff; box-shadow: 0 0 0 1px rgba(11, 21, 49, .06), 0 18px 40px -26px rgba(11, 21, 49, .4); }
.ob-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 16px; border-bottom: 1px dashed #d3dae6; }
.ob-pill { padding: 6px 12px; border-radius: 999px; background: #0b1531; color: #fff; font: 700 10.5px var(--v-mono, var(--font-mono)); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.ob-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 16px; font-size: 15px; color: #3d475f; }
.ob-line s { color: #6e788d; font-variant-numeric: tabular-nums; }
.ob-total { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 8px; }
.ob-total b { font-size: clamp(2.6rem, 2rem + 1.6vw, 3.4rem); font-weight: 600; letter-spacing: -.05em; line-height: 1; color: #0b1531; font-variant-numeric: tabular-nums; }
.ob-total span { padding-bottom: 6px; font-size: 14px; color: #3d475f; white-space: nowrap; }
.ob-save { align-self: flex-start; margin: 12px 0 0; padding: 5px 12px; border-radius: 999px; background: #e3f5ec; color: #086640; font: 600 13.5px var(--font-sans); }
.ob-save:empty { display: none; }
.ob-line-free { margin-top: 14px; padding-top: 14px; border-top: 1px solid #edf0f5; font-size: 14px; }
.ob-line-free b { color: #086640; font-weight: 600; }
.ob-ship { margin-top: 14px; }
.ob-bar { position: relative; display: block; height: 6px; border-radius: 999px; overflow: hidden; background: #e1e6ef; }
.ob-bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, #1561dc, #4f8dff 70%, #5ee6a6); transition: width 700ms cubic-bezier(.22, 1, .36, 1); }
.ob-ship p { margin: 8px 0 0; font-size: 13.5px; color: #3d475f; }
.ob-ship.is-free p { color: #086640; font-weight: 600; }
.ob-add, .ob-quote { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; margin-top: 18px; border: 0; border-radius: 999px; background: #0b1531; color: #fff;
  font: 600 16px var(--font-sans); cursor: pointer; text-decoration: none; transition: background-color 180ms; }
.ob-add svg, .ob-quote svg, .ob-perks svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ob-add.is-added { background: #0b7f4f; }
.ob-quote[hidden], .ob-add[hidden] { display: none; }
.ob-note { margin: 14px 0 0; font-size: 12.5px; line-height: 1.5; color: #5a647d; }

/* ---------- offers ---------- */
.ob-perks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ob-perks a { position: relative; display: grid; gap: 4px; height: 100%; padding: 20px 22px; border-radius: 20px; background: #fff; color: #0b1531; text-decoration: none;
  box-shadow: 0 0 0 1px rgba(11, 21, 49, .07), 0 10px 26px -22px rgba(11, 21, 49, .4); transition: box-shadow 220ms, translate 220ms; }
.ob-perks b { font-size: 2rem; font-weight: 600; letter-spacing: -.04em; line-height: 1.05; color: #1561dc; font-variant-numeric: tabular-nums; }
.ob-perk-t { margin-top: 8px; font-size: 16px; font-weight: 600; }
.ob-perk-s { font-size: 13.5px; line-height: 1.45; color: #3d475f; }
.ob-perks svg { position: absolute; right: 18px; top: 22px; width: 34px; height: 34px; padding: 9px; border-radius: 50%; background: #f3f5f9; color: #0b1531; transition: background-color 200ms, color 200ms; }
.ob-ruo { margin-top: 18px; }
.ob :is(button, a):focus-visible, .ob-perks a:focus-visible { outline: 2px solid #1561dc; outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .ob-n:hover:not([aria-checked="true"]) { background: #f3f5f9; color: #0b1531; }
  .ob-add:hover, .ob-quote:hover { background: #0a3fa3; }
  .ob-perks a:hover { translate: 0 -3px; box-shadow: 0 0 0 1px rgba(21, 97, 220, .2), 0 18px 34px -22px rgba(11, 21, 49, .5); }
  .ob-perks a:hover svg { background: #0b1531; color: #fff; }
  .ob-select select:hover { border-color: #96a0b3; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .ob-v.is-in { animation: ob-in 620ms cubic-bezier(.22, 1, .36, 1) both; animation-delay: var(--d, 0ms); }
  .ob-v.is-out { animation: ob-out 260ms ease-in both; }
  .ob-v.is-in .ob-tag { animation: ob-stamp 520ms cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: calc(var(--d, 0ms) + 380ms); }
  .ob-laser.is-on { animation: ob-fade 1300ms linear both; }
  .ob-laser.is-on i { animation: ob-laser 1300ms cubic-bezier(.45, 0, .25, 1) both; }
  .ob-roll { display: inline-block; animation: ob-roll 380ms cubic-bezier(.22, 1, .36, 1); }
}
@keyframes ob-in { from { opacity: 0; translate: 0 34px; filter: blur(8px); } }
@keyframes ob-out { to { opacity: 0; translate: 0 22px; filter: blur(6px); } }
@keyframes ob-stamp { 0% { opacity: 0; scale: 1.7; } 60% { opacity: 1; scale: .92; } 100% { scale: 1; } }
@keyframes ob-laser { 0% { translate: 0 36%; } 65% { translate: 0 90%; } 100% { translate: 0 60%; } }
@keyframes ob-fade { 0% { opacity: 0; } 8% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ob-roll { from { opacity: .2; translate: 0 8px; } }

/* ---------- tablet / phone ---------- */
@media (max-width: 1099px) { .ob { grid-template-columns: minmax(0, 1fr); } .ob-perks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) {
  .ob { padding: 10px; border-radius: 24px; gap: 10px; }
  .ob-bench { padding: 14px 10px 12px; }
  .ob-ctl { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ob-ctl .ob-k:not(:first-child) { margin-top: 6px; }
  .ob-counts { justify-self: stretch; justify-content: space-between; }
  .ob-n { min-width: 0; flex: 1; padding: 0 6px; }
  .ob-stage { height: 230px; }
  .ob-card { padding: 18px; }
  .ob-perks { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ob-perks a { padding: 16px 18px; }
  .ob-perks b { font-size: 1.7rem; }
}
.ob-ship[hidden] { display: none; }
.ob-v { margin-inline: calc(var(--vh, 236px) * .016); }   /* labels never overlap */
.ob-line s { color: #5a647d; }
/* ---------- ten vials: two ranks of five, the back rank on a raised shelf ---------- */
.ob-stage { transition: height 420ms cubic-bezier(.22, 1, .36, 1); }
.ob-stage.is-ten { height: 420px; }
.ob-row.is-ten { height: auto; display: grid; grid-template-columns: repeat(5, auto); justify-content: center; align-items: end; row-gap: 18px; }
.ob-row.is-ten .ob-v { height: var(--vh, 180px); }
.ob-row.is-ten::before { content: ""; position: absolute; left: 10%; right: 10%; top: calc(var(--vh, 180px) + 2px); height: 14px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(21, 97, 220, .18), transparent); }
.ob-row.is-ten .ob-v:nth-child(-n + 5) { filter: saturate(.94); }
.ob-n { position: relative; }
.ob-n-off { position: absolute; top: -9px; right: -6px; padding: 2px 6px; border-radius: 999px; background: #5ee6a6; color: #04301c; font: 700 10px var(--v-mono, var(--font-mono)); font-style: normal; letter-spacing: .02em; pointer-events: none; }
.ob-counts { overflow: visible; }
.ob-pill.is-ten { background: #0b7f4f; }
@media (max-width: 599px) { .ob-stage.is-ten { height: 330px; } .ob-row.is-ten { row-gap: 12px; } .ob-n-off { top: -10px; right: -2px; font-size: 9px; } }
/* owner 10-19: room above the footer; card content starts at the top so titles line up across the row */
.ob-sec { padding-bottom: clamp(72px, 5vw + 40px, 140px); }
.ob-perks { margin-top: 20px; }
.ob-perks a { align-content: start; padding: 24px 26px 26px; }
@media (max-width: 599px) { .ob-perks a { padding: 20px 20px 22px; } }
