/* Festival themes. Everything here only applies while <html data-season="..."> is set
   by the admin "ธีมเทศกาล" setting. Card colours stay exactly as the shop's own theme. */
.lk-scene{display:none}

/* ===================== ลอยกระทง: one krathong floating beside the balance ===================== */
html[data-season="loykrathong"] .balance-card,
html[data-season="loykrathong"] .withdraw-balance{isolation:isolate}
html[data-season="loykrathong"] .balance-amount,
html[data-season="loykrathong"] .withdraw-total{position:relative}
/* keep the number easy to read if the krathong sits behind it on small screens */
html[data-season="loykrathong"] .balance-amount strong,
html[data-season="loykrathong"] .withdraw-total strong{text-shadow:0 2px 12px rgba(0,0,0,.22)}

html[data-season="loykrathong"] .lk-scene{
  position:absolute;z-index:-1;right:14%;bottom:-30px;width:220px;
  display:flex;flex-direction:column;align-items:center;
  pointer-events:none;line-height:1;color:#fff;font-size:14px;
}
/* the site styles every svg as an outlined icon; the scene draws filled shapes */
.lk-scene svg{stroke:none;stroke-width:0}

/* ---------- full moon ---------- */
.lk-moon{position:absolute;left:-8px;top:-22px;width:50px;height:50px;animation:lk-moonfloat 8s ease-in-out infinite alternate}
.lk-moon-halo{position:absolute;inset:-34px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,246,205,.62) 0%,rgba(255,231,150,.28) 38%,rgba(255,220,130,0) 70%);
  animation:lk-halo 3.6s ease-in-out infinite alternate}
