/* =========================================================
   PEPPYS PROMO
   ---------------------------------------------------------
   Palette tokens are redeclared here rather than inherited. Every PEPPYS
   plugin does this: the brand variables live in Divi > Theme Options >
   Custom CSS, and depending on that file loading first has broken styling
   on this site before. Self-contained is cheaper than correct-load-order.
   ========================================================= */

.pep-promo-bar,
.pep-optin {
  --pp-navy-900: #060B1F;
  --pp-navy-850: #08102B;
  --pp-navy-800: #0B1638;
  --pp-navy-750: #0F1C46;
  --pp-ink: #050912;
  --pp-gold: #FFC21E;
  --pp-green: #2FD07A;
  --pp-text: #F4F7FF;
  --pp-dim: #AEB8D6;
  --pp-mut: #7683A8;
  --pp-line: rgba(255, 255, 255, .10);
  --pp-disp: "Barlow Condensed", system-ui, sans-serif;
  --pp-body: "Inter", system-ui, -apple-system, sans-serif;
  --pp-ease: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Free shipping bar ---------- */

.pep-promo-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 11px 46px 11px 18px;
  background: linear-gradient(90deg, var(--pp-navy-800), var(--pp-navy-750));
  border-top: 1px solid rgba(255, 194, 30, .35);
  box-shadow: 0 -12px 34px -18px rgba(0, 0, 0, .9);
  font-family: var(--pp-body);
  transform: translateY(100%);
  transition: transform .45s var(--pp-ease);
}
.pep-promo-bar[data-shown="1"] { transform: translateY(0); }

.pep-promo-bar__text {
  font-family: var(--pp-disp);
  font-weight: 800;
  font-style: italic;
  font-size: 19px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--pp-gold);
}
.pep-promo-bar__sub {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--pp-dim);
}
.pep-promo-bar__sub::before {
  content: "•";
  margin-right: 14px;
  color: var(--pp-mut);
}
.pep-promo-bar__close {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  color: var(--pp-dim);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: background .18s var(--pp-ease), color .18s var(--pp-ease);
}
.pep-promo-bar__close:hover { background: rgba(255, 255, 255, .14); color: var(--pp-text); }

@media (max-width: 640px) {
  .pep-promo-bar { flex-direction: column; gap: 2px; padding: 9px 44px 10px 14px; text-align: center; }
  .pep-promo-bar__text { font-size: 16px; }
  .pep-promo-bar__sub { font-size: 12px; }
  .pep-promo-bar__sub::before { display: none; }
}

/* Progress mode: same bar, with a track instead of the shipping strapline. */
.pep-promo-bar--progress .pep-promo-bar__text { color: var(--pp-text); font-size: 17px; }
.pep-promo-bar--progress[data-qualified="1"] .pep-promo-bar__text { color: var(--pp-green); }
.pep-promo-bar__track {
  flex: 0 1 240px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  overflow: hidden;
}
.pep-promo-bar__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pp-gold), #F2A900);
  transition: width .45s var(--pp-ease);
}
.pep-promo-bar--progress[data-qualified="1"] .pep-promo-bar__fill {
  background: linear-gradient(90deg, var(--pp-green), #21b365);
}
@media (max-width: 640px) {
  .pep-promo-bar__track { flex: 0 1 70%; }
}

/* ---------- Cart / checkout progress (classic-cart fallback) ---------- */

.pep-promo-progress {
  margin: 0 0 22px;
  padding: 15px 18px;
  border: 1px solid var(--pp-line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--pp-navy-750), var(--pp-navy-800));
  font-family: var(--pp-body);
}
.pep-promo-progress__label {
  margin: 0 0 10px;
  font-family: var(--pp-disp);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--pp-text);
}
.pep-promo-progress--met .pep-promo-progress__label { color: var(--pp-green); }
.pep-promo-progress__track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}
.pep-promo-progress__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pp-gold), #F2A900);
  transition: width .5s var(--pp-ease);
}
.pep-promo-progress--met .pep-promo-progress__fill { background: linear-gradient(90deg, var(--pp-green), #21b365); }

/* ---------- Opening sale notice ---------- */

.pep-sale {
  --pp-gold: #FFC21E;
  --pp-ink: #050912;
  --pp-text: #F4F7FF;
  --pp-dim: #AEB8D6;
  --pp-navy-750: #0F1C46;
  --pp-navy-800: #0B1638;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}

.pep-sale__tag {
  flex: 0 0 auto;
  padding: 5px 11px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--pp-gold), #F2A900);
  color: var(--pp-ink);
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .09em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.pep-sale__copy {
  flex: 1 1 220px;
  color: var(--pp-dim);
  font-size: 14px;
  line-height: 1.45;
}

/* Archive: a full-width strip sitting above the grid. */
.pep-sale--archive {
  margin: 0 0 22px;
  padding: 13px 16px;
  border: 1px solid rgba(255, 194, 30, .3);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--pp-navy-750), var(--pp-navy-800));
  clear: both;
}

/* Single product: sits right under the price, deliberately quieter — the
   struck-through figure is already doing the shouting. */
.pep-sale--single {
  margin: -2px 0 16px !important;
  padding: 0;
  background: none;
  border: 0;
}
.pep-sale--single .pep-sale__copy { font-size: 13.5px; }

@media (max-width: 600px) {
  .pep-sale { gap: 9px; }
  .pep-sale__copy { font-size: 13px; }
  .pep-sale__tag { font-size: 12px; padding: 4px 9px; }
}

/* ---------- Home page announcement bar ----------
   One continuous ticker. Badge, messages and CTA all ride a SINGLE flex
   track with one gap value, so the space between any two neighbours is
   identical at every width — the previous layout positioned three elements
   independently and the gaps drifted apart per breakpoint. The set is
   rendered twice in the markup; animating the track from -50% to 0 wraps
   the loop on a pixel-identical frame and reads as travelling left → right.
   JS only sets --pb-dur from the measured track width, so the speed in
   px/s is constant on every screen.
   --pep-logo-clear is measured at runtime and can go NEGATIVE: Divi's
   content container opens with its own padding, and a margin floored at
   zero could never pull the bar back up. The 8px is only the fallback. */
.pep-bar {
  --pb-navy-900: #060B1F;
  --pb-navy-850: #08102B;
  --pb-navy-700: #142455;
  --pb-gold: #FFC21E;
  --pb-gold-600: #F2A900;
  --pb-red: #E6352B;
  --pb-text: #F4F7FF;
  --pb-dim: #C3CCE6;
  --pb-mut: #97A2C4;
  --pb-ease: cubic-bezier(.16, 1, .3, 1);
  --pb-gap: 44px;
  --pb-dur: 26s;   /* fallback only; JS derives the real value from width */
  --pep-logo-clear: 8px;

  position: relative;
  left: 50%;
  width: 100vw;
  margin: var(--pep-logo-clear) 0 30px calc(-50vw);
  /* A shade lighter in the middle than the page behind it, so the band has
     its own edges instead of dissolving into the hero. */
  background: linear-gradient(90deg, var(--pb-navy-850) 0%, var(--pb-navy-700) 50%, var(--pb-navy-850) 100%);
  border-bottom: 1px solid rgba(255, 194, 30, .14);
  box-shadow: 0 12px 34px -22px rgba(255, 194, 30, .5);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}

/* The entire brand statement, in 3px. */
.pep-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pb-red), var(--pb-gold) 50%, var(--pb-red));
}

