/* ============================================================
   /apppremium — storefront, order preview and confirmation
   ============================================================ */
body.appv-body {
  margin: 0;
  background: radial-gradient(ellipse at 12% 0%, #ffe1bd, transparent 36rem), #ffffff;
  font-family: 'Sarabun', 'Noto Sans Thai', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
body.appv-body::before { display: none; }

.appv-page {
  --o: #ff7a00;
  --o3: #e85d00;
  --action: #ff6a00;
  --action-hover: #e85a00;
  --ink: #1b1410;
  --ink2: #463a33;
  --mut: #6b5f57;
  --mut2: #8a7d74;
  --line: #f0e2d6;
  --soft: #fff8f3;
  --ok: #16a34a;
  --okl: #e9fbf1;
  --bad: #e11d48;
  --badl: #ffedf1;
  --warn: #d97706;
  --warnl: #fff7e6;
  --sh: 0 6px 22px -14px rgba(255, 106, 0, .35);
  max-width: 1160px;
  margin: 0 auto;
  padding: 18px 16px 90px;
  color: var(--ink);
  font-family: 'Sarabun', 'Noto Sans Thai', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}
.appv-page, .appv-sheet { --appv-frame: url('/image/a647b2204943.png'); --appv-frame-png: url('/image/a647b2204943.png'); }
.appv-page * { box-sizing: border-box; }
.appv-page button, .appv-page input, .appv-page select, .appv-page textarea { font-family: inherit; }
.appv-page button { -webkit-tap-highlight-color: transparent; }

/* Storefront and order preview */
.appv-page [hidden] { display: none !important; }
.appv-page :is(button, a, select):focus-visible { outline: 3px solid var(--o3); outline-offset: 2px; }
.appv-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(290px, .95fr);
  align-items: center;
  gap: clamp(16px, 3.4vw, 40px);
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid #ffd3a6;
  border-radius: 26px;
  background:
    radial-gradient(ellipse at 96% 18%, #ffc98f, transparent 62%),
    linear-gradient(116deg, #ffffff 12%, #fff8f0 62%, #ffe6cd);
  box-shadow: 0 22px 48px -34px rgba(255, 106, 0, .55);
  overflow: hidden;
}
.appv-hero::before {
  content: "";
  position: absolute; z-index: -1; inset: 0 0 0 43%;
  background: radial-gradient(circle, #dd65093b 1px, transparent 1.5px) right top / 15px 15px;
  mask-image: radial-gradient(ellipse at right top, #000, transparent 70%);
  pointer-events: none;
}
.appv-hero > .appv-hero-copy { min-width: 0; padding: 0; }
.appv-title { margin: 0; font: 600 clamp(1.7rem, 3.8vw, 3.05rem)/1.16 'Kanit', sans-serif; color: var(--ink); }
.appv-title span { display: block; color: var(--o3); }
.appv-support { margin-top: 12px; }
.appv-support-toggle { padding: 5px 0; border: 0; background: transparent; color: var(--ink2); font: inherit; font-size: .82rem; font-weight: 600; text-align: left; cursor: pointer; }
.appv-support-toggle::before { display: inline-block; width: 20px; content: "›"; color: var(--o3); transition: transform .16s ease; }
.appv-support-toggle[aria-expanded="true"]::before { transform: rotate(90deg); }

.appv-lead { max-width: 33ch; margin: 10px 0 0; color: var(--ink2); font-size: .95rem; font-weight: 500; }
.appv-browse {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; margin-top: 14px; padding: 8px 12px;
  border: 1px solid #ffcf9e; border-radius: 11px; background: #fff; color: var(--o3);
  font-weight: 700; text-decoration: none;
}
.appv-browse:hover { background: #fff3e6; color: var(--o3); }
.appv-grid-icon {
  flex: none; width: 14px; height: 14px;
  background:
    linear-gradient(currentColor, currentColor) top left / 42% 42% no-repeat,
    linear-gradient(currentColor, currentColor) top right / 42% 42% no-repeat,
    linear-gradient(currentColor, currentColor) bottom left / 42% 42% no-repeat,
    linear-gradient(currentColor, currentColor) bottom right / 42% 42% no-repeat;
}
.appv-chevron {
  display: inline-block; flex: none; width: 8px; height: 8px; border: solid currentColor; border-width: 2px 2px 0 0;
  transform: rotate(45deg); margin-inline-end: 3px;
}
.appv-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.appv-meta-chip {
  display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 4px 9px;
  border: 1px solid #e9d9cb; border-radius: 8px; background: #fffcf9;
  color: var(--ink2); font-size: .76rem; text-decoration: none;
}
.appv-meta-chip:hover { color: var(--o3); border-color: #c68a68; }
.appv-meta-chip i { font-size: .94rem; }
.appv-meta-chip.tg i { color: var(--o3); }
.appv-meta-chip.warn i { color: var(--o3); }
.appv-household-note { margin: 9px 0 0; color: var(--mut); font-size: .76rem; font-weight: 400; }
.appv-anim-toggle {
  display: grid; place-items: center; flex: none; width: 38px; height: 38px; padding: 0;
  margin-inline-start: auto; border: 1px solid #f3d5b8; border-radius: 50%;
  color: var(--o3); background: white; font-size: 1.2rem; cursor: pointer;
}
.appv-anim-toggle:is(:hover, [aria-pressed="true"]) { border-color: #e5a16a; background: #fff3e5; }
.appv-anim-toggle::before { content: ""; width: 10px; height: 13px; border-inline: 3px solid currentColor; box-sizing: border-box; }
.appv-anim-toggle[aria-pressed="true"]::before { width: 0; height: 0; border: 6px solid transparent; border-left: 9px solid currentColor; transform: translateX(3px); }
.appv-preview {
  min-width: 0; width: min(100%, 410px); justify-self: center;
}
.appv-preview-heading {
  display: flex; align-items: center; gap: 9px; margin-bottom: 9px;
}
.appv-preview-stamp {
  position: relative; display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px;
  background: linear-gradient(150deg, #fff, #fff1df); border: 1px solid #ffd0a3;
  color: var(--o3); box-shadow: 0 5px 13px -9px #a23e00a8;
}
.appv-preview-stamp::before { content: ""; width: 15px; height: 19px; border: 1.5px solid currentColor; border-radius: 3px; border-bottom-style: dotted; }
.appv-preview-stamp::after { content: ""; position: absolute; inset: 14px auto auto; width: 7px; height: 1px; background: currentColor; box-shadow: 0 4px currentColor, 0 8px currentColor; }
.appv-preview-heading h2 { margin: 0; font: 500 clamp(1.04rem, 1.7vw, 1.25rem)/1.35 'Kanit', sans-serif; color: var(--ink); }
.appv-preview-stage { position: relative; isolation: isolate; padding: 7px 11px 10px 0; }
.appv-preview-stage::before, .appv-preview-stage::after {
  content: ""; position: absolute; z-index: -1; inset: 12px 8px 9px 13px; border: 1px solid #ffc78f;
  border-radius: 23px; background: linear-gradient(145deg, #fff3e1, #ffd9b5); transform: translate(4px, -3px) rotate(3deg);
  pointer-events: none;
}
.appv-preview-stage::after { inset: 14px 5px 13px 15px; transform: translate(6px, -3px) rotate(6deg); opacity: .56; z-index: -2; }
.appv-preview-frame {
  position: relative; display: grid; gap: 12px; padding: 17px; border: 1px solid #ffd3a8; border-radius: 22px; background: #fff;
  box-shadow: 0 22px 38px -20px rgba(255, 90, 0, .45), 0 4px 12px -8px rgba(255, 90, 0, .3);
}
.appv-preview-item { display: flex; align-items: center; gap: 12px; min-height: 92px; }
.appv-preview-product { flex: 1; min-width: 0; }
.appv-preview-product strong, #appvPreviewPkg { display: -webkit-box; overflow: hidden; overflow-wrap: anywhere; -webkit-box-orient: vertical; }
.appv-preview-product strong { color: var(--ink); font: 600 clamp(1rem, 1.9vw, 1.24rem)/1.35 'Kanit', sans-serif; -webkit-line-clamp: 2; }
#appvPreviewPkg { margin-top: 2px; color: var(--mut); font-size: .82rem; -webkit-line-clamp: 2; }
.appv-preview-status {
  display: inline-flex; align-items: center; gap: 5px; margin-bottom: 3px; padding: 2px 6px; border-radius: 6px;
  background: #fff0df; color: #e85d00; font-weight: 700; font-size: .67rem; line-height: 1.35;
}
.appv-preview-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.appv-preview-status[data-state="ready"] { background: #eafaf0; color: #15803d; }
.appv-preview-status[data-state="out"] { background: #f4f1ee; color: #7c7167; }
.appv-preview-logo {
  position: relative; isolation: isolate; flex: none; display: grid; place-items: center; width: clamp(71px, 7.9vw, 92px); aspect-ratio: 1;
  padding: 0;
  border: 0; border-radius: 14px;
  background: radial-gradient(circle at 50% 46%, #fffaf3 0 34%, rgba(255, 243, 229, 0) 62%), #fff;
  color: var(--o3);
  overflow: hidden;
}
.appv-preview-logo::after {
  content: ""; position: absolute; inset: 0; z-index: 3;
  pointer-events: none;
  background: var(--appv-frame-png) center / 100% 100% no-repeat;
}
.appv-preview-logo > span { position: relative; z-index: 1; display: grid; place-items: center; width: 84%; height: 84%; border-radius: 50%; background: #fff6ea; font-size: 1rem; }
.appv-preview-logo i { position: relative; z-index: 1; display: block; }
.appv-preview-logo img { position: absolute; z-index: 1; inset: 0; width: 84%; height: 84%; margin: auto; padding: 0; object-fit: cover; border-radius: 8px; background: transparent; }
.appv-preview-total {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 3px 10px;
  padding: 9px 11px; border: 1px dashed #f0cbab; border-radius: 12px; background: #fff7ee; color: var(--ink2); font-size: .84rem;
}
.appv-preview-total strong {
  color: var(--o3); font: 600 clamp(1.35rem, 2.4vw, 1.85rem)/1.2 'Kanit', sans-serif;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere; transform-origin: right center;
}
.appv-preview.has-package .appv-preview-total { border-style: solid; background: #fff1e1; }
.appv-preview .appv-preview-action { justify-content: space-between; width: 100%; padding-inline: 12px; }
.appv-preview-dock {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: fit-content; max-width: 100%;
  margin: 8px auto 0; padding: 6px; border: 1px solid #ffd3a8; border-radius: 16px; background: #fffaf3;
  box-shadow: 0 9px 20px -17px #bc4d02ad;
}
.appv-preview-thumb {
  position: relative; isolation: isolate; flex: 0 1 44px; display: grid; place-items: center; width: 44px; min-width: 0; height: 44px; padding: 3px;
  border: 1px solid #ebded3; border-radius: 10px; background: #fff; color: var(--o3);
  font: 600 .89rem/1 'Kanit', sans-serif; cursor: pointer; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.appv-preview-thumb img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); border-radius: 6px; object-fit: contain; background: white; }
.appv-preview-thumb:hover { border-color: #eaad7e; }
.appv-preview-thumb[aria-pressed="true"] { transform: translateY(-3px); border-color: var(--o); box-shadow: 0 0 0 2px #ffe2c5, 0 6px 11px -7px #bb4a06aa; }
.appv-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ============ STEP LAYOUT ============ */
.appv-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  margin-top: 14px;
}
.appv-panel {
  display: block;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--sh);
  overflow: hidden;
}
.appv-panel--apps { scroll-margin-top: 82px; }
.appv-panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 16px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fffaf5, #fff);
}
.appv-step-no {
  display: grid; place-items: center;
  flex: none;
  width: 30px; height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff8a1e, #f25c00);
  color: #fff;
  box-shadow: 0 8px 18px -12px rgba(255, 90, 0, .8);
  font-family: 'Kanit', sans-serif;
  font-size: 1rem; font-weight: 600;
}
.appv-panel-head-txt { min-width: 0; flex: 1; }
.appv-panel-head-txt strong { display: block; font-family: 'Kanit', sans-serif; font-size: 1.1rem; font-weight: 600; color: var(--ink); line-height: 1.4; }
.appv-panel-head-txt strong i { color: var(--o3); font-size: .95em; vertical-align: -.05em; }
.appv-panel-head-txt small { display: block; margin-top: 2px; color: var(--mut); font-size: .78rem; }
.appv-count-chip {
  flex: none;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--mut);
  font-size: .64rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ============ TOOLBAR (step 1) ============ */
.appv-toolbar { padding: 14px 14px 0; display: grid; gap: 10px; }
.appv-search {
  position: relative;
  display: flex; align-items: center;
  gap: 8px;
  padding: 0 12px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--soft);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.appv-search:focus-within { border-color: #f5b97f; background: #fff; box-shadow: 0 0 0 3px rgba(255, 122, 0, .09); }
.appv-search i.bx { color: var(--o); font-size: 1.15rem; flex: none; }
.appv-search input {
  flex: 1; min-width: 0;
  border: 0; outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: .82rem;
  padding: 10px 0;
}
.appv-search input::placeholder { color: var(--mut2); }
.appv-search-clear {
  flex: none;
  display: grid; place-items: center;
  width: 24px; height: 24px;
  border: 0; border-radius: 50%;
  background: #e8eaee; color: #6b7280;
  font-size: .95rem; cursor: pointer;
  visibility: hidden;
}
.appv-search.has-value .appv-search-clear { visibility: visible; }

.appv-filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.appv-tabs {
  display: flex; align-items: center; gap: 5px;
  flex: 1 1 auto; min-width: 0; flex-wrap: wrap;
  overflow-x: visible;
  scrollbar-width: none;
  padding-bottom: 1px;
}
.appv-tabs::-webkit-scrollbar { display: none; }
.appv-tab {
  flex: none;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px; min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #fff;
  color: var(--mut);
  font-size: .72rem; font-weight: 600;
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
}
.appv-tab em {
  font-style: normal;
  font-size: .62rem;
  font-weight: 700;
  color: var(--mut2);
  background: var(--soft);
  border-radius: 99px;
  padding: 1px 6px;
  font-variant-numeric: tabular-nums;
  transition: all .18s ease;
}
.appv-tab:hover { border-color: #f3cfae; color: var(--o3); }
.appv-tab.is-on {
  background: linear-gradient(135deg, #ff8a1e, #f25c00);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px -12px rgba(255, 90, 0, .7);
}
.appv-tab.is-on em { background: rgba(255, 255, 255, .25); color: #fff; }
.appv-sort {
  flex: none;
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink2);
  font-size: .7rem;
  cursor: pointer;
}
.appv-sort i { color: var(--mut2); font-size: .85rem; }
.appv-sort select {
  border: 0; outline: 0;
  background: transparent;
  color: var(--ink2);
  font-size: .7rem;
  font-weight: 600;
  cursor: pointer;
  max-width: 108px;
}

/* ============ PRODUCT GRID ============ */
.appv-grid-wrap { padding: 12px 8px 12px 14px; }
.appv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  max-height: 620px;
  overflow-y: auto;
  padding: 2px 6px 2px 2px;
  scrollbar-width: thin;
  scrollbar-color: #ffcfab transparent;
}
.appv-grid::-webkit-scrollbar { width: 6px; }
.appv-grid::-webkit-scrollbar-track { background: transparent; }
.appv-grid::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #ffcfab, #ffb27a); border-radius: 99px; }

.appv-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 6px;
  min-height: 168px;
  padding: 30px 8px 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.34, 1.4, .64, 1), border-color .18s ease, box-shadow .18s ease;
  overflow: hidden;
}
.appv-card::after {
  content: "";
  position: absolute; inset: auto 14px 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, transparent, rgba(255, 122, 0, .55), transparent);
  opacity: 0;
  transition: opacity .18s ease;
}
.appv-card:hover { transform: translateY(-3px); border-color: #ffb066; box-shadow: 0 18px 30px -20px rgba(255, 106, 0, .55); }
.appv-card:hover::after { opacity: 1; }
.appv-card.is-on { border-color: var(--o); box-shadow: 0 0 0 3px rgba(255, 122, 0, .18), 0 18px 32px -20px rgba(255, 106, 0, .65); }
.appv-card.is-off { background: #f9f7f5; }
.appv-card.is-off .appv-card-logo { filter: grayscale(.8); opacity: .75; }
.appv-card.is-hidden { display: none; }

.appv-card-logo {
  position: relative; isolation: isolate;
  display: grid; place-items: center;
  width: 97px; height: 97px;
  padding: 0; /* รูปอยู่หลังกรอบ ให้กรอบซ้อนทับ */
  border: 0;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 46%, #fff 0 38%, rgba(255, 243, 229, 0) 64%), #fff;
  box-shadow: 0 14px 24px -18px rgba(255, 106, 0, .55);
  overflow: hidden;
  transition: transform .2s ease;
}
/* กรอบคริสต์มาสวางทับรูปสินค้า (frame on top) — กลางกรอบโปร่งใสเห็นสินค้า */
/* กรอบ PNG โปร่งใสตรงกลาง — ลายแมว/กระดิ่งทับอยู่บนรูปสินค้า */
.appv-card-logo::after {
  content: ""; position: absolute; inset: 0; z-index: 3;
  pointer-events: none;
  background: var(--appv-frame-png) center / 100% 100% no-repeat;
}
.appv-card-logo img, .appv-card-logo .appv-initial { position: relative; z-index: 1; }
.appv-card:hover .appv-card-logo { transform: translateY(-2px) scale(1.04); }
.appv-card-logo img { width: 84%; height: 84%; object-fit: cover; filter: saturate(1.12) contrast(1.04); }
.appv-card-logo .appv-initial {
  display: grid; place-items: center;
  width: 84%; height: 84%;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff6ea, #ffe0b8);
  color: var(--o3);
  font-family: 'Kanit', sans-serif;
  font-size: 1.2rem; font-weight: 700;
}
.appv-card-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 1.45em;
  margin: 0;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.45;
  word-break: break-word;
}
.appv-card-price { display: inline-flex; align-items: baseline; gap: 2px; margin-top: auto; color: var(--o3); font-size: .84rem; font-weight: 700; }
.appv-card-price small { font-size: .62rem; font-weight: 600; color: var(--mut2); }
.appv-card-price.is-out { color: var(--mut2); font-weight: 600; }
.appv-card.is-off .appv-card-price { color: #8f8379; font-weight: 600; }
.appv-card.is-off .appv-card-price small { color: #a99d93; }

.appv-card-badge {
  position: absolute; top: 7px; right: 7px;
  padding: 2px 7px;
  border-radius: 99px;
  font-size: .68rem; font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}
.appv-card-badge.ok { background: #eafaf0; color: #15803d; border: 1px solid #c8ecd6; }
.appv-card-badge.pre { background: #fff7ee; color: #f25c00; border: 1px solid #ffe8d1; }
.appv-card-badge.out { background: #f4f1ee; color: #7c7167; border: 1px solid #e8e1da; }
.appv-card-badge.email { left: 7px; right: auto; background: #fff8f1; color: #e85d00; border: 1px solid #ffe6cc; }
.appv-card-badge.flash {
  left: 7px; right: auto;
  background: linear-gradient(135deg, #ff4d2d, #ff8a00);
  color: #fff; border: 0;
  font-weight: 800;
  box-shadow: 0 6px 14px -8px rgba(255, 77, 45, .85);
}
.appv-card-badge.flash i { font-size: .68rem; margin-right: 1px; vertical-align: -1px; }

.appv-empty {
  padding: 34px 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--soft);
  color: var(--mut);
  font-size: .76rem;
  text-align: center;
}
.appv-empty i { display: block; margin-bottom: 6px; color: #d7b89c; font-size: 1.5rem; }
.appv-empty[hidden] { display: none; }

/* ============ STEP 2 — PACKAGES ============ */
.appv-panel--pkgs { position: sticky; top: 82px; scroll-margin-top: 82px; }
.appv-pkg-head { padding: 15px 16px 12px; border-bottom: 1px solid var(--line); }
.appv-pkg-app {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  border: 1px solid #f6e3d0;
  border-radius: 14px;
  background: linear-gradient(140deg, #fffaf4, #fff4e8);
}
.appv-pkg-app img { width: 42px; height: 42px; padding: 4px; border-radius: 11px; background: #fff; object-fit: contain; border: 1px solid #f3e7db; }
.appv-pkg-app-initial { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: #ffe6cc; color: var(--o3); font-family: 'Kanit', sans-serif; font-weight: 800; }
.appv-pkg-app-txt { min-width: 0; flex: 1; }
.appv-pkg-app-txt strong { display: block; color: var(--ink); font-size: .82rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appv-pkg-app-txt small { display: block; color: var(--mut); font-size: .64rem; margin-top: 1px; }
.appv-pkg-app-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.appv-tag { display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: 99px; font-size: .7rem; font-weight: 700; border: 1px solid transparent; }
.appv-tag.pre { background: #fff7ee; color: #f25c00; border-color: #ffe8d1; }
.appv-tag.ok { background: #fff3e6; color: var(--o3); border-color: #ffe1c4; }
.appv-tag.mail { background: #fff8f1; color: #e85d00; border-color: #ffe6cc; }

.appv-pkg-search {
  position: relative;
  display: flex; align-items: center; gap: 7px;
  margin-top: 10px;
  padding: 0 11px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--soft);
}
.appv-pkg-search i { color: var(--mut2); font-size: .95rem; }
.appv-pkg-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: .74rem; color: var(--ink); padding: 8px 0; }
.appv-pkg-search input::placeholder { color: var(--mut2); }

.appv-pkg-body { padding: 10px 10px 12px; }
.appv-pkg-list { display: grid; gap: 7px; max-height: 480px; overflow-y: auto; padding: 1px 4px 1px 1px; scrollbar-width: thin; scrollbar-color: #e4e7ec transparent; }
.appv-pkg-list::-webkit-scrollbar { width: 5px; }
.appv-pkg-list::-webkit-scrollbar-thumb { background: #e4e7ec; border-radius: 99px; }

.appv-pkg {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid #bbf7d0;
  border-radius: 13px;
  background:
    repeating-linear-gradient(0deg, rgba(6, 78, 59, .045) 0 1px, transparent 1px 3px),
    linear-gradient(90deg, #f0fdf4 0%, #dcfce7 100%);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, .22), 0 0 14px rgba(34, 197, 94, .22), inset 0 0 16px rgba(34, 197, 94, .05);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
  animation: appvRise .3s ease both, appvFrameGlow 3.2s ease-in-out infinite;
}
/* หัวรายการ: หลอดไฟบาง ๆ ไล่สีอ่อน → เข้ม (ซ้ายไปขวา) */
.appv-pkg::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, #bbf7d0 0%, #22c55e 45%, #15803d 100%);
  background-size: 200% 100%;
  animation: appvTubeFlow 3.2s linear infinite, appvTubeGlow 2.4s ease-in-out infinite, appvNeonFlicker 4.6s steps(1, end) infinite;
}
/* แสงสะท้อนวิ่งจากซ้ายไปขวา (สีขวาไล่ตามไฟ) */
.appv-pkg::after {
  content: ""; position: absolute; top: 0; left: 0; height: 4px; width: 74%;
  z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.95) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-140%);
  animation: appvNeonSweep 2.6s linear infinite;
}
.appv-pkg:hover { border-color: #86efac; transform: translateY(-1px); box-shadow: 0 10px 22px -20px rgba(21, 128, 61, .55); }
.appv-pkg.is-off { opacity: .95; cursor: not-allowed; border-color: #cbd5e1; background: repeating-linear-gradient(0deg, rgba(51, 65, 85, .05) 0 1px, transparent 1px 3px), linear-gradient(90deg, #f8fafc 0%, #e2e8f0 100%); box-shadow: 0 0 0 1px rgba(100, 116, 139, .2), 0 0 14px rgba(100, 116, 139, .2), inset 0 0 16px rgba(100, 116, 139, .05); animation: appvRise .3s ease both, appvFrameGlowGray 3.2s ease-in-out infinite; }
/* หัวรายการสินค้าหมด: หลอดไฟโทนเทา ไล่สีอ่อน → เข้ม (ซ้ายไปขวา) */
.appv-pkg.is-off::before {
  background: linear-gradient(90deg, #e2e8f0 0%, #94a3b8 45%, #475569 100%);
  background-size: 200% 100%;
  animation: appvTubeFlow 3.2s linear infinite, appvTubeGlowGray 2.4s ease-in-out infinite, appvNeonFlicker 4.6s steps(1, end) infinite;
}
.appv-pkg.is-off:hover { transform: none; box-shadow: none; border-color: #cbd5e1; }
.appv-pkg.is-off .appv-pkg-name { color: #64748b; }
.appv-pkg.is-off .appv-pkg-radio { border-color: #cbd5e1; }
.appv-pkg.is-off .appv-chip.out { background: #eef2f7; color: #64748b; }
@keyframes appvTubeFlow { from { background-position: 200% 50%; } to { background-position: 0% 50%; } }
@keyframes appvNeonFlicker { 0%, 94%, 100% { opacity: 1; } 95% { opacity: .55; } 96% { opacity: 1; } 97% { opacity: .7; } 98% { opacity: 1; } }
@keyframes appvFrameGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(34, 197, 94, .22), 0 0 12px rgba(34, 197, 94, .18), inset 0 0 14px rgba(34, 197, 94, .04); }
  50% { box-shadow: 0 0 0 1px rgba(34, 197, 94, .4), 0 0 20px rgba(34, 197, 94, .35), inset 0 0 18px rgba(34, 197, 94, .08); }
}
@keyframes appvFrameGlowGray {
  0%, 100% { box-shadow: 0 0 0 1px rgba(100, 116, 139, .2), 0 0 12px rgba(100, 116, 139, .15), inset 0 0 14px rgba(100, 116, 139, .04); }
  50% { box-shadow: 0 0 0 1px rgba(100, 116, 139, .38), 0 0 20px rgba(100, 116, 139, .3), inset 0 0 18px rgba(100, 116, 139, .08); }
}
@keyframes appvNeonSweep { 0% { transform: translateX(-140%); } 100% { transform: translateX(140%); } }
@keyframes appvTubeGlow {
  0%, 100% { box-shadow: 0 1px 8px rgba(34, 197, 94, .5); filter: brightness(1); }
  50% { box-shadow: 0 1px 16px rgba(34, 197, 94, .9); filter: brightness(1.18); }
}
@keyframes appvTubeGlowGray {
  0%, 100% { box-shadow: 0 1px 8px rgba(100, 116, 139, .4); filter: brightness(1); }
  50% { box-shadow: 0 1px 16px rgba(100, 116, 139, .8); filter: brightness(1.15); }
}
.appv-pkg-radio {
  width: 16px; height: 16px;
  border: 2px solid #e3d3c5;
  border-radius: 50%;
  transition: all .15s ease;
}
.appv-pkg:hover .appv-pkg-radio { border-color: var(--o); }
.appv-pkg.is-selected { border-color: var(--o); box-shadow: 0 0 0 2px rgba(255,122,0,.15); }
.appv-pkg.is-selected .appv-pkg-radio { background: var(--o); border-color: var(--o); box-shadow: inset 0 0 0 3px white; }
.appv-pkg-main { min-width: 0; }
.appv-pkg-name { display: block; color: var(--ink); font-size: .91rem; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.appv-pkg-sub { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 3px; }
.appv-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: .7rem; font-weight: 600;
  background: var(--soft); color: var(--mut);
}
.appv-chip.ok { background: #eafaf0; color: #15803d; }
.appv-chip.out { background: #fdeeee; color: #b42318; }
.appv-chip.pre { background: #fff7ee; color: #f25c00; }
.appv-chip.warn { background: var(--warnl); color: var(--warn); }
.appv-chip.flash { background: #fff0e6; color: #d9480f; font-weight: 700; }
.appv-chip.flash i { color: #f25c00; }
.appv-pkg-price { text-align: right; flex: none; min-width: 84px; }
.appv-price-top { display: block; color: var(--mut2); font-size: .62rem; font-weight: 500; line-height: 1.25; white-space: nowrap; }
.appv-price-top del { color: #a3948a; text-decoration-thickness: 1px; }
.appv-pkg-price b { display: block; color: var(--o3); font-size: .82rem; font-weight: 800; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; }
.appv-pkg.is-off .appv-pkg-price b { color: #475569; }
.appv-pkg.is-off .appv-price-top { color: #a99d93; }

.appv-skel {
  display: inline-block;
  width: 58px; height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, #eef0f3 25%, #f7f8fa 37%, #eef0f3 63%);
  background-size: 400% 100%;
  animation: appvShimmer 1.2s ease infinite;
}

.appv-pkg-empty { padding: 28px 16px; border-radius: 14px; background: var(--soft); text-align: center; color: var(--mut); font-size: .87rem; }
.appv-pkg-empty i { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 9px; border: 1px solid #e5d3c5; border-radius: 15px; background: #fff9f2; color: var(--o3); font-size: 1.45rem; }
.appv-pkg-empty[hidden] { display: none; }

@keyframes appvRise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes appvShimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* Review actions */
.appv-review-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); background: #fffaf5; }
.appv-review-bar small, .appv-review-bar strong { display: block; }
.appv-review-bar small { color: var(--mut); font-size: .78rem; }
.appv-review-bar strong { color: var(--o3); font-size: 1.12rem; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; transform-origin: left center; }
.appv-review { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 9px 16px; border: 0; border-radius: 11px; background: var(--action); color: white; font-size: .9rem; font-weight: 700; cursor: pointer; box-shadow: 0 6px 15px -10px #bb4a06b3; }
.appv-review:hover { background: var(--action-hover); }
.appv-review i { font-size: 1.15rem; transition: transform .16s ease; }
.appv-review:hover i { transform: translateX(2px); }
.appv-note { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-top: 14px; }
.appv-note a, .appv-note button { display: inline-flex; align-items: center; gap: 5px; min-height: 38px; padding: 2px 4px; background: transparent; border: 0; color: var(--ink2); text-decoration: none; font-size: .82rem; cursor: pointer; }
.appv-note :is(a, button):hover { color: var(--o3); text-decoration: underline; }

/* Step 3 — order receipt */
body.appv-modal-open { overflow: hidden; }
.appv-sheet {
  --ink: #1b1410; --mut: #6b5f57; --o3: #e85d00; --line: #f0e2d6; --bad: #e11d48;
  position: fixed; inset: 0; box-sizing: border-box; width: min(420px, calc(100% - 28px)); max-width: 100%;
  max-height: min(88vh, 700px); max-height: min(88dvh, 700px); margin: auto; padding: 0; overflow: auto; overscroll-behavior: contain;
  border: 1px solid #f0dccb; border-radius: 22px; background: #fffdfa; color: var(--ink);
  box-shadow: 0 22px 60px -18px rgba(90, 45, 10, .38); font: 400 .88rem/1.5 'Sarabun', system-ui, sans-serif;
}
.appv-sheet[open] { animation: appvReceiptIn .2s ease-out; }
.appv-sheet::before { content: ""; display: block; height: 4px; background: linear-gradient(90deg, #ff7a00, #ffb066, #ff7a00); }
.appv-sheet::backdrop { background: rgba(58, 36, 20, .45); backdrop-filter: blur(5px); }
.appv-sheet * { box-sizing: border-box; }
.appv-sheet button, .appv-sheet input { font-family: inherit; }
.appv-sheet :is(button, input, summary):focus-visible { outline: 3px solid var(--o3); outline-offset: 1px; }
.appv-sheet-body { padding: 0 18px 16px; }
.appv-sheet-heading { display: flex; align-items: center; gap: 10px; padding: 15px 16px 13px; margin: 0 -18px 12px; border-bottom: 1px solid #f6dcc2; background: radial-gradient(ellipse at 92% 8%, #ffe3c2, transparent 66%), #fff8f0; }
.appv-sheet-heading small { font-size: .7rem; color: var(--o3); font-weight: 700; }
.appv-sheet-title { margin: 0; color: var(--ink); font: 600 1.22rem/1.3 'Kanit', sans-serif; }
.appv-confirm-stamp { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 1px dashed #e0ac84; outline: 3px solid #fff8f1; border-radius: 12px; background: #fffdfa; color: var(--o3); transform: rotate(-6deg); font-size: 1.25rem; }
.appv-sheet-close { flex: none; margin-left: auto; width: 36px; height: 36px; padding: 0; border: 1px solid #f0d8c5; border-radius: 50%; background: #fffaf4; color: #8a6a56; font-size: 1.25rem; cursor: pointer; }
.appv-sheet-close:hover { background: #fff1e2; color: var(--o3); }
.appv-sheet-product { display: flex; align-items: center; gap: 10px; padding: 10px 11px; background: #fff7ee; border: 1px solid #fbe8d5; border-radius: 13px; overflow-wrap: anywhere; }
.appv-sheet-thumb {
  position: relative; isolation: isolate;
  flex: none; display: grid; place-items: center; width: 65px; height: 65px; padding: 0; border: 0; border-radius: 10px;
  background: radial-gradient(circle at 50% 46%, #fffaf3 0 34%, rgba(255, 243, 229, 0) 62%), #fff;
  overflow: hidden;
}
.appv-sheet-thumb::after {
  content: ""; position: absolute; inset: 0; z-index: 3;
  pointer-events: none;
  background: var(--appv-frame-png) center / 100% 100% no-repeat;
}
.appv-sheet-thumb img { position: relative; z-index: 1; width: 84%; height: 84%; object-fit: cover; }
.appv-sheet-product strong, .appv-sheet-product small { display: block; }
.appv-sheet-product strong { font-size: .94rem; }
.appv-sheet-product small { margin-top: 2px; color: var(--mut); font-size: .76rem; }
.appv-rows { display: grid; gap: 0; margin: 8px 0; }
.appv-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 1px; }
.appv-row-label { color: var(--mut); font-size: .82rem; }
.appv-row-val { color: var(--ink); text-align: right; font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.appv-row:has(.total) { margin-top: 4px; padding-top: 10px; border-top: 1px dashed #e2ccba; }
.appv-row-val.total { color: var(--o3); font: 600 1.28rem/1.3 'Kanit', sans-serif; transform-origin: right center; }
.appv-row-val.is-bad, .appv-short { color: var(--bad); }
.appv-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.appv-qty button { width: 38px; height: 38px; color: var(--o3); background: #fff4e8; border: 0; cursor: pointer; font-size: 1.05rem; }
.appv-qty input { width: 44px; height: 38px; min-width: 0; padding: 0; border: 0; text-align: center; background: white; color: var(--ink); font-size: .94rem; appearance: textfield; }
.appv-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.appv-short { margin: 6px 0; font-size: .8rem; }
.appv-sheet-details { border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.appv-sheet-details summary { padding: 8px 10px; color: var(--mut); font-size: .81rem; cursor: pointer; }
.appv-sheet-details .detail-body { padding: 0 11px 9px; color: var(--mut); font-size: .8rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.appv-agree { display: flex; align-items: center; gap: 8px; min-height: 40px; color: var(--ink); font-size: .86rem; cursor: pointer; }
.appv-agree input { width: 17px; height: 17px; accent-color: var(--o3); }
.appv-sheet-actions { display: grid; grid-template-columns: .72fr 1.28fr; gap: 8px; }
.appv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: .9rem; font-weight: 700; }
.appv-btn-ghost { background: #fff; color: var(--mut); }
.appv-btn-ghost:hover { background: #fff8f0; color: var(--o3); border-color: #f3d3b6; }
.appv-btn-primary { background: linear-gradient(135deg, #ff8a1e, #f25c00); color: #fff; border-color: transparent; box-shadow: 0 10px 20px -12px rgba(255, 90, 0, .75); }
.appv-btn-primary:hover:not(:disabled) { filter: brightness(1.04); }
.appv-btn:disabled { cursor: not-allowed; background: #f0e7df; color: #8b7d72; box-shadow: none; }
@keyframes appvReceiptIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .appv-sheet { width: 100%; max-height: 92vh; max-height: 92dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .appv-sheet-body { padding: 0 14px max(12px, env(safe-area-inset-bottom)); }
  .appv-sheet-heading { margin-inline: -14px; padding: 13px 14px; }
  .appv-sheet-thumb { width: 56px; height: 56px; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .appv-hero { gap: 20px; }
  .appv-steps { grid-template-columns: minmax(0, 1fr); }
  .appv-panel--pkgs { position: static; }
  .appv-grid { max-height: 540px; }
  .appv-pkg-list { max-height: 420px; }
}
@media (max-width: 640px) {
  .appv-page { padding: 12px 10px 80px; }
  .appv-hero { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 15px; border-radius: 20px; }
  .appv-title { line-height: 1.24; }
  .appv-title span { display: inline; }
  .appv-lead { margin-top: 5px; font-size: .9rem; }
  .appv-browse { margin-top: 10px; }
  .appv-support { margin-top: 6px; }
  /* ลดความสูงส่วนแนะนำบนมือถือ ให้เห็นการ์ดสินค้าเร็วขึ้น */
  .appv-howto { display: none; }
  .appv-preview-frame { padding: 12px; gap: 9px; border-radius: 17px; }
  .appv-preview-item { min-height: 70px; }
  .appv-preview-dock { gap: 5px; }
  .appv-preview-thumb { width: 38px; height: 40px; }
  .appv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: min(60vh, 520px); gap: 8px; }
  .appv-grid-wrap { padding: 9px 7px 10px 10px; }
  .appv-card { min-height: 146px; padding: 28px 7px 10px; gap: 5px; }
  .appv-card-logo { width: 84px; height: 84px; border-radius: 10px; }
  .appv-card-logo img { width: 84%; height: 84%; }
  .appv-card-logo .appv-initial { font-size: .95rem; }
  .appv-card-name { font-size: .82rem; line-height: 1.4; }
  .appv-card-price { font-size: .8rem; }
  .appv-card-badge { font-size: .62rem; padding: 1px 6px; }
  /* Step 1 header — compact on mobile */
  .appv-panel-head { padding: 9px 11px; gap: 8px; }
  .appv-step-no { width: 26px; height: 26px; border-radius: 8px; font-size: .85rem; }
  .appv-panel-head-txt strong { font-size: .95rem; line-height: 1.25; }
  .appv-panel-head-txt strong i { display: none; }
  .appv-panel-head-txt small { display: none; }
  .appv-count-chip { font-size: .6rem; padding: 2px 7px; }
  .appv-toolbar { padding: 9px 11px 0; gap: 7px; }
  .appv-search { min-height: 38px; border-radius: 11px; padding: 0 10px; }
  .appv-search i.bx { font-size: 1rem; }
  .appv-search input { padding: 8px 0; }
  .appv-pkg-head { padding: 13px 13px 10px; }
  .appv-pkg-body { padding: 9px 8px 10px; }
  .appv-row-label { font-size: .84rem; }
  .appv-toolbar { grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; }
  .appv-filter-row { display: contents; }
  .appv-sort { grid-column: 2; grid-row: 1; min-height: 38px; }
  .appv-tabs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .appv-tab { justify-content: center; min-height: 34px; padding-inline: 2px; font-size: .7rem; }
  .appv-tab i { display: none; }
  .appv-search input, .appv-pkg-search input { font-size: 1rem; }
}

@media (max-width: 430px) {
  .appv-tab em { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .appv-anim-toggle { display: none; }
  .appv-pkg::before { animation: none !important; }
  .appv-pkg::after { animation: none !important; opacity: 0; }
  .appv-card, .appv-pkg, .appv-btn, .appv-sheet, .appv-card-logo, .appv-review i, .appv-preview-thumb, .appv-support-toggle::before { transition: none !important; animation: none !important; }
  .appv-skel { animation: none; }
}

/* Step 1 — preorder availability on sold-out regular stock */
.appv-card.has-pre { border-color: #ffd2a8; }
.appv-card-pre {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 4px 8px;
  border-radius: 15px 15px 0 0;
  background: linear-gradient(135deg, #ff8a1e, #f25c00);
  color: #fff;
  font-size: .57rem; font-weight: 700; letter-spacing: .2px;
  box-shadow: 0 6px 12px -10px rgba(242, 92, 0, .8);
  pointer-events: none;
}
.appv-card-pre i { font-size: .72rem; }
.appv-card.has-pre .appv-card-logo { margin-top: 1px; }
/* ============ HERO — วิธีสั่งซื้อ animated preview ============ */
.appv-demo-col { min-width: 0; width: 100%; justify-self: center; }
.appv-howto { width: min(100%, 420px); justify-self: center; }
.appv-howto-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.appv-howto-kicker { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; background: linear-gradient(135deg,#fff3e4,#ffe4c8); border: 1px solid #ffd3a6; color: #e85d00; font-size: .64rem; font-weight: 700; }
.appv-howto-kicker i { font-size: .85rem; }
.appv-howto-head h2 { margin: 6px 0 0; font: 600 1.18rem/1.3 'Kanit', sans-serif; color: var(--ink); }
.appv-howto-head .appv-anim-toggle { margin: 0; width: 34px; height: 34px; }

.appv-demo { position: relative; width: 100%; border: 1px solid #ffd3a8; border-radius: 18px; background: #fff; box-shadow: 0 22px 44px -30px rgba(255, 106, 0, .5); overflow: hidden; }
.appv-demo-chrome { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 11px; background: linear-gradient(180deg,#fff8f0,#fff2e2); border-bottom: 1px solid #f8e3cc; }
.appv-demo-dots { display: inline-flex; gap: 4px; }
.appv-demo-dots i { width: 6px; height: 6px; border-radius: 50%; background: #ffb887; }
.appv-demo-dots i:nth-child(2) { background: #ffcf9e; }
.appv-demo-dots i:nth-child(3) { background: #ffe0bf; }
.appv-demo-url { flex: 1; min-width: 0; padding: 2px 9px; border-radius: 6px; background: #fff; border: 1px solid #f7e3cf; color: #a08d7f; font-size: .53rem; letter-spacing: .2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appv-demo-notch { display: none; }
.appv-demo-screen { position: relative; height: 300px; padding: 12px; overflow: hidden; background: radial-gradient(ellipse at 88% 0%, #fff0de, transparent 55%), linear-gradient(180deg,#fffdfa,#fff8f1); }

.pd-pane[hidden], .pd-success[hidden] { display: none !important; }
.pd-pane, .pd-success { animation: pdPaneIn .35s ease both; }
@keyframes pdPaneIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pd-caption { margin-bottom: 9px; color: #a05a2c; font-size: .58rem; font-weight: 700; }
.pd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.pd-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 6px; border: 1px solid #f4e3d2; border-radius: 11px; background: #fff; text-align: center; transition: all .2s ease; }
.pd-tile img { width: 30px; height: 30px; object-fit: contain; }
.pd-tile b { color: var(--ink); font-size: .6rem; font-weight: 700; }
.pd-tile small { color: #e85d00; font-size: .53rem; font-weight: 700; }
.pd-tile.is-picked { border-color: #ff8a1e; box-shadow: 0 0 0 3px rgba(255, 122, 0, .16); transform: scale(1.03); }

.pd-app-head { display: flex; align-items: center; gap: 8px; padding: 8px; margin-bottom: 8px; border: 1px solid #f8e3cc; border-radius: 10px; background: #fffaf4; }
.pd-app-head img { width: 28px; height: 28px; object-fit: contain; }
.pd-app-head span { min-width: 0; }
.pd-app-head b { display: block; color: var(--ink); font-size: .6rem; }
.pd-app-head small { display: block; color: #9a8a7d; font-size: .51rem; }
.pd-pkgs { display: grid; gap: 6px; }
.pd-pkg { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid #f4e3d2; border-radius: 9px; background: #fff; font-size: .6rem; }
.pd-pkg b { color: var(--ink); font-weight: 600; }
.pd-pkg em { color: #e85d00; font-style: normal; font-weight: 800; }
.pd-pkg.is-picked { border-color: #ff8a1e; background: #fff2e2; box-shadow: 0 0 0 3px rgba(255,122,0,.12); }

.pd-summary { display: grid; gap: 6px; padding: 10px; border: 1px solid #f4e3d2; border-radius: 10px; background: #fff; }
.pd-summary div { display: flex; justify-content: space-between; gap: 8px; font-size: .58rem; }
.pd-summary span { color: #9a8a7d; }
.pd-summary b { color: var(--ink); }
.pd-summary .pd-total { color: #e85d00; font-size: .78rem; font-weight: 800; }
.pd-confirm { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 10px; padding: 9px; border-radius: 9px; background: linear-gradient(135deg,#ff8a1e,#f25c00); color: #fff; font-size: .62rem; font-weight: 700; box-shadow: 0 8px 18px -12px rgba(242,92,0,.8); transition: transform .2s; }
.pd-confirm.is-picked { transform: scale(.97); filter: brightness(1.08); }

.pd-success { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 5px; text-align: center; }
.pd-check { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg,#22c55e,#16a34a); color: #fff; font-size: 1.5rem; box-shadow: 0 12px 24px -12px rgba(22,163,74,.6); }
.pd-success b { color: var(--ink); font: 700 .8rem/1.3 'Kanit', sans-serif; }
.pd-success small { color: #9a8a7d; font-size: .55rem; }

.pd-cursor { position: absolute; z-index: 5; left: 20px; top: 30px; width: 22px; height: 22px; pointer-events: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); transition: left .6s cubic-bezier(.22,.8,.25,1), top .6s cubic-bezier(.22,.8,.25,1), transform .12s ease; }
.pd-cursor.is-click { transform: scale(.8); }
.pd-tap { position: absolute; z-index: 6; display: none; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 2px solid rgba(255,122,0,.7); background: rgba(255,122,0,.22); pointer-events: none; opacity: 0; }
.pd-tap.show { display: block; animation: pdTap .6s ease-out both; }
@keyframes pdTap { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(2.6); } }
.appv-demo-foot { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 8px; border-top: 1px solid #f8e3cc; background: #fffaf4; color: #a05a2c; font-size: .58rem; font-weight: 600; }

.appv-demo[data-mode="mobile"] { width: min(100%, 232px); margin: 0 auto; padding: 8px; border-radius: 38px; border-color: #2a1c14; background: #1b1410; box-shadow: 0 26px 50px -26px rgba(0,0,0,.6); }
.appv-demo[data-mode="mobile"] .appv-demo-chrome { display: none; }
.appv-demo[data-mode="mobile"] .appv-demo-notch { display: block; position: absolute; z-index: 7; top: 10px; left: 50%; width: 74px; height: 16px; transform: translateX(-50%); border-radius: 0 0 10px 10px; background: #1b1410; }
.appv-demo[data-mode="mobile"] .appv-demo-screen { height: 356px; padding: 24px 10px 10px; border-radius: 30px; }
.appv-demo[data-mode="mobile"] .pd-cursor { display: none; }
.appv-demo[data-mode="mobile"] .pd-tap { display: none; }
.appv-demo[data-mode="mobile"] .pd-tap.show { display: block; }
.appv-demo[data-mode="mobile"] .pd-tile img { width: 34px; height: 34px; }
.appv-demo[data-mode="mobile"] .pd-caption { font-size: .56rem; }
.appv-demo[data-mode="mobile"] .pd-confirm { padding: 10px; }

.appv-howto-steps { display: flex; gap: 5px; margin-top: 10px; }
.appv-howto-steps span { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 6px 5px; border: 1px solid #f0e2d6; border-radius: 9px; background: #fff; color: #9a8a7d; font-size: .55rem; font-weight: 600; transition: all .2s ease; }
.appv-howto-steps span b { display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: #f7efe7; color: #a08d7f; font-size: .5rem; }
.appv-howto-steps span.is-on { border-color: #ffd3a8; background: #fff5e9; color: #e85d00; }
.appv-howto-steps span.is-on b { background: linear-gradient(135deg,#ff8a1e,#f25c00); color: #fff; }
.appv-howto-steps span.is-done { color: #16a34a; border-color: #cdebd8; background: #f4fdf8; }
.appv-howto-steps span.is-done b { background: #16a34a; color: #fff; }
.appv-howto-tip { margin: 8px 0 0; color: #8a7d74; font-size: .62rem; line-height: 1.5; text-align: center; }

@media (max-width: 640px) {
  .appv-howto { width: 100%; }
  .appv-demo[data-mode="mobile"] { width: min(100%, 220px); }
  .appv-demo-screen { height: 270px; }
  .appv-demo[data-mode="mobile"] .appv-demo-screen { height: 340px; }
}

/* Step 3 — real confirmation modal look inside the demo */
.pd-pane-modal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; }
.pd-modal-dim { position: absolute; inset: 0; background: rgba(30, 15, 10, .35); backdrop-filter: blur(1px); }
.pd-modal { position: relative; z-index: 2; width: min(86%, 270px); border: 1px solid #f3ddc9; border-radius: 12px; background: #fffdfa; box-shadow: 0 16px 34px -20px rgba(60, 20, 0, .5); overflow: hidden; animation: pdModalIn .3s ease both; }
@keyframes pdModalIn { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.pd-modal-bar { height: 3px; background: linear-gradient(90deg, #ff8a1e, #f25c00); }
.pd-modal-x { position: absolute; top: 6px; right: 8px; z-index: 2; color: #b39a86; font-size: .9rem; line-height: 1; }
.pd-modal-head { padding: 9px 10px 7px; border-bottom: 1px solid #f4e7da; background: linear-gradient(180deg,#fff8f0,#fff); }
.pd-modal-head small { display: block; color: #e85d00; font-size: .47rem; font-weight: 700; }
.pd-modal-head b { display: block; margin-top: 1px; color: #1b1410; font-size: .68rem; font-weight: 700; }
.pd-modal-product { display: flex; align-items: center; gap: 7px; padding: 8px 10px; background: #fff8f1; border-bottom: 1px solid #f7e9dc; }
.pd-modal-product img { width: 24px; height: 24px; object-fit: contain; background: #fff; border-radius: 6px; }
.pd-modal-product b { display: block; font-size: .55rem; color: #1b1410; }
.pd-modal-product small { display: block; font-size: .47rem; color: #9a8a7d; }
.pd-modal-rows { display: grid; gap: 4px; padding: 8px 10px; }
.pd-modal-rows div { display: flex; justify-content: space-between; gap: 6px; font-size: .52rem; }
.pd-modal-rows span { color: #9a8a7d; }
.pd-modal-rows b { color: #1b1410; }
.pd-modal-rows .total { margin-top: 2px; padding-top: 5px; border-top: 1px dashed #ead8c7; }
.pd-modal-rows .total span { color: #6b5f57; font-weight: 600; }
.pd-modal-rows .total b { color: #e85d00; font-size: .68rem; font-weight: 800; }
.pd-modal-agree { display: flex; align-items: center; gap: 5px; padding: 4px 10px; color: #6b5f57; font-size: .5rem; }
.pd-modal-agree input { width: 10px; height: 10px; accent-color: #ff7a00; margin: 0; }
.pd-modal-actions { display: grid; grid-template-columns: .8fr 1.2fr; gap: 5px; padding: 5px 10px 10px; }
.pd-modal-actions span { display: flex; align-items: center; justify-content: center; min-height: 22px; border-radius: 6px; font-size: .52rem; font-weight: 700; transition: transform .2s, filter .2s; }
.pd-modal-actions .ghost { border: 1px solid #f0e2d6; background: #fff; color: #8a7d74; }
.pd-modal-actions .primary { background: linear-gradient(135deg,#ff8a1e,#f25c00); color: #fff; box-shadow: 0 6px 12px -8px rgba(242,92,0,.8); }
.pd-modal-actions .primary.is-picked { transform: scale(.96); filter: brightness(1.08); }
.appv-demo[data-mode="mobile"] .pd-pane-modal { padding: 12px; }
.appv-demo[data-mode="mobile"] .pd-modal { width: 94%; }

/* ============ Demo step 1-2 — match the real storefront ============ */
.pd-search { display: flex; align-items: center; gap: 4px; height: 23px; margin-bottom: 6px; padding: 0 7px; border: 1px solid #efe2d6; border-radius: 7px; background: #faf7f3; color: #a08d7f; font-size: .5rem; }
.pd-search i { color: #ff7a00; font-size: .7rem; }
.pd-tabs { display: flex; gap: 4px; margin-bottom: 7px; }
.pd-tabs span { padding: 2px 6px; border: 1px solid #f0e2d6; border-radius: 99px; background: #fff; color: #9a8a7d; font-size: .46rem; font-weight: 600; }
.pd-tabs span.is-on { background: linear-gradient(135deg, #ff8a1e, #f25c00); border-color: transparent; color: #fff; }
.pd-logo { position: relative; overflow: hidden; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 9px; background: radial-gradient(circle at 50% 46%, #fff 0 38%, rgba(255,243,229,0) 64%), #fff; box-shadow: 0 6px 10px -8px rgba(255,106,0,.5); }
.pd-logo::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: url('/image/a647b2204943.png') center / 100% 100% no-repeat; }
.pd-logo img { position: relative; z-index: 1; width: 84% !important; height: 84% !important; object-fit: cover; }
.pd-logo.sm { width: 32px; height: 32px; padding: 0; }
.pd-logo.sm::after { border-width: 5px; }
.pd-tile { padding: 6px 4px; gap: 2px; }
.pd-tile b { font-size: .54rem; line-height: 1.25; }
.pd-tile em { font-style: normal; font-size: .47rem; font-weight: 700; }
.pd-tile em.ok { color: #15803d; }
.pd-tile em.out { color: #94a3b8; }
.pd-tile small { font-size: .47rem; }
.pd-app-head > span:not(.pd-logo) { flex: 1; min-width: 0; }
.pd-app-head > .pd-logo { flex: none; }
.pd-app-head .pd-logo img { width: 84% !important; height: 84% !important; }
.pd-app-tag { flex: none; padding: 2px 6px; border-radius: 99px; background: #eafaf0; color: #15803d; font-size: .46rem; font-style: normal; font-weight: 700; }
.pd-pkg > span { flex: 1; min-width: 0; }
.pd-pkg b { display: block; font-size: .55rem; }
.pd-pkg small { display: inline-block; margin-top: 1px; padding: 0 4px; border-radius: 4px; font-size: .45rem; font-weight: 600; }
.pd-pkg small.ok { background: #eafaf0; color: #15803d; }
.pd-pkg em { font-size: .58rem; }

/* Mobile: move hero + demo below the bottom links */
@media (max-width: 900px) {
  .appv-page { display: flex; flex-direction: column; }
  .appv-steps { order: 1; margin-top: 0 !important; }
  .appv-note { order: 2; }
  .appv-hero { order: 3; margin-top: 14px; }
}
