/**
 * Nova Commerce Suite - Drawer Shell 1.2
 * A single intentional products scroll zone with a stable action footer.
 */
.ncd-drawer {
  display: flex !important;
  flex-direction: column !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
}

.ncd-drawer__header {
  flex: 0 0 auto !important;
  position: relative !important;
  z-index: 4 !important;
}

.ncd-toast {
  flex: 0 0 auto !important;
}

.ncd-drawer__body {
  flex: 1 1 auto !important;
  min-height: 150px !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.ncd-drawer__footer {
  flex: 0 0 auto !important;
  max-height: min(58dvh, 590px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid var(--ncd-border, #e2e8f0) !important;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, .055) !important;
  scrollbar-width: thin;
}

.ncd-drawer__body:focus-visible,
.ncd-drawer__footer:focus-visible {
  outline: 2px solid var(--ncd-gold, #d5a929);
  outline-offset: -2px;
}

/* Keep high-value actions together and easy to reach. */
.ncd-btn--checkout,
.ncd-btn--cart {
  position: relative !important;
  z-index: 2 !important;
}

/* Make destructive action secondary to checkout. */
.ncd-empty-cart {
  min-height: 42px !important;
  width: auto !important;
  padding: 9px 14px !important;
  font-size: 14px !important;
}

/* Coupon motion is handled with a compact premium transition. */
.ncd-coupon-form:not([hidden]) {
  animation: ncdCouponReveal 180ms ease-out both;
  transform-origin: top;
}

@keyframes ncdCouponReveal {
  from { opacity: 0; transform: translateY(-5px) scaleY(.98); }
  to { opacity: 1; transform: translateY(0) scaleY(1); }
}

@media (max-width: 480px) {
  .ncd-drawer__body {
    min-height: 170px !important;
    padding-block: 10px !important;
  }

  .ncd-drawer__footer {
    max-height: min(59dvh, 560px) !important;
  }
}

@media (max-height: 720px) {
  .ncd-drawer__body {
    min-height: 130px !important;
  }

  .ncd-drawer__footer {
    max-height: 62dvh !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ncd-coupon-form:not([hidden]) { animation: none !important; }
}
