/* =========================================================
   PepperLabz site-wide polish layer (2026-11-13)
   PHP: includes/pepperlabz-motion.php · JS: assets/js/pepperlabz-motion.js
========================================================= */

/* ---------- 1. Scroll reveals ----------
   Only applied once JS has marked an element .plz-reveal (below the fold),
   so nothing is ever hidden without JavaScript. Uses the individual
   `translate` property so it never fights an element's own transform. */
html.plz-motion-on .plz-reveal {
  opacity: 0;
  translate: 0 28px;
  filter: blur(5px);
  transition:
    opacity .75s ease,
    translate .9s cubic-bezier(.2,.7,.2,1),
    filter .75s ease;
  transition-delay: var(--plz-delay, 0ms);
}
html.plz-motion-on .plz-reveal.is-in {
  opacity: 1;
  translate: 0 0;
  filter: none;
}
html.plz-motion-on .plz-reveal.plz-reveal--zoom { translate: 0 18px; scale: .97; transition-property: opacity, translate, scale, filter; }
html.plz-motion-on .plz-reveal.plz-reveal--zoom.is-in { scale: 1; }

/* ---------- 2. Chrome scroll rail (desktop) ---------- */
.plz-rail {
  position: fixed; right: 14px; top: 22vh; height: 56vh; width: 4px;
  z-index: 9990; pointer-events: none;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(196,202,209,0), rgba(196,202,209,.45) 12%, rgba(196,202,209,.45) 88%, rgba(196,202,209,0));
  opacity: 0; transition: opacity .4s ease;
}
.plz-rail.is-on { opacity: 1; }
.plz-rail-fill {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  border-radius: 4px; transform-origin: 50% 0; transform: scaleY(var(--plz-progress, 0));
  background: linear-gradient(180deg, #ffffff 0%, #b9c0c8 30%, #3a3f46 60%, #c9ced4 85%, #ffffff 100%);
  box-shadow: 0 0 6px rgba(28,31,35,.18);
}
.plz-rail-orb {
  position: absolute; left: 50%; top: calc(var(--plz-progress, 0) * 100%);
  width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #d7dce1 35%, #6b737c 75%, #2a2f35 100%);
  box-shadow: 0 2px 6px rgba(17,19,22,.35), 0 0 0 3px rgba(255,255,255,.55);
}
@media (max-width: 1099px) { .plz-rail { display: none; } }

/* ---------- 3. Footer: crisp chrome hexagon / molecule pattern ----------
   Replaces the stretched PNG (background-size:100% 100% distorted it on
   tall footers). Vector, tiles cleanly at any size, fades toward the
   centre so the text stays readable, and drifts very slowly. */
.plz-site-footer::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cg fill='none' stroke='%23c4cad1' stroke-width='.7'%3E%3Cpath d='M28 1 54 16v30L28 61 2 46V16z'/%3E%3Cpath d='M28 61v36M2 46-26 61M54 46l28 15M2 16-26 1M54 16 82 1'/%3E%3C/g%3E%3Cg fill='%23e6e9ed'%3E%3Ccircle cx='28' cy='1' r='1.6'/%3E%3Ccircle cx='54' cy='16' r='1.6'/%3E%3Ccircle cx='54' cy='46' r='2.4'/%3E%3Ccircle cx='28' cy='61' r='1.6'/%3E%3Ccircle cx='2' cy='46' r='1.6'/%3E%3Ccircle cx='2' cy='16' r='2.4'/%3E%3C/g%3E%3C/svg%3E") !important;
  background-repeat: repeat !important;
  background-size: 84px 145.5px !important;
  background-position: 0 0 !important;
  opacity: .22 !important;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, transparent 0%, rgba(0,0,0,.25) 45%, #000 85%) !important;
          mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, transparent 0%, rgba(0,0,0,.25) 45%, #000 85%) !important;
}
@media (prefers-reduced-motion: no-preference) {
  .plz-site-footer::before { animation: plzFooterDrift 90s linear infinite; }
}
@keyframes plzFooterDrift { to { background-position: 84px 145.5px; } }
.plz-site-footer::after {
  background:
    radial-gradient(ellipse 60% 60% at 50% 40%, rgba(17,19,23,.55) 0%, rgba(17,19,23,0) 70%),
    linear-gradient(180deg, rgba(17,19,23,.65) 0%, rgba(17,19,23,0) 18%, rgba(17,19,23,0) 82%, rgba(17,19,23,.6) 100%) !important;
}
/* A thin chrome edge where the footer meets the page. */
.plz-site-footer { border-top: 0 !important; }
.plz-site-footer-inner::before {
  content: ""; position: absolute; left: 50%; top: 0; width: min(560px, 70%); height: 1px; translate: -50% 0;
  background: linear-gradient(90deg, transparent, rgba(230,233,237,.75), transparent);
}
@media (max-width: 1024px) {
  .plz-site-footer::before { background-size: 70px 121.25px !important; opacity: .18 !important; }
}

