/* =========================================================
   ARCANE FORGE SHOP — blue tech / speedometer theme
   ========================================================= */
:root {
  --bg: #050810;
  --bg2: #0a1220;
  --card: #0d1728;
  --card2: #122036;
  --line: #16335c;
  --txt: #eaf6ff;
  --muted: #8fb1d6;
  --accent: #38bdf8;
  --accent2: #22d3ee;
  --accent3: #60a5fa;
  --ok: #34d399;
  --danger: #fb7185;
  --cyan: #22d3ee;
  --border: #16335c;
  --text: #eaf6ff;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(2, 20, 48, .55);
  --mono: 'Share Tech Mono', Consolas, monospace;
  --sans: 'Prompt', -apple-system, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--txt);
  line-height: 1.6;
  overflow-x: hidden;
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 20% 0%, rgba(56, 189, 248, .14), transparent 55%),
              radial-gradient(ellipse at 85% 90%, rgba(34, 211, 238, .10), transparent 50%);
}

/* ---------- animated magical background (สร้างโดย JS) ---------- */
.bg-scene { position: fixed; inset: -6%; z-index: -3; pointer-events: none; will-change: transform; }
.bg-scene-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .4;
  animation: kenburns 26s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes kenburns {
  0%   { transform: scale(1.05) translate(0, 0) rotate(0deg); }
  50%  { transform: scale(1.16) translate(-1.5%, -1%) rotate(.5deg); }
  100% { transform: scale(1.09) translate(1.3%, 1.6%) rotate(-.5deg); }
}
.magic-cursor {
  position: fixed; width: 360px; height: 360px; z-index: 85; pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, .16), rgba(34, 211, 238, .07) 40%, transparent 70%);
  filter: blur(8px);
  transform: translate(-50%, -50%);
}

/* ---------- magic wand cursor ---------- */
* { cursor: none !important; }
.wand-cursor {
  position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none;
  will-change: transform;
}
.wand-cursor img {
  display: block; width: 92px; height: auto;
  filter: drop-shadow(0 0 14px rgba(255, 210, 130, .5));
  transform-origin: top left;
}

