/* Free-shipping progress bar — slim strip under the header, grows toward the
   trophy; bright pink plus confetti and a toast when the threshold is crossed. */
.sg-ship-bar { border-bottom: 1px solid var(--line); background: #fffdf9; }
.sg-ship-bar__inner {
  width: min(100% - 48px, var(--content-width)); margin: auto;
  display: flex; align-items: center; gap: 14px; padding: 9px 0 10px;
}
.sg-ship-bar__label {
  flex: 0 1 auto; color: var(--ink); font: 500 12px var(--label);
  letter-spacing: .08em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sg-ship-bar__label .woocommerce-Price-amount { font-weight: 700; color: var(--green); }
.sg-ship-bar__track {
  flex: 1 1 120px; height: 8px; background: var(--line);
  position: relative; overflow: hidden; border-radius: 4px;
}
.sg-ship-bar__fill {
  position: absolute; inset: 0 auto 0 0; width: 0; background: var(--green);
  border-radius: 4px; transition: width .5s ease, background .3s ease;
}
.sg-ship-bar__trophy { flex: 0 0 auto; display: grid; place-items: center; color: #b9b4a7; }
.sg-ship-bar[data-full="1"] .sg-ship-bar__fill { background: var(--hotpink); }
.sg-ship-bar[data-full="1"] .sg-ship-bar__trophy { color: var(--hotpink); animation: sg-trophy-pop .45s ease; }
.sg-ship-bar[data-full="1"] .sg-ship-bar__label,
.sg-ship-bar[data-full="1"] .sg-ship-bar__label .woocommerce-Price-amount { color: var(--hotpink); }
@keyframes sg-trophy-pop { 40% { transform: scale(1.5) rotate(-8deg); } }

/* Ship-to country is an independent choice from language and currency. */
.sg-ship-bar__country { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.sg-ship-bar__country > span { display: none; }
.sg-ship-bar__country select {
  max-width: 110px; padding: 5px 8px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font: 600 12px var(--label); cursor: pointer;
}

/* Drawer variant sits inside the cart drawer. */
.cart-drawer .sg-ship-bar { border: 1px solid var(--line); background: #fffdf9; margin: 12px 0 14px; }
.cart-drawer .sg-ship-bar__inner { width: auto; flex-wrap: wrap; row-gap: 8px; }
.cart-drawer .sg-ship-bar__label { flex-basis: 100%; white-space: normal; }

/* One-shot celebration when the bar crosses the threshold. */
.sg-confetti {
  position: fixed; z-index: 60; width: 7px; height: 7px; border-radius: 1px;
  pointer-events: none; background: #f2a516;
  animation: sg-confetti 1s ease-out forwards;
}
.sg-confetti:nth-child(3n) { background: var(--hotpink); }
.sg-confetti:nth-child(4n) { background: var(--electric); }
@keyframes sg-confetti { to { transform: translate(var(--dx), var(--dy)) rotate(220deg); opacity: 0; } }

/* The unlocked toast. */
.sg-ship-toast {
  position: fixed; z-index: 59; left: 50%; bottom: 34px;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px; border: 1px solid var(--ink); background: #fffdf9;
  box-shadow: 0 18px 44px #111c4426; color: var(--ink);
  font: 700 13px var(--label); letter-spacing: .08em; text-transform: uppercase;
  transform: translate(-50%, 20px); opacity: 0; visibility: hidden;
  transition: transform .35s ease, opacity .35s ease, visibility .35s;
}
.sg-ship-toast.is-visible { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.sg-ship-toast .sg-ship-toast__cup { color: #f2a516; display: grid; place-items: center; }
.sg-ship-toast .sg-ship-toast__cup svg { width: 22px; height: 22px; }

@media (max-width: 720px) {
  .sg-ship-bar__inner { width: calc(100% - 32px); gap: 10px; flex-wrap: wrap; row-gap: 7px; padding: 7px 0 8px; }
  .sg-ship-bar__label { flex: 1 1 auto; min-width: 0; font-size: 13px; white-space: normal; }
  .sg-ship-bar__country { order: 4; flex: 1 1 auto; }
  .sg-ship-bar__country select { max-width: none; width: 100%; padding: 4px 8px; font-size: 12px; }
  .sg-ship-bar__track { order: 5; flex-basis: 100%; }
}
