/* Container */
.cart-drawer-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

/* Overlay with smooth fade */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.drawer-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Drawer panel with smooth slide */
.drawer-wrapper {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  max-width: 440px;
  background-color: #ffffff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
  z-index: 10001;
  transform: translateX(100%);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  will-change: transform; /* Help with animation performance */
}

.drawer-wrapper.visible {
  transform: translateX(0);
}

@media screen and (min-width: 768px) {
  .drawer-wrapper {
    width: 440px;
  }
}

/* Add styles for the close button to make it more noticeable */
.drawer-close {
  padding: 8px;
  cursor: pointer;
  background-color: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.drawer-close:hover {
  transform: scale(1.1);
}

.drawer-close:active {
  transform: scale(0.95);
}

/* Ensure content scrolls properly */
.cart-order-container {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}