.wand-spark {
  position: fixed; z-index: 9998; pointer-events: none;
  width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle, #fff, #22d3ee 50%, transparent 80%);
  filter: drop-shadow(0 0 5px rgba(34, 211, 238, .9));
  animation: wandSparkFade .55s ease-out forwards;
}
.wand-spark--violet { background: radial-gradient(circle, #fff, #38bdf8 50%, transparent 80%); filter: drop-shadow(0 0 5px rgba(56, 189, 248, .9)); }
@keyframes wandSparkFade {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(12px, -18px) scale(.2); opacity: 0; }
}

/* ---------- magic background particles (เติมโดย JS) ---------- */
.magic-bg { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; }
.magic-star {
  position: absolute; border-radius: 50%; background: #fff;
  opacity: 0; box-shadow: 0 0 8px 2px rgba(56, 189, 248, .8);
  animation: twinkle 4s ease-in-out infinite;
}
.magic-star--gold { box-shadow: 0 0 8px 2px rgba(34, 211, 238, .85); }
.magic-orb {
  position: absolute; border-radius: 50%;
  filter: blur(36px); opacity: .26;
  animation: floaty 16s ease-in-out infinite alternate;
  background: radial-gradient(circle, rgba(56, 189, 248, .55), transparent 70%);
}
.magic-orb--gold { background: radial-gradient(circle, rgba(34, 211, 238, .45), transparent 70%); }
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(.5); }
  50% { opacity: .9; transform: scale(1.15); }
}
@keyframes floaty {
  from { transform: translateY(0) translateX(0); }
  to { transform: translateY(-70px) translateX(45px); }
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

.container { width: min(1180px, 92%); margin: 0 auto; }
.accent { color: var(--accent); }
.accent2 { color: var(--accent2); }

/* ---------- navbar ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(8, 6, 15, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(8, 6, 15, .95); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; position: relative; }
.brand {
  display: flex; align-items: center; gap: 10px; position: relative;
}
.brand-logo {
  height: 42px; width: auto; border-radius: 10px;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, .85)) drop-shadow(0 0 14px rgba(56, 189, 248, .55));
  animation: logoPulse 3s ease-in-out infinite;
  will-change: transform;
}
.brand::before,
.brand::after {
  content: '';
  position: absolute;
  left: -14px; top: 50%;
  width: 34px; height: 34px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(56, 189, 248, .55), transparent 70%);
  filter: blur(2px);
  pointer-events: none;
  animation: logoGlow 3s ease-in-out infinite;
}
.brand::after {
  left: auto; right: -14px;
  background: radial-gradient(circle, rgba(34, 211, 238, .5), transparent 70%);
  animation-delay: 1.5s;
}
@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
@keyframes logoGlow {
  0%, 100% { opacity: .5; transform: translateY(-50%) scale(1); }
  50%      { opacity: 1;  transform: translateY(-50%) scale(1.35); }
}
.brand-text { font-weight: 800; font-size: 1.15rem; letter-spacing: 1px; text-shadow: 0 0 18px rgba(56, 189, 248, .45); }
.brand-dot { color: var(--accent); }
.nav-links { display: flex; gap: 26px; }
.nav-links a { color: var(--muted); font-size: .95rem; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--accent); }

.cart-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #06111f; border: none;
  transition: transform .15s, box-shadow .15s;
}
.cart-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(56, 189, 248, .35); }
.cart-badge {
  position: absolute; top: -7px; right: -7px;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--danger); color: #fff;
  font-size: .72rem; font-weight: 700;
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
}
.menu-btn { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 6px; }
.menu-btn span { width: 24px; height: 2px; background: var(--txt); border-radius: 2px; transition: .2s; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center; overflow: hidden; }
.hero-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 40%, rgba(56, 189, 248, .14), transparent 55%),
              radial-gradient(ellipse at 75% 65%, rgba(34, 211, 238, .10), transparent 50%),
              linear-gradient(180deg, rgba(8, 6, 15, .55), var(--bg) 96%);
}
.hero-inner { position: relative; padding: 130px 0 90px; max-width: 800px; }
.hero-badge {
  display: inline-block; font-family: var(--mono); font-size: .8rem; letter-spacing: 3px;
  color: var(--accent); border: 1px solid rgba(56, 189, 248, .4);
  padding: 6px 14px; border-radius: 999px; background: rgba(56, 189, 248, .06);
  margin-bottom: 22px;
}
.hero-title { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.25; margin-bottom: 18px; text-shadow: 0 0 34px rgba(56, 189, 248, .5), 0 0 80px rgba(56, 189, 248, .25); }
.hero-sub { color: var(--muted); font-size: 1.05rem; max-width: 620px; margin-bottom: 30px; }
.hero-sub b { color: var(--txt); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 12px; font-weight: 700; font-size: .95rem;
  border: 1px solid transparent; transition: transform .15s, box-shadow .15s, background .15s, color .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #06111f; box-shadow: 0 8px 24px rgba(56, 189, 248, .3);
}
.btn-primary:hover { box-shadow: 0 12px 32px rgba(56, 189, 248, .45); }
.btn-ghost { border-color: var(--line); color: var(--txt); background: rgba(255, 255, 255, .02); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; }

.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-family: var(--mono); font-size: 1.6rem; color: var(--accent); }
.hero-stats span { color: var(--muted); font-size: .82rem; }

/* ---------- features ---------- */
.features { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(15, 10, 28, .55); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; padding: 46px 0; }
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature-icon {
  font-size: 1.4rem; width: 50px; height: 50px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: rgba(56, 189, 248, .08); border: 1px solid rgba(56, 189, 248, .25);
  border-radius: 12px;
}
.feature h3 { font-size: 1rem; margin-bottom: 4px; }
.feature p { color: var(--muted); font-size: .86rem; }

/* ---------- sections ---------- */
section { padding: 84px 0; }
.section-pad { padding-top: 40px; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-title { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 800; text-shadow: 0 0 22px rgba(56, 189, 248, .35); }
.section-title::after {
  content: ''; display: block; width: 60px; height: 3px; margin: 12px auto 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 3px;
}
.section-sub { color: var(--muted); margin-top: 12px; font-size: .95rem; }

/* ---------- inner page head ---------- */
.page-head {
  padding: 150px 0 60px; text-align: center; position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(8, 6, 15, .55), rgba(15, 10, 28, .6) 92%);
  border-bottom: 1px solid var(--line);
}
.page-head .container { position: relative; }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; margin: 14px 0 10px; text-shadow: 0 0 26px rgba(56, 189, 248, .45); }
.page-head p { color: var(--muted); max-width: 560px; margin: 0 auto; }

