:root {
  --primary: #5b3df5;
  --primary-600: #4a2be0;
  --primary-50: #f0edff;
  --accent: #ff7a1a;
  --bg: #f4f5fb;
  --card: #ffffff;
  --text: #171a2c;
  --muted: #6b7088;
  --line: #e6e8f2;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 22, 50, .05), 0 6px 20px rgba(20, 22, 50, .06);
  --green: #12a150; --amber: #d97706; --blue: #2563eb; --red: #dc2626; --gray: #6b7280;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, "Noto Sans Myanmar", sans-serif;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 720px; padding-top: 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.accent { color: var(--accent); }
.req { color: var(--red); font-style: normal; }
.pre { white-space: pre-wrap; word-break: break-word; }

/* header */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 20px; }
.brand:hover { text-decoration: none; }
.brand img { height: 36px; width: auto; border-radius: 8px; }
.brand-mark {
  min-width: 36px; padding: 0 4px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 15px;
  background: linear-gradient(135deg, var(--primary), #a855f7); letter-spacing: .5px;
}
.search { flex: 1; max-width: 520px; position: relative; margin-left: auto; }
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: var(--muted); }
.search input {
  width: 100%; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg);
  padding: 0 16px 0 42px; font: inherit; outline: none;
}
.search input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--primary-50); }
.topnav { display: flex; gap: 6px; }
.topnav a { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; color: var(--text); font-weight: 600; font-size: 14px; }
.topnav a:hover, .topnav a.active { background: var(--primary-50); color: var(--primary); text-decoration: none; }
.topnav svg { width: 18px; height: 18px; fill: currentColor; }
.announce { background: linear-gradient(90deg, #1f1b4d, #3b2a8f); color: #e7e4ff; font-size: 13px; }
.announce .container { padding-top: 8px; padding-bottom: 8px; display: flex; gap: 10px; align-items: center; }
.announce-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; flex: none; box-shadow: 0 0 0 3px rgba(74, 222, 128, .25); }

/* home */
.carousel { position: relative; margin-top: 20px; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); background: #ddd; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 3 / 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.carousel-dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; padding: 0; background: rgba(255,255,255,.55); cursor: pointer; transition: width .2s; }
.carousel-dots button.on { width: 22px; background: #fff; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 6px; }
.feature { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.feature .fi { font-size: 22px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--primary-50); flex: none; }
.feature b { display: block; font-size: 14px; }
.feature small { color: var(--muted); font-size: 12px; }
.section-title { font-size: 20px; margin: 28px 0 14px; display: flex; align-items: center; gap: 8px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; margin-top: 18px; scrollbar-width: none; }
.chip { flex: none; padding: 7px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: 14px; }
.chip:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.pcard { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--text); transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; }
.pcard:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(40, 30, 120, .14); text-decoration: none; }
.pcard-img { position: relative; aspect-ratio: 1; background: var(--primary-50); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; }
.tag-hot { position: absolute; top: 8px; left: 8px; background: linear-gradient(135deg, #ff5f1f, #ff2d55); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 6px; letter-spacing: .5px; }
.pcard-body { padding: 10px 12px 12px; }
.pcard-name { font-weight: 700; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-pub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.pcard-price { font-size: 12px; color: var(--muted); margin-top: 6px; }
.pcard-price b { color: var(--accent); font-size: 14px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* cards & forms */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.card h2 { font-size: 17px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-weight: 600; font-size: 14px; }
.field input, .field select, .field textarea {
  font: inherit; font-weight: 400; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; outline: none; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.field-row { display: grid; gap: 0 14px; }
.field-row.cols-2 { grid-template-columns: 1fr 1fr; }
.stack { display: flex; flex-direction: column; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none !important;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: linear-gradient(135deg, var(--primary), #8b5cf6); color: #fff; border: 0; box-shadow: 0 6px 16px rgba(91, 61, 245, .3); }
.btn-primary:hover { color: #fff; filter: brightness(1.06); }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.btn-block { width: 100%; padding: 14px; font-size: 16px; }
.alert { padding: 14px 16px; border-radius: 12px; margin: 16px 0; font-size: 14px; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #ecfdf3; color: #065f46; border: 1px solid #a7f3d0; }
.alert-info { background: var(--primary-50); color: #3b2a8f; border: 1px solid #ddd6fe; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { text-align: right; word-break: break-word; }
.kv.total { font-size: 16px; border-bottom: 0; padding-top: 12px; }
.kv.total b { color: var(--accent); font-size: 20px; }
.copy { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 2px 10px; font-size: 12px; cursor: pointer; color: var(--primary); font-weight: 600; margin-left: 8px; }
.copy.done { color: var(--green); border-color: var(--green); }

/* product page */
.phero { position: relative; overflow: hidden; color: #fff; background: #1f1b4d; }
.phero-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(40px) saturate(1.3) brightness(.55); transform: scale(1.1); }
.phero-inner { position: relative; display: flex; gap: 22px; align-items: center; padding-top: 28px; padding-bottom: 28px; }
.phero-img { width: 112px; height: 112px; border-radius: 22px; object-fit: cover; box-shadow: 0 10px 30px rgba(0,0,0,.35); border: 3px solid rgba(255,255,255,.25); }
.phero h1 { font-size: 28px; margin: 4px 0 2px; }
.phero-pub { opacity: .8; font-size: 14px; }
.crumbs { font-size: 13px; opacity: .8; }
.crumbs a { color: #fff; }
.phero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.phero-badges span { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); padding: 4px 10px; border-radius: 999px; font-size: 12px; }
.buy-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; margin-top: 20px; align-items: start; }
.buy-side { position: sticky; top: 84px; }
.step h2 { display: flex; align-items: center; gap: 10px; }
.step-no { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 13px; flex: none; }
.howto summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: 14px; }
.howto p { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pkg, .pay { position: relative; cursor: pointer; }
.pkg input, .pay input { position: absolute; opacity: 0; pointer-events: none; }
.pkg-box {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 12px 12px; border-radius: 12px; border: 2px solid var(--line);
  background: #fff; min-height: 88px; transition: border-color .15s, background .15s; position: relative;
}
.pkg:hover .pkg-box, .pay:hover .pay-box { border-color: #c4b8ff; }
.pkg input:checked + .pkg-box, .pay input:checked + .pay-box { border-color: var(--primary); background: var(--primary-50); }
.pkg input:checked + .pkg-box::after, .pay input:checked + .pay-box::after {
  content: "✓"; position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; background: var(--primary); color: #fff;
  border-radius: 10px 0 10px 0; font-size: 12px; display: grid; place-items: center; font-weight: 800;
}
.pkg input:focus-visible + .pkg-box, .pay input:focus-visible + .pay-box { outline: 3px solid #c4b8ff; }
.pkg-name { font-weight: 700; font-size: 14px; }
.pkg-price { color: var(--accent); font-weight: 800; font-size: 16px; margin-top: auto; }
.pkg-old { font-size: 12px; color: var(--muted); }
.pkg-badge { position: absolute; top: -9px; right: 8px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; padding: 1px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .3px; }
.pay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.pay-box { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; border: 2px solid var(--line); border-radius: 12px; font-weight: 600; font-size: 14px; position: relative; background: #fff; }
.pay-box img { height: 36px; width: auto; border-radius: 6px; }
.pay-fallback { width: 48px; height: 36px; display: grid; place-items: center; background: var(--primary-50); border-radius: 8px; color: var(--primary); }
.pay-detail { margin-top: 14px; display: flex; gap: 18px; align-items: flex-start; padding: 16px; background: #fafaff; border: 1px solid #e3defe; border-radius: 12px; }
.pay-detail[hidden] { display: none; }
.pay-detail-info { flex: 1; min-width: 0; }
.pay-detail h3 { font-size: 15px; }
.qr { width: 150px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload { position: relative; }
.upload-box {
  border: 2px dashed #cfc7ff; border-radius: 12px; background: #fbfaff; min-height: 214px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; text-align: center; color: var(--muted); font-weight: 500; cursor: pointer; padding: 12px; overflow: hidden;
}
.upload-box svg { width: 34px; height: 34px; fill: #a99bff; }
.upload-box img { max-height: 190px; border-radius: 8px; }
.upload input:focus-visible + .upload-box { outline: 3px solid #c4b8ff; }
.summary h2 { margin-bottom: 8px; }
.summary .btn { margin-top: 14px; }
.mobile-bar { display: none; }
.about p { color: var(--muted); margin: 0; }

/* order page */
.order-head-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.order-code { font-size: 22px; font-weight: 800; letter-spacing: .5px; display: flex; align-items: center; }
.status { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.status-amber { background: #fff7e6; color: var(--amber); }
.status-blue { background: #eaf1ff; color: var(--blue); }
.status-green { background: #e7f8ef; color: var(--green); }
.status-red { background: #fdecec; color: var(--red); }
.status-gray { background: #f1f2f5; color: var(--gray); }
.timeline { list-style: none; padding: 0; margin: 22px 0 10px; display: flex; }
.timeline li { flex: 1; position: relative; text-align: center; font-size: 13px; color: var(--muted); padding-top: 26px; }
.timeline li span { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 18px; height: 18px; border-radius: 50%; background: #e2e4ee; z-index: 1; }
.timeline li::before { content: ""; position: absolute; top: 8px; left: -50%; width: 100%; height: 3px; background: #e2e4ee; }
.timeline li:first-child::before { display: none; }
.timeline li.done { color: var(--text); font-weight: 600; }
.timeline li.done span, .timeline li.done::before { background: var(--green); }
.timeline li.current span { background: #fff; border: 3px solid var(--amber); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(217, 119, 6, .15); } }
.seller-msg { border-left: 4px solid var(--primary); }
.order-product { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.order-product img { width: 52px; height: 52px; border-radius: 12px; }
.order-product > div { flex: 1; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { display: flex; gap: 8px; justify-content: space-between; padding: 6px 0; font-size: 14px; flex-wrap: wrap; }
.actions-row { display: flex; gap: 10px; justify-content: center; margin: 8px 0 16px; }
.order-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.order-row { display: flex; justify-content: space-between; gap: 12px; color: var(--text); margin: 0; }
.order-row:hover { text-decoration: none; box-shadow: 0 10px 30px rgba(40, 30, 120, .12); }
.order-row .right { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.track h1 { font-size: 24px; }
.message-card { padding: 40px 20px; }

/* footer */
.footer { margin-top: 48px; background: #fff; border-top: 1px solid var(--line); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; padding-top: 32px; padding-bottom: 24px; }
.footer h4 { margin: 4px 0 10px; font-size: 14px; }
.footer-grid a, .footer-grid span { display: block; color: var(--muted); margin-bottom: 6px; }
.footer-brand { margin-bottom: 8px; }
.footer-brand span.brand-name { color: var(--text); margin: 0; display: inline; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

/* responsive */
@media (max-width: 900px) {
  .buy-layout { grid-template-columns: 1fr; }
  .buy-side { display: none; }
  .mobile-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); align-items: center; justify-content: space-between; gap: 12px;
    box-shadow: 0 -6px 20px rgba(20, 22, 50, .08);
  }
  .mobile-bar small { display: block; color: var(--muted); font-size: 12px; }
  .mobile-bar b { color: var(--accent); font-size: 18px; }
  .mobile-bar .btn { padding: 12px 28px; }
  body:has(.mobile-bar) .footer { padding-bottom: 76px; }
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .topbar-inner { gap: 10px; height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .topnav { margin-left: auto; }
  .topnav span { display: none; }
  .topnav a { padding: 8px; }
  .carousel { border-radius: 14px; margin-top: 14px; }
  .pgrid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .pcard-body { padding: 8px; }
  .pcard-name { font-size: 12.5px; }
  .pcard-pub { display: none; }
  .pcard-price { font-size: 11px; }
  .pcard-price b { font-size: 12px; }
  .features { gap: 8px; }
  .feature { padding: 10px; gap: 8px; }
  .feature .fi { width: 34px; height: 34px; font-size: 18px; }
  .phero-inner { gap: 14px; padding-top: 20px; padding-bottom: 20px; }
  .phero-img { width: 76px; height: 76px; border-radius: 16px; }
  .phero h1 { font-size: 21px; }
  .card { padding: 16px; }
  .field-row.cols-2 { grid-template-columns: 1fr; }
  .pkg-grid { grid-template-columns: repeat(2, 1fr); }
  .pay-grid { grid-template-columns: repeat(2, 1fr); }
  .pay-detail { flex-direction: column-reverse; align-items: center; }
  .pay-detail-info { width: 100%; }
  .upload-box { min-height: 150px; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .pgrid { grid-template-columns: repeat(2, 1fr); }
}
