/* Side Modal Overlay */
.cart-side-overlay {
  position: fixed;
  top: 84px;
  left: 0;
  width: 100%;
  height: calc(100vh - 84px);
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 98;
  backdrop-filter: blur(2px);

  /* Initial state: Hidden and non-interactive */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s ease;
}

.cart-side-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Side Modal */
.cart-side-modal {
  position: fixed;
  top: 84px;
  right: 0;
  width: 450px;
  height: calc(100vh - 84px);
  background-color: #ffffff;
  z-index: 99;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;

  /* Initial state: Hidden and non-interactive */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.95);
  transform-origin: top right;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.cart-side-modal.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
}

/* Override existing cart-dropdown-menu styles to fit the side modal */
.cart-side-modal .cart-dropdown-menu {
  position: relative !important;
  top: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: none !important;
  margin-top: 0 !important;
  animation: none !important;
}

.cart-side-modal .cart-dropdown-body {
  flex: 1;
  max-height: none !important;
  overflow-y: auto;
}

.cart-side-modal .cart-dropdown-footer {
  padding: 24px;
  border-top: 1px solid #eee;
  background-color: #f9f9f9;
}

/* Ensure common close button works */
.cart-side-modal .btn-close {
  cursor: pointer;
}

@media (max-width: 991px) {
  .cart-side-modal,
  .cart-side-overlay {
    display: none !important;
  }
}

@media (max-width: 576px) {
  .cart-side-modal {
    width: 100%;
    right: -100%;
  }
}

/* Empty Cart State Styles */
.cart-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.empty-cart-icon-wrapper {
  width: 180px;
  height: 180px;
  background-color: #fcfcfc;
  border: 1px solid #f0f0f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
}

.empty-cart-icon {
  width: 120px;
  height: auto;
  opacity: 0.8;
}

.empty-cart-text {
  font-family: "Inter", sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #333;
  margin: 0;
}

/* Red Close Button for Cart Modal */
.cart-dropdown-header .btn-close {
  opacity: 1;
  filter: invert(21%) sepia(97%) saturate(5423%) hue-rotate(354deg) brightness(95%) contrast(93%); /* Matches EP Red */
  background-size: 12px;
}