/* ---------- featured CTA ---------- */
.featured-cta { text-align: center; margin-top: 38px; }
.inline-link { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(56, 189, 248, .4); }
.inline-link:hover { color: #fff; }

/* ---------- steps big ---------- */
.steps-big .step p { line-height: 1.8; }
.steps-big .step b { color: var(--txt); }

/* ---------- notes box ---------- */
.notes { padding-top: 0; }
.notes-box {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px; max-width: 860px; margin: 0 auto;
}
.notes-box h2 { font-size: 1.3rem; margin-bottom: 16px; }
.notes-box ul { list-style: none; }
.notes-box li { color: var(--muted); font-size: .92rem; padding-left: 24px; position: relative; margin-bottom: 12px; }
.notes-box li::before { content: '→'; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); }
.notes-box b { color: var(--txt); }

/* ---------- contact page ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.contact-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 26px; text-align: center;
  transition: transform .18s, border-color .18s;
}
.contact-card:hover { transform: translateY(-4px); border-color: rgba(56, 189, 248, .4); }
.contact-card-icon { font-size: 2rem; margin-bottom: 12px; }
.contact-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.contact-card p { color: var(--muted); font-size: .86rem; margin-bottom: 18px; }
.contact-card .btn { display: inline-flex; margin-bottom: 14px; }
.contact-id { font-family: var(--mono); font-size: .8rem !important; letter-spacing: 1px; color: var(--accent) !important; }
.contact-pp { font-family: var(--mono); font-size: 1.15rem; font-weight: 700; color: var(--txt); margin-bottom: 14px; }

/* ---------- filters ---------- */
.filters { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 34px; }
.filter-btn {
  padding: 9px 20px; border-radius: 999px; font-size: .88rem; font-weight: 600;
  background: var(--card); color: var(--muted); border: 1px solid var(--line);
  transition: .15s;
}
.filter-btn:hover { color: var(--accent); border-color: var(--accent); }
.filter-btn.active { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #06111f; border-color: transparent; }

/* ---------- product grid ---------- */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }
.product-card {
  background: linear-gradient(160deg, var(--card), var(--card2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; position: relative; overflow: hidden;
  transition: transform .18s, border-color .18s, box-shadow .18s;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); border-color: rgba(56, 189, 248, .5); box-shadow: var(--shadow); }
.product-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2), transparent);
  opacity: 0; transition: opacity .2s;
}
.product-card:hover::before { opacity: 1; }
.product-badge {
  position: absolute; top: 16px; right: 16px;
  font-size: .68rem; font-weight: 800; letter-spacing: 1px;
  padding: 4px 10px; border-radius: 999px; text-transform: uppercase;
}
.product-badge.popular { background: rgba(34, 211, 238, .15); color: var(--accent2); border: 1px solid rgba(34, 211, 238, .4); }
.product-badge.new { background: rgba(56, 189, 248, .12); color: var(--accent); border: 1px solid rgba(56, 189, 248, .4); }
.product-icon {
  width: 56px; height: 56px; font-size: 1.7rem;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 14px;
  margin-bottom: 16px;
}
.product-cat { font-family: var(--mono); font-size: .72rem; letter-spacing: 1.5px; color: var(--accent); text-transform: uppercase; margin-bottom: 8px; }
.product-name { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.product-desc { color: var(--muted); font-size: .86rem; flex: 1; }
.product-feats { margin: 14px 0 18px; list-style: none; }
.product-feats li {
  font-size: .8rem; color: var(--muted); padding-left: 22px; position: relative; margin-bottom: 6px;
}
.product-feats li::before {
  content: '✓'; position: absolute; left: 0; color: var(--ok);
  font-family: var(--mono); font-weight: 700;
}
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.product-price { font-family: var(--mono); font-size: 1.35rem; font-weight: 700; color: var(--accent); }
.product-price small { font-size: .8rem; color: var(--muted); margin-right: 2px; }
.add-btn {
  padding: 9px 16px; border-radius: 10px; font-size: .85rem; font-weight: 700;
  background: rgba(56, 189, 248, .1); color: var(--accent);
  border: 1px solid rgba(56, 189, 248, .35); transition: .15s;
}
.add-btn:hover { background: var(--accent); color: #06111f; }
.product-card.hide { display: none; }

/* ---------- howto steps ---------- */
.howto { background: rgba(15, 10, 28, .55); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.step { text-align: center; padding: 30px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.step-num {
  width: 46px; height: 46px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: 1.2rem;
  border-radius: 50%; color: var(--accent);
  background: rgba(56, 189, 248, .08); border: 1px solid rgba(56, 189, 248, .35);
}
.step h3 { font-size: 1rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: .84rem; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; background: none; border: none; color: var(--txt);
  font-size: .95rem; font-weight: 600; text-align: left;
}
.faq-arrow { color: var(--accent); transition: transform .2s; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-item.open .faq-a { max-height: 300px; }
.faq-a p { padding: 0 20px 18px; color: var(--muted); font-size: .88rem; }

/* ---------- contact ---------- */
.contact { padding-bottom: 40px; }
.contact-box { text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 46px 24px; }
.contact-box h2 { font-size: 1.6rem; margin-bottom: 8px; }
.contact-box p { color: var(--muted); margin-bottom: 24px; }
.contact-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- footer ---------- */
.footer { background: rgba(6, 5, 16, .92); border-top: 1px solid var(--line); padding-top: 46px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 30px; }
.footer-brand { font-weight: 800; font-size: 1.1rem; margin-bottom: 8px; }
.footer-brand span { color: var(--accent); }
.footer-txt { color: var(--muted); font-size: .84rem; line-height: 1.8; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; align-self: center; }
.footer-links a { color: var(--muted); font-size: .9rem; transition: color .15s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--line); text-align: center; padding: 16px 0; color: var(--muted); font-size: .8rem; }

/* ---------- cart drawer ---------- */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 200;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 92vw);
  background: var(--bg2); border-left: 1px solid var(--line); z-index: 201;
  transform: translateX(100%); transition: transform .3s ease;
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.cart-head h3 { font-size: 1.1rem; }
.close-btn { background: none; border: none; color: var(--muted); font-size: 1.2rem; transition: color .15s; }
.close-btn:hover { color: var(--danger); }
.cart-body { flex: 1; overflow-y: auto; padding: 16px 22px; }
.cart-empty { text-align: center; color: var(--muted); padding: 60px 0; }
.cart-empty .big { font-size: 2.6rem; display: block; margin-bottom: 12px; }
.cart-item { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ci-icon { width: 42px; height: 42px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 10px; }
.ci-info { flex: 1; min-width: 0; }
.ci-name { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-price { font-family: var(--mono); color: var(--accent); font-size: .88rem; margin-top: 2px; }
.ci-qty { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.ci-qty button { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--txt); font-size: .85rem; line-height: 1; }
.ci-qty button:hover { border-color: var(--accent); color: var(--accent); }
.ci-qty span { font-family: var(--mono); min-width: 20px; text-align: center; }
.ci-remove { background: none; border: none; color: var(--danger); font-size: .9rem; opacity: .7; }
.ci-remove:hover { opacity: 1; }
.cart-foot { padding: 20px 22px; border-top: 1px solid var(--line); }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.cart-total b { font-family: var(--mono); font-size: 1.3rem; color: var(--accent); }

/* ---------- modal / checkout ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(4, 7, 13, .82); z-index: 300;
  display: none; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(6px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 18px;
  width: min(920px, 100%); max-height: 92vh; overflow-y: auto;
  padding: 28px; position: relative; animation: pop .25s ease;
}
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(10px); } to { opacity: 1; transform: none; } }
.modal > .close-btn { position: absolute; top: 16px; right: 18px; z-index: 2; font-size: 1.3rem; }
.modal-title { font-size: 1.5rem; margin-bottom: 22px; }
.modal-title::after { content: ''; display: block; width: 50px; height: 3px; margin-top: 8px; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 3px; }

.co-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
.qr-wrap { text-align: center; }
.qr-wrap .box-title { font-family: var(--mono); color: var(--accent); letter-spacing: 2px; font-size: .8rem; margin-bottom: 14px; }
#qrBox { background: #fff; border-radius: 16px; padding: 14px; display: inline-block; box-shadow: 0 10px 34px rgba(0,0,0,.5); }
#qrBox img { display: block; width: 230px; height: 230px; image-rendering: pixelated; }
.qr-hint { color: var(--muted); font-size: .82rem; margin-top: 12px; }
.pay-qr { margin: 10px auto; padding: 8px; background: #fff; border-radius: 10px; width: fit-content; }
.pay-qr-img { display: block; width: 200px; max-width: 100%; height: auto; margin: 0 auto; }
.pp-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 4px; flex-wrap: wrap; }
.pp-number { font-family: var(--mono); font-size: 1.15rem; font-weight: 700; color: var(--txt); }
.pp-name { color: var(--muted); font-size: .78rem; letter-spacing: 1px; }
.copy-btn {
  padding: 5px 12px; font-size: .78rem; font-weight: 700; border-radius: 8px;
  background: rgba(56, 189, 248, .1); color: var(--accent); border: 1px solid rgba(56, 189, 248, .35);
  transition: .15s;
}
.copy-btn:hover { background: var(--accent); color: #06111f; }

.co-steps { display: flex; flex-direction: column; gap: 20px; }
.co-step { display: flex; gap: 16px; align-items: flex-start; }
.co-step-num {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: .95rem;
  background: rgba(56, 189, 248, .08); color: var(--accent); border: 1px solid rgba(56, 189, 248, .35);
}
.co-step-body { flex: 1; min-width: 0; }
.co-step-body h4 { font-size: .95rem; margin-bottom: 4px; }
.co-step-body p { color: var(--muted); font-size: .82rem; margin-bottom: 10px; }
.co-step-body input, .co-step-body textarea {
  width: 100%; margin-bottom: 10px; padding: 11px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  color: var(--txt); font-size: .9rem; outline: none; transition: border-color .15s;
}
.co-step-body input:focus, .co-step-body textarea:focus { border-color: var(--accent); }
.co-step-body textarea { resize: vertical; font-family: var(--mono); font-size: .8rem; line-height: 1.6; }
.co-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.co-actions .btn { padding: 10px 18px; font-size: .85rem; }
.co-note { font-size: .76rem !important; color: var(--muted); }

.co-order { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 24px; background: var(--card); }
.co-order h4 { font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.co-item { display: flex; justify-content: space-between; font-size: .86rem; padding: 6px 0; }
.co-item span:last-child { font-family: var(--mono); }
.co-total { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-weight: 700; }
.co-total b { font-family: var(--mono); color: var(--accent); font-size: 1.2rem; }

/* ---------- music button ---------- */
.music-btn {
  position: fixed; bottom: 26px; right: 26px; z-index: 150;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, .4);
  background: linear-gradient(135deg, var(--card), var(--card2));
  color: var(--accent); font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
  animation: pulseBtn 2s infinite;
}
.music-btn:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 10px 30px rgba(56, 189, 248, .3); }
.music-btn.playing { animation: none; }
@keyframes pulseBtn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, .4); }
  50% { box-shadow: 0 0 0 14px rgba(56, 189, 248, 0); }
}
.music-eq { display: none; align-items: flex-end; gap: 3px; height: 20px; }
.music-eq i { width: 4px; background: var(--accent); border-radius: 2px; animation: eq 1s ease-in-out infinite; }
.music-eq i:nth-child(2) { animation-delay: .2s; }
.music-eq i:nth-child(3) { animation-delay: .4s; }
.music-btn.playing .music-note { display: none; }
.music-btn.playing .music-eq { display: flex; }
.music-btn.playing { color: var(--accent); }
@keyframes eq { 0%, 100% { height: 5px; } 50% { height: 20px; } }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 80px);
  background: var(--card2); color: var(--txt); border: 1px solid var(--line);
  padding: 13px 22px; border-radius: 12px; font-size: .9rem; z-index: 400;
  opacity: 0; transition: transform .3s, opacity .3s; box-shadow: var(--shadow);
  max-width: 92vw; text-align: center;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.ok { border-color: var(--ok); color: var(--ok); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .nav-links {
    position: fixed; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg2);
    border-bottom: 1px solid var(--line); padding: 10px 0;
    transform: translateY(-120%); transition: transform .25s; z-index: 99;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 14px 24px; border-bottom: 1px solid rgba(30, 42, 69, .5); }
  .menu-btn { display: flex; }
  #navAuth { display: none; }
  .nav-auth-menu { display: block; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
  .nav-auth-menu-label {
    padding: 10px 24px 6px; font-size: 11px; letter-spacing: 2px;
    color: var(--muted); font-family: var(--mono);
  }
  .nav-auth-menu a, .nav-auth-menu button {
    display: block; width: 100%; text-align: left; padding: 14px 24px;
    color: var(--accent); font-weight: 600; font-size: .95rem;
    background: none; border: none; border-bottom: 1px solid rgba(30, 42, 69, .5);
    cursor: pointer; font-family: inherit; text-decoration: none;
  }
  .nav-auth-menu a:hover, .nav-auth-menu button:hover { color: var(--accent2); }
  .co-wrap { grid-template-columns: 1fr; }
  #qrBox img { width: 200px; height: 200px; }
  .hero-stats { gap: 22px; }
}

