.seg{display:grid;grid-template-columns:1fr 1fr;background:var(--fill);border-radius:12px;padding:4px;margin-bottom:var(--s-3)}
.seg button{border:0;background:none;min-height:40px;border-radius:9px;font-weight:700;font-size:14px;color:var(--ink-2)}
.seg button.on{background:var(--surface);color:var(--navy-900);box-shadow:var(--sh-1)}
@media (min-width:1024px){.seg{width:420px}}
.lowcard{background:var(--navy-900);border-color:var(--navy-900);color:#fff}
.lowcard .lbl{color:var(--navy-300)}
.lowcard h2{color:#fff;margin:6px 0 10px}
.lowcard .ln{display:flex;justify-content:space-between;padding:8px 0;border-top:1px solid rgba(255,255,255,.12);font-size:14px}
.lowcard .ln b{font-family:var(--font-mono);font-weight:500;color:#FF9878}
.lowcard .muted{color:var(--navy-300);margin-top:10px}
.shopbar{font-size:var(--fs-13);color:var(--ink-2);margin-top:2px}
.search{position:relative;margin-top:12px}
.search svg{position:absolute;left:13px;top:50%;width:18px;height:18px;margin-top:-9px;fill:none;stroke:var(--ink-3);stroke-width:2}
.search input{padding-left:40px}
.ochips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0 calc(-1*var(--gutter-phone)) var(--s-3);padding:0 var(--gutter-phone)}
.ochips .chip{flex:none}
.ochips .chip small{font-family:var(--font-mono);font-size:11px;margin-left:6px;opacity:.7}
.otoolbar{display:flex;align-items:center;gap:8px;margin-bottom:var(--s-3)}
.otoolbar .ocount{flex:1;font-size:var(--fs-13);color:var(--ink-2)}
.otoolbar select{width:auto;min-height:36px;padding:6px 32px 6px 10px;font-size:13px}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.prod{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-md);overflow:hidden;display:flex;flex-direction:column}
.pimg{aspect-ratio:1/1;background:#F1EEE7;display:grid;place-items:center;position:relative}
.pimg svg{width:62%;height:62%}
.pimg .sale{position:absolute;left:8px;top:8px;background:var(--coral);color:#fff;font-size:11px;font-weight:700;border-radius:6px;padding:2px 7px}
.pbody{padding:10px 10px 12px;display:flex;flex-direction:column;flex:1}
.pname{font-size:13.5px;font-weight:650;line-height:1.3;min-height:35px}
.pprice{font-size:17px;font-weight:800;margin-top:6px;letter-spacing:-.01em}
.pprice s{font-size:12.5px;color:var(--ink-3);font-weight:500;margin-left:6px}
.pact{margin-top:10px}
.pact .btn{width:100%;min-height:40px;font-size:14px}
.pstep{display:grid;grid-template-columns:40px 1fr 40px;align-items:center;border:1px solid var(--line-2);border-radius:10px;overflow:hidden}
.pstep button{border:0;background:var(--navy-50);height:40px;font-size:18px;font-weight:700;color:var(--navy-900)}
.pstep b{text-align:center;font-size:15px}
.cartbar{position:sticky;bottom:66px;z-index:9;margin:var(--s-3) calc(-1*var(--gutter-phone)) 0;padding:13px var(--gutter-phone);background:var(--navy-900);color:#fff;font-weight:700;font-size:14px;display:flex;align-items:center;gap:10px}
.cartbar i{width:8px;height:8px;border-radius:50%;background:#FF9878;flex:none}
.cart .ln{display:flex;align-items:center;gap:8px;padding:10px 0;border-bottom:1px solid var(--line)}
.cart .ln .n{flex:1;min-width:0;font-size:14px;font-weight:600}
.cart .ln .n .muted{font-weight:400}
.olow{display:inline-block;margin-left:6px;font-size:11px;font-weight:700;color:var(--coral);background:var(--coral-100);border-radius:5px;padding:1px 6px;vertical-align:1px}
.cart .ln b{min-width:22px;text-align:center}
.free{margin-top:10px}
.free .tr{height:6px;background:var(--fill);border-radius:4px;margin-top:6px;overflow:hidden}
.free .tr i{display:block;height:6px;width:86%;background:var(--navy-700);border-radius:4px}
.total{font-weight:800;font-size:20px;margin-top:12px}
/* filters: a sheet on phones, a sidebar on laptops */
.ofilters{display:none}
.ofgroup{padding:12px 0;border-top:1px solid var(--line)}
.ofgroup h4{font-size:13px;margin:0 0 8px;color:var(--ink)}
.ofopt{display:flex;align-items:center;gap:9px;font-size:14px;color:var(--ink);font-weight:500;margin:0;padding:5px 0}
.ofopt input{width:18px;height:18px;min-height:0;accent-color:var(--navy-900);flex:none}
.tree div{display:flex;justify-content:space-between;font-size:14px;padding:5px 0}
.tree div span{font-family:var(--font-mono);font-size:12px;color:var(--ink-3)}
.tree .on{font-weight:700;color:var(--navy-900)}
.tree .kid{padding-left:14px;font-size:13.5px}
@media (min-width:1024px){
  .shoprow{display:grid;grid-template-columns:230px minmax(0,1fr) 320px;gap:var(--s-4);align-items:start}
  .ofilters{display:block;position:sticky;top:84px}
  .ofbtn{display:none}
  .grid{grid-template-columns:repeat(3,1fr);gap:14px}
  .cartbar{display:none}
  .cartcol{position:sticky;top:84px}
  .ochips{margin:0 0 var(--s-3);padding:0;flex-wrap:wrap}
  .toprow{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:var(--s-4);align-items:start}
}

/* Phone fix (23 Sept): the two-up switch would not shrink below its longest label,
   which pushed the whole Order tab wider than the screen. */
.seg{grid-template-columns:repeat(2,minmax(0,1fr))}
.seg button{min-width:0;padding:0 8px;line-height:1.2;white-space:normal}
/* the department chips scroll sideways inside the screen instead of stretching it */
.shoprow,.oshopmain{min-width:0}
.ochips{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.cartbar{max-width:100%}
/* the app's own switch is a flex row; its buttons must be allowed to shrink too */
.ordswitch{min-width:0}
.ordswitch button{min-width:0;white-space:normal;line-height:1.2}
/* two product cards per phone row, each allowed to shrink (long names were setting the width) */
.grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid > *{min-width:0}
@media (min-width:1024px){.grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
/* The chips row bleeds to the screen edges with a negative margin. In the app that made the
   whole page as wide as the row, so the bleed is kept but the row is held to the screen. */
.ochips{max-width:calc(100% + 2*var(--gutter-phone))}
.oshopmain{overflow-x:clip}
@media (min-width:1024px){.ochips{margin-left:0;margin-right:0;padding-left:0;padding-right:0;max-width:100%}}
/* Final: no edge-to-edge bleed for the chips row inside the app - it kept widening the page.
   The row still scrolls sideways, it just starts and ends with the rest of the content. */
.ochips{margin-left:0;margin-right:0;padding-left:0;padding-right:0;width:100%;max-width:100%}
/* the product grid has an id in the app, so the count of columns needs the id too */
#ordResults.grid{grid-template-columns:repeat(2,minmax(0,1fr))}
@media (min-width:1024px){#ordResults.grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
