.cart-fab{
    position:fixed; right:20px; bottom:20px; width:56px; height:56px; border-radius:999px;
    display:grid; place-items:center; background:#111; color:#fff; box-shadow:0 10px 20px rgba(0,0,0,.25);
    cursor:pointer; z-index:1001; border:none;
  }
  .cart-fab[hidden]{ display:none; }
  .cart-fab .badge{
    position:absolute; top:-6px; right:-6px; background:#e11d48; color:#fff; min-width:22px;
    padding:6px 7px; border-radius:999px; font-size:12px; line-height:1; text-align:center;
  }

  .cart-backdrop{
    position:fixed; inset:0; background:rgba(0,0,0,.35);
    opacity:0; pointer-events:none; transition:opacity .25s ease; z-index:1000;
  }
  .cart-backdrop.open{ opacity:1; pointer-events:auto; }

  .cart-sidebar{
    position:fixed; top:0; right:0; width:min(420px,100vw); height:100vh; background:#fff;
    box-shadow:-8px 0 24px rgba(0,0,0,.25); transform:translateX(100%); transition:transform .28s ease;
    z-index:1001; display:grid; grid-template-rows:auto 1fr auto;
  }
  .cart-sidebar.open{ transform:translateX(0); }

  .cart-header{ padding:14px 16px; border-bottom:1px solid #eee; display:flex; align-items:center; justify-content:space-between; }
  .cart-items{ overflow:auto; padding:12px; display:flex; flex-direction:column; gap:10px; }
  .cart-item{ display:grid; grid-template-columns:64px 1fr auto; gap:12px; align-items:center; border:1px solid #eee; border-radius:12px; padding:8px; }
  .cart-item img{ width:64px; height:64px; border-radius:8px; object-fit:cover; background:#fafafa; }
  .cart-item h4{ margin:0; font-size:.98em; }
  .muted{ color:#666; font-size:.9em; }

  .qty-ctl{ display:inline-flex; align-items:center; gap:6px; }
  .qty-ctl button{ width:28px; height:28px; border-radius:6px; border:1px solid #ddd; background:#fff; cursor:pointer; }

  .cart-footer{ border-top:1px solid #eee; padding:12px 16px; display:flex; align-items:center; gap:10px; justify-content:space-between; flex-wrap:wrap; }
  .subtotal{ font-weight:700; font-size:1.05em; }
  .btn{ cursor:pointer; border:none; border-radius:10px; padding:12px 16px; font-weight:700; }
  .btn.primary{ background:#111; color:#fff; }
  .btn.ghost{ background:transparent; border:1px solid #ddd; color:#111; }

  .qty-ctl button:disabled {
    opacity: .5;
    cursor: not-allowed;
  }