/* Sticky Add to Cart — a buy bar that stays on screen.
 *
 * The script moves the block to <body> and says when it should be on show;
 * everything the eye sees is here. Hidden, the bar is slid past the edge or
 * faded out, and `visibility: hidden` so nothing inside it can take focus.
 * On show at the bottom, the page gets a bottom padding as tall as the bar,
 * so the last lines of the page are never stuck underneath it.
 */

html.pb-sat-pad body { padding-bottom: var(--pb-sat-h, 0px); }

.pb-sat {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 98;
  font-family: inherit;
  visibility: hidden;
  transform: translateY(105%);
  transition: transform 0.35s ease, opacity 0.35s ease, visibility 0s linear 0.35s;
}
.pb-sat--top { top: 0; bottom: auto; transform: translateY(-105%); }

/* A floating card sits off the edge, so it has further to go to be out of
   sight: its own height and the gap, not just its height. */
.pb-sat--float {
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  left: 12px;
  transform: translateY(calc(100% + 40px));
}
.pb-sat--float.pb-sat--top { top: 12px; bottom: auto; transform: translateY(calc(-100% - 40px)); }

.pb-sat.is-on {
  visibility: visible;
  transform: none;
  transition: transform 0.35s ease, opacity 0.35s ease, visibility 0s;
}
.pb-sat.pb-sat--fade { opacity: 0; transform: none; }
.pb-sat.pb-sat--fade.is-on { opacity: 1; }
.pb-sat.pb-sat--none { transform: none; transition: none; }

@media (min-width: 750px) { .pb-sat--on-mobile { display: none; } }
@media (max-width: 749px) { .pb-sat--on-desktop { display: none; } }

/* ── the bar ─────────────────────────────────────────────────────────── */

