/* Cart Drawer 2 — bold commerce · BOTTOM SHEET snap */

.bsp-cart-drawer--2 {
  /* Colors come from Customizer inline vars — keep motion only here. */
  --bsp-cart-panel-closed: translateY(110%);
  --bsp-cart-panel-open: translateY(0);
  --bsp-cart-panel-duration: 0.42s;
  --bsp-cart-panel-ease: cubic-bezier(0.34, 1.4, 0.64, 1);
}

.bsp-cart-drawer--2 .bsp-cart-drawer__overlay {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: opacity 0.28s ease;
}

.bsp-cart-drawer--2 .bsp-cart-drawer__panel {
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: none;
  height: min(88vh, var(--bsp-cart-sheet-max-height, 720px));
  max-height: 88vh;
  margin: 0 auto;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -16px 48px rgba(15, 23, 42, 0.22);
}

.bsp-cart-drawer--2 .bsp-cart-drawer__handle {
  display: flex;
  justify-content: center;
  padding: 10px 0 2px;
  background: var(--bsp-cart-header-bg, #0f172a);
  flex-shrink: 0;
}

.bsp-cart-drawer--2 .bsp-cart-drawer__handle span {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.bsp-cart-drawer--2 .bsp-cart-drawer__inner {
  height: auto;
  flex: 1;
  min-height: 0;
}

.bsp-cart-drawer--2 .bsp-cart-drawer__stripe {
  height: 4px;
  background: linear-gradient(90deg, var(--bsp-cart-stripe-start, #16a34a) 0%, var(--bsp-cart-stripe-mid, #0f172a) 55%, var(--bsp-cart-stripe-end, #38bdf8) 100%);
  flex-shrink: 0;
}

.bsp-cart-drawer--2 .bsp-cart-drawer__header {
  background: var(--bsp-cart-header-bg, #0f172a);
  border-bottom: 0;
  padding: 14px 24px 18px;
}

.bsp-cart-drawer--2 .bsp-cart-drawer__title {
  color: var(--bsp-cart-title, #ffffff);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: inherit;
}

.bsp-cart-drawer--2 .bsp-cart-drawer__close {
  color: #94a3b8;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.bsp-cart-drawer--2 .bsp-cart-drawer__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.bsp-cart-drawer--2 .bsp-cart-drawer__shipping {
  background: #f8fafc;
}

.bsp-cart-drawer--2 .bsp-cart-drawer__progress {
  height: 6px;
  border-radius: 999px;
}

.bsp-cart-drawer--2 .bsp-cart-drawer__progress-bar {
  border-radius: 999px;
  background: var(--bsp-cart-progress);
}

.bsp-cart-drawer--2 .bsp-cart-drawer__item-thumb,
.bsp-cart-drawer--2 .bsp-cart-drawer__upsell-thumb {
  border-radius: 10px;
}

.bsp-cart-drawer--2 .bsp-cart-drawer__qty {
  border-radius: 8px;
  border-color: #cbd5e1;
}

.bsp-cart-drawer--2 .bsp-cart-drawer__btn {
  border-radius: 10px;
  letter-spacing: 0.08em;
}

.bsp-cart-drawer--2 .bsp-cart-drawer__upsell-add {
  border-radius: 8px;
}

.bsp-cart-drawer--2 .bsp-cart-drawer__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: center;
  padding: 12px 20px 16px;
  background: var(--bsp-cart-trust-bg, #f1f5f9);
  border-top: 1px solid #e2e8f0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
  flex-shrink: 0;
}

.bsp-cart-drawer--2 .bsp-cart-drawer__trust span {
  position: relative;
}

.bsp-cart-drawer--2 .bsp-cart-drawer__trust span + span::before {
  content: "•";
  position: absolute;
  left: -10px;
  color: #94a3b8;
}

.bsp-cart-drawer--2.is-entering .bsp-cart-drawer__stripe {
  animation: bspCd2Stripe 0.6s ease both;
}

.bsp-cart-drawer--2.is-entering .bsp-cart-drawer__item,
.bsp-cart-drawer--2.is-entering .bsp-cart-drawer__empty,
.bsp-cart-drawer--2.is-entering .bsp-cart-drawer__trust {
  animation: bspCd2Pop 0.4s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.bsp-cart-drawer--2.is-entering .bsp-cart-drawer__item:nth-child(1) { animation-delay: 0.1s; }
.bsp-cart-drawer--2.is-entering .bsp-cart-drawer__item:nth-child(2) { animation-delay: 0.16s; }
.bsp-cart-drawer--2.is-entering .bsp-cart-drawer__item:nth-child(3) { animation-delay: 0.22s; }
.bsp-cart-drawer--2.is-entering .bsp-cart-drawer__empty { animation-delay: 0.12s; }
.bsp-cart-drawer--2.is-entering .bsp-cart-drawer__trust { animation-delay: 0.2s; }

.bsp-cart-drawer--2.is-entering .bsp-cart-drawer__progress-bar {
  animation: bspCd2Pulse 0.55s ease 0.25s both;
}

@keyframes bspCd2Stripe {
  from { transform: scaleX(0); transform-origin: left; }
  to { transform: scaleX(1); transform-origin: left; }
}

@keyframes bspCd2Pop {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes bspCd2Pulse {
  0% { filter: brightness(1); transform: scaleX(1); }
  50% { filter: brightness(1.35); }
  100% { filter: brightness(1); }
}

@media (min-width: 900px) {
  .bsp-cart-drawer--2 {
    --bsp-cart-panel-closed: translate(-50%, 110%);
    --bsp-cart-panel-open: translate(-50%, 0);
  }

  .bsp-cart-drawer--2 .bsp-cart-drawer__panel {
    width: min(100%, var(--bsp-cart-drawer-width, 560px));
    left: 50%;
    right: auto;
  }
}

@media (max-width: 576px) {
  .bsp-cart-drawer--2 .bsp-cart-drawer__panel {
    width: 100%;
    border-radius: 18px 18px 0 0;
  }
}
