/* ─── Free Shipping Progress Bar ─────────────────────────────────────────── */
.astra-fs-bar {
  --astra-fs-accent: var(--c-gold);
  position: fixed;
  top: calc(
    var(--wp-admin-bar-offset, 0px) + var(--bar-h, 40px) + var(--header-h, 68px)
  );
  left: 0;
  right: 0;
  z-index: 10005;
  width: 100%;
  background:
    linear-gradient(180deg, rgba(242, 202, 80, 0.1), rgba(242, 202, 80, 0) 80%),
    rgba(14, 14, 14, 0.97);
  border-bottom: 1px solid rgba(242, 202, 80, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.astra-fs-bar__inner {
  max-width: var(--max-w, 1440px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px var(--site-side-space, 24px);
}

.astra-fs-bar__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.astra-fs-bar__icon {
  flex: 0 0 auto;
  color: var(--astra-fs-accent);
  font-size: 20px;
  line-height: 1;
}

.astra-fs-bar__text {
  font-family: var(--font-body);
  font-size: clamp(0.72rem, 1.4vw, 0.86rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--c-text);
}

.astra-fs-bar__text .amount,
.astra-fs-bar__text bdi {
  color: var(--astra-fs-accent);
  font-weight: 800;
  white-space: nowrap;
}

/* Progress track */
.astra-fs-bar__track {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 6px;
  margin: 0 auto;
  border-radius: 999px;
  background: rgba(242, 202, 80, 0.14);
  overflow: hidden;
}

.astra-fs-bar__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--c-gold-dim, #d4af37), var(--c-gold, #f2ca50));
  box-shadow: 0 0 12px rgba(242, 202, 80, 0.45);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Completed state */
.astra-fs-bar.is-complete {
  background:
    linear-gradient(180deg, rgba(76, 175, 80, 0.16), rgba(76, 175, 80, 0) 80%),
    rgba(19, 19, 19, 0.96);
  border-bottom-color: rgba(120, 200, 120, 0.3);
}

.astra-fs-bar.is-complete .astra-fs-bar__icon {
  color: #8fd19e;
}

.astra-fs-bar.is-complete .astra-fs-bar__fill {
  background: linear-gradient(90deg, #4caf50, #8fd19e);
  box-shadow: 0 0 12px rgba(120, 200, 120, 0.45);
}

.astra-fs-bar.is-complete .astra-fs-bar__text .amount,
.astra-fs-bar.is-complete .astra-fs-bar__text bdi {
  color: #8fd19e;
}

/* RTL: the price keeps LTR digit grouping but flows in the sentence naturally. */
html[dir="rtl"] .astra-fs-bar__text .amount,
html[dir="rtl"] .astra-fs-bar__text bdi {
  direction: ltr;
  display: inline-block;
  unicode-bidi: embed;
}

@media (max-width: 575.98px) {
  .astra-fs-bar__inner {
    gap: 7px;
    padding: 9px 14px;
  }

  .astra-fs-bar__icon {
    font-size: 18px;
  }

  .astra-fs-bar__track {
    height: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .astra-fs-bar__fill {
    transition: none;
  }
}
