/* The mobile bar delegates to the existing product controls and checkout. */
.ss-purchase-bar,.ss-size-sheet:not([open]) { display:none; }
.ss-size-sheet { width:min(520px,calc(100% - 24px)); max-height:80vh; max-height:80dvh; padding:0; border:1px solid var(--theme-border); border-radius:20px; background:var(--theme-surface); color:var(--theme-text); }
.ss-size-sheet::backdrop { background:rgb(0 0 0 / .5); }
.ss-size-head { display:flex; align-items:center; gap:12px; padding:18px; border-bottom:1px solid var(--theme-border); }
.ss-size-head h2 { font-size:18px; margin:0; }
.ss-size-head p { font-size:12px; margin:4px 0 0; color:var(--muted,#666); }
.ss-size-close { margin-inline-start:auto; border:1px solid var(--theme-border); border-radius:50%; width:40px; height:40px; flex:none; background:var(--theme-surface); color:inherit; font-size:24px; cursor:pointer; }
.ss-size-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:16px; overflow:auto; max-height:56vh; max-height:56dvh; }
.ss-size-options .sz { min-width:0; padding:10px 4px; min-height:66px; }
.ss-size-options .sz[aria-pressed=true] { outline:2px solid currentColor; outline-offset:1px; }
.ss-checkout-error { color:#b00020; background:#fff1f3; padding:12px; border-radius:10px; font-size:14px; }
.ss-checkout-error:empty { display:none; }
html[data-theme=dark] .ss-checkout-error { color:#ff9daf; background:#482631; }
@media(max-width:700px) {
  body.ss-purchase-ready { padding-bottom:calc(90px + env(safe-area-inset-bottom)); }
  .ss-purchase-ready .ss-purchase-bar { display:flex; position:fixed; bottom:0; left:0; right:0; z-index:45; gap:12px; align-items:center; padding:12px 16px calc(12px + env(safe-area-inset-bottom)); border-top:1px solid var(--theme-border); background:var(--theme-surface); color:var(--theme-text); box-shadow:0 -4px 24px rgb(0 0 0 / .08); }
  .ss-purchase-summary { flex:1; min-width:0; }
  .ss-purchase-price { display:block; font-size:19px; font-weight:800; white-space:nowrap; }
  .ss-purchase-size { display:block; border:0; background:none; color:inherit; padding:3px 0; font:inherit; font-size:12px; text-decoration:underline; text-underline-offset:3px; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
  .ss-purchase-action { flex:0 0 48%; max-width:240px; min-height:48px; border:0; border-radius:26px; font:inherit; font-weight:700; background:var(--theme-text); color:var(--theme-surface); padding:10px 12px; cursor:pointer; }
  .ss-purchase-action:disabled { opacity:.55; cursor:wait; }
  .ss-purchase-action:focus-visible,.ss-purchase-size:focus-visible { outline:2px solid #c0122b; outline-offset:3px; }
  .pwrap .prod { padding:14px; gap:12px; }
  .pwrap .gal .main { height:220px; }
  .pwrap .th { width:48px; height:48px; }
  .pwrap .szs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); max-height:270px; overflow:auto; padding:3px; scrollbar-width:thin; }
  .pwrap .szs .sz { min-width:0; padding:8px 4px; }
  .ss-size-sheet { margin:auto 0 0; width:100%; max-width:none; max-height:85vh; max-height:85dvh; border-radius:20px 20px 0 0; padding-bottom:env(safe-area-inset-bottom); box-sizing:border-box; }
}