/* ---------- 4. Phones: compact Black Friday bar (2 short lines, not 3) ---------- */
@media (max-width: 600px) {
  .plz-promo-bar-inner { flex-direction: row !important; flex-wrap: wrap !important; justify-content: center !important; align-items: center !important; row-gap: 3px !important; column-gap: 8px !important; padding: 7px 12px !important; }
  .plz-promo-bar-event {
    flex: 1 0 100%; font-size: 10.5px !important; letter-spacing: .14em; text-transform: uppercase; opacity: .85;
  }
  .plz-promo-bar-flake { display: none !important; }
  .plz-promo-bar-headline { font-size: 12.5px !important; }
  .plz-promo-bar-countdown { font-size: 12px !important; opacity: .9; }
  .plz-promo-bar-cta { padding: 4px 10px !important; font-size: 11px !important; }
}

/* ---------- 5. Phones: Snow toggle becomes a small round button ---------- */
@media (max-width: 767px) {
  .plz-snow-toggle {
    width: 36px; height: 36px; padding: 0 !important; justify-content: center;
    font-size: 0 !important; gap: 0 !important;
  }
  .plz-snow-toggle .plz-snow-toggle-icon { font-size: 15px !important; }
}

/* ---------- 6. Product cards: chrome frame + light sheen (2026-11-13) ----------
   A thin liquid-chrome outline that slowly travels round the card, and one
   soft light sweep across the vial, on hover (mouse) — nothing on phones
   except the carousel focus below. Elements are added by motion.js. */
@property --plz-ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
ul.products > li.product.plz-fx { position: relative; }
.plz-cardfx {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--plz-ang), #ffffff, #9aa1a9 18%, #f4f5f7 32%, #3a3f46 50%, #e6e9ed 66%, #8f979f 82%, #ffffff);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  opacity: 0; transition: opacity .35s ease;
}
.plz-cardfx-sheen {
  position: absolute; z-index: 3; pointer-events: none; inset: 0;
  overflow: hidden; border-radius: inherit;
}
.plz-cardfx-sheen::before {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 40%;
  background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 100%);
  rotate: 12deg; translate: 0 0; opacity: 0;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  ul.products > li.product.plz-fx:hover .plz-cardfx { opacity: 1; animation: plzCardSpin 4s linear infinite; }
  ul.products > li.product.plz-fx:hover .plz-cardfx-sheen::before { animation: plzCardSheen 1.1s cubic-bezier(.3,.6,.3,1) 1 both; }
}
@keyframes plzCardSpin { to { --plz-ang: 360deg; } }
@keyframes plzCardSheen { 0% { opacity: 0; translate: 0 0; } 15% { opacity: 1; } 100% { opacity: 0; translate: 420% 0; } }

