/* ButtSnorkelers cart — drawer + nav button + line items + progress */

/* ---------- nav cart button ---------- */

.bs-cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0 8px 0 0;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  color: inherit;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.bs-cart-btn:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-1px); }
.bs-cart-btn:focus-visible { outline: 2px solid var(--orange, #E85D04); outline-offset: 2px; }

.bs-cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange, #E85D04);
  color: #fff;
  font: 700 11px/1 'Space Grotesk', system-ui, sans-serif;
  letter-spacing: 0.5px;
  border-radius: 999px;
  border: 2px solid var(--dark, #1A1008);
}

/* ---------- overlay ---------- */

.bs-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
  z-index: 998;
}
body.bs-cart-open .bs-cart-overlay {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0s linear 0s;
}

/* ---------- drawer ---------- */

.bs-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: 100%;
  max-width: 440px;
  background: var(--dark, #1A1008);
  color: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  z-index: 999;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.45);
  font-family: 'Space Grotesk', system-ui, sans-serif;
}
body.bs-cart-open .bs-cart-drawer { transform: translateX(0); }

.bs-cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
.bs-cart-drawer__title {
  margin: 0;
  font-family: 'Bebas Neue', 'Space Grotesk', sans-serif;
  font-size: 24px;
  letter-spacing: 2px;
  color: var(--yellow, #FFBA08);
}
.bs-cart-drawer__close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease;
}
.bs-cart-drawer__close:hover { background: rgba(255, 255, 255, 0.1); }

/* ---------- progress bar ---------- */

.bs-cart-drawer__progress { padding: 16px 24px 0; flex-shrink: 0; }
.bs-cart-drawer__progress:empty { padding: 0; }

