/* === CART DRAWER BASE === */
.drawer {
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100vw;
  height: 100%;
  display: flex;
  justify-content: flex-end;
  background-color: rgba(0, 0, 0, 0.6);
  transition: visibility var(--duration-default) ease;
}

.drawer.active { visibility: visible; }

.drawer__inner {
  position: relative;
  z-index: 2;
  height: 100%;
  width: 40rem;
  max-width: calc(100vw - 3rem);
  padding: 0 1.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--duration-default) ease;
}

.drawer.active .drawer__inner { transform: translateX(0); }

.sz-cart-drawer .drawer__inner {
  background:
    radial-gradient(800px 360px at 15% 0%, rgba(154,107,255,0.12), transparent 60%),
    radial-gradient(700px 340px at 90% 20%, rgba(181,140,255,0.14), transparent 65%),
    #0b0b12;
  color: #f3edff;
  border-left: 1px solid rgba(154,107,255,0.18);
}

cart-drawer { position: fixed; inset: 0; width: 100vw; height: 100%; }
cart-drawer-items { overflow: auto; flex: 1; }

/* === OVERLAY === */
.cart-drawer__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  pointer-events: auto !important;
  z-index: 1;
}

/* === HEADER === */
.drawer__header {
  padding: 1.2rem 0 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer__heading {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  color: #f3edff;
}

.drawer__close {
  position: absolute;
  right: -6px;
  top: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.drawer__close .svg-wrapper {
  height: 1.6rem;
  width: 1.6rem;
  color: #f3edff;
}

/* === EMPTY STATE === */
.sz-empty {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 36px 10px 10px;
  text-align: left;
  color: #f3edff;
}

.sz-empty__title {
  font-size: 1.9rem;
  font-weight: 900;
  margin: 0;
}

.sz-empty__sub {
  color: #c6bddc;
  margin: 0;
  font-size: 1rem;
}

.sz-empty__cta {
  background: #9a6bff;
  color: #ffffff;
  font-weight: 800;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(154,107,255,0.35);
  padding: 12px 16px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
}

/* === BANNER === */
.sz-cart-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(154,107,255,0.18);
  color: #b58cff;
  border: 1px solid rgba(154,107,255,0.35);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0 0 1rem;
  text-align: center;
  font-weight: 700;
}

.sz-urgency-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
  margin-top: 2px;
}

.sz-urgency-text { line-height: 1.2; }

/* === CART ITEMS LAYOUT === */
.cart-items,
.cart-items tbody { display: block; width: 100%; }

.cart-item {
  display: grid;
  width: 100% !important;
  grid-template-columns: 80px minmax(0, 1fr) 120px;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.cart-item__image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
  background: #0f0f16;
  border: 1px solid rgba(154,107,255,0.18);
}

.cart-item__details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #f3edff;
  min-width: 0 !important;
}

.cart-item__name {
  color: #f3edff;
  font-weight: 800;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.cart-item__price-line {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #f3edff;
  font-weight: 800;
}

.cart-item__old-price {
  color: #7b7396;
  text-decoration: line-through;
  font-size: 0.9rem;
}

.cart-item__save {
  color: #b58cff;
  font-size: 0.9rem;
  font-weight: 700;
}

.cart-item__final-price {
  font-weight: 800;
  color: #f3edff;
}

.cart-item__discounts .discounts__discount {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #ff8ca1;
}

/* === CONTROLS === */
.cart-item__controls,
.cart-item__quantity,
quantity-input.quantity {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  justify-content: flex-end !important;
  flex-shrink: 0 !important;
  width: 120px !important;
  min-width: 120px !important;
  max-width: 120px !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

.cart-item__controls { margin-top: 16px !important; }

quantity-input.quantity {
  max-width: 86px !important;
  border: 0 !important;
  padding: 0 !important;
}

.quantity,
.quantity__button,
.quantity__input {
  background: transparent !important;
  background-color: transparent !important;
  color: #f3edff !important;
  border: 1px solid rgba(154,107,255,0.35) !important;
  box-shadow: none !important;
  border-radius: 12px !important;
  -webkit-appearance: none;
  appearance: none;
}

.quantity__button {
  width: 28px !important;
  height: 28px !important;
}

.quantity__input {
  width: 34px !important;
  height: 28px !important;
  padding: 0 !important;
  text-align: center;
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

.quantity::before,
.quantity::after {
  content: none !important;
  display: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* === REMOVE BUTTON === */
.cart-remove-button {
  background: transparent;
  border: none;
  cursor: pointer;
}

.cart-remove-button svg {
  width: 20px;
  height: 20px;
  fill: #b58cff;
}

/* === FOOTER === */
.drawer__footer {
  border-top: 0;
  padding: 1rem 0 1.2rem;
  color: #f3edff;
}

.drawer__footer .totals {
  margin-top: 6px !important;
  margin-bottom: 12px !important;
  text-align: left !important;
  justify-content: space-between !important;
}

.sz-summary { padding: 0.6rem 0 0.4rem; color: #f3edff; }

.sz-savings {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  color: #ff5a6c;
  margin-bottom: 0.4rem;
}

.totals {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  color: #f3edff;
}

.cart__checkout-button {
  background: #9a6bff;
  color: #ffffff;
  font-weight: 800;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(154,107,255,0.35);
  padding: 12px 16px;
  width: 100%;
}

/* === CHECKOUT BUTTON STACKING === */
.cart__ctas {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

#dynamic-checkout-cart,
#dynamic-checkout-cart [data-shopify-buttoncontainer],
#dynamic-checkout-cart [data-shopify-buttoncontainer] > div,
#dynamic-checkout-cart button {
  width: 100% !important;
  border-radius: 12px !important;
  margin: 0 !important;
}

.cart__dynamic-checkout-buttons { margin-top: 10px; }

/* Hide PayPal button visually */
#dynamic-checkout-cart .paypal,
#dynamic-checkout-cart [data-funding-source="paypal"] {
  display: none !important;
}

/* === PAYMENTS === */
.sz-payments {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
}

.sz-payments li svg { height: 24px; width: auto; }

/* === EMPTY CART === */
cart-drawer.is-empty .drawer__footer,
cart-drawer.is-empty #sz-cart-banner {
  display: none !important;
}

/* === CART DRAWER SCROLL FIX === */
#CartDrawer,
#CartDrawer .drawer__contents,
#CartDrawer .cart-items,
#CartDrawer .cart-items tbody,
#CartDrawer .cart-item {
  overflow-x: hidden !important;
}

/* === READABILITY FOR ALL TEXT === */
.cart-item__details,
.cart-item__details *,
.drawer__footer,
.drawer__footer * {
  color: #f3edff !important;
}

/* === MOBILE (IPHONE FIX) === */
@media (max-width: 749px) {
  .drawer__inner { width: 100%; max-width: 100%; }

  .cart-item {
    grid-template-columns: 64px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 6px 0 !important;
  }

  .cart-item__image {
    width: 64px;
    height: 64px;
  }

  .cart-item__controls {
    grid-column: 1 / -1 !important;
    justify-content: flex-start !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-top: 10px !important;
  }
}
/* === FIX: keep qty controls from overlapping price === */
.cart-item {
  align-items: start;
}

.cart-item__controls {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 6px !important;
  margin-top: 0 !important;
}

.cart-item__controls quantity-input.quantity {
  order: 2;`
}

.cart-item__controls cart-remove-button {
  order: 1;
}

.cart-item__price-line,
.cart-item__save,
.cart-item__discounts {
  line-height: 1.2;
}