.pep-bar__viewport {
  overflow: hidden;
  display: flex;
  align-items: center;      /* vertical centring, single source */
  min-height: 58px;
}

.pep-bar__track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: pep-ticker var(--pb-dur) linear infinite;
}

/* Hold still for anyone reading it or aiming at the CTA. focus-within
   covers keyboard users tabbing to the link. */
.pep-bar:hover .pep-bar__track,
.pep-bar:focus-within .pep-bar__track { animation-play-state: paused; }

.pep-bar__group {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--pb-gap);
  /* The seam between the two copies must equal the gap between items, or
     the loop point announces itself once per cycle. */
  padding-right: var(--pb-gap);
}

/* -50% of the track is exactly one copy of the set, so the wrap lands on an
   identical frame — the loop has no visible start. -50% → 0 is what makes
   the content travel left to right. */
@keyframes pep-ticker {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* Solid gold on navy — the single loudest element on the strip. */
.pep-bar__badge {
  flex: 0 0 auto;
  padding: 6px 11px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--pb-gold), var(--pb-gold-600));
  color: var(--pb-navy-900);
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Three weights, so the eye is told what to read first. Nothing ellipsises
   here — the ticker brings every word into view. */
.pep-bar__msg { white-space: nowrap; }
.pep-bar__msg--primary   { color: var(--pb-text); font-size: 17px; font-weight: 600; letter-spacing: .005em; }
.pep-bar__msg--secondary { color: var(--pb-dim);  font-size: 16px; font-weight: 500; }
.pep-bar__msg--tertiary  { color: var(--pb-mut);  font-size: 16px; font-weight: 500; }

.pep-bar__cta {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  color: var(--pb-gold) !important;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .11em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none !important;
  box-shadow: none !important;
  white-space: nowrap;
}

/* Standing underline — a call to action nobody can see until they find it
   is not a call to action. Full strength on hover. */
.pep-bar__cta::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  opacity: .38;
  transition: opacity .32s var(--pb-ease);
}
.pep-bar__cta:hover::after,
.pep-bar__cta:focus-visible::after { opacity: 1; }

.pep-bar__cta-arrow { transition: transform .32s var(--pb-ease); }
.pep-bar__cta:hover .pep-bar__cta-arrow,
.pep-bar__cta:focus-visible .pep-bar__cta-arrow { transform: translateX(4px); }

/* Mobile: same ticker, tighter rhythm. Nothing is dropped — the scroll
   brings every message into view, which is the whole point of a ticker. */
