/* Silver Spring cart upsell — additive, drawer-scoped */

/* "You may also like" affinity rail removed */
.lb-ss-upsell-rail[data-rail="affinity"] {
  display: none !important;
}

/* Hide ATC success toast while SS suppress is active (belt + suspenders) */
body.lb-ss-hide-atc-toast #lb_toast_messages_deck .lb_toast_msg_box {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/*
 * SS cart drawer: slide with transform only.
 * LeafBridge animates opacity + max-width on wrapper/inner/container
 * (triple fade) which looks broken — replace with a single slide.
 *
 * lb-ss-cart-no-anim: kill transitions while priming styles (prevents
 * load / first-paint flash of fade+slide).
 */
body.lb-ss-cart-smooth #floating_cart.floating_cart_wrapper {
  opacity: 1 !important;
  max-width: 100% !important;
  width: 100% !important;
  overflow: hidden;
  pointer-events: none;
  box-shadow: none !important;
  transition: none !important;
  background: transparent !important;
}

body.lb-ss-cart-smooth #floating_cart.floating_cart_wrapper.open_the_cart {
  opacity: 1 !important;
  pointer-events: auto;
  box-shadow: none !important;
}

body.lb-ss-cart-smooth #floating_cart.floating_cart_wrapper .floating_cart_bg {
  width: 100% !important;
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.4) !important;
}

body.lb-ss-cart-smooth #floating_cart.floating_cart_wrapper.open_the_cart .floating_cart_bg {
  opacity: 1;
  pointer-events: auto;
}

body.lb-ss-cart-smooth #floating_cart.floating_cart_wrapper .floating_cart_inner {
  opacity: 1 !important;
  max-width: min(550px, 100vw) !important;
  width: min(550px, 100vw) !important;
  height: 100%;
  max-height: 100vh;
  padding: 0 !important;
  float: right;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.18);
  transform: translate3d(100%, 0, 0);
  /* Delay hiding until slide-out finishes */
  visibility: hidden;
  transition:
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.34s;
  will-change: transform;
  backface-visibility: hidden;
}

body.lb-ss-cart-smooth #floating_cart.floating_cart_wrapper.open_the_cart .floating_cart_inner {
  opacity: 1 !important;
  max-width: min(550px, 100vw) !important;
  transform: translate3d(0, 0, 0);
  visibility: visible;
  transition:
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

body.lb-ss-cart-smooth #floating_cart.floating_cart_wrapper .floating_cart_container,
body.lb-ss-cart-smooth #floating_cart.floating_cart_wrapper.open_the_cart .floating_cart_container {
  opacity: 1 !important;
  transition: none !important;
}

/* Priming only — open/close must keep transform transitions */
body.lb-ss-cart-no-anim #floating_cart.floating_cart_wrapper .floating_cart_inner,
body.lb-ss-cart-no-anim #floating_cart.floating_cart_wrapper .floating_cart_bg,
body.lb-ss-cart-no-anim #floating_cart.floating_cart_wrapper .floating_cart_container {
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  body.lb-ss-cart-smooth #floating_cart.floating_cart_wrapper .floating_cart_inner,
  body.lb-ss-cart-smooth #floating_cart.floating_cart_wrapper.open_the_cart .floating_cart_inner,
  body.lb-ss-cart-smooth #floating_cart.floating_cart_wrapper .floating_cart_bg {
    transition-duration: 0.01ms !important;
  }
}

/* Qty already updates on +/-; manual Update Cart is redundant. */
#floating_cart .lb-update_cart_qts-btn {
  display: none !important;
}

/* Checkout CTA: drop trailing “- $X”, add breathing room below */
#floating_cart .floating_cart_footer {
  padding-bottom: 28px !important;
  margin-bottom: 8px;
}

#floating_cart .floating_cart_footer a span.cart_total {
  display: none !important;
}

#floating_cart .cart-products-carousel.lb-ss-upsell-active > p,
#floating_cart .cart-products-carousel.lb-ss-upsell-active > .leafbridge_specific_product_filter_wrapper,
#floating_cart .cart-products-carousel.lb-ss-upsell-active > .lb_specific_prods_slider_wrapper {
  display: none !important;
}

