/* ===== Conversion helpers (inc/store.php): savings, low stock, free-shipping progress, trust points, sticky add-to-cart ===== */

/* "You save Rs 500 (20%)" under the single-product price */
.juno-savings {
  display: inline-flex;
  margin: calc(var(--space-2) * -1) 0 var(--space-4);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--mint-100);
  color: var(--mint-600);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--fw-ui);
}

/* Low stock — real stock levels only */
.juno-low-stock {
  align-self: flex-start;
  margin: var(--space-2) var(--space-1-5) 0;
  padding: var(--space-0-5) var(--space-2-5);
  border-radius: var(--radius-pill);
  background: var(--danger-50);
  color: var(--danger-600);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--fw-ui);
}
.woocommerce div.product .stock.in-stock:not(:empty) {
  color: var(--mint-600);
}

/* Free-shipping progress (cart drawer + cart totals) */
.juno-ship-progress {
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: var(--border-w) dashed var(--gray-300);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.juno-ship-progress-text {
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text);
}
.juno-ship-progress-text strong {
  color: var(--color-price);
}
.juno-ship-progress-track {
  height: 10px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--gray-100);
  overflow: hidden;
}
.juno-ship-progress-bar {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  background: repeating-linear-gradient(-45deg, var(--primary-500) 0 8px, var(--primary-400) 8px 16px);
  transition: width var(--dur-slow) var(--ease-out);
}
.juno-ship-progress.is-complete {
  border-style: solid;
  border-color: var(--mint-400);
  background: var(--mint-50);
}
.juno-ship-progress.is-complete .juno-ship-progress-text {
  color: var(--mint-600);
  font-weight: var(--fw-ui);
}
.juno-ship-progress.is-complete .juno-ship-progress-bar {
  background: var(--mint-400);
}

/* Trust points beside "Add to cart" */
.juno-trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin: 0 0 var(--space-6);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
}
.juno-trust li {
  display: flex;
  align-items: center;
  gap: var(--space-1-5);
  font-size: var(--text-sm);
  font-weight: var(--fw-ui);
  color: var(--gray-700);
}
.juno-trust .icon {
  color: var(--mint-600);
}

/* Sticky add-to-cart bar: phones only, shown by app.js once the real button scrolls out of view */
.juno-sticky-atc {
  display: none;
}
@media (max-width: 767px) {
  .juno-sticky-atc {
    position: fixed;
    left: var(--space-3);
    right: var(--space-3);
    bottom: var(--space-3);
    z-index: var(--z-header);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2-5) var(--space-2-5) var(--space-2-5) var(--space-4);
    border: var(--border-strong);
    border-radius: var(--radius-pill);
    background: var(--color-surface);
    box-shadow: var(--shadow-pop);
    transform: translateY(calc(100% + var(--space-6)));
    transition: transform var(--dur-base) var(--ease-spring);
  }
  .juno-sticky-atc.is-visible {
    transform: none;
  }
  .juno-sticky-atc-info {
    flex: 1;
    min-width: 0;
  }
  .juno-sticky-atc-name {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--fw-ui);
    color: var(--color-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .juno-sticky-atc-price {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--fw-figure);
    color: var(--color-price);
  }
  .juno-sticky-atc-price del {
    color: var(--color-text-subtle);
    font-weight: var(--fw-regular);
    margin-right: var(--space-1);
  }
  .juno-sticky-atc-price ins {
    text-decoration: none;
  }
  .juno-sticky-atc-btn {
    flex: none;
    padding: var(--space-2-5) var(--space-5);
  }
  /* keep the page's last content (and the WhatsApp button) clear of the bar */
  body.has-sticky-atc {
    padding-bottom: 88px;
  }
}
