/*
cart_drawer.css
async load to improve html size and performance
*/
.drawer-sidebar-inner {
  border-width: var(--popup-border-width);
  border-radius: var(--popup-corner-radius);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.inner-h {
  height: 90vh;
}
.overflow-hidden-drawer {
  overflow: hidden !important;
}
.uppercase {
  text-transform: uppercase;
}
#cart-drawer-modal {
  height: 100vh;
  border-radius: var(--popup-corner-radius) var(--popup-corner-radius) 0 0;
}
#cart-drawer-modal .cart-drawer-header {
  border-bottom: 1px solid var(--color-border);
}
.cart-drawer-summary-sticky-render {
  width: 430px;
  max-width: 85vw;
}
#cart-drawer[loading] ~ *,
#cart-drawer[data-empty][finish] ~ *,
#cart-drawer:not([data-empty])[finish] ~ .cart-empty {
  display: none;
}
#cart-drawer[data-empty][finish] ~ .cart-empty {
  display: flex;
}
#cart-drawer[loading] ~ .cart-loading {
  display: var(--loading-show);
  position: absolute;
  top: 50%;
  inset-inline-start: 50%;
  transform: translate(-50%, -50%);
}
#cart-drawer:not([loading]) ~ .cart-loading {
  display: none !important;
}
#cart-drawer-modal .cart-drawer-header {
  padding: 18px 16px;
}

.plugin__bundle__cart__total-price {
  color: var(--color-highlight);
}
@media (min-width: 960px) {
  .lg\:gap-9px {
    gap: 9px;
  }
  #cart-drawer-modal {
    width: 430px;
    max-width: 430px;
    border-radius: 0;
  }
  #cart-drawer-modal .cart-drawer-header {
    padding: 18px 16px;
    border-bottom: 1px solid var(--color-border);
  }
  #cart-drawer-modal[side='bottom'] {
    top: 0 !important;
    inset-inline-end: 0 !important;
    inset-inline-start: unset !important;
    max-height: 100vh !important;
    max-width: 80vw !important;
    min-width: 45px !important;
    animation-name: i-spzhtml-sidebar-slide-out-right;
  }
  #cart-drawer-modal[side='bottom'][open] {
    animation-name: i-spzhtml-sidebar-slide-in-right;
  }
  html[dir='rtl'] #cart-drawer-modal[side='bottom'] {
    animation-name: i-spzhtml-sidebar-slide-out-left;
  }
  html[dir='rtl'] #cart-drawer-modal[side='bottom'][open] {
    animation-name: i-spzhtml-sidebar-slide-in-left;
  }

  .inner-h {
    height: 100vh;
  }
  .drawer-sidebar-inner {
    border-radius: 0;
    border: none;
  }
}

@media (max-width: 958.98px) {
  #cart-drawer-modal {
    height: 90vh;
    max-height: 100vh;
  }
}


/* SOLUNA Floating Native Cart v1.1.0.
   Retain Reformia's side=bottom native controller and its 350ms lifecycle;
   extend its desktop horizontal presentation to both device sizes. */
#cart-drawer-modal[data-soluna-cart-floating] {
  --soluna-cart-gap: 12px;
  top: var(--soluna-cart-gap) !important;
  right: var(--soluna-cart-gap) !important;
  bottom: var(--soluna-cart-gap) !important;
  left: auto !important;
  width: calc(100vw - var(--soluna-cart-gap) * 2) !important;
  max-width: calc(100vw - var(--soluna-cart-gap) * 2) !important;
  min-width: 0 !important;
  height: calc(100vh - var(--soluna-cart-gap) * 2) !important;
  height: calc(100dvh - var(--soluna-cart-gap) * 2) !important;
  max-height: none !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--color-background, #fff) !important;
  box-shadow: 0 8px 28px rgba(0,0,0,.14);
  overflow: hidden !important;
  transform: translateX(calc(100% + var(--soluna-cart-gap)));
  animation-duration: 350ms;
  animation-timing-function: cubic-bezier(.22,.7,.2,1);
  animation-fill-mode: both;
}
#cart-drawer-modal[data-soluna-cart-floating],
html[dir='rtl'] #cart-drawer-modal[data-soluna-cart-floating] {
  animation-name: soluna-cart-exit-right !important;
}
#cart-drawer-modal[data-soluna-cart-floating][open],
html[dir='rtl'] #cart-drawer-modal[data-soluna-cart-floating][open] {
  animation-name: soluna-cart-enter-right !important;
}
#cart-drawer-modal[data-soluna-cart-floating][i-spzhtml-sidebar-opened] {
  transform: none;
  animation: none !important;
}
/* A single native beforeClose measurement freezes height during the exit only. */
#cart-drawer-modal[data-soluna-cart-floating]:not([open]) {
  height: var(--soluna-cart-exit-height, calc(100dvh - var(--soluna-cart-gap) * 2)) !important;
}
#cart-drawer-modal[data-soluna-cart-floating] > #cart-drawer-modal-inner {
  width: 100%;
  height: 100% !important;
  max-height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  border: 1px solid var(--color-border, #e3e3e3);
  border-radius: 8px;
  background: var(--color-background, #fff);
}
#cart-drawer-modal[data-soluna-cart-floating] > .ios_safari_bottom_bar {
  display: none !important;
}
#cart-drawer-modal[data-soluna-cart-floating] + .i-spzhtml-sidebar-mask {
  background-color: rgba(0,0,0,.18);
  animation-duration: 350ms;
}
/* Override the shared 20px blur only for this cart's own native mask. */
#cart-drawer-modal[data-soluna-cart-floating] + .i-spzhtml-sidebar-mask[open] {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
#cart-drawer-modal[data-soluna-cart-floating]:not([open]) + .i-spzhtml-sidebar-mask[open] {
  animation-name: i-spzhtml-sidebar-mask-fade-out;
}
@media (min-width: 960px) {
  #cart-drawer-modal[data-soluna-cart-floating] {
    --soluna-cart-gap: 20px;
    width: 430px !important;
  }
  #cart-drawer-modal[data-soluna-cart-floating] + .i-spzhtml-sidebar-mask[open] {
    background-color: rgba(0,0,0,.12);
    -webkit-backdrop-filter: blur(5px) !important;
    backdrop-filter: blur(5px) !important;
  }
}
@keyframes soluna-cart-enter-right {
  from { transform: translateX(calc(100% + var(--soluna-cart-gap))); }
  to { transform: translateX(0); }
}
@keyframes soluna-cart-exit-right {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100% + var(--soluna-cart-gap))); }
}
@media (prefers-reduced-motion: reduce) {
  #cart-drawer-modal[data-soluna-cart-floating],
  #cart-drawer-modal[data-soluna-cart-floating] + .i-spzhtml-sidebar-mask {
    animation-duration: 1ms;
  }
}