.lb-ss-upsell {
  --lb-ss-ink: #1a1a1a;
  --lb-ss-muted: rgba(26, 26, 26, 0.55);
  --lb-ss-line: rgba(26, 26, 26, 0.1);
  --lb-ss-surface: #f7f6f4;
  --lb-ss-gap: 10px;
  --lb-ss-cols: 2;

  display: block;
  width: 100%;
  padding: 14px 12px 22px;
  box-sizing: border-box;
  border-top: 1px solid var(--lb-ss-line);
  background: #fff;
  contain: layout style;
}

.lb-ss-upsell[hidden] {
  display: none !important;
}

.lb-ss-upsell-offers[hidden],
.lb-ss-upsell-rail[hidden],
.lb-ss-upsell-mode[hidden] {
  display: none !important;
}

/* Rails: collapsed while loading, quick fade when content lands */
.lb-ss-upsell-rail.lb-ss-upsell-awaiting,
.lb-ss-upsell-offers.lb-ss-upsell-awaiting {
  display: none !important;
}

.lb-ss-upsell-rail:not([hidden]):not(.lb-ss-upsell-reveal),
.lb-ss-upsell-offers:not([hidden]):not(.lb-ss-upsell-reveal),
.lb-ss-upsell-empty-intro:not(.lb-ss-upsell-reveal) {
  opacity: 0;
}

.lb-ss-upsell-rail.lb-ss-upsell-reveal,
.lb-ss-upsell-offers.lb-ss-upsell-reveal,
.lb-ss-upsell-empty-intro.lb-ss-upsell-reveal {
  animation: lb-ss-upsell-fade-in 0.2s ease forwards;
}

@keyframes lb-ss-upsell-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lb-ss-upsell-rail.lb-ss-upsell-reveal,
  .lb-ss-upsell-offers.lb-ss-upsell-reveal,
  .lb-ss-upsell-empty-intro.lb-ss-upsell-reveal {
    animation: none;
    opacity: 1;
  }
}

.lb-ss-upsell-empty-intro {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--lb-ss-ink);
  line-height: 1.3;
}

.lb-ss-upsell-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.lb-ss-upsell-rail-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lb-ss-ink);
  line-height: 1.25;
}

.lb-ss-upsell-rail-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.lb-ss-upsell-rail-nav.is-disabled {
  opacity: 0.35;
}

.lb-ss-upsell-prev,
.lb-ss-upsell-next {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--lb-ss-line);
  border-radius: 999px;
  background: #fff;
  color: var(--lb-ss-ink);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.lb-ss-upsell-prev:hover:not(:disabled),
.lb-ss-upsell-next:hover:not(:disabled) {
  background: var(--lb-ss-surface);
  border-color: rgba(26, 26, 26, 0.22);
}

.lb-ss-upsell-prev:disabled,
.lb-ss-upsell-next:disabled {
  opacity: 0.35;
  cursor: default;
}

.lb-ss-upsell-offers {
  display: none !important; /* temporarily hidden */
  margin-bottom: 14px;
  padding: 10px 10px 8px;
  border: 1px solid var(--lb-ss-line);
  border-radius: 8px;
  background: var(--lb-ss-surface);
}

/* Pinned under the matching cart line item */
.lb-ss-upsell-offers.lb-ss-upsell-offers-on-item {
  margin: -2px 0 12px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

#floating_cart .floating_cart_item_box + .lb-ss-upsell-offers-on-item {
  /* Pull visually into the item above */
  position: relative;
  z-index: 1;
}

.lb-ss-upsell-offers .lb-ss-upsell-rail-head {
  margin-bottom: 6px;
}

.lb-ss-upsell-offers-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.lb-ss-upsell-offer-chip {
  display: block;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--lb-ss-line);
  border-radius: 0;
  text-decoration: none;
  color: inherit;
}

.lb-ss-upsell-offer-chip:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.lb-ss-upsell-offer-chip:hover .lb-ss-upsell-offer-name {
  text-decoration: underline;
}

.lb-ss-upsell-offer-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--lb-ss-ink);
}

