/* Overlay */
#cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9998;
}

/* Modal panel */
#cart-modal {
  position: relative;
  display: flex;
  flex-direction: column;  /* body + footer stacked */
  background: #fff;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  z-index: 9999;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(.2,.9,.2,1), opacity 0.28s ease;
  -webkit-overflow-scrolling: touch;
}
#cart-overlay.show #cart-modal {
  transform: scale(1);
  opacity: 1;
}

/* Close button */
#cart-close {
  background-color: transparent;
  color: #B4B4B4;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  font-size: 30px;
  line-height: 10px;
  text-align: center;
  cursor: pointer;
  z-index: 10000;
  opacity: 0;                /* hidden initially */
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* Scrollable body */
#cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 40px 20px 20px 20px;
}

/* Sticky footer */
#cart-footer {
  border-top: 1px solid #eee;
  padding: 15px 20px;
  background: #fff;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}

/* Checkout button full width CTA */
#cart-footer .desktop-checkout-btn {
  display: block !important;
  width: 100% !important;
  text-align: center;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 12px 14px;
  border-radius: 10px;
  background: #28d512;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600;
  border: none !important;
}

/* ===============================
   Processing state when removing
   =============================== */
.cartfix-processing {
  position: relative;
  opacity: 0.6;
}

.cartfix-processing::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(200,200,200,0.3),
    rgba(200,200,200,0.3) 10px,
    rgba(230,230,230,0.5) 10px,
    rgba(230,230,230,0.5) 20px
  );
  animation: cartfix-stripes 1s linear infinite;
  z-index: 10;
}

@keyframes cartfix-stripes {
  from { background-position: 0 0; }
  to   { background-position: 40px 0; }
}