/* Floating pill (bottom-right) */
#igf-cart-pill {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  background: #dc2626;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border: none;
  display: none;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
}
#igf-cart-pill.visible { display: inline-flex; }
#igf-cart-pill .pill-count {
  background: #fff;
  color: #dc2626;
  border-radius: 999px;
  padding: 0 0.5rem;
  font-size: 0.85rem;
  min-width: 1.4rem;
  text-align: center;
}

/* Drawer overlay */
#igf-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1001;
  display: none;
}
#igf-cart-overlay.open { display: block; }

/* Drawer */
#igf-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: #fff;
  z-index: 1002;
  transform: translateX(100%);
  transition: transform 200ms ease;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
}
#igf-cart-drawer.open { transform: translateX(0); }

.drawer-header {
  padding: 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-header h2 { margin: 0; font-size: 1.25rem; }
.drawer-close {
  background: none; border: none; font-size: 1.5rem; cursor: pointer;
  color: #6b7280;
}
.drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
}
.drawer-line {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
}
.drawer-line-name { font-weight: 600; font-size: 0.95rem; }
.drawer-line-pn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.15rem;
}
.qty-controls { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.qty-controls button {
  width: 1.5rem; height: 1.5rem;
  border: 1px solid #d1d5db; background: #fff;
  border-radius: 4px; cursor: pointer;
}
.drawer-line-remove {
  background: none; border: none; color: #dc2626;
  cursor: pointer; margin-left: auto; padding: 0.25rem;
}
.drawer-footer {
  padding: 1.25rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}
.drawer-footer .row {
  display: flex; justify-content: space-between; margin-bottom: 0.5rem;
}
.drawer-footer .subtotal { font-size: 1.1rem; font-weight: 700; }
.drawer-footer .muted { color: #6b7280; font-size: 0.85rem; }
.drawer-buttons { display: flex; gap: 0.5rem; margin-top: 1rem; }
.drawer-buttons .btn-primary,
.drawer-buttons .btn-secondary { flex: 1; }
.drawer-empty { padding: 2rem 1.25rem; text-align: center; color: #6b7280; }

@media (max-width: 768px) {
  #igf-cart-drawer { max-width: 100%; }
}