.lb-ss-upsell-offer-desc {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--lb-ss-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-ss-upsell-rail {
  margin-bottom: 18px;
}

.lb-ss-upsell-rail:last-child {
  margin-bottom: 0;
}

/* Horizontal slider: 2 cards side by side */
.lb-ss-upsell-rail-viewport {
  position: relative;
  container-type: inline-size;
  container-name: lb-ss-rail;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 6px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.lb-ss-upsell-rail-viewport::-webkit-scrollbar {
  display: none;
}

.lb-ss-upsell-rail-track {
  display: flex;
  flex-direction: row;
  gap: var(--lb-ss-gap);
  width: max-content;
}

.lb-ss-upsell-slide {
  --lb-ss-slide: calc((100cqi - var(--lb-ss-gap)) / var(--lb-ss-cols));
  flex: 0 0 var(--lb-ss-slide);
  width: var(--lb-ss-slide);
  max-width: var(--lb-ss-slide);
  min-width: 0;
  scroll-snap-align: start;
  box-sizing: border-box;
}

@supports not (width: 1cqi) {
  .lb-ss-upsell-slide {
    --lb-ss-slide: 160px;
  }
}

/* —— Normal stacked product cards —— */
#floating_cart .lb-ss-upsell .lb-ss-upsell-slide .leafbridge_product_card {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 100%;
  margin: 0 !important;
  padding: 10px 8px 10px !important;
  box-sizing: border-box;
  box-shadow: none !important;
  border: 1px solid var(--lb-ss-line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  position: relative;
}

#floating_cart .lb-ss-upsell .leafbridge_product_a {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  text-decoration: none;
}

#floating_cart .lb-ss-upsell .leafbridge_product_a > a:has(.lb_prod_card_thumb) {
  display: block;
  width: 100%;
  margin: 0 0 2px;
  text-align: center;
}

#floating_cart .lb-ss-upsell .lb_prod_card_thumb {
  width: 100% !important;
  max-width: 88px !important;
  height: 88px !important;
  object-fit: contain;
  display: block;
  margin: 0 auto !important;
  border-radius: 6px;
}

/* Hide tall chrome; keep a compact % off badge for sale pricing */
#floating_cart .lb-ss-upsell .special_offer_label,
#floating_cart .lb-ss-upsell .staff_picks_label,
#floating_cart .lb-ss-upsell .open_prod_modal,
#floating_cart .lb-ss-upsell .pos_tags_view,
#floating_cart .lb-ss-upsell .moodidays_prod_card_review,
#floating_cart .lb-ss-upsell .lb_cashback_offer_label,
#floating_cart .lb-ss-upsell .offer_amount,
#floating_cart .lb-ss-upsell .leafbridge_product_modal_outer {
  display: none !important;
}

#floating_cart .lb-ss-upsell .disc_perc.offer_percentage {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 2px auto 0 !important;
  padding: 2px 7px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #e4022d !important;
  color: #fff !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

#floating_cart .lb-ss-upsell .disc_perc.offer_percentage i {
  display: none !important;
}

#floating_cart .lb-ss-upsell .disc_perc.offer_percentage .sale_prcnt_val,
#floating_cart .lb-ss-upsell .disc_perc.offer_percentage .sale_prcnt {
  color: #fff !important;
  font: inherit !important;
}

#floating_cart .lb-ss-upsell .leafbridge_price_row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto !important;
  padding: 0 !important;
  min-height: 0 !important;
  width: 100% !important;
}

#floating_cart .lb-ss-upsell .leafbridge_product_price,
#floating_cart .lb-ss-upsell .price_discount {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 0 6px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  width: 100% !important;
  text-align: center !important;
  font-size: 13px;
  line-height: 1.25;
}

#floating_cart .lb-ss-upsell .leafbridge_product_price > *,
#floating_cart .lb-ss-upsell .price_discount > * {
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

#floating_cart .lb-ss-upsell .old_price_cut,
#floating_cart .lb-ss-upsell del {
  font-size: 11px;
  font-weight: 500;
  color: rgba(26, 26, 26, 0.45);
  text-decoration: line-through;
  text-align: center !important;
}

#floating_cart .lb-ss-upsell .special_price,
#floating_cart .lb-ss-upsell .show_special_prices {
  font-size: 15px;
  font-weight: 800;
  color: #e4022d !important;
  text-align: center !important;
}

/* —— Cart line items on sale (Story red sale price) —— */
#floating_cart .cart_item_amount:has(.special_price_det) {
  gap: 10px;
}

#floating_cart .cart_item_amount .special_price_det {
  align-items: flex-end;
  gap: 3px !important;
}

#floating_cart .cart_item_amount .strk_price {
  color: rgba(26, 26, 26, 0.45) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  text-decoration: line-through !important;
}

#floating_cart .cart_item_amount .special_offer_precentage {
  color: #e4022d !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

#floating_cart .cart_item_amount:has(.special_price_det) > span:not(.special_price_det) {
  color: #e4022d !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1.1;
}