@media (max-width: 782px) {
  .pep-bar { margin-bottom: 22px; --pb-gap: 28px; }
  .pep-bar__viewport { min-height: 50px; }
  .pep-bar__msg--primary { font-size: 14.5px; }
  .pep-bar__msg--secondary,
  .pep-bar__msg--tertiary { font-size: 14px; }
  .pep-bar__badge { font-size: 12px; letter-spacing: .13em; padding: 5px 8px; }
  .pep-bar__cta { font-size: 14px; }
}

@media (max-width: 400px) {
  .pep-bar__msg { font-size: 13.2px !important; }
}

/* A ticker that never stops IS motion. Reduced motion gets a static,
   centred strip: no animation, duplicate copy hidden. */
@media (prefers-reduced-motion: reduce) {
  .pep-bar__track { animation: none; width: 100%; justify-content: center; }
  .pep-bar__group { padding-right: 0; }
  .pep-bar__group[aria-hidden="true"] { display: none; }
  .pep-bar__cta::after,
  .pep-bar__cta-arrow { transition: none; }
}

/* Static single row can't scroll extra content into view on a phone —
   keep what fits, in priority order. */
@media (prefers-reduced-motion: reduce) and (max-width: 782px) {
  .pep-bar__msg--secondary,
  .pep-bar__msg--tertiary { display: none; }
}

/* Struck-through "was" range on variable products, matched to the gold
   current price Divi already renders. */
.woocommerce div.product p.price del,
.woocommerce ul.products li.product .price del {
  opacity: .75;
  font-size: .78em;
  margin-right: 7px;
}
.woocommerce div.product p.price ins,
.woocommerce ul.products li.product .price ins {
  text-decoration: none;
  background: none;
}

/* ---------- SMS opt-in popup ---------- */

.pep-optin {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: var(--pp-body);
}
.pep-optin[hidden] { display: none; }

.pep-optin__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 16, .78);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .35s var(--pp-ease);
}
.pep-optin[data-shown="1"] .pep-optin__backdrop { opacity: 1; }

.pep-optin__panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 34px 30px 28px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  background: linear-gradient(170deg, #101A3A, var(--pp-navy-850));
  box-shadow: 0 40px 90px -24px rgba(0, 0, 0, .8);
  transform: translateY(14px) scale(.98);
  opacity: 0;
  transition: transform .4s var(--pp-ease), opacity .3s var(--pp-ease);
}
.pep-optin[data-shown="1"] .pep-optin__panel { transform: none; opacity: 1; }

.pep-optin__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  color: var(--pp-dim);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.pep-optin__close:hover { background: rgba(255, 255, 255, .14); color: var(--pp-text); }

.pep-optin__eyebrow {
  margin: 0 0 6px;
  font-family: var(--pp-disp);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--pp-gold);
}
.pep-optin__title {
  margin: 0 0 10px;
  font-family: var(--pp-disp);
  font-weight: 800;
  font-style: italic;
  font-size: 40px;
  line-height: .95;
  text-transform: uppercase;
  color: var(--pp-text);
}
.pep-optin__lead {
  margin: 0 0 18px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--pp-dim);
}

.pep-optin__label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--pp-mut);
}
.pep-optin__input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--pp-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  color: var(--pp-text);
  font-family: var(--pp-body);
  font-size: 16px; /* 16px stops iOS zooming the page on focus. */
}
.pep-optin__input:focus {
  outline: 2px solid var(--pp-gold);
  outline-offset: 1px;
  background: rgba(255, 255, 255, .08);
}

.pep-optin__consent {
  display: flex;
  gap: 10px;
  margin: 14px 0 10px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--pp-mut);
}
.pep-optin__consent input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: var(--pp-gold);
}

.pep-optin__links { margin: 0 0 14px; font-size: 11.5px; }
.pep-optin__links a { color: var(--pp-dim); text-decoration: underline; }
.pep-optin__links a + a { margin-left: 12px; }

.pep-optin__error {
  margin: 0 0 12px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 107, 99, .35);
  border-radius: 9px;
  background: rgba(255, 107, 99, .1);
  color: #FF9F99;
  font-size: 13px;
}

.pep-optin__submit {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--pp-gold), #F2A900);
  color: var(--pp-ink);
  font-family: var(--pp-disp);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .18s var(--pp-ease), box-shadow .18s var(--pp-ease);
}
.pep-optin__submit:hover { transform: translateY(-1px); box-shadow: 0 16px 34px -14px rgba(255, 194, 30, .7); }
.pep-optin__submit[disabled] { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

.pep-optin__decline {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  border: 0;
  background: none;
  color: var(--pp-mut);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

.pep-optin__code {
  margin: 4px 0 10px;
  padding: 16px;
  border: 1px dashed rgba(255, 194, 30, .5);
  border-radius: 12px;
  background: rgba(255, 194, 30, .08);
  color: var(--pp-gold);
  font-family: var(--pp-disp);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: .1em;
  text-align: center;
}

@media (max-width: 480px) {
  .pep-optin__panel { padding: 28px 20px 22px; }
  .pep-optin__title { font-size: 33px; }
}

@media (prefers-reduced-motion: reduce) {
  .pep-promo-bar,
  .pep-optin__panel,
  .pep-optin__backdrop,
  .pep-promo-progress__fill { transition: none; }
}
