/* PawChristmas 0.1.8 — Skyrise 3.04: desktop header 5, mobile header 2.
   Full, continuous fir branches from the top corners nearly to the centered logo.
   Matching side branches have the same origin and do not intercept interaction.
   Does not modify header HTML, PawInfoBar, product pages or the checkout. */
@media (min-width: 1250px) {
  html.pawchristmas-decor-on body { position: relative; }
  html.pawchristmas-decor-on body::before,
  html.pawchristmas-decor-on body::after {
    content: '';
    position: absolute;
    top: -10px;
    width: clamp(410px, calc(50vw - 210px), 860px);
    aspect-ratio: 860 / 1580;
    background-repeat: no-repeat;
    background-size: 100% auto;
    pointer-events: none;
    z-index: 8;
  }
  html.pawchristmas-decor-on body::before {
    left: 0;
    background-image: url('../img/corner-left-wide-short.png');
  }
  html.pawchristmas-decor-on body::after {
    right: 0;
    /* The text half of the header 5 logo is wider; keep extra clearance. */
    width: clamp(385px, calc(50vw - 295px), 795px);
    transform: scaleX(-1);
    background-image: url('../img/corner-right-wide-short.png');
  }
  html.pawchristmas-decor-on.pawchristmas-sides-on body::before {
    background-image: url('../img/corner-left-wide.png');
  }
  html.pawchristmas-decor-on.pawchristmas-sides-on body::after {
    background-image: url('../img/corner-right-wide.png');
  }
  html.pawchristmas-decor-on body#checkout::before,
  html.pawchristmas-decor-on body#checkout::after,
  html.pawchristmas-decor-on body#cart::before,
  html.pawchristmas-decor-on body#cart::after { display: none !important; }
}
/* Tablet and mobile: no garlands, only banner and optional snow. */
#pawchristmas-greeting[hidden] { display: none !important; }
#pawchristmas-greeting.pawchristmas-greeting {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  /* The original graphic is 1536 x 192 (exact 8:1). Respect this ratio,
     rather than cropping the lantern, trees, baubles and presents. */
  min-height: clamp(190px, 12.5vw, 320px);
  height: auto;
  text-align: center;
  background-color: #faf0de;
  background-image: url('../img/greeting.webp');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 100% auto;
  margin: 0;
  padding: 20px 26px;
  border-top: 1px solid #e8d5ae;
  border-bottom: 1px solid #e8d5ae;
  overflow: hidden;
}
#pawchristmas-greeting .pawchristmas-greeting-inner {
  width: 100%;
  max-width: 710px;
  margin: auto;
  position: relative;
  z-index: 1;
}
#pawchristmas-greeting h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: clamp(29px, 3.5vw, 56px);
  font-weight: normal;
  line-height: 1.08;
  letter-spacing: .02em;
  margin: 0 0 9px;
  color: #9f1715;
  text-shadow: 0 1px 2px rgba(255,255,255,.9);
}
#pawchristmas-greeting p {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(15px, 1.6vw, 23px);
  line-height: 1.3;
  margin: 0;
  color: #352e2a;
  text-shadow: 0 1px 3px rgba(255,255,255,.9);
}
#pawchristmas-greeting .pawchristmas-greeting-star {
  font-size: 18px;
  margin-top: 5px;
  color: #b58842;
}

/* Seasonal logo swaps its src only, never overwrites PS logo files. */
#header img.pawchristmas-seasonal-logo {
  height: auto;
  width: auto;
  max-height: 92px;
  max-width: min(100%, 360px);
  object-fit: contain;
}

/* Snow overlay uses lightweight glyph snowflakes rather than simple dots,
   so the effect reads as real snow on both light and dark product photos. */
#pawchristmas-snow-overlay { display: none; }
@media (prefers-reduced-motion: no-preference) {
  html.pawchristmas-snow-on #pawchristmas-snow-overlay {
    display: block;
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 35;
    pointer-events: none;
  }
  #pawchristmas-snow-overlay .pc-snowflake {
    position: absolute;
    top: -12vh;
    line-height: 1;
    user-select: none;
    will-change: transform;
    text-shadow:
      0 0 1px rgba(255,255,255,.95),
      0 0 4px rgba(255,255,255,.38),
      0 0 8px rgba(255,255,255,.18);
    filter: drop-shadow(0 0 1px rgba(255,255,255,.25));
    animation-name: pawchristmas-flake-fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
  }
}
@media (max-width: 991px) {
  html.pawchristmas-snow-on:not(.pawchristmas-snow-mobile-on) #pawchristmas-snow-overlay { display: none; }
  html.pawchristmas-snow-on.pawchristmas-snow-mobile-on #pawchristmas-snow-overlay .pc-snowflake {
    text-shadow:
      0 0 1px rgba(255,255,255,.90),
      0 0 3px rgba(255,255,255,.24);
  }
}
@media (prefers-reduced-motion: reduce) { #pawchristmas-snow-overlay { display: none !important; } }
@keyframes pawchristmas-flake-fall {
  0% {
    transform: translate3d(0, -14vh, 0) rotate(0deg);
  }
  25% {
    transform: translate3d(calc(var(--pc-drift, 24px) * .45), 25vh, 0)
      rotate(calc(var(--pc-rotate, 30deg) * .35));
  }
  50% {
    transform: translate3d(calc(var(--pc-drift, 24px) * -.55), 52vh, 0)
      rotate(calc(var(--pc-rotate, 30deg) * .7));
  }
  75% {
    transform: translate3d(calc(var(--pc-drift, 24px) * .70), 78vh, 0)
      rotate(calc(var(--pc-rotate, 30deg) * .92));
  }
  100% {
    transform: translate3d(var(--pc-drift, 24px), 118vh, 0)
      rotate(var(--pc-rotate, 30deg));
  }
}

@media (max-width: 991px) {
  /* Tablet/mobile without garlands: cleaner layout, better usability. */
  html.pawchristmas-decor-on #header { background: none; }

  #pawchristmas-greeting.pawchristmas-greeting {
    min-height: 166px;
    height: auto;
    padding: 20px 16px;
    background-size: cover;
    background-position: center;
  }
  #pawchristmas-greeting h2 { font-size: clamp(28px, 7vw, 36px); }
  #pawchristmas-greeting p { font-size: 15px; }
  #header img.pawchristmas-seasonal-logo { max-height: 45px; max-width: 195px; }
}
@media (max-width: 767px) {
  #pawchristmas-greeting.pawchristmas-greeting {
    min-height: 210px;
    padding: 18px 14px;
    background-image: url('../img/greeting-mobile.webp');
    background-size: cover;
    background-position: center center;
  }
  #pawchristmas-greeting .pawchristmas-greeting-inner {
    max-width: 360px;
  }
  #pawchristmas-greeting h2 {
    font-size: clamp(26px, 8vw, 34px);
    margin-bottom: 8px;
  }
  #pawchristmas-greeting p {
    font-size: 14px;
    line-height: 1.28;
  }
}
