/* ==========================================================================
   Cart & Account panels — click to open, slide in from right to left
   ==========================================================================
   By default the cart & account dropdowns open on hover (desktop) or fade
   in (mobile). This file turns both into full-height panels docked to the
   right edge of the screen, opened by click, that slide in from off the
   right side of the viewport. Works at every screen width.
   ========================================================================== */

.cartzilla-cart,
.cz-account-dropdown {
  display: block !important; /* stay in the DOM so the transition can run */
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  width: 85vw !important;
  max-width: 22rem !important;
  height: 100vh !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 3.5rem 0 1rem !important;
  overflow-y: auto;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: -1.375rem 0 2rem -0.75rem rgba(43, 52, 69, 0.15) !important;
  visibility: hidden;
  transform: translateX(100%) !important;
  transition: transform .4s cubic-bezier(.785, .135, .15, .86) 0s,
              visibility 0s linear .4s !important;
  z-index: 1050;
  animation: none !important; /* cancel the theme's default slide-up/fade-in */
}
.cartzilla-cart.cz-panel-show,
.cz-account-dropdown.cz-panel-show {
  visibility: visible;
  transform: translateX(0) !important;
  transition: transform .4s cubic-bezier(.785, .135, .15, .86) 0s,
              visibility 0s linear 0s !important;
}

/* Close (X) button injected into each panel by cz-slide-panels.js */
.cz-panel-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
}

/* ---------- Sign-in / Sign-up modal -> same slide-in panel ---------- */
#cz-sign-in-modal .modal-dialog {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  width: 100% !important;
  max-width: 26rem !important;
  height: 100vh !important;
  height: 100dvh !important;
  margin: 0 !important;
  transform: translateX(100%) !important;
  transition: transform .4s cubic-bezier(.785, .135, .15, .86) !important;
}
#cz-sign-in-modal.show .modal-dialog {
  transform: translateX(0) !important;
}
#cz-sign-in-modal .modal-content {
  height: 100%;
  border: none;
  border-radius: 0;
  overflow-y: auto;
}

/* Dim + lock the page behind an open cart/account panel
   (the sign-in modal already gets Bootstrap's own .modal-backdrop) */
body.cz-panel-open {
  overflow: hidden;
}
body.cz-panel-open::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1040;
  background-color: rgba(43, 52, 69, .5);
  animation: fade-in .25s ease-in-out;
}
