.cart-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1200;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: #ffbe33;
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.28);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.cart-fab:active {
  transform: translateY(1px);
}

.cart-fab svg {
  width: 22px;
  height: 22px;
  fill: #111827;
}

.cart-fab__badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.cart-fab__badge[hidden] {
  display: none !important;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 1300;
  pointer-events: none;
}

.cart-drawer.is-open {
  pointer-events: auto;
}

.cart-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.48);
  opacity: 0;
  transition: opacity 180ms ease;
}

.cart-drawer.is-open .cart-drawer__backdrop {
  opacity: 1;
}

.cart-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 92vw);
  background: #ffffff;
  transform: translateX(100%);
  transition: transform 220ms ease;
  box-shadow: -24px 0 60px rgba(17, 24, 39, 0.25);
  display: flex;
  flex-direction: column;
}

.cart-drawer.is-open .cart-drawer__panel {
  transform: translateX(0);
}

.cart-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.cart-drawer__title {
  font-size: 16px;
  font-weight: 800;
  color: #111827;
  margin: 0;
}

.cart-drawer__meta {
  margin-top: 4px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
}

.cart-drawer__close {
  border: 0;
  background: transparent;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  color: #111827;
  font-size: 22px;
  line-height: 1;
}

.cart-drawer__close:hover {
  background: rgba(17, 24, 39, 0.06);
}

.cart-drawer__body {
  padding: 12px 16px 16px;
  overflow: auto;
  flex: 1;
}

.cart-empty {
  border: 1px dashed rgba(17, 24, 39, 0.22);
  border-radius: 14px;
  padding: 14px;
  color: #374151;
  background: rgba(255, 190, 51, 0.10);
  font-weight: 600;
}

.cart-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.cart-item:last-child {
  border-bottom: 0;
}

.cart-item__img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  object-fit: cover;
  background: #fff;
}

.cart-item__name {
  font-weight: 800;
  font-size: 14px;
  color: #111827;
  margin: 0;
}

.cart-item__sub {
  margin-top: 2px;
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}

.cart-item__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 999px;
  padding: 6px 10px;
}

.cart-qty__btn {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 0;
  background: rgba(17, 24, 39, 0.08);
  color: #111827;
  font-weight: 900;
  cursor: pointer;
}

.cart-qty__btn:hover {
  background: rgba(17, 24, 39, 0.12);
}

.cart-qty__val {
  min-width: 18px;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
}

.cart-remove {
  border: 0;
  background: transparent;
  color: #b91c1c;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 10px;
}

.cart-remove:hover {
  background: rgba(185, 28, 28, 0.08);
}

.cart-drawer__footer {
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  padding: 14px 16px 16px;
  background: #fff;
}

.cart-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-weight: 900;
  color: #111827;
  margin-bottom: 12px;
}

.cart-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cart-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid rgba(17, 24, 39, 0.12);
}

.cart-actions a.primary {
  background: #ffbe33;
  border-color: #ffbe33;
  color: #111827;
}

.cart-actions a.secondary {
  background: #ffffff;
  color: #111827;
}

.cart-actions a.ghost {
  grid-column: 1 / -1;
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

@media (max-width: 520px) {
  .cart-fab {
    right: 14px;
    bottom: 14px;
  }
}