/* Cart totals discounts (backup if loyalty.js class not applied yet) */
#floating_cart .floating_cart_notes .cart_amnt_parent.lb-ss-cart-discount .cart_amnt_label,
#floating_cart .floating_cart_notes .cart_amnt_parent.lb-ss-cart-discount .cart_amnt_val {
  color: #e4022d !important;
  font-weight: 700 !important;
}

#floating_cart .lb-ss-upsell .prod_box_price_label {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 0 6px !important;
  width: auto !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  font-size: 13px;
  line-height: 1.25;
  text-align: center !important;
}

#floating_cart .lb-ss-upsell .leafbridge_brand_name {
  margin: 2px 0 0 !important;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lb-ss-muted);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

#floating_cart .lb-ss-upsell .leafbridge_prod_box_name {
  display: block !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
}

#floating_cart .lb-ss-upsell h5.leafbridge_product_name,
#floating_cart .lb-ss-upsell .leafbridge_product_name {
  display: block !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  font-size: 12px !important;
  font-weight: 600;
  line-height: 1.3 !important;
  text-align: center;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  -webkit-line-clamp: unset !important;
  height: auto !important;
}

#floating_cart .lb-ss-upsell .leafbridge_product_name a {
  display: block !important;
  max-width: 100% !important;
  width: 100% !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  -webkit-line-clamp: unset !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: var(--lb-ss-ink);
  text-decoration: none;
}

#floating_cart .lb-ss-upsell .lb-strain-weight {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 4px;
  margin: 2px 0 0 !important;
  min-height: 0 !important;
}

#floating_cart .lb-ss-upsell .leafbridge_strain_type_label {
  margin: 0 !important;
  font-size: 10px !important;
  line-height: 1.2;
}

#floating_cart .lb-ss-upsell .lb-product-weight-wrapper,
#floating_cart .lb-ss-upsell .lb-product-weight {
  margin: 0 !important;
  font-size: 10px;
  line-height: 1.2;
  color: var(--lb-ss-muted);
}

#floating_cart .lb-ss-upsell .potency_card_view {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 6px;
  margin: 2px 0 0 !important;
  font-size: 10px;
  line-height: 1.2;
  color: var(--lb-ss-muted);
}

#floating_cart .lb-ss-upsell .lb_prod_box_add_to_cart_wrapper,
#floating_cart .lb-ss-upsell .leafbridge_product_modal_add_to_cart {
  display: block !important;
  position: static !important;
  margin: 8px 0 0 !important;
  padding: 0 !important;
  width: 100% !important;
  min-height: 0 !important;
  flex: 0 0 auto;
}

#floating_cart .lb-ss-upsell .lb_prod_box_add_to_cart_wrapper select,
#floating_cart .lb-ss-upsell .lb_prod_box_add_to_cart_wrapper .add_to_cart_count {
  display: none !important;
}

/* Match shop product-card ATC: Story red pill */
#floating_cart .lb-ss-upsell .lb_prod_box_add_to_cart_wrapper button,
#floating_cart .lb-ss-upsell .leafbridge_product_modal_add_to_cart button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 36px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 8px 14px !important;
  border: none !important;
  border-radius: 25px !important;
  background: var(--e-global-color-secondary, #e4012c) !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis;
  position: static !important;
  cursor: pointer;
}

#floating_cart .lb-ss-upsell .lb_prod_box_add_to_cart_wrapper button:hover,
#floating_cart .lb-ss-upsell .leafbridge_product_modal_add_to_cart button:hover {
  background: #c40126 !important;
}

#floating_cart .lb-ss-upsell .lb_prod_box_add_to_cart_wrapper span.atc_text,
#floating_cart .lb-ss-upsell .lb_prod_box_add_to_cart_wrapper .btn_label,
#floating_cart .lb-ss-upsell .lb_prod_box_add_to_cart_wrapper .btn_label span {
  display: inline !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

#floating_cart .lb-ss-upsell .lb_prod_box_add_to_cart_wrapper .btn_icon_wrapper {
  display: none !important;
}

.lb-ss-upsell-skeleton {
  width: 100%;
  height: 220px;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    rgba(26, 26, 26, 0.05) 0%,
    rgba(26, 26, 26, 0.09) 50%,
    rgba(26, 26, 26, 0.05) 100%
  );
  background-size: 200% 100%;
  animation: lb-ss-upsell-shimmer 1.2s ease-in-out infinite;
}

@keyframes lb-ss-upsell-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

