/* POPUP — base + components (ไม่ต้อง Build) */
:root {
  --navy: #1a3a9e;
  --navy-d: #142c7c;
  --ink: #1e2a5a;
  --blue: #1f6fe0;
  --blue-l: #3d9bf5;
  --pink: #ec2470;
  --pink-l: #ff5c97;
  --yellow: #ffd43b;
  --yellow-d: #f5b800;
  --green: #22b14c;
  --sky: #e6f3ff;
  --card: #ffffff;
  --radius: 22px;
  --shadow: 0 10px 28px rgba(31, 84, 170, .14);
  --shadow-s: 0 4px 14px rgba(31, 84, 170, .12);
  --font: "Kanit", "Leelawadee UI", "Tahoma", sans-serif;
  --font-display: "Fredoka", "Kanit", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: #f3f9ff; line-height: 1.5; overflow-x: hidden; }
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 1000; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid #ffb800; outline-offset: 3px; border-radius: 8px; }
.ico { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.22em; }
.hp { position: absolute; left: -9999px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); box-shadow: 0 2px 14px rgba(30,80,160,.08); backdrop-filter: blur(6px); }
.site-header__inner { display: flex; align-items: center; gap: 24px; height: 104px; }
.brand img { width: 300px; height: auto; }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 6px; }
.main-nav a { display: block; padding: 6px 13px; border-radius: 999px; font-weight: 500; font-size: 1.12rem; color: var(--ink); transition: background .2s, color .2s; }
.main-nav a:hover { background: #e3f0ff; }
.main-nav a.is-active { background: linear-gradient(180deg, #2d8ff0, #1468cf); color: #fff; box-shadow: 0 3px 8px rgba(20,104,207,.35); }
.header-tools { display: flex; align-items: center; gap: 6px; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; border-radius: 50%; color: var(--navy); cursor: pointer; position: relative; }
.icon-btn:hover { background: #eaf3ff; }
.icon-btn .ico { width: 28px; height: 28px; }
.cart-badge { position: absolute; top: 0; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--pink); color: #fff; font-size: .75rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.cart-btn.bump { animation: bump .5s ease; }
@keyframes bump { 30% { transform: scale(1.25) rotate(-8deg); } 60% { transform: scale(.95); } }
.nav-toggle { display: none; }
.search-panel { border-top: 1px solid #e5eefb; background: #fff; padding: 12px 0; }
.search-panel__inner { display: flex; gap: 10px; }
.search-panel input, .search-inline input { flex: 1; border: 2px solid #cfe2fb; border-radius: 999px; padding: 10px 18px; }

/* ---------- Typography widgets ---------- */
.popup-word { font-family: var(--font-display); font-weight: 700; color: var(--navy); letter-spacing: .01em; line-height: .95; display: inline-block; white-space: nowrap;
  -webkit-text-stroke: .11em #fff; paint-order: stroke fill; text-shadow: 0 .06em 0 #fff, 0 .1em .14em rgba(20,50,140,.35); }
.popup-word--xl { font-size: clamp(4.2rem, 9vw, 7.4rem); }
.popup-word--lg { font-size: clamp(3.6rem, 7.5vw, 6.2rem); }
.popup-word--md { font-size: clamp(2.6rem, 5vw, 4rem); }
.paw-o { position: relative; display: inline-block; }
.paw-o__paw { position: absolute; left: 50%; top: 52%; width: .4em; height: .4em; transform: translate(-50%, -50%); color: #fff; }
.display-title { display: block; font-weight: 800; font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.1; -webkit-text-stroke: .14em #fff; paint-order: stroke fill;
  text-shadow: 0 .08em .14em rgba(20,50,140,.25); transform: rotate(-3deg); }
.display-title--navy { color: var(--navy); }
.display-title--pink { color: var(--pink); }
.display-title--yellow { color: var(--yellow); -webkit-text-stroke: .1em var(--navy); text-shadow: 0 .06em 0 #fff, 0 .1em .2em rgba(20,50,140,.35); }
.display-title--md { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
.display-title--lg { font-size: clamp(2rem, 4.2vw, 3.2rem); }
.display-title--xl { font-size: clamp(2.8rem, 6vw, 4.8rem); }
.display-title--xxl { font-size: clamp(3rem, 7.4vw, 6rem); }
.pill-label { display: inline-block; padding: .18em .8em .22em; border-radius: 999px; font-weight: 800; color: #fff; font-size: clamp(1.25rem, 2.4vw, 2rem); transform: rotate(-3deg);
  box-shadow: 0 0 0 4px #fff, 0 8px 18px rgba(20,60,160,.25); }
.pill-label--blue { background: linear-gradient(180deg, #2f6fe8, #1b3fae); color: #fff; }
.pill-label--blue::first-line { color: #fff; }
.pill-label--pink { background: linear-gradient(180deg, #ff4b8d, #e4145f); }
.pill-label--lg { font-size: clamp(1.6rem, 3.4vw, 2.8rem); }
.sub-pill { display: block; width: fit-content; margin: -.2em auto 0; padding: .1em .9em; background: #fff; color: var(--navy); border-radius: 999px; font-family: var(--font-display); font-size: clamp(1rem, 1.8vw, 1.5rem); font-weight: 700; box-shadow: var(--shadow-s); transform: rotate(-2deg); }
.ribbon { display: inline-block; padding: .25em 1em .3em; font-weight: 700; font-size: clamp(1.1rem, 2.2vw, 1.75rem); border-radius: 16px; transform: rotate(-3deg); box-shadow: 0 0 0 4px #fff, 0 8px 16px rgba(200,20,90,.25); }
.ribbon--pink { background: linear-gradient(180deg, #ff4789, #e01860); color: #fff; }
.ribbon--white { background: #fff; color: var(--pink); box-shadow: var(--shadow); font-weight: 800; }
.ribbon--white b { color: var(--yellow); font-size: 1.5em; -webkit-text-stroke: .08em var(--pink); paint-order: stroke fill; }
.navy-sub { display: block; color: var(--navy); font-weight: 700; font-size: clamp(1.3rem, 2.6vw, 2.1rem); -webkit-text-stroke: .1em #fff; paint-order: stroke fill; }
.section { padding: 26px 0 10px; }
.section-title { display: flex; justify-content: center; align-items: center; gap: 14px; font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; color: var(--navy); font-style: italic; margin-bottom: 18px; }
.section-title--left { justify-content: flex-start; font-style: normal; }
.navy-strong { color: var(--navy); font-family: var(--font-display); }
.spark { width: 34px; height: 30px; flex: none; background:
  linear-gradient(var(--yellow-d), var(--yellow-d)) 0 50%/30px 5px no-repeat,
  linear-gradient(var(--yellow-d), var(--yellow-d)) 4px 6px/24px 5px no-repeat,
  linear-gradient(var(--yellow-d), var(--yellow-d)) 4px 22px/24px 5px no-repeat; border-radius: 4px; }
.spark--l { transform: scaleX(-1) rotate(-12deg); }
.spark--r { transform: rotate(-12deg); }
.yellow-pill { display: inline-block; background: linear-gradient(180deg, #ffe45c, #ffc81e); color: var(--pink); font-weight: 800; padding: .1em .8em; border-radius: 999px; font-size: clamp(1.3rem, 2.6vw, 2rem); box-shadow: 0 0 0 4px #fff, var(--shadow-s); transform: rotate(-3deg); }
.yellow-pill b { font-size: 1.7em; line-height: 1; vertical-align: -.1em; }
.yellow-pill--md { font-size: clamp(1.2rem, 2vw, 1.6rem); }
.pin-ico { color: #f02e5a; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; border: 0; border-radius: 999px; padding: .55em 1.5em; font-weight: 700; font-size: 1.15rem; cursor: pointer; transition: transform .15s, box-shadow .2s, filter .2s; text-align: center; line-height: 1.2; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn .ico { width: 1.3em; height: 1.3em; }
.btn--pink { background: linear-gradient(180deg, #ff4a8b, #e3175f); color: #fff; box-shadow: 0 6px 0 #b80d4a, 0 10px 18px rgba(227,23,95,.35); }
.btn--blue { background: linear-gradient(180deg, #2b7cf0, #1450c4); color: #fff; box-shadow: 0 6px 0 #0d3a96, 0 10px 18px rgba(20,80,196,.35); }
.btn--green { background: linear-gradient(180deg, #2fd25a, #13a83d); color: #fff; box-shadow: 0 5px 0 #0b7d2b; }
.btn--outline { background: #fff; color: var(--blue); box-shadow: inset 0 0 0 2px #bfd8fb; }
.btn--disabled, .btn:disabled { background: #c9d3e4; color: #fff; box-shadow: none; cursor: not-allowed; transform: none; }
.btn--sm { font-size: 1rem; padding: .4em 1.1em; }
.btn--xl { font-size: clamp(1.25rem, 2.4vw, 1.75rem); padding: .55em 1.2em; }
.btn--block { width: 100%; }
.btn--cta { font-size: clamp(1.4rem, 3vw, 2.2rem); padding: .5em 1.4em; position: relative; }
.cursor-ico { width: 1.1em !important; height: 1.1em !important; }
.btn--cta .cursor-ico { position: absolute; right: -.3em; bottom: -.35em; width: 1.4em !important; height: 1.4em !important; }

/* ---------- Checklists ---------- */
.checklist { display: grid; gap: 6px; }
.checklist li { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.1rem; }
.checklist .ico { width: 26px; height: 26px; }
.checklist--pill li { background: rgba(255,255,255,.92); width: fit-content; padding: 2px 16px 2px 4px; border-radius: 999px; font-size: clamp(1rem, 1.6vw, 1.3rem); box-shadow: var(--shadow-s); }
.checklist--pill .ico, .checklist--pinkcheck .ico { color: var(--pink); }
.checklist--green .ico { color: var(--green); }
.checklist--lines li { padding: 8px 0; border-bottom: 1px solid #e3ecf8; }
.checklist--lines li:last-child { border-bottom: 0; }

/* ---------- Sky / hero background ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.sky { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #6fb6f2 0%, #a7d6fb 38%, #dff0ff 70%, #f3f9ff 100%); }
.cloud { position: absolute; background: #fff; border-radius: 50%; filter: blur(6px); opacity: .85; }
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.cloud--1 { width: 180px; height: 60px; top: 14%; left: 32%; }
.cloud--1::before { width: 90px; height: 80px; left: 30px; top: -36px; }
.cloud--1::after { width: 70px; height: 60px; left: 95px; top: -22px; }
.cloud--2 { width: 220px; height: 70px; top: 8%; right: 20%; opacity: .7; }
.cloud--2::before { width: 110px; height: 90px; left: 40px; top: -44px; }
.cloud--2::after { width: 80px; height: 70px; left: 120px; top: -30px; }
.cloud--3 { width: 160px; height: 50px; top: 36%; left: 8%; opacity: .6; }
.cloud--3::before { width: 80px; height: 70px; left: 30px; top: -34px; }
.leaves { position: absolute; top: -30px; width: 340px; height: 300px; background: url("../images/leaves.svg") no-repeat 0 0 / contain; filter: blur(2.5px) saturate(1.1); opacity: .95; }
.leaves--l { left: -70px; }
.leaves--r { right: -70px; transform: scaleX(-1); }
.table-top { position: absolute; left: 30%; right: 4%; bottom: 0; height: 30%; border-radius: 6px 6px 0 0; background:
  linear-gradient(180deg, #f1dcc0 0%, #e2c39a 22%, #d3aa78 58%, #c39465 100%);
  -webkit-mask: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%); mask: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%); }
.table-top::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(180deg, transparent 0 26px, rgba(130,80,35,.12) 26px 28px),
  linear-gradient(90deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%); }
.cloud-bank { position: absolute; left: -5%; right: -5%; bottom: -40px; height: 90px; background:
  radial-gradient(circle 60px at 6% 70%, #fff 98%, transparent), radial-gradient(circle 80px at 16% 90%, #fff 98%, transparent),
  radial-gradient(circle 70px at 84% 80%, #fff 98%, transparent), radial-gradient(circle 90px at 95% 70%, #fff 98%, transparent);
  filter: blur(2px); }

/* ---------- Features bubbles ---------- */
.features { display: flex; justify-content: center; gap: clamp(10px, 2.4vw, 34px); flex-wrap: wrap; }
.feature-bubble { width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 55%, #e2f0ff 100%); box-shadow: 0 0 0 5px rgba(255,255,255,.85), 0 10px 24px rgba(40,110,200,.2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font-weight: 700; color: var(--navy); line-height: 1.15; font-size: 1.12rem; }
.feature-bubble img { width: 74px; height: auto; margin-bottom: 4px; }
.features--mini .feature-bubble { width: 104px; height: 104px; font-size: .86rem; }
.features--mini .feature-bubble img { width: 50px; }

/* ---------- Forms ---------- */
.card-form { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: grid; gap: 12px; }
.card-form__title { display: flex; align-items: center; gap: 10px; color: var(--navy); font-size: 1.6rem; font-weight: 800; font-style: italic; }
.card-form__title img { width: 58px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.field { display: grid; gap: 4px; position: relative; }
.field > span { font-weight: 600; }
.field i { color: var(--pink); font-style: normal; }
.field input, .field select, .field textarea { width: 100%; border: 2px solid #cfe0f6; border-radius: 14px; padding: 11px 14px; background: #fbfdff; transition: border-color .2s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(31,111,224,.15); }
.field--full { grid-column: 1 / -1; }
.field--icon > .ico { position: absolute; left: 14px; top: 13px; width: 22px; height: 22px; color: #5a6b90; }
.field--icon input, .field--icon textarea { padding-left: 46px; }
.field-err { color: #d4114f; font-size: .9rem; min-height: 0; }
.field-err:empty { display: none; }
.alert { padding: 10px 14px; border-radius: 12px; font-weight: 600; }
.alert--ok { background: #e3f8e8; color: #137a33; }
.alert--err { background: #ffe6ee; color: #b80d4a; }

/* ---------- Cart drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(15,30,70,.45); z-index: 90; }
.cart-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #fff; z-index: 100; display: flex; flex-direction: column; transform: translateX(105%); transition: transform .35s cubic-bezier(.2,.9,.3,1.1); box-shadow: -10px 0 30px rgba(20,50,120,.2); }
.cart-drawer.is-open { transform: none; }
.cart-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid #e6eef9; }
.cart-drawer__head h2 { font-size: 1.35rem; color: var(--navy); display: flex; gap: 8px; align-items: center; }
.cart-drawer__body { flex: 1; overflow: auto; padding: 12px 18px; }
.cart-drawer__foot { padding: 16px 18px; border-top: 1px solid #e6eef9; display: grid; gap: 8px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.15rem; }
.cart-total strong { color: var(--pink); font-size: 1.6rem; }
.cart-note { font-size: .9rem; color: #5d6b8c; }
.cart-empty { text-align: center; color: #6a7898; padding: 30px 0; }
.mini-line { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed #e0e9f6; }
.mini-line img { width: 70px; }
.mini-line b { display: block; font-size: .98rem; }
.mini-line small { color: #5d6b8c; }
.mini-qty { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; }
.mini-qty button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: #eaf2ff; color: var(--navy); cursor: pointer; display: grid; place-items: center; }
.mini-qty button .ico { width: 14px; height: 14px; }
.mini-qty span { min-width: 26px; text-align: center; font-weight: 700; }
.mini-line__total { font-weight: 700; color: var(--pink); }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px; z-index: 120; box-shadow: var(--shadow); font-weight: 600; max-width: calc(100% - 32px); text-align: center; }
.toast--err { background: #d4114f; }
.fly-img { position: fixed; z-index: 130; pointer-events: none; width: 120px; transition: transform .8s cubic-bezier(.5,-0.3,.7,1), opacity .8s; will-change: transform; }

.line-float { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 62px; height: 62px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; }
.line-float img { width: 50px; }

/* ---------- Footer ---------- */
.site-footer { background: linear-gradient(180deg, #1d4fb8, #143a8e); color: #e7efff; margin-top: 40px; }
.site-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr 1fr; gap: 24px; padding: 36px 0 24px; }
.site-footer__logo { background: #fff; border-radius: 16px; padding: 6px 10px; width: 200px; margin-bottom: 10px; }
.site-footer__h { font-size: 1.1rem; margin-bottom: 8px; color: #fff; }
.site-footer li { margin: 4px 0; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__bottom { text-align: center; padding: 14px; border-top: 1px solid rgba(255,255,255,.15); font-size: .9rem; }

/* ---------- Reveal (Scroll Reveal ทำงานเมื่อ JS พร้อมเท่านั้น) ---------- */
.js .reveal { opacity: 0; transform: translateY(26px) scale(.98); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.9,.3,1.2); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media (max-width: 1100px) {
  .brand img { width: 220px; }
  .main-nav a { font-size: 1rem; padding: 6px 9px; }
  .site-header__inner { gap: 12px; }
}
@media (max-width: 900px) {
  .site-header__inner { height: 76px; }
  .brand img { width: 180px; }
  .nav-toggle { display: inline-grid; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: #fff; box-shadow: 0 10px 20px rgba(20,60,140,.12); display: none; margin: 0; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; padding: 10px 16px 16px; }
  .main-nav a { font-size: 1.1rem; padding: 10px 14px; }
  .header-tools { margin-left: auto; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .brand img { width: 150px; }
  .icon-btn { width: 38px; height: 38px; }
  .icon-btn .ico { width: 24px; height: 24px; }
  .feature-bubble { width: 112px; height: 112px; font-size: .92rem; }
  .feature-bubble img { width: 56px; }
  .site-footer__grid { grid-template-columns: 1fr; }
}
