/* /order: step-by-step hardware ordering for current clients. Builds on styles.css (mobile-first). */
.order-page{background:linear-gradient(180deg,var(--bg) 0%,#EEF3F7 100%)}
.ob-layout{padding-bottom:132px}
.ob-card{border-radius:20px;padding:22px 18px 26px;box-shadow:0 1px 2px rgba(28,47,65,.05),0 12px 32px rgba(28,47,65,.07)}
.ob-step{animation:ob-in .22s ease-out}
@keyframes ob-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.ob-step .step-sub{margin-bottom:20px}
.ob-label{display:block;font-weight:600;font-size:14px;color:var(--ink);margin-bottom:6px}
.ob-sub{margin:22px 0 10px}
.ob-back{background:none;border:0;font:inherit;font-size:14px;font-weight:600;color:var(--cyan-800);cursor:pointer;padding:6px 0;margin:-4px 0 12px;display:inline-flex;gap:6px;min-height:36px;align-items:center}
.ob-back:hover{text-decoration:underline}

/* Icon tile */
.ob-ic{flex:none;width:56px;height:56px;border-radius:16px;background:linear-gradient(145deg,var(--navy-900),var(--navy));color:var(--mint);display:grid;place-items:center;box-shadow:inset 0 0 0 1px rgba(255,255,255,.06)}
.ob-ic svg{width:32px;height:32px}
.ob-ic.sm{width:44px;height:44px;border-radius:12px}
.ob-ic.sm svg{width:24px;height:24px}

/* Step 1: category cards */
.ob-cats{display:grid;gap:12px}
.ob-cat{display:flex;align-items:center;gap:14px;width:100%;text-align:left;font:inherit;color:var(--ink);background:#fff;border:1.5px solid var(--line);border-radius:16px;padding:16px;cursor:pointer;box-shadow:0 1px 2px rgba(28,47,65,.04);transition:border-color .15s,box-shadow .15s,transform .15s}
.ob-cat:hover{border-color:var(--navy);box-shadow:0 8px 22px rgba(28,47,65,.10);transform:translateY(-1px)}
.ob-cat:focus-visible{box-shadow:var(--focus)}
.ob-cat-txt{flex:1;min-width:0}
.ob-cat-name{display:block;font-weight:700;font-size:17px;color:var(--navy)}
.ob-cat-desc{display:block;font-size:14px;color:var(--muted);margin-top:2px}
.ob-cat-price{display:inline-block;margin-top:8px;font-size:13px;font-weight:700;color:var(--mint-700);background:var(--mint-50);border-radius:999px;padding:2px 10px}
.ob-cat-price.quote{color:#5A4A00;background:#FFF2C2}
.ob-cat-in{display:inline-block;margin:8px 0 0 6px;font-size:13px;font-weight:700;color:var(--navy);background:var(--bg);border-radius:999px;padding:2px 10px}
.ob-cat-go{flex:none;color:var(--navy);opacity:.55}
.ob-cat:hover .ob-cat-go{opacity:1}

/* Step 2 */
.ob-cat-head{display:flex;gap:14px;align-items:flex-start;margin-bottom:4px}
.ob-cat-head .step-sub{margin-bottom:16px}
.dd{position:relative}
.dd-btn{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;font:inherit;font-size:16px;color:var(--ink);background:#fff;border:1.5px solid #C4D0DB;border-radius:12px;padding:12px 14px;min-height:54px;cursor:pointer;text-align:left}
.dd-btn:hover{border-color:var(--navy)}
.dd-btn:focus-visible,.dd-btn[aria-expanded="true"]{outline:none;border-color:var(--cyan-800);box-shadow:0 0 0 3px rgba(0,211,251,.3)}
.dd-val{display:flex;flex-direction:column;min-width:0}
.dd-val b{font-weight:700}
.dd-val small{font-size:13px;color:var(--muted)}
.dd-chev{flex:none;color:var(--navy);transition:transform .15s}
.dd-btn[aria-expanded="true"] .dd-chev{transform:rotate(180deg)}
.dd-list{position:absolute;z-index:20;left:0;right:0;top:calc(100% + 6px);list-style:none;margin:0;padding:6px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 16px 40px rgba(28,47,65,.18);max-height:320px;overflow:auto}
.dd-list:focus{outline:none}
.dd-opt{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px;border-radius:10px;cursor:pointer}
.dd-opt b{display:block;color:var(--ink)}
.dd-opt small{display:block;font-size:13px;color:var(--muted)}
.dd-opt .dd-p{flex:none;font-size:14px;font-weight:700;color:var(--navy)}
.dd-opt .dd-p.quote{font-size:12px;color:#5A4A00;background:#FFF2C2;border-radius:999px;padding:2px 9px}
.dd-opt.active{background:var(--cyan-50)}
.dd-opt[aria-selected="true"] b::after{content:" ✓";color:var(--mint-700)}

.ob-item{margin-top:16px;border:1.5px solid var(--line);border-radius:16px;padding:18px;background:linear-gradient(180deg,#fff 0%,#FAFCFD 100%)}
.ob-item-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap}
.ob-item-name{font-size:18px;font-weight:700;color:var(--navy)}
.ob-item-desc{font-size:14px;color:var(--muted);margin-top:2px}
.ob-item-price{font-size:22px;font-weight:700;color:var(--navy);white-space:nowrap}
.ob-item-price small{font-size:13px;font-weight:500;color:var(--muted)}
.ob-qty{margin-top:16px}
.ob-qty-h{display:block;font-weight:600;font-size:14px;margin-bottom:8px}
.ob-chips{display:flex;flex-wrap:wrap;gap:8px}
.ob-chip{font:inherit;font-weight:700;font-size:15px;color:var(--navy);background:#fff;border:1.5px solid #C4D0DB;border-radius:999px;padding:8px 16px;min-height:42px;min-width:58px;cursor:pointer}
.ob-chip:hover{border-color:var(--navy)}
.ob-chip[aria-pressed="true"]{background:var(--navy);border-color:var(--navy);color:var(--mint)}
.ob-custom{margin-top:10px;display:flex;align-items:center;gap:10px}
.ob-custom input{width:120px;font:inherit;font-size:16px;font-weight:700;border:1.5px solid #C4D0DB;border-radius:10px;padding:10px 12px;min-height:46px}
.ob-custom input:focus{outline:none;border-color:var(--cyan-800);box-shadow:0 0 0 3px rgba(0,211,251,.3)}
.ob-line{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:16px;padding-top:14px;border-top:1px dashed var(--line);font-size:15px;color:var(--muted)}
.ob-line b{color:var(--ink);font-size:17px}
.ob-add{width:100%;margin-top:14px}
.ob-quote{margin-top:14px;display:flex;gap:12px;align-items:flex-start;background:#FFFAEB;border:1px solid #F3E3A8;border-radius:14px;padding:14px}
.ob-quote svg{flex:none;color:#9A6B00;margin-top:2px}
.ob-quote p{font-size:14px;color:#4D3B00}
.ob-quote .btn{margin-top:10px;min-height:42px;font-size:15px}
.ob-added{margin-top:14px;background:var(--mint-50);border:1px solid #9BEFD6;border-radius:14px;padding:14px;display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px}
.ob-added p{flex:1 1 220px;font-weight:600;color:#064E3B;display:flex;gap:8px;align-items:center}
.ob-added .btn{min-height:42px;font-size:15px;padding:9px 16px}

/* Stepper (shared) */
.ob-stepper{display:inline-flex;align-items:center;border:1.5px solid #C4D0DB;border-radius:12px;overflow:hidden;background:#fff}
.ob-stepper button{width:42px;height:44px;border:0;background:#fff;font:inherit;font-size:20px;color:var(--navy);cursor:pointer}
.ob-stepper button:hover{background:var(--bg)}
.ob-stepper button:focus-visible{box-shadow:inset 0 0 0 3px var(--cyan-800);border-radius:0}
.ob-stepper input{width:64px;height:44px;border:0;border-left:1px solid var(--line);border-right:1px solid var(--line);text-align:center;font:inherit;font-weight:700;color:var(--ink);-moz-appearance:textfield}
.ob-stepper input::-webkit-outer-spin-button,.ob-stepper input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.ob-stepper input:focus{outline:none;box-shadow:inset 0 0 0 3px rgba(0,211,251,.5)}

/* Step 3: cart */
.ob-cart{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.ob-row{display:grid;grid-template-columns:auto 1fr;gap:12px 14px;align-items:center;border:1.5px solid var(--line);border-radius:16px;padding:14px}
.ob-row-txt b{display:block;color:var(--navy)}
.ob-row-txt small{display:block;color:var(--muted);font-size:13px}
.ob-row-ctl{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.ob-row-sub{font-weight:700;color:var(--ink);font-size:16px}
.ob-remove{background:none;border:0;font:inherit;font-size:14px;font-weight:600;color:var(--err);cursor:pointer;padding:6px 4px;min-height:40px;text-decoration:underline;text-underline-offset:3px}
.ob-empty{border:1.5px dashed #C4D0DB;border-radius:16px;padding:22px;text-align:center;color:var(--muted)}
.ob-cart-total{display:flex;justify-content:space-between;align-items:baseline;margin-top:16px;padding:14px 16px;border-radius:14px;background:var(--navy);color:#fff;font-weight:700}
.ob-cart-total span:last-child{color:var(--mint);font-size:22px}
.ob-nav{display:flex;flex-direction:column-reverse;gap:10px;margin-top:22px}
.ob-nav .btn{width:100%}
.ob-state-zip{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.ob-pay{margin-top:22px}
.ob-pay .btn{width:100%}

/* Running total: mobile sticky bar */
.ob-sum-card{display:none}
.ob-bar{position:fixed;left:0;right:0;bottom:0;z-index:50;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px calc(12px + env(safe-area-inset-bottom));background:var(--navy-900);color:#fff;box-shadow:0 -8px 24px rgba(28,47,65,.22);border-radius:18px 18px 0 0}
.ob-bar-main{display:flex;flex-direction:column;line-height:1.2}
.ob-bar-label{font-size:12px;color:#C7D5E2}
.ob-bar-total{font-size:20px;font-weight:700;color:var(--mint)}
.ob-bar-cta{min-height:44px;padding:10px 18px;font-size:15px}

/* Tablet+ */
@media (min-width:640px){
  .ob-card{padding:30px 32px 34px}
  .ob-cats{grid-template-columns:1fr 1fr}
  .ob-cat{flex-direction:column;align-items:flex-start;padding:20px;min-height:184px}
  .ob-cat-go{display:none}
  .ob-row{grid-template-columns:auto 1fr auto;}
  .ob-row-ctl{grid-column:auto;justify-content:flex-end}
  .ob-nav{flex-direction:row;justify-content:space-between}
  .ob-nav .btn{width:auto}
  .ob-add{width:auto}
  .ob-pay .btn{width:auto;min-width:260px}
}
/* Desktop: sticky sidebar */
@media (min-width:1000px){
  .ob-layout{grid-template-columns:minmax(0,1fr) 330px;align-items:start;padding-top:32px;padding-bottom:64px}
  .ob-bar{display:none}
  .ob-sum{position:sticky;top:20px}
  .ob-sum-card{display:block;background:#fff;border-radius:20px;padding:22px;box-shadow:0 1px 2px rgba(28,47,65,.05),0 12px 32px rgba(28,47,65,.07)}
  .ob-sum-h{font-size:16px;font-weight:700;color:var(--navy);margin-bottom:10px}
  .ob-sum-lines{list-style:none;margin:0;padding:0}
  .ob-sum-lines li{display:flex;justify-content:space-between;gap:12px;font-size:14px;padding:6px 0;border-bottom:1px solid var(--line)}
  .ob-sum-lines li small{display:block;color:var(--muted);font-size:12px}
  .ob-sum-lines li span:last-child{font-weight:600;white-space:nowrap}
  .ob-sum-lines .none{color:var(--muted);border:0}
  .ob-sum-total{display:flex;justify-content:space-between;align-items:baseline;margin-top:12px;padding:12px 14px;border-radius:12px;background:var(--navy);color:#fff;font-weight:700}
  .ob-sum-total span:last-child{color:var(--mint);font-size:20px}
  .ob-sum-note,.ob-sum-help{font-size:12px;color:var(--muted);margin-top:10px}
  .ob-sum-cta{width:100%;margin-top:12px}
  .order-page .ftr{padding-bottom:22px}
}
@media (prefers-reduced-motion:reduce){.ob-step{animation:none}}

/* Mobile fix (Nov 1, 2026): the running-total bar (up to ~70px) must never cover a primary button.
   Below 1000px "Add to order", the review buttons and "Pay securely" stick just above the bar. */
@media (max-width:999px){
  .order-page{--ob-bar-h:calc(70px + env(safe-area-inset-bottom))}
  html:has(body.order-page){scroll-padding-bottom:calc(70px + env(safe-area-inset-bottom) + 140px)}
  .order-page .ob-layout{padding-bottom:calc(var(--ob-bar-h) + 80px)}
  .order-page .ob-nav{position:sticky;bottom:var(--ob-bar-h);z-index:40;background:#fff;padding:12px 0;margin-bottom:-12px}
  .order-page .ob-add{position:sticky;bottom:calc(var(--ob-bar-h) + 10px);z-index:40;box-shadow:0 0 0 10px #fff,0 22px 0 10px #fff}
  .order-page .ob-pay{display:contents}
  .order-page .ob-pay #pay{position:sticky;bottom:calc(var(--ob-bar-h) + 10px);z-index:40;margin-top:22px;box-shadow:0 0 0 10px #fff,0 22px 0 10px #fff}
}