/* ---------- 7. Featured carousel: focus + drag + entrance ---------- */
.plz-featured-wrap ul.products.plz-drag { cursor: grab; }
.plz-featured-wrap ul.products.plz-dragging { cursor: grabbing; scroll-snap-type: none !important; scroll-behavior: auto !important; user-select: none; }
.plz-featured-wrap ul.products.plz-dragging a { pointer-events: none; }
@media (max-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .plz-featured-wrap ul.products > li.product {
    scale: calc(1 - var(--plz-f, 0) * .07);
    opacity: calc(1 - var(--plz-f, 0) * .3);
    transition: transform .28s, box-shadow .28s, scale .35s cubic-bezier(.2,.7,.2,1), opacity .35s ease;
  }
}
html.plz-motion-on .plz-featured-wrap ul.products.plz-cin > li.product {
  opacity: 0; translate: 48px 0;
  transition: opacity .7s ease, translate .9s cubic-bezier(.2,.7,.2,1), transform .28s, box-shadow .28s, scale .35s;
  transition-delay: calc(var(--plz-i, 0) * 90ms);
}
html.plz-motion-on .plz-featured-wrap ul.products.plz-cin.is-in > li.product { opacity: calc(1 - var(--plz-f, 0) * .3); translate: 0 0; }
@media (min-width: 1025px) {
  html.plz-motion-on .plz-featured-wrap ul.products.plz-cin.is-in > li.product { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html.plz-motion-on .plz-reveal { opacity: 1 !important; translate: none !important; filter: none !important; scale: none !important; }
  .plz-cardfx, .plz-cardfx-sheen { display: none !important; }
}

/* ---------- 8. Promo bar: "save up to N%" chip (2026-11-13) ---------- */
.plz-promo-bar .plz-promo-bar-upto {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #d7dce1); color: #111 !important;
  font-weight: 800; letter-spacing: .01em; box-shadow: inset 0 -1px 0 rgba(17,19,22,.15);
}
@media (max-width: 900px) {
  .plz-promo-bar .plz-promo-bar-upto, .plz-promo-bar .plz-promo-bar-upto-sep { display: none !important; }
}

/* ---------- 9. Header + footer: chrome hover lines, no dotted boxes (2026-11-13) ----------
   A thin liquid-chrome line grows out from the middle under each menu
   link on hover. The logo gets a soft lift and its own chrome line. The
   dotted focus box only shows for keyboard users now (focus-visible). */
.main-header-menu > .menu-item > .menu-link { position: relative; transition: color .2s ease; }
.main-header-menu > .menu-item > .menu-link::after {
  content: ""; position: absolute; left: 20px; right: 20px; bottom: -3px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(196,202,209,0), #8f979f 12%, #ffffff 32%, #3a3f46 55%, #c4cad1 80%, rgba(196,202,209,0));
  transform: scaleX(0); transform-origin: 50% 50%; opacity: 0;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), opacity .25s ease;
  pointer-events: none;
}
.main-header-menu > .menu-item > .menu-link:hover::after,
.main-header-menu > .menu-item > .menu-link:focus-visible::after,
.main-header-menu > .menu-item.current-menu-item > .menu-link::after { transform: scaleX(1); opacity: 1; }
.main-header-menu > .menu-item > .menu-link:hover { color: #111316 !important; }

/* position only — never set display here: Astra hides its extra
   transparent/mobile logo links with display:none on some pages. */
.custom-logo-link { position: relative; }
.custom-logo-link img { transition: transform .35s cubic-bezier(.2,.7,.2,1), filter .35s ease; }
.custom-logo-link:hover img { transform: translateY(-1px) scale(1.02); filter: drop-shadow(0 6px 10px rgba(17,19,22,.14)); }
.custom-logo-link::after {
  content: ""; position: absolute; left: 8%; right: 8%; bottom: -8px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(196,202,209,0), #9aa1a9 20%, #ffffff 45%, #3a3f46 70%, rgba(196,202,209,0));
  transform: scaleX(0); opacity: 0; transition: transform .4s cubic-bezier(.2,.7,.2,1), opacity .3s ease; pointer-events: none;
}
.custom-logo-link:hover::after { transform: scaleX(1); opacity: 1; }

/* No dotted box after a mouse click/tap; a clean chrome ring for keyboard users. */
a:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: none !important; }
.custom-logo-link:focus, .custom-logo-link:focus img { outline: none !important; box-shadow: none !important; }
.custom-logo-link:focus-visible, .main-header-menu .menu-link:focus-visible, .plz-site-footer a:focus-visible {
  outline: 2px solid #9aa1a9 !important; outline-offset: 6px; border-radius: 8px;
}
.ast-header-account-link, .ast-site-header-cart .cart-container { transition: transform .25s ease; }
.ast-header-account-link:hover, .ast-site-header-cart .cart-container:hover { transform: translateY(-2px); }

