 /* =========================================================
   BF Cart Progress — CART variant (updated for SVG state + add button)
   ========================================================= */

.bf-cart-progress{
  background:#fff;
  border:1px solid rgba(0,0,0,.14);
  border-radius:12px;
  padding:14px 16px;
  margin:14px 0 18px;
}

/* (head styles kept - even if head removed in markup, harmless) */
.bf-cart-progress__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:6px;
}
.bf-cart-progress__title{ font-size:15px; font-weight:600; opacity:1; }
.bf-cart-progress__cart-total{ font-size:13px; white-space:nowrap; opacity:.9; }
.bf-cart-progress__label{ opacity:.65; margin-right:6px; }
.bf-cart-progress__amount{ font-weight:800; }
.bf-cart-progress__sub{ font-size:13px; opacity:.85; margin-bottom:12px; }

/* =========================================================
   Progress bar
   ========================================================= */

.bf-cart-progress__bar{
  position: relative;
  margin: 10px 0 14px;
  padding-top: 10px;
  padding-bottom: 34px;
}

.bf-cart-progress__track{
  position:relative;
  z-index:2;
  height:10px;
  border-radius:999px;
  background:#f3efea;
  border:1px solid rgba(0,0,0,0.06);
  overflow:visible;
}

.bf-cart-progress__fill{
  position:absolute;
  inset:0 auto 0 0;
  width:calc(var(--bf-pct, 0) * 1%);
  background:#9d0b02;
  border-radius:999px;
}

.bf-cart-progress__dot{
  position:absolute;
  top:50%;
  left:calc(var(--bf-pct, 0) * 1%);
  transform:translate(-50%, -50%);
  width:16px;
  height:16px;
  border-radius:999px;
  background:#9d0b02;
  border:2px solid #fff;
  box-shadow:0 0 0 1px rgba(0,0,0,0.08);
  pointer-events:none;
  z-index: 3;
}

.bf-cart-progress__bubble{
  position: absolute;
  bottom: -12px;
  left: calc(var(--bf-pct,0) * 1%);
  transform: translateX(-50%);
  z-index: 5;

  background: rgba(255,255,255,.96);
  border: 1px solid #3333;
  border-radius: 25px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #111;
  white-space: nowrap;

  transition: left .25s ease;
}

.bf-cart-progress__bar{ --bf-bubble-pad: 90px; }
.bf-cart-progress__bubble{
  left: clamp(var(--bf-bubble-pad), calc(var(--bf-pct,0) * 1%), calc(100% - var(--bf-bubble-pad)));
}

/* Pointer */
.bf-cart-progress__bubble::before{
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid rgba(255,255,255,.96);
}

.bf-cart-progress__bubble::after{
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #3333;
  z-index: -1;
}

/* =========================================================
   Grid + cards
   ========================================================= */

.bf-cart-progress__grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:16px;
}

@media (max-width: 1024px){
  .bf-cart-progress__grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px){
  .bf-cart-progress__grid{ grid-template-columns:1fr; }
}

/* Cards */
.bf-cart-progress__card{
  position:relative;
  border-radius:14px;
  overflow:hidden;
  min-height:94px;
  border:none;
  background:#faf7f3;
  background-size:cover;
  background-image: var(--bf-card-img);
  background-position:center;
  transform:translateZ(0);
}

/* Keep ONLY one overlay definition (removed duplicate) */
.bf-cart-progress__overlay{
  position:absolute;
  inset:0;
  background: linear-gradient(
    90deg,
    rgba(12,12,12,0.88) 0%,
    rgba(12,12,12,0.82) 38%,
    rgba(12,12,12,0.35) 62%,
    rgba(12,12,12,0.00) 82%
  );
  opacity:1;
}

.bf-cart-progress__card-top{
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 10px 0;
}

/* Badge */
.bf-cart-progress__badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 9px;
  border-radius:25px;
  font-size:12px;
  font-weight:700;

  background: rgba(255,255,255,0.96);
  color:#111;
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* State circle — tuned for SVG (bigger, crisp) */
.bf-cart-progress__state{
  width:30px;
  height:30px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;

  background: #fff;
  color:#111;
  border: 1px solid rgba(0,0,0,0.14);
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);

  /* no glass blur here for max contrast */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.bf-cart-progress__state svg{
  display:block;
}

/* Body text */
.bf-cart-progress__card-body{
  position:relative;
  z-index:2;
  padding:8px 10px 10px;
  color:#fff;
  opacity: 1 !important;
}

.bf-cart-progress__card-title{
  font-size:13px;
  font-weight:800;
  line-height:1.15;
  opacity: 1;
  text-shadow: 0 2px 10px rgba(0,0,0,0.55);
}

.bf-cart-progress__card-desc{
  font-size:12px;
  opacity: 1;
  margin-top:3px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.55);
}

/* =========================================================
   Card states (visual)
   ========================================================= */

/* locked: keep readable, don't fade text */
.bf-cart-progress__card.is-locked{
  filter: grayscale(0.9);
  opacity: 1;
}
.bf-cart-progress__card.is-locked .bf-cart-progress__overlay{
  background: linear-gradient(
    90deg,
    rgba(12,12,12,0.80) 0%,
    rgba(12,12,12,0.65) 55%,
    rgba(12,12,12,0.20) 78%,
    rgba(12,12,12,0.00) 90%
  );
}