.lk-moon-disc{position:absolute;inset:0;border-radius:50%;
  background:
    radial-gradient(circle at 30% 34%,rgba(214,190,120,.42) 0 12%,transparent 13%),
    radial-gradient(circle at 62% 62%,rgba(214,190,120,.34) 0 9%,transparent 10%),
    radial-gradient(circle at 66% 30%,rgba(214,190,120,.28) 0 6%,transparent 7%),
    radial-gradient(circle at 38% 70%,rgba(214,190,120,.24) 0 5%,transparent 6%),
    radial-gradient(circle at 36% 32%,#fffef6 0%,#fff6cf 45%,#ffe597 85%,#f7d675 100%);
  box-shadow:0 0 14px 4px rgba(255,236,160,.75),0 0 40px 10px rgba(255,226,140,.35),inset -6px -5px 10px rgba(214,170,70,.35)}

.lk-star{position:absolute;width:4px;height:4px;border-radius:50%;background:#fffbe6;
  box-shadow:0 0 6px 2px rgba(255,240,180,.85);animation:lk-twinkle 1.9s ease-in-out infinite alternate}
.lk-star-1{left:54px;top:-26px}
.lk-star-2{left:-22px;top:30px;width:3px;height:3px;animation-delay:-.7s}
.lk-star-3{left:62px;top:14px;width:3px;height:3px;animation-delay:-1.3s}

/* ---------- water ---------- */
.lk-pond{position:relative;display:block;width:100%;height:144px}
.lk-water{
  position:absolute;left:0;right:0;bottom:0;height:40px;border-radius:50%;
  background:radial-gradient(ellipse at 50% 42%,rgba(205,240,255,.62) 0%,rgba(165,222,255,.36) 42%,rgba(150,215,255,.12) 62%,transparent 74%);
  animation:lk-waterbreath 4s ease-in-out infinite alternate;
}
/* moonlight shimmering on the water, under the moon */
.lk-moon-reflect{position:absolute;left:4px;bottom:6px;width:38px;height:28px;
  background:repeating-linear-gradient(180deg,rgba(255,240,180,.85) 0 2px,transparent 2px 6px);
  -webkit-mask:radial-gradient(ellipse at 50% 50%,#000 10%,transparent 70%);
          mask:radial-gradient(ellipse at 50% 50%,#000 10%,transparent 70%);
  animation:lk-glint 2.4s ease-in-out infinite alternate}
.lk-ripple{
  position:absolute;left:50%;bottom:10px;width:170px;height:26px;margin-left:-85px;border-radius:50%;
  border:1.5px solid rgba(255,255,255,.6);opacity:0;animation:lk-ripple 3.4s ease-out infinite;
}
.lk-ripple-2{animation-delay:-1.7s}
.lk-waveline{position:absolute;left:50%;height:8px;fill:none;overflow:visible;
  -webkit-mask:linear-gradient(90deg,transparent,#000 22%,#000 78%,transparent);
          mask:linear-gradient(90deg,transparent,#000 22%,#000 78%,transparent)}
.lk-scene .lk-waveline path{fill:none;stroke:rgba(255,255,255,.75);stroke-width:1.6;stroke-linecap:round;vector-effect:non-scaling-stroke}
.lk-waveline-1{bottom:15px;width:150px;margin-left:-75px;animation:lk-shimmer 2.6s ease-in-out infinite alternate}
.lk-waveline-2{bottom:7px;width:190px;margin-left:-95px;opacity:.65;animation:lk-shimmer 3.3s ease-in-out infinite alternate-reverse}

/* ---------- the krathong: drifts on the current and rocks on the waves ---------- */
.lk-boat{position:absolute;left:50%;bottom:13px;width:148px;margin-left:-74px;display:block;animation:lk-drift 7s ease-in-out infinite alternate}
.lk-krathong{position:relative;display:block;width:100%;height:auto;overflow:visible;
  filter:drop-shadow(0 4px 6px rgba(0,0,0,.22));transform-origin:50% 88%;animation:lk-float 3.2s ease-in-out infinite}
.lk-reflection{position:absolute;left:50%;bottom:-12px;width:110px;height:20px;margin-left:-55px;border-radius:50%;
  background:radial-gradient(ellipse,rgba(255,214,120,.6),rgba(255,214,120,0) 70%);filter:blur(2px);animation:lk-reflect 3.2s ease-in-out infinite}
.lk-glow{animation:lk-glowpulse 2.2s ease-in-out infinite alternate}
.lk-flame{transform-box:fill-box;transform-origin:50% 100%;animation:lk-flicker 1.1s ease-in-out infinite alternate}
.lk-ember{animation:lk-glowpulse 1.6s ease-in-out infinite alternate}

.lk-greeting{
  position:relative;display:block;margin-top:4px;white-space:nowrap;
  font-family:'Noto Sans Thai',sans-serif;font-size:15px;font-weight:700;letter-spacing:.3px;color:#fff;
  text-shadow:0 0 12px rgba(255,214,110,.85),0 1px 2px rgba(0,0,0,.25);
}
.lk-greeting::before,.lk-greeting::after{content:"✦";display:inline-block;margin:0 7px;font-size:.75em;color:#ffe08a;vertical-align:.12em;animation:lk-twinkle 1.8s ease-in-out infinite alternate}
.lk-greeting::after{animation-delay:-.9s}

/* drift sideways with the current, a little slower at each end */
@keyframes lk-drift{0%{transform:translateX(-22px)}100%{transform:translateX(22px)}}
/* rise and fall on the waves while rocking side to side */
@keyframes lk-float{
  0%{transform:translateY(0) rotate(-3.5deg)}
  25%{transform:translateY(-6px) rotate(0deg)}
  50%{transform:translateY(-2px) rotate(3.5deg)}
  75%{transform:translateY(-7px) rotate(0deg)}
  100%{transform:translateY(0) rotate(-3.5deg)}
}
/* candle reflection stretches as the krathong lifts and settles */
@keyframes lk-reflect{0%,50%,100%{transform:scaleX(1);opacity:.95}25%,75%{transform:scaleX(.82);opacity:.65}}
@keyframes lk-flicker{0%{transform:scale(1,1)}40%{transform:scale(.9,1.1)}100%{transform:scale(1.08,.93)}}
@keyframes lk-glowpulse{from{opacity:.6}to{opacity:1}}
@keyframes lk-ripple{0%{transform:scale(.55);opacity:.95}100%{transform:scale(1.3);opacity:0}}
@keyframes lk-shimmer{from{transform:translateX(-9px);opacity:.5}to{transform:translateX(9px);opacity:1}}
@keyframes lk-waterbreath{from{transform:scaleX(.96)}to{transform:scaleX(1.04)}}
@keyframes lk-glint{from{opacity:.5;transform:scaleX(.8)}to{opacity:1;transform:scaleX(1.15)}}
@keyframes lk-twinkle{from{opacity:.35;transform:scale(.75)}to{opacity:1;transform:scale(1.15)}}
@keyframes lk-halo{from{opacity:.7;transform:scale(.94)}to{opacity:1;transform:scale(1.06)}}
@keyframes lk-moonfloat{from{transform:translateY(0)}to{transform:translateY(-4px)}}

@media(max-width:900px){html[data-season="loykrathong"] .lk-scene{right:4%}}
@media(max-width:700px){
  html[data-season="loykrathong"] .lk-scene{right:-26px;bottom:-24px;width:160px}
  .lk-pond{height:106px}
  .lk-boat{width:106px;margin-left:-53px;bottom:10px}
  .lk-reflection{width:84px;margin-left:-42px}
  .lk-water{height:32px}
  .lk-ripple{width:130px;height:20px;margin-left:-65px;bottom:8px}
  .lk-waveline-1{width:112px;margin-left:-56px;bottom:12px}
  .lk-waveline-2{width:144px;margin-left:-72px;bottom:5px}
  .lk-moon{left:-14px;top:-14px;width:36px;height:36px}
  .lk-moon-halo{inset:-24px}
  .lk-moon-reflect{left:-2px;width:30px;height:22px}
  .lk-star-1{left:34px;top:-20px}
  .lk-star-2{left:-26px;top:26px}
  .lk-star-3{left:40px;top:8px}
  .lk-greeting{font-size:12px}
  .lk-greeting::before,.lk-greeting::after{margin:0 4px}
  @keyframes lk-drift{0%{transform:translateX(-12px)}100%{transform:translateX(12px)}}
}

/* =====================================================================
   ลอยกระทง across the whole site. Uses the shop's own colour variables
   (--blue / --light-blue / --brand-gradient), so the palette stays the same.
   ===================================================================== */
html[data-season="loykrathong"]{
  --lk-garland:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='20' viewBox='0 0 72 20'%3E%3Cpath d='M0 2 Q36 18 72 2' fill='none' stroke='%23e0a91b' stroke-width='1.2'/%3E%3Ccircle cx='10' cy='6.2' r='3.4' fill='%23f59e0b'/%3E%3Ccircle cx='10' cy='6.2' r='1.3' fill='%23fde68a'/%3E%3Ccircle cx='21' cy='9.4' r='2.5' fill='%23fffdf5' stroke='%23e6d3a3' stroke-width='.6'/%3E%3Ccircle cx='36' cy='11.4' r='3.7' fill='%23f472b6'/%3E%3Ccircle cx='36' cy='11.4' r='1.5' fill='%23fff1f7'/%3E%3Ccircle cx='51' cy='9.4' r='2.5' fill='%23fffdf5' stroke='%23e6d3a3' stroke-width='.6'/%3E%3Ccircle cx='62' cy='6.2' r='3.4' fill='%23f59e0b'/%3E%3Ccircle cx='62' cy='6.2' r='1.3' fill='%23fde68a'/%3E%3Cpath d='M36 15 L33.6 19.5 L38.4 19.5Z' fill='%2343a047'/%3E%3C/svg%3E");
  --lk-wave-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='10' viewBox='0 0 40 10'%3E%3Cpath d='M0 5 Q10 0 20 5 T40 5 V10 H0Z'/%3E%3C/svg%3E");
  --lk-wave-tall:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='60' viewBox='0 0 40 60'%3E%3Cpath d='M0 5 Q10 0 20 5 T40 5 V60 H0Z'/%3E%3C/svg%3E");
}

/* ---------- top promo bar: a little krathong sails along behind the text ---------- */
html[data-season="loykrathong"] .topline.promo-topline .promo-topline-inner{position:relative;z-index:1}
html[data-season="loykrathong"] .topline.promo-topline::after{
  content:"";position:absolute;left:0;bottom:1px;z-index:0;width:32px;height:27px;pointer-events:none;
  background:url(krathong.svg) center/contain no-repeat;
  filter:drop-shadow(0 0 6px rgba(255,220,130,.9));
  animation:lk-topdrift 42s linear infinite,lk-smallbob 3s ease-in-out infinite;
}

/* ---------- header: flower garland (มาลัยดอกดาวเรือง-มะลิ) + krathong beside the brand ---------- */
html[data-season="loykrathong"] header::before{
  content:"";position:absolute;left:0;right:0;top:0;height:20px;z-index:2;pointer-events:none;
  background:var(--lk-garland) 0 0/72px 20px repeat-x;
  -webkit-mask:linear-gradient(90deg,transparent,#000 4%,#000 96%,transparent);
          mask:linear-gradient(90deg,transparent,#000 4%,#000 96%,transparent);
  animation:lk-garland 5s ease-in-out infinite alternate;transform-origin:50% 0;
}
html[data-season="loykrathong"] header .brand::after{
  content:"";flex:0 0 auto;width:30px;height:25px;margin-left:2px;align-self:center;
  background:url(krathong.svg) center/contain no-repeat;
  filter:drop-shadow(0 2px 4px rgba(255,190,80,.55));
  animation:lk-smallbob 3.2s ease-in-out infinite;
}
/* desktop menu: the current page gets a tiny krathong */
html[data-season="loykrathong"] header nav a.active::before{
  content:"";display:inline-block;width:18px;height:15px;margin-right:5px;vertical-align:-2px;
  background:url(krathong.svg) center/contain no-repeat;animation:lk-smallbob 3s ease-in-out infinite;
}

/* ---------- mobile bottom menu: glowing wallet button with a krathong ---------- */
html[data-season="loykrathong"] .floating-btn::before{
  content:"";position:absolute;inset:-6px;border-radius:50%;pointer-events:none;
  border:2px solid rgba(255,204,92,.8);animation:lk-ring 2.6s ease-out infinite;
}
html[data-season="loykrathong"] .floating-btn::after{
  content:"";position:absolute;right:-14px;top:-14px;width:30px;height:25px;pointer-events:none;
  background:url(krathong.svg) center/contain no-repeat;
  filter:drop-shadow(0 2px 4px rgba(255,190,80,.6));
  animation:lk-smallbob 3s ease-in-out infinite;
}

/* ---------- footer: water along the top edge with a krathong drifting on it ---------- */
html[data-season="loykrathong"] .site-footer{position:relative}
html[data-season="loykrathong"] .site-footer::before{
  content:"";position:absolute;left:0;right:0;top:-9px;height:10px;pointer-events:none;
  background:linear-gradient(90deg,var(--blue),var(--light-blue));opacity:.28;
  -webkit-mask:var(--lk-wave-mask) 0 0/40px 10px repeat-x;
          mask:var(--lk-wave-mask) 0 0/40px 10px repeat-x;
  animation:lk-wavemask 5s linear infinite;
}
html[data-season="loykrathong"] .site-footer::after{
  content:"";position:absolute;top:-34px;left:0;width:42px;height:35px;pointer-events:none;
  background:url(krathong.svg) center/contain no-repeat;
  filter:drop-shadow(0 0 8px rgba(255,210,110,.75));
  animation:lk-footdrift 28s ease-in-out infinite alternate,lk-smallbob 3.4s ease-in-out infinite;
}

/* ---------- home page festival banner ---------- */
.lk-banner{display:none}
html[data-season="loykrathong"] .lk-banner{
  position:relative;display:flex;align-items:center;isolation:isolate;overflow:hidden;
  min-height:132px;margin:0 0 16px;padding:20px 26px 46px;border-radius:24px;color:#fff;
  background:var(--brand-gradient);
  box-shadow:0 14px 34px color-mix(in srgb,var(--blue) 24%,transparent);
}
html[data-season="loykrathong"] .lk-banner::before{ /* soft light from the moon */
  content:"";position:absolute;inset:0;z-index:-1;
  background:radial-gradient(circle at 88% 18%,rgba(255,248,214,.45),transparent 38%),linear-gradient(180deg,rgba(0,0,0,.08),transparent 55%);
}
.lkb-copy{position:relative;z-index:2;max-width:62%}
.lkb-kicker{display:block;font-size:10px;font-weight:800;letter-spacing:2px;opacity:.85}
.lkb-copy strong{display:block;margin:4px 0 4px;font-size:26px;font-weight:800;line-height:1.25;text-shadow:0 2px 10px rgba(0,0,0,.18),0 0 18px rgba(255,220,130,.45)}
.lkb-copy p{margin:0;font-size:13px;line-height:1.5;opacity:.92}
.lkb-moon{position:absolute;right:6%;top:16px;z-index:0;width:46px;height:46px;border-radius:50%;
  background:
    radial-gradient(circle at 30% 34%,rgba(214,190,120,.42) 0 12%,transparent 13%),
    radial-gradient(circle at 62% 62%,rgba(214,190,120,.34) 0 9%,transparent 10%),
    radial-gradient(circle at 66% 30%,rgba(214,190,120,.28) 0 6%,transparent 7%),
    radial-gradient(circle at 36% 32%,#fffef6 0%,#fff6cf 45%,#ffe597 85%,#f7d675 100%);
  box-shadow:0 0 14px 4px rgba(255,236,160,.75),0 0 44px 14px rgba(255,226,140,.35);
  animation:lk-moonfloat 8s ease-in-out infinite alternate}
.lkb-stars{position:absolute;inset:0 0 40% 40%;z-index:0;opacity:.9;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 30%,#fff 60%,transparent 100%),
    radial-gradient(1.2px 1.2px at 30% 70%,#fff8d6 60%,transparent 100%),
    radial-gradient(1.5px 1.5px at 52% 22%,#fff 60%,transparent 100%),
    radial-gradient(1.2px 1.2px at 70% 60%,#fff 60%,transparent 100%),
    radial-gradient(1.6px 1.6px at 40% 48%,#fff8d6 60%,transparent 100%);
  animation:lk-twinkle 2.4s ease-in-out infinite alternate}
.lkb-river{position:absolute;left:0;right:0;bottom:0;height:52px;z-index:1;pointer-events:none}
.lkb-wave{position:absolute;left:0;right:0;pointer-events:none;
  -webkit-mask:var(--lk-wave-mask) 0 0/56px 14px repeat-x;
          mask:var(--lk-wave-mask) 0 0/56px 14px repeat-x}
/* wave crest + water body in one tall tile, so the crest stays wavy while it moves */
.lkb-wave-back{bottom:10px;height:30px;background:linear-gradient(180deg,rgba(225,246,255,.38),rgba(225,246,255,.06));
  -webkit-mask:var(--lk-wave-tall) 0 0/56px 84px repeat-x;
          mask:var(--lk-wave-tall) 0 0/56px 84px repeat-x;
  animation:lk-wavetall 6s linear infinite reverse}
.lkb-wave-front{bottom:0;height:20px;background:linear-gradient(180deg,rgba(255,255,255,.3),rgba(255,255,255,.12));
  -webkit-mask:var(--lk-wave-tall) 0 0/56px 84px repeat-x;
          mask:var(--lk-wave-tall) 0 0/56px 84px repeat-x;
  animation:lk-wavetall 4s linear infinite}
@keyframes lk-wavetall{from{-webkit-mask-position:0 0;mask-position:0 0}to{-webkit-mask-position:56px 0;mask-position:56px 0}}
.lkb-glint{position:absolute;right:calc(6% + 6px);bottom:6px;width:36px;height:34px;
  background:repeating-linear-gradient(180deg,rgba(255,242,190,.85) 0 2px,transparent 2px 6px);
  -webkit-mask:radial-gradient(ellipse,#000 10%,transparent 70%);mask:radial-gradient(ellipse,#000 10%,transparent 70%);
  animation:lk-glint 2.4s ease-in-out infinite alternate}
.lkb-boat{position:absolute;display:block}
.lkb-boat img{display:block;width:100%;height:auto;transform-origin:50% 88%;animation:lk-float 3.2s ease-in-out infinite;filter:drop-shadow(0 4px 6px rgba(0,0,0,.2))}
.lkb-boat-main{right:20%;bottom:8px;width:104px;animation:lk-drift 7s ease-in-out infinite alternate}
.lkb-boat-far{right:44%;bottom:22px;width:44px;opacity:.85;animation:lk-drift 9s ease-in-out infinite alternate-reverse}
.lkb-boat-far img{animation-duration:3.8s;animation-delay:-1.2s}
.lkb-light{position:absolute;left:50%;bottom:-8px;width:90px;height:18px;margin-left:-45px;border-radius:50%;
  background:radial-gradient(ellipse,rgba(255,214,120,.65),rgba(255,214,120,0) 70%);filter:blur(2px);animation:lk-reflect 3.2s ease-in-out infinite}

@keyframes lk-topdrift{from{transform:translateX(-40px)}to{transform:translateX(calc(100vw + 10px))}}
@keyframes lk-smallbob{0%,100%{translate:0 0;rotate:-4deg}50%{translate:0 -3px;rotate:4deg}}
@keyframes lk-garland{from{transform:scaleY(.92)}to{transform:scaleY(1.06)}}
@keyframes lk-wavemask{from{-webkit-mask-position:0 0;mask-position:0 0}to{-webkit-mask-position:40px 0;mask-position:40px 0}}
@keyframes lk-ring{0%{transform:scale(.92);opacity:.95}100%{transform:scale(1.3);opacity:0}}
@keyframes lk-footdrift{from{left:0}to{left:calc(100% - 42px)}}

@media(max-width:700px){
  html[data-season="loykrathong"] .lk-banner{min-height:118px;padding:16px 18px 42px;border-radius:20px}
  .lkb-copy{max-width:66%}
  .lkb-copy strong{font-size:19px}
  .lkb-copy p{font-size:11px}
  .lkb-kicker{font-size:8.5px;letter-spacing:1.4px}
  .lkb-moon{width:34px;height:34px;top:12px;right:5%}
  .lkb-boat-main{right:7%;width:78px}
  .lkb-boat-far{right:36%;width:34px;bottom:18px}
  .lkb-glint{right:calc(5% + 2px);width:28px}
  html[data-season="loykrathong"] header .brand::after{width:24px;height:20px}
}