.bs-cart-progress__bar {
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}
.bs-cart-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold, #FAA307), var(--orange, #E85D04));
  border-radius: 999px;
  transition: width 0.4s ease;
}
.bs-cart-progress__bar--complete .bs-cart-progress__fill {
  background: linear-gradient(90deg, var(--yellow, #FFBA08), var(--orange, #E85D04));
}
.bs-cart-progress__label {
  margin: 8px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}
.bs-cart-progress__label--complete {
  color: var(--yellow, #FFBA08);
  font-weight: 600;
}

/* ---------- free-shipping upsell ---------- */

.bs-cart-drawer__upsell { padding: 12px 24px 0; flex-shrink: 0; }
.bs-cart-drawer__upsell:empty { padding: 0; }

.bs-cart-upsell {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(27, 122, 140, 0.14); /* teal tint — distinct from the bundle's sunset */
  border: 1px solid rgba(27, 122, 140, 0.35);
}

.bs-cart-upsell__img {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.bs-cart-upsell__img img { max-width: 100%; max-height: 100%; object-fit: contain; }

.bs-cart-upsell__text { flex: 1 1 auto; min-width: 0; }
.bs-cart-upsell__title {
  margin: 0 0 2px;
  font: 600 13px/1.2 'Space Grotesk', sans-serif;
  color: #fff;
}
.bs-cart-upsell__sub {
  margin: 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.bs-cart-upsell__cta {
  flex-shrink: 0;
  padding: 7px 14px;
  background: var(--teal, #1B7A8C);
  color: #fff;
  border: 0;
  border-radius: 6px;
  font: 700 12px/1 'Space Grotesk', sans-serif;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.bs-cart-upsell__cta:hover:not([disabled]) {
  background: #1f8ea2;
  transform: translateY(-1px);
}
.bs-cart-upsell__cta[disabled] { opacity: 0.6; cursor: default; }

/* ---------- bundle banner ---------- */

.bs-cart-drawer__bundle { padding: 12px 24px 0; flex-shrink: 0; }
.bs-cart-drawer__bundle:empty { padding: 0; }

.bs-cart-bundle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.bs-cart-bundle__icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.bs-cart-bundle__text { flex: 1 1 auto; min-width: 0; }

.bs-cart-bundle__title {
  margin: 0 0 2px;
  font-family: 'Bebas Neue', 'Space Grotesk', sans-serif;
  font-size: 15px;
  letter-spacing: 1px;
  color: #fff;
}

.bs-cart-bundle__sub {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.7);
}

.bs-cart-bundle--qualified {
  background: linear-gradient(135deg, rgba(250, 163, 7, 0.18), rgba(232, 93, 4, 0.18));
  border-color: var(--yellow, #FFBA08);
}
.bs-cart-bundle--qualified .bs-cart-bundle__title { color: var(--yellow, #FFBA08); }

.bs-cart-bundle--close .bs-cart-bundle__title { color: rgba(255, 255, 255, 0.9); }

.bs-cart-bundle__cta {
  flex-shrink: 0;
  padding: 6px 12px;
  background: transparent;
  color: var(--yellow, #FFBA08);
  border: 1px solid rgba(255, 186, 8, 0.5);
  border-radius: 6px;
  font: 600 12px/1 'Space Grotesk', sans-serif;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.bs-cart-bundle__cta:hover {
  background: rgba(255, 186, 8, 0.12);
  border-color: var(--yellow, #FFBA08);
}

/* ---------- body / line items ---------- */

.bs-cart-drawer__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 24px;
}

.bs-cart-line {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  align-items: start;
}
.bs-cart-line:last-child { border-bottom: 0; }

.bs-cart-line__img {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bs-cart-line__img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.bs-cart-line__details { min-width: 0; }
.bs-cart-line__name {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}
.bs-cart-line__variant {
  margin: 0 0 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.bs-cart-line__qty-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bs-cart-line__qty {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  overflow: hidden;
}
.bs-cart-qty-btn {
  background: transparent;
  color: #fff;
  border: 0;
  width: 28px;
  height: 28px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}
.bs-cart-qty-btn:hover { background: rgba(255, 255, 255, 0.08); }
.bs-cart-qty-val {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  font-size: 13px;
  font-weight: 600;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.bs-cart-line__remove {
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  border: 0;
  font: 500 12px/1 'Space Grotesk', sans-serif;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  padding: 4px 0;
}
.bs-cart-line__remove:hover { color: var(--orange, #E85D04); }

.bs-cart-line__price {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

/* ---------- empty state ---------- */

.bs-cart-empty {
  text-align: center;
  padding: 48px 16px;
}
.bs-cart-empty__emoji { font-size: 56px; margin: 0 0 16px; }
.bs-cart-empty__title {
  margin: 0 0 6px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 1.5px;
  color: var(--yellow, #FFBA08);
}
.bs-cart-empty__sub {
  margin: 0 0 24px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- footer / totals ---------- */

.bs-cart-drawer__footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}
.bs-cart-drawer__footer:empty { padding: 0; border-top: 0; }

.bs-cart-totals {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 4px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
}
.bs-cart-totals__val {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}
.bs-cart-totals--discount {
  font-size: 13px;
  color: var(--yellow, #FFBA08);
  font-weight: 600;
}
.bs-cart-totals--final {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.bs-cart-totals--final .bs-cart-totals__val { color: var(--yellow, #FFBA08); }
.bs-cart-totals__note {
  margin: 8px 0 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.bs-cart-checkout-btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: 'Bebas Neue', 'Space Grotesk', sans-serif;
}
.bs-cart-checkout-btn[disabled] { opacity: 0.6; cursor: not-allowed; }

.bs-cart-continue {
  display: block;
  width: 100%;
  margin: 10px 0 0;
  padding: 8px;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.55);
  font: 500 13px/1 'Space Grotesk', sans-serif;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.bs-cart-continue:hover { color: #fff; }

/* ---------- mobile ---------- */

@media (max-width: 480px) {
  .bs-cart-drawer { max-width: 100%; }
  .bs-cart-drawer__header { padding: 16px 18px; }
  .bs-cart-drawer__body { padding: 12px 18px; }
  .bs-cart-drawer__footer { padding: 16px 18px; }
  .bs-cart-drawer__progress { padding: 12px 18px 0; }
  .bs-cart-line { grid-template-columns: 64px 1fr auto; gap: 10px; }
  .bs-cart-line__img { width: 64px; height: 64px; }
  .bs-cart-btn { width: 38px; height: 38px; }
}

/* Lock body scroll when drawer open */
body.bs-cart-open { overflow: hidden; }