.pb-sat__bar {
  --pb-sat-shadow: 0 -4px 20px rgb(0 0 0 / 0.08);
  color: var(--pb-sat-nc, #2b2b2b);
  background: var(--pb-sat-bg, #fff);
  box-shadow: var(--pb-sat-shadow);
}
.pb-sat--top .pb-sat__bar { --pb-sat-shadow: 0 4px 20px rgb(0 0 0 / 0.08); }
/* The home indicator on a phone without a button sits over the bottom edge. */
.pb-sat--edge.pb-sat--bottom .pb-sat__bar { padding-bottom: env(safe-area-inset-bottom, 0px); }
.pb-sat--float .pb-sat__bar {
  --pb-sat-shadow: 0 12px 36px rgb(0 0 0 / 0.18);
  max-width: var(--pb-sat-cw, 1200px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: calc(var(--pb-sat-r, 8px) + 6px);
}

.pb-sat__ann {
  margin: 0;
  padding: 0.4em 1em;
  font-size: var(--pb-sat-as, 13px);
  line-height: 1.35;
  text-align: center;
  color: var(--pb-sat-af, #fff);
  background: var(--pb-sat-ab, #2b2b2b);
}
.pb-sat__time {
  margin-inline-start: 0.2em;
  font-size: 1.15em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--pb-sat-tc, #fff);
}
.pb-sat--notimer .pb-sat__ann { display: none; }

.pb-sat__in {
  display: flex;
  align-items: center;
  gap: 10px 16px;
  box-sizing: border-box;
  max-width: var(--pb-sat-cw, 1200px);
  margin: 0 auto;
  padding: var(--pb-sat-py, 10px) 16px;
}

/* ── the product ─────────────────────────────────────────────────────── */

.pb-sat__img {
  flex: 0 0 auto;
  width: var(--pb-sat-is, 44px);
  height: var(--pb-sat-is, 44px);
  object-fit: cover;
  border-radius: min(var(--pb-sat-r, 8px), 12px);
  background: color-mix(in srgb, currentColor 8%, transparent);
}
.pb-sat__info { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
.pb-sat__name {
  margin: 0;
  overflow: hidden;
  font-size: var(--pb-sat-ns, 14px);
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--pb-sat-nc, #2b2b2b);
}
.pb-sat__rate { display: flex; align-items: center; gap: 4px; margin: 0; font-size: 12px; line-height: 1; color: var(--pb-sat-cc, #8f8f8f); }
/* Five stars from one mask, filled to the exact rating by a gradient: no half
   stars to draw and no rounding to the nearest whole one. */
.pb-sat__stars {
  --pb-sat-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.6l2.9 6 6.5 1-4.7 4.6 1.1 6.5-5.8-3.1-5.8 3.1 1.1-6.5L2.6 9.6l6.5-1z'/%3E%3C/svg%3E");
  display: inline-block;
  width: 5em;
  height: 1em;
  background: linear-gradient(90deg, #f5b301 var(--pb-sat-rate, 100%), color-mix(in srgb, currentColor 28%, transparent) 0);
  -webkit-mask: var(--pb-sat-star) repeat-x left center / 1em 1em;
  mask: var(--pb-sat-star) repeat-x left center / 1em 1em;
}
.pb-sat__price { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 0; font-size: var(--pb-sat-ps, 14px); line-height: 1.25; }
.pb-sat__now { font-weight: 600; color: var(--pb-sat-pc, #2b2b2b); }
.pb-sat__was { font-size: 0.9em; color: var(--pb-sat-cc, #8f8f8f); }
.pb-sat__was:empty { display: none; }
.pb-sat__tag {
  padding: 0.2em 0.55em;
  font-size: 0.78em;
  font-weight: 700;
  line-height: 1.2;
  color: var(--pb-sat-tf, #fff);
  background: var(--pb-sat-tb, #8f8f8f);
  border-radius: 999px;
}
.pb-sat__tag[hidden] { display: none; }

/* ── menus, quantity, button ─────────────────────────────────────────── */

.pb-sat__buy { display: flex; flex: 0 1 auto; align-items: center; gap: 8px; margin-inline-start: auto; }
.pb-sat__opts { display: flex; gap: 8px; min-width: 0; }

/* Minimal draws the lines in the text colour at a fifth of its strength,
   Classic at full strength and twice as thick — one colour drives both. */
.pb-sat--classic { --pb-sat-lw: 2px; --pb-sat-lm: 100%; }
.pb-sat__variants,
.pb-sat__qty {
  box-sizing: border-box;
  height: 40px;
  color: var(--pb-sat-ff, #000);
  background-color: var(--pb-sat-fb, #fff);
  border: var(--pb-sat-lw, 1px) solid color-mix(in srgb, var(--pb-sat-ff, #000) var(--pb-sat-lm, 22%), transparent);
  border-radius: var(--pb-sat-r, 8px);
}
/* The chevron is two gradient triangles in the text colour, so it follows
   whatever colour the menus are given. */
.pb-sat__variants {
  min-width: 0;
  max-width: 240px;
  margin: 0;
  padding: 0 30px 0 12px;
  font: inherit;
  font-size: 13px;
  text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.pb-sat__qty { display: inline-flex; flex: 0 0 auto; align-items: center; overflow: hidden; }
.pb-sat__step {
  width: 32px;
  height: 100%;
  margin: 0;
  padding: 0;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.pb-sat__num {
  width: 36px;
  height: 100%;
  margin: 0;
  padding: 0;
  font: inherit;
  font-size: 14px;
  text-align: center;
  color: inherit;
  background: transparent;
  border: 0;
  -moz-appearance: textfield;
  appearance: textfield;
}
.pb-sat__num::-webkit-outer-spin-button,
.pb-sat__num::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }

.pb-sat__btn {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 160px;
  height: 42px;
  margin: 0;
  padding: 0 22px;
  overflow: hidden;
  font: inherit;
  font-size: var(--pb-sat-bs, 15px);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--pb-sat-bf, #fff);
  background: var(--pb-sat-bb, #0a1714);
  border: 0;
  border-radius: var(--pb-sat-r, 8px);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: filter 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.pb-sat__btn:disabled { cursor: not-allowed; opacity: 0.7; filter: saturate(0.4); }

/* Working: the words fade, a ring turns where they were, the width stays. */
.pb-sat__btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.1em;
  height: 1.1em;
  margin: -0.55em 0 0 -0.55em;
  box-sizing: border-box;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.pb-sat[data-busy] .pb-sat__btn { cursor: progress; }
.pb-sat[data-busy] .pb-sat__txt { opacity: 0; }
.pb-sat[data-busy] .pb-sat__btn::before { opacity: 1; animation: pb-sat-spin 0.7s linear infinite; }
@keyframes pb-sat-spin { to { transform: rotate(360deg); } }

@media (hover: hover) {
  .pb-sat__btn:not(:disabled):hover { filter: brightness(1.15); }
  .pb-sat--hbg .pb-sat__btn:not(:disabled):hover { background: var(--pb-sat-hb); filter: none; }
  .pb-sat--hfg .pb-sat__btn:not(:disabled):hover { color: var(--pb-sat-hf); }
  .pb-sat__step:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
}
.pb-sat__btn:focus-visible,
.pb-sat__variants:focus-visible { outline: 2px solid var(--pb-sat-ff, currentColor); outline-offset: 2px; }
/* Inside the quantity box, which clips: the ring goes on the inside. */
.pb-sat__step:focus-visible,
.pb-sat__num:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }

.pb-sat__hint { margin: 0; padding: 0 1em 0.8em; font-size: 13px; text-align: center; color: var(--pb-sat-cc, #8f8f8f); }

/* ── the confirmation ────────────────────────────────────────────────── */

/* Positioned against the bar rather than the viewport: the bar is fixed and
   transformed while it slides, and a fixed child of a transformed parent
   would land somewhere else. The text stays in the live region between
   showings, so the words are announced when they arrive. */
.pb-sat__toast {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  z-index: 1;
  box-sizing: border-box;
  width: max-content;
  max-width: min(92vw, 420px);
  padding: 0.7em 1.1em;
  font-size: var(--pb-sat-os, 15px);
  line-height: 1.35;
  text-align: center;
  color: var(--pb-sat-of, #fff);
  background: var(--pb-sat-ob, #2ebd3b);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.18);
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.pb-sat--top .pb-sat__toast { top: calc(100% + 12px); bottom: auto; transform: translate(-50%, -8px); }
.pb-sat__toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.pb-sat__toast.is-error { color: #fff; background: #b42318; }

/* ── on a phone ──────────────────────────────────────────────────────── */

/* Two rows: the product, then the menu, the quantity and the button — which
   fit a 375px phone side by side. Menus for each option take a row of their
   own rather than being squeezed until "Beige" reads "Bei…". Anything that
   still does not fit wraps instead of shrinking below a tappable size. The
   stars go: a phone has no room for them beside a name and a price. */
@media (max-width: 749px) {
  .pb-sat__in { flex-wrap: wrap; gap: 8px 10px; padding-inline: 12px; }
  .pb-sat__img { width: min(var(--pb-sat-is, 44px), 40px); height: min(var(--pb-sat-is, 44px), 40px); }
  .pb-sat__rate { display: none; }
  .pb-sat__buy { flex: 1 1 100%; flex-wrap: wrap; margin: 0; }
  .pb-sat__opts { flex: 1 1 96px; }
  .pb-sat__opts:has(> :nth-child(2)) { flex-basis: 100%; }
  .pb-sat__variants { flex: 1 1 0; max-width: none; }
  .pb-sat__btn { flex: 1 1 110px; min-width: 0; padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .pb-sat,
  .pb-sat.is-on { transform: none; transition: none; }
  .pb-sat__toast { transition: none; }
  .pb-sat[data-busy] .pb-sat__btn::before { animation-duration: 1.6s; }
}