/* ---------- auth pages ---------- */
.nav-auth { display: inline-flex; margin-right: 10px; }
.nav-auth a { color: var(--cyan); font-weight: 600; font-size: 14px; text-decoration: none; }
.nav-auth a:hover { text-shadow: 0 0 12px var(--cyan); }
.nav-auth-menu { display: none; }

.auth-box { max-width: 460px; margin: 0 auto; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 32px; }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-step-title { font-size: 18px; margin-bottom: 4px; text-align: center; }
.auth-alt { text-align: center; color: var(--muted); font-size: 14px; margin-top: 6px; }
.inline-link { color: var(--cyan); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 13px; color: var(--muted); }
.field input { padding: 12px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-family: inherit; font-size: 15px; }
.field input:focus { outline: none; border-color: var(--cyan); }

.otp-desc { text-align: center; color: var(--muted); font-size: 14px; }
.otp-dev { border: 1px dashed var(--cyan); border-radius: 10px; padding: 14px; text-align: center; color: var(--muted); font-size: 13px; }
.otp-dev-code { font-family: var(--mono); font-size: 30px; letter-spacing: 6px; color: var(--cyan); margin-top: 4px; }

/* ---------- captcha (ยืนยันว่าเป็นมนุษย์) ---------- */
.captcha-row { display: flex; align-items: center; gap: 12px; }
.captcha-q {
  font-family: var(--mono); font-size: 20px; letter-spacing: 2px;
  color: var(--accent); background: rgba(56, 189, 248, .08);
  border: 1px solid rgba(56, 189, 248, .35); border-radius: 8px;
  padding: 10px 16px; white-space: nowrap;
}
.captcha-op { color: var(--muted); font-weight: 700; }
.captcha-row input { flex: 1; min-width: 0; }