/* Footer links: the same chrome line, drawn under the words. */
.plz-site-footer li a, .plz-site-footer nav a, .plz-site-footer-bottom a {
  background-image: linear-gradient(90deg, #8f979f, #ffffff 40%, #c4cad1 70%, #6b737c);
  background-repeat: no-repeat; background-position: 0 100%; background-size: 0% 1.5px;
  padding-bottom: 3px; text-decoration: none !important;
  transition: background-size .35s cubic-bezier(.2,.7,.2,1), color .2s ease;
}
.plz-site-footer li a:hover, .plz-site-footer nav a:hover, .plz-site-footer-bottom a:hover { background-size: 100% 1.5px; color: #ffffff !important; }
.plz-site-footer-brand > a { display: inline-block; transition: transform .35s cubic-bezier(.2,.7,.2,1), filter .35s ease; }
.plz-site-footer-brand > a:hover { transform: translateY(-3px); filter: drop-shadow(0 8px 14px rgba(0,0,0,.45)); }
.plz-site-footer-social a { transition: transform .25s ease, box-shadow .25s ease; }
.plz-site-footer-social a:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0,0,0,.35); }

/* ---------- 10. 404 page in the PepperLabz look (was a green heading) ---------- */
body.error404 .page-title, body.error404 .ast-404-layout-1 h1 {
  color: #111316 !important; font-family: 'Rubik', sans-serif !important; font-weight: 800 !important;
  letter-spacing: -.02em; font-size: clamp(30px, 4vw, 48px) !important;
}
body.error404 .page-sub-title { color: #5a6069 !important; font-weight: 500 !important; font-size: 18px !important; }
body.error404 .search-field { border-radius: 14px !important; border: 1px solid #d8dae0 !important; background: #fafafa !important; }

/* ---------- 11. Shop cards: View + Add to cart side by side (2026-11-13) ----------
   The wrapper takes the old View button's place ("view" grid area). */
ul.products li.product .astra-shop-summary-wrap .plz-shop-actions {
  grid-area: view !important; display: grid !important; grid-template-columns: 1fr 1.35fr !important; grid-template-rows: auto !important;
  gap: 10px !important; align-self: end; width: 100%; margin: 0 !important;
}
ul.products li.product .astra-shop-summary-wrap .plz-shop-actions > a {
  grid-area: auto !important; grid-column: auto !important; grid-row: auto !important; float: none !important;
  display: inline-flex !important; align-items: center; justify-content: center; box-sizing: border-box;
  width: 100% !important; height: 48px !important; min-height: 0 !important; margin: 0 !important; padding: 0 12px !important;
  border-radius: 999px !important; white-space: nowrap; visibility: visible !important; opacity: 1 !important; position: relative !important;
  font: 800 15px/1 'Karla', sans-serif !important; letter-spacing: .02em; text-transform: none !important; text-decoration: none !important;
  transition: translate .2s ease, background .2s ease, box-shadow .2s ease;
}
ul.products li.product .astra-shop-summary-wrap .plz-shop-actions > a.pepper-product-view-btn { background: #fff !important; color: #111 !important; border: 1px solid rgba(17,17,17,.16) !important; box-shadow: none !important; }
ul.products li.product .astra-shop-summary-wrap .plz-shop-actions > a.plz-shop-add,
ul.products li.product .astra-shop-summary-wrap .plz-shop-actions > a.plz-shop-add.added,
ul.products li.product .astra-shop-summary-wrap .plz-shop-actions > a.plz-shop-add.loading { background: #111 !important; color: #fff !important; border: 0 !important; box-shadow: 0 10px 22px rgba(17,19,22,.20) !important; }
ul.products li.product .astra-shop-summary-wrap .plz-shop-actions > a:hover { translate: 0 -2px; }
ul.products li.product .plz-shop-actions .plz-shop-add.loading { opacity: .7 !important; }
ul.products li.product .plz-shop-actions .plz-shop-add.added::after { content: " \2713"; }
ul.products li.product .plz-shop-actions .added_to_cart { display: none !important; }
@media (max-width: 480px) {
  ul.products li.product .astra-shop-summary-wrap .plz-shop-actions > a { height: 44px !important; font-size: 14px !important; padding: 0 8px !important; }
}

/* ---------- 12. Header turns into a floating glass bubble once you scroll (2026-11-18) ----------
   pepperlabz-motion.js adds html.plz-hdr-glass after ~40px of scrolling.
   The header box keeps its exact height (the fixed-header spacer measures
   it), so nothing on the page jumps: only the white bar fades away and a
   frosted chrome-edged pill fades in behind the logo, menu and cart. */
#masthead > #ast-desktop-header,
#masthead > #ast-mobile-header { position: relative; z-index: 1; }
#masthead::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  top: 8px; bottom: 8px; left: max(14px, calc(50% - 680px)); right: max(14px, calc(50% - 680px));
  border-radius: 999px; border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(255,255,255,.78), rgba(246,247,249,.62)) padding-box,
    linear-gradient(120deg, rgba(255,255,255,.95), rgba(150,158,168,.55) 30%, rgba(255,255,255,.95) 52%, rgba(110,118,128,.45) 78%, rgba(255,255,255,.9)) border-box;
  -webkit-backdrop-filter: blur(18px) saturate(1.7); backdrop-filter: blur(18px) saturate(1.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 18px 40px -22px rgba(17,19,22,.45), 0 2px 6px -2px rgba(17,19,22,.12);
  opacity: 0; transform: translateY(-8px) scale(.97);
  transition: opacity .35s ease, transform .5s cubic-bezier(.2,1.25,.4,1);
}
/* a slow chrome glint that runs across the bubble when it appears */
#masthead::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  top: 8px; bottom: 8px; left: max(14px, calc(50% - 680px)); right: max(14px, calc(50% - 680px));
  border-radius: 999px; overflow: hidden;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.75) 48%, transparent 60%) no-repeat;
  background-size: 40% 100%; background-position: -60% 0;
  opacity: 0;
}
html.plz-hdr-glass #masthead::before { opacity: 1; transform: none; }
html.plz-hdr-glass #masthead::after { animation: plzHdrGlint 1.6s ease .15s 1 both; }
@keyframes plzHdrGlint { 0% { opacity: 1; background-position: -60% 0; } 100% { opacity: 1; background-position: 160% 0; } }
html.plz-hdr-glass #masthead .ast-primary-header-bar,
html.plz-hdr-glass #masthead .main-header-bar,
html.plz-hdr-glass #masthead .ast-above-header-bar,
html.plz-hdr-glass #masthead .ast-below-header-bar { background: transparent !important; border-bottom-color: transparent !important; box-shadow: none !important; }
#masthead .ast-primary-header-bar { transition: background-color .3s ease; }
@media (max-width: 921px) {
  #masthead::before, #masthead::after { top: 6px; bottom: 6px; left: 10px; right: 10px; border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  #masthead::before { transition: opacity .2s ease; transform: none; }
  html.plz-hdr-glass #masthead::after { animation: none; }
}
/* phone menu button: soft glass tile inside the bubble instead of a white square */
html.plz-hdr-glass #masthead .menu-toggle.main-header-menu-toggle {
  background: rgba(255,255,255,.55) !important; border-radius: 14px !important;
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(160,168,177,.35) !important;
  transition: background-color .3s ease, box-shadow .3s ease;
}