/* active highlight ring */
.bf-cart-progress__card.is-active{
  opacity:1;
  box-shadow: 0 0 0 3px rgba(157,11,2,0.28);
}

/* unlocked */
.bf-cart-progress__card.is-unlocked{
  opacity:1;
}

/* State colors (works whether class is on card or state element) */
.bf-cart-progress__card.is-unlocked .bf-cart-progress__state,
.bf-cart-progress__state.is-unlocked{
  background: #16a34a;
  border-color: rgba(0,0,0,0.10);
  color:#fff;
}

.bf-cart-progress__card.is-active .bf-cart-progress__state,
.bf-cart-progress__state.is-active{
  background: #9d0b02;
  border-color: rgba(0,0,0,0.10);
  color:#fff;
}

.bf-cart-progress__card.is-locked .bf-cart-progress__state,
.bf-cart-progress__state.is-locked{
  background: rgba(255,255,255,0.88);
  border-color: rgba(0,0,0,0.10);
  color: rgba(0,0,0,0.55);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* =========================================================
   Add-to-cart (+) button on unlocked cards
   ========================================================= */

.bf-cart-progress__add{
  position:absolute;
  top:10px;
  right:10px;
  z-index:4;

  width:30px;
  height:30px;
  border-radius:999px;

  display:flex;
  align-items:center;
  justify-content:center;

  border: 1px solid rgba(0,0,0,0.14);
  background: rgba(255,255,255,0.96);
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
  color:#111;

  font-size:18px;
  line-height:1;
  font-weight:900;

  cursor:pointer;

  opacity:0;
  transform: translateY(-2px) scale(0.98);
  transition: opacity .15s ease, transform .15s ease;
}

/* show only when card is unlocked and hovered */
.bf-cart-progress__card.is-unlocked:hover .bf-cart-progress__add{
  opacity:1;
  transform: translateY(0) scale(1);
}

/* never show on locked/active */
.bf-cart-progress__card.is-locked .bf-cart-progress__add,
.bf-cart-progress__card.is-active .bf-cart-progress__add{
  opacity:0 !important;
  pointer-events:none;
}

/* loading state (optional) */
.bf-cart-progress__add.is-loading{
  opacity:1;
  transform: translateY(0) scale(1);
  cursor:default;
}

/* disabled should still be visible for "selected" feedback */
.bf-cart-progress__add:disabled{
  opacity: 1;
  pointer-events: none;
  cursor: default;
}

/* Mobile tweaks */
@media (max-width: 520px){
  .bf-cart-progress__bar{
    padding-top: 20px;
    padding-bottom: 32px;
  }
  .bf-cart-progress__bar{ --bf-bubble-pad: 70px; }

  .bf-cart-progress__dot{
    width:14px;
    height:14px;
  }

  /* keep touch-friendly button size */
  .bf-cart-progress__state,
  .bf-cart-progress__add{
    width:32px;
    height:32px;
  }
}

/* header row above bonus cards */
.bf-cart-progress__top{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin: 2px 0 10px;

  /* force same row */
  flex-direction: row;
  flex-wrap: nowrap;
}

.bf-cart-progress__top-title{
  font-size: 17px;
  font-weight:700;
  letter-spacing: .2px;
  padding: 0 0 10px 0;
  color: #111;
  margin: 0;
}

.bf-cart-progress__top-sub{
  font-size: 13px;
  opacity: .70;
  color: #111;
  margin: 0;

  /* keep on same line (desktop) */
  white-space: nowrap;
  flex: 0 0 auto;
}

/* only stack on small screens */
@media (max-width: 520px){
  .bf-cart-progress__top{
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 4px;
  }
  .bf-cart-progress__top-sub{
    white-space: normal;
  }
}

.bf-cart-progress-boundary{
  margin-top: 14px;
  border-top: 2px solid rgba(0,0,0,0.06);
}

.bf-cart-progress__add{
  font-size: 0;       /* kill glyph sizing */
  line-height: 0;
}

.bf-cart-progress__add svg{
  display:block;
}

/* hide the + button completely when this reward is already in cart */
.bf-cart-progress__card.is-in-cart .bf-cart-progress__add{
  opacity: 0 !important;
  pointer-events: none !important;
}

/* =========================================================
   SIMPLE + RELIABLE: highlight the reward that is in cart
   ========================================================= */

.bf-cart-progress__card.is-in-cart{
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .45);
  outline: 2px solid rgba(22, 163, 74, .25);
  outline-offset: 2px;
}

/* optional: make the overlay slightly less dark so the selected one pops */
.bf-cart-progress__card.is-in-cart .bf-cart-progress__overlay{
  opacity: .92;
}

/* optional: give the badge a subtle green hint */
.bf-cart-progress__card.is-in-cart .bf-cart-progress__badge{
  border-color: rgba(22, 163, 74, .35);
  box-shadow: 0 2px 10px rgba(22, 163, 74, .18);
}

:root{ --bf-cart-progress-align-left: 0px; }

.bf-cart-progress__top{
  padding-left: var(--bf-cart-progress-align-left);
}