/* ---------- account / admin ---------- */
.acct-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px 24px; }
.acct-name { font-size: 20px; font-weight: 700; }
.acct-phone { color: var(--muted); font-size: 14px; margin-top: 2px; }
.acct-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.order-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; margin-bottom: 14px; }
.o-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.o-no { font-family: var(--mono); color: var(--cyan); font-size: 15px; }
.badge { padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.st-pending { background: rgba(251,191,36,.12); color: #22d3ee; }
.st-paid { background: rgba(52,211,153,.12); color: #34d399; }
.st-fail { background: rgba(251,113,133,.12); color: #fb7185; }
.st-shipped { background: rgba(96,165,250,.12); color: #60a5fa; }
.st-cancelled { background: rgba(248,113,113,.12); color: #f87171; }
.o-date { color: var(--muted); font-size: 12px; margin: 4px 0 12px; }
.o-items { display: flex; flex-direction: column; gap: 6px; }
.o-item, .ai { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.o-meta { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.o-total { text-align: right; font-weight: 700; margin-top: 10px; font-size: 16px; }
.o-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.empty-note { color: var(--muted); text-align: center; padding: 30px 0; }
.mono { font-family: var(--mono); }

/* ---------- wallet / topup ---------- */
.wallet-card { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; margin-top: 28px; }
.wallet-bal {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(56, 189, 248, .25), rgba(34, 211, 238, .12));
  border: 1px solid rgba(56, 189, 248, .55);
  border-radius: 18px; padding: 34px 26px; text-align: center;
  box-shadow: 0 10px 40px rgba(56, 189, 248, .25);
}
.wallet-bal::before {
  content: ''; position: absolute; top: -60px; right: -60px; width: 180px; height: 180px;
  border-radius: 50%; background: radial-gradient(circle, rgba(34, 211, 238, .28), transparent 70%);
}
.wallet-label { color: var(--muted); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; }
.wallet-amount { font-size: 2.6rem; font-weight: 800; margin: 10px 0 6px; color: var(--txt); text-shadow: 0 0 28px rgba(34, 211, 238, .4); }
.wallet-hint { color: var(--muted); font-size: 12px; }
.wallet-topup { min-width: 0; }
.wallet-history { margin-top: 8px; }
.topup-presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 10px; margin-bottom: 14px; }
.preset {
  padding: 14px 10px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card2); color: var(--txt); cursor: pointer; font-weight: 700;
  transition: .2s; font-size: 15px;
}
.preset:hover, .preset.active { border-color: var(--accent); box-shadow: 0 0 16px rgba(56, 189, 248, .35); transform: translateY(-2px); }
.topup-form { display: flex; gap: 10px; flex-wrap: wrap; }
.topup-form input {
  flex: 1; min-width: 180px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg2); color: var(--txt); font-size: 15px;
}
.topup-form input:focus { outline: none; border-color: var(--accent); }

/* topup result (หลังสร้างคำสั่ง) */
.topup-result { margin-top: 20px; border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: rgba(56, 189, 248, .05); }
.tu-success { text-align: center; padding-bottom: 18px; border-bottom: 1px dashed var(--line); }
.tu-label { color: var(--accent2); font-weight: 700; letter-spacing: 1px; font-size: .85rem; }
.tu-big { font-size: 3rem; font-weight: 800; margin: 6px 0 4px; color: var(--txt); text-shadow: 0 0 30px rgba(34, 211, 238, .35); }
.tu-ref { color: var(--muted); font-size: 13px; }
.tu-steps { display: flex; flex-direction: column; gap: 14px; margin: 18px 0; text-align: left; }
.tu-step { display: flex; gap: 12px; align-items: flex-start; }
.tu-step-num {
  flex: 0 0 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #06111f; font-weight: 800; font-size: 14px;
}
.tu-step-body h4 { font-size: 14px; margin: 0 0 2px; }
.tu-step-body p { color: var(--muted); font-size: 12.5px; margin: 0; }
.pay-title { text-align: center; color: var(--muted); font-size: 13px; letter-spacing: 1px; margin-bottom: 12px; }
.pay-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.pay-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 14px; text-align: center;
  background: var(--card2); transition: .2s;
}
.pay-card:hover { border-color: var(--accent); box-shadow: 0 0 16px rgba(56, 189, 248, .2); }
.pay-name { color: var(--muted); font-size: 12.5px; margin-bottom: 2px; }
.pay-logo { height: 30px; max-width: 120px; object-fit: contain; margin-bottom: 10px; }
.pay-holder { color: var(--muted); font-size: 12px; margin-top: 6px; }

/* ---------- slip upload ---------- */
.slip-box {
  margin-top: 16px; border: 1px solid var(--line); border-radius: 14px; padding: 18px;
  text-align: center; background: rgba(15,10,28,.5);
}
.slip-box .box-title { font-family: var(--mono); color: var(--accent2); letter-spacing: 2px; font-size: .8rem; margin-bottom: 8px; }
.file-btn {
  display: inline-block; margin-top: 6px; padding: 11px 22px; border-radius: 10px; cursor: pointer;
  border: 1px dashed var(--accent); color: var(--accent); font-size: .9rem;
}
.file-btn:hover { background: rgba(56, 189, 248, .1); }
.slip-preview { margin-top: 12px; }
.slip-preview img { max-height: 260px; max-width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.slip-box #slipVerifyBtn { margin-top: 14px; width: 100%; }
#slipStatus { margin-top: 12px; font-size: .85rem; }
#slipStatus .slip-checking { color: var(--muted); }
#slipStatus .slip-ok { color: var(--accent2); font-weight: 600; }
#slipStatus .slip-fail { color: #fb7185; }

/* ---------- checkout points box ---------- */
.co-points {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  background: rgba(255,255,255,.03);
}
.co-points.ok { border-color: rgba(52,211,153,.5); box-shadow: 0 0 16px rgba(52,211,153,.12); }
.co-points-bal { color: var(--muted); font-size: .85rem; }
.co-points-bal b { color: var(--accent2); font-size: 1.05rem; }
.co-points-hint { flex-basis: 100%; color: var(--muted); font-size: .75rem; }
.co-points-actions .btn { padding: 10px 18px; font-size: .85rem; }

@media (max-width: 720px) {
  .wallet-card { grid-template-columns: 1fr; }
}

/* ---------- trust bar ---------- */
.trust-bar { border-bottom: 1px solid var(--line); background: rgba(15, 10, 28, .6); }
.trust-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; padding: 20px 0; }
.trust-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 12px; }
.trust-item > span { font-size: 24px; filter: drop-shadow(0 0 8px rgba(34, 211, 238, .5)); }
.trust-item b { display: block; font-size: 14px; }
.trust-item small { color: var(--muted); font-size: 12px; }

/* ---------- reviews ---------- */
.reviews { padding: 70px 0 90px; }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 30px; }
.review {
  background: linear-gradient(160deg, var(--card), var(--card2));
  border: 1px solid var(--line); border-radius: 14px; padding: 20px;
  position: relative; overflow: hidden;
}
.review::before {
  content: '”'; position: absolute; top: -12px; right: 12px;
  font-size: 90px; line-height: 1; color: rgba(56, 189, 248, .18);
  font-family: serif;
}
.review-stars { color: var(--accent2); font-size: 15px; letter-spacing: 3px; margin-bottom: 8px; text-shadow: 0 0 10px rgba(34, 211, 238, .6); }
.review p { font-size: 14px; color: var(--txt); margin-bottom: 12px; line-height: 1.65; }
.review-by { color: var(--muted); font-size: 13px; }
.review-by b { color: var(--accent); }

/* ---------- welcome modal ---------- */
.welcome-overlay {
  position: fixed; inset: 0; z-index: 950;
  background: rgba(5, 3, 12, .78); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .4s ease;
}
.welcome-overlay.open { opacity: 1; pointer-events: auto; }
.welcome-box {
  position: relative; width: 100%; max-width: 440px;
  background: linear-gradient(160deg, #0a1422, #081226);
  border: 1px solid rgba(56, 189, 248, .4);
  border-radius: 20px; padding: 34px 30px 28px; text-align: center;
  box-shadow: 0 0 60px rgba(56, 189, 248, .28), 0 24px 60px rgba(0,0,0,.6);
  transform: translateY(18px) scale(.96); transition: transform .4s ease;
}
.welcome-overlay.open .welcome-box { transform: translateY(0) scale(1); }
.welcome-close {
  position: absolute; top: 10px; right: 14px;
  background: none; border: none; color: var(--muted); font-size: 20px; padding: 6px;
}
.welcome-close:hover { color: var(--txt); }
.welcome-star { font-size: 46px; line-height: 1; filter: drop-shadow(0 0 16px rgba(255, 226, 138, .95)); animation: welcomePulse 1.6s ease-in-out infinite; }
@keyframes welcomePulse { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.18) rotate(18deg); } }
.welcome-box h2 { font-size: 25px; font-weight: 800; margin: 12px 0 4px; }
.welcome-box h2 span { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.welcome-tag { color: var(--accent2); font-family: var(--mono); font-size: 11px; letter-spacing: 3px; margin-bottom: 6px; }
.welcome-sub { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.welcome-pts { list-style: none; margin: 0 0 22px; display: flex; flex-direction: column; gap: 9px; }
.welcome-pts li {
  display: flex; align-items: center; gap: 10px; text-align: left;
  color: var(--txt); font-size: 14px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
.welcome-pts li b { color: var(--accent2); }
