/* ============================================================================
   digimium — brand design system
   Colours sampled from the official logo gradient (#1A43BD → #051650).
   Type: Gunken for the wordmark, the native system sans for English,
   Walone for Burmese.
   ========================================================================== */

@font-face {
  font-family: "Gunken";
  src: url("/fonts/Gunken.otf") format("opentype");
  font-display: swap;
}
/* The system sans has no Myanmar glyphs, so Walone catches Burmese text. */
@font-face {
  font-family: "Walone";
  src: url("/fonts/Z06-Walone Regular.ttf") format("truetype");
  font-weight: 300 400;
  font-display: swap;
}
@font-face {
  font-family: "Walone";
  src: url("/fonts/Z06-Walone Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  /* Brand constants — identical in both themes */
  --blue: #1a43bd;
  --navy: #051650;
  --gradient: linear-gradient(135deg, #1a43bd 0%, #051650 100%);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Walone", sans-serif;
  --font-brand: "Gunken", var(--font);

  /* Light theme */
  --page: #ffffff;
  --card: #ffffff;
  --surface: #f6f8fd;
  --surface-2: #eef2fb;
  --tile: #eef2fb;
  --line: #e3e9f6;
  --line-strong: #cfd8ee;
  --ink: #051650;
  --ink-soft: #5c6a8c;
  --ink-faint: #8a95af;
  --band: #051650;
  /* Buttons are a flat colour: a gradient on a small control reads as two
     tones, as if the surface behind it were showing through. */
  --action: #1a43bd;
  --action-hover: #16389f;
  --on-blue: rgba(255, 255, 255, .78);
  --danger: #c8323f;
  --shadow-sm: 0 2px 8px rgba(5, 22, 80, .06);
  --shadow-md: 0 10px 30px rgba(5, 22, 80, .1);
  --shadow-lg: 0 24px 70px rgba(5, 22, 80, .18);
  --scheme: light;
}

/* The theme is stamped on <html> before paint, so one dark block is enough. */
:root[data-theme="dark"] {
  --blue: #7d9bff;
  --page: #0a0d15;
  --card: #12161f;
  --surface: #0e121b;
  --surface-2: #1a1f2b;
  /* Product art is brand logos, some of them black, so the tile stays light
     in dark mode too — otherwise a dark logo disappears into the card. */
  --tile: #eceff5;
  --line: #222735;
  --line-strong: #333a4b;
  --ink: #e7eaf1;
  --ink-soft: #9aa2b4;
  --ink-faint: #6d7587;
  --band: #0e121b;
  --action: #3358de;
  --action-hover: #4568ea;
  --danger: #ff8089;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .5);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .55);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .7);
  --scheme: dark;
}

* { box-sizing: border-box; }

/* Elements below set `display`, which would otherwise beat the `hidden` attribute. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; color-scheme: var(--scheme); }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s, color .2s;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.wrap { width: min(1160px, 100% - 44px); margin-inline: auto; }

.icon { width: 20px; height: 20px; flex-shrink: 0; }
.icon-sm { width: 16px; height: 16px; flex-shrink: 0; }

/* Logo lockups swap with the theme so the mark always has contrast. */
.mark-dark { display: none; }
:root[data-theme="dark"] .mark-light { display: none; }
:root[data-theme="dark"] .mark-dark { display: block; }

.wordmark {
  font-family: var(--font-brand);
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1;
}
.wordmark .dot { color: var(--blue); }

/* ----------------------------------------------------------- announcement */

.announcement {
  background: var(--band);
  color: rgba(255, 255, 255, .86);
  font-size: 12.5px;
  letter-spacing: .02em;
  text-align: center;
  padding: 9px 20px;
}

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner { display: flex; align-items: center; gap: 22px; height: 74px; }

.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.brand img { width: 32px; height: 32px; }
.brand .wordmark { font-size: 25px; }

.nav { display: flex; gap: 26px; font-size: 14.5px; color: var(--ink-soft); }
.nav a { transition: color .15s; }
.nav a:hover { color: var(--blue); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.round-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .2s;
}
.round-btn:hover { border-color: var(--blue); box-shadow: var(--shadow-sm); }

.cart-count {
  position: absolute;
  top: -7px; right: -7px;
  min-width: 21px; height: 21px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--action);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

/* The button shows the theme it will switch *to*, so it reads as an action. */
.theme-btn .icon-sun { display: none; }
:root[data-theme="dark"] .theme-btn .icon-moon { display: none; }
:root[data-theme="dark"] .theme-btn .icon-sun { display: block; }

/* -------------------------------------------------------------------- hero */

.hero {
  background: var(--gradient);
  color: #fff;
  padding: 104px 0 108px;
  text-align: center;
}
.hero-inner { max-width: 760px; margin-inline: auto; }
.hero-logo { width: 84px; margin: 0 auto 26px; }

.hero h1 {
  margin: 0 0 18px;
  font-family: var(--font-brand);
  font-size: clamp(46px, 8vw, 76px);
  line-height: 1;
  color: #fff;
}

.hero-sub {
  margin: 0 auto 34px;
  max-width: 560px;
  font-weight: 300;
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.55;
  color: var(--on-blue);
}

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .16s, border-color .16s, color .16s, box-shadow .16s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary { background: var(--action); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--action-hover); }

.btn-outline { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

.btn-on-blue { background: #fff; color: var(--navy); }
.btn-on-blue:hover { background: rgba(255, 255, 255, .9); }

.btn-ghost-blue { background: transparent; border-color: rgba(255, 255, 255, .38); color: #fff; }
.btn-ghost-blue:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

.btn-block { width: 100%; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

/* --------------------------------------------------------------- promotion */

.promo {
  padding: 56px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.promo-head {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.promo-copy { min-width: 0; }
.promo-head .btn { margin-left: auto; }

.promo-tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--action);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.promo-copy h2 {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.promo-copy p {
  margin: 8px 0 0;
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Cards in the promo row sit on the tinted band, so they need their own edge. */
.promo .card { background: var(--card); border-color: var(--line-strong); }

/* Doubled class: the plain .badge rule is defined later in this file. */
.badge.badge-sale { left: auto; right: 12px; background: var(--danger); }

/* Stacked, not inline — two prices side by side overflow a narrow card. */
.price s {
  display: block;
  margin-bottom: 1px;
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 400;
  text-decoration-thickness: 1px;
}

/* ---------------------------------------------------------------- sections */

.section { padding: 84px 0; }

.section-head { display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 34px; }
.section-head h2 {
  margin: 0;
  font-weight: 300;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.1;
  letter-spacing: -.01em;
}

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.chip {
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: .15s;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--band); border-color: var(--band); color: #fff; }

/* ------------------------------------------------------------------- cards */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 22px; }

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .2s, background .2s;
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Product art is usually a brand logo, so letterbox it instead of cropping. */
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: var(--tile);
  overflow: hidden;
}
.card-media img.photo { max-width: 46%; max-height: 62%; width: auto; height: auto; object-fit: contain; }
.card-media .mark { width: 46px; opacity: .16; }

.badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--band);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.card-body { padding: 18px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card-cat { color: var(--ink-faint); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.card-title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.card-desc {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-select, .detail-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
}
.card-select:focus-visible, .detail-select:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }

.card-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 12px; }
.price { font-size: 18px; font-weight: 700; white-space: nowrap; letter-spacing: -.01em; }
.card-foot .btn { margin-left: auto; padding: 10px 18px; min-width: 88px; }

.sold-out { margin-left: auto; color: var(--danger); font-size: 12.5px; font-weight: 700; }

.empty { text-align: center; color: var(--ink-soft); padding: 56px 0; }

/* ----------------------------------------------------------------- contact */

.contact { background: var(--surface); border-top: 1px solid var(--line); }
.contact-lead { margin: -20px 0 30px; color: var(--ink-soft); max-width: 480px; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.contact-card:hover { border-color: var(--blue); box-shadow: var(--shadow-md); transform: translateY(-2px); }

.contact-icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--action);
  color: #fff;
  flex-shrink: 0;
}
.contact-meta { display: flex; flex-direction: column; min-width: 0; }
.contact-meta strong { font-size: 14.5px; font-weight: 700; }
.contact-meta span { color: var(--ink-soft); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------------ footer */

.site-footer { background: var(--band); color: rgba(255, 255, 255, .58); padding: 18px 0; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; color: #fff; }
.footer-brand img { width: 18px; height: 18px; }
.footer-brand .wordmark { font-size: 15px; }
.footer-brand .dot { color: #fff; }

/* ------------------------------------------------------------------ drawer */

.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(5, 22, 80, .42); }
:root[data-theme="dark"] .overlay { background: rgba(0, 0, 0, .62); }

.drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100dvh;
  width: min(430px, 100%);
  background: var(--page);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  z-index: 60;
  display: flex;
  flex-direction: column;
  animation: slide-in .24s cubic-bezier(.2, .8, .3, 1);
}
@keyframes slide-in { from { transform: translateX(100%); } }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h3 { margin: 0; font-size: 17px; font-weight: 700; }

.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 12px; }

.cart-item { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.cart-thumb {
  width: 54px; height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--tile);
  overflow: hidden;
  flex-shrink: 0;
}
.cart-thumb img.photo { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.cart-thumb .mark { width: 24px; opacity: .28; }

.cart-info { flex: 1; min-width: 0; }
.cart-info strong { display: block; font-size: 14px; font-weight: 700; }
.cart-info span { color: var(--ink-soft); font-size: 12.5px; }

.qty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
}
.qty button {
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.qty button:hover { background: var(--surface-2); }
.qty span { min-width: 22px; text-align: center; font-size: 13px; font-weight: 700; }

.cart-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.cart-right strong { font-size: 14px; font-weight: 700; white-space: nowrap; }
.remove { border: 0; background: none; color: var(--ink-faint); font-family: inherit; font-size: 12.5px; cursor: pointer; padding: 0; }
.remove:hover { color: var(--danger); }

.drawer-foot { padding: 18px 22px 24px; border-top: 1px solid var(--line); background: var(--surface); }
.total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; color: var(--ink-soft); font-size: 13.5px; }
.total-row strong { font-size: 22px; font-weight: 700; color: var(--ink); }

.checkout-form { display: flex; flex-direction: column; gap: 10px; }

input[type="text"], textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent);
}
::placeholder { color: var(--ink-faint); }

.hint { margin: 12px 0 0; color: var(--ink-faint); font-size: 12px; text-align: center; line-height: 1.5; }

/* ------------------------------------------------------------------- modal */

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(5, 22, 80, .46);
}
:root[data-theme="dark"] .modal { background: rgba(0, 0, 0, .66); }

.modal-card {
  position: relative;
  width: min(500px, 100%);
  max-height: 88dvh;
  overflow-y: auto;
  background: var(--page);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-lg);
}
.modal-close { position: absolute; top: 14px; right: 14px; }

.modal-icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  margin-bottom: 16px;
  border-radius: var(--radius-pill);
  background: var(--action);
  color: #fff;
}
.modal-card h3 { margin: 0 0 4px; font-size: 21px; font-weight: 700; }
.modal-sub { margin: 0 0 18px; color: var(--ink-soft); font-size: 13.5px; }

.order-preview {
  margin: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 230px;
  overflow-y: auto;
}

.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }

/* ----------------------------------------------------------- product detail */

/* `overflow: hidden` here would beat the modal's own overflow-y and kill scrolling. */
.detail-card { width: min(560px, 100%); padding: 0; overflow-y: auto; }

.detail-media {
  position: relative;
  height: 180px;
  display: grid;
  place-items: center;
  background: var(--tile);
}
/* Capped rather than stretched, so a square logo does not dominate the card. */
.detail-media img.photo { max-height: 108px; max-width: 52%; width: auto; height: auto; object-fit: contain; }
.detail-media .mark { width: 56px; opacity: .18; }

.detail-body { padding: 26px 30px 30px; }
.detail-cat { color: var(--ink-faint); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.detail-body h3 { margin: 6px 0 14px; font-size: 24px; font-weight: 700; line-height: 1.2; }
.detail-desc {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.detail-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.detail-options > span { font-size: 12px; font-weight: 700; color: var(--ink-soft); }

.detail-foot { display: flex; align-items: center; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.detail-price { font-size: 26px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.detail-foot .btn { margin-left: auto; }
.detail-stock { color: var(--ink-faint); font-size: 12px; margin-top: 4px; }

.detail-card .modal-close {
  background: color-mix(in srgb, var(--page) 78%, transparent);
  backdrop-filter: blur(6px);
}

/* ------------------------------------------------------------------- toast */

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  background: var(--band);
  color: #fff;
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  animation: rise .2s ease;
}
@keyframes rise { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ------------------------------------------------------------- small screens */

@media (max-width: 700px) {
  .wrap { width: min(1160px, 100% - 32px); }
  .nav { display: none; }
  .header-inner { height: 64px; gap: 12px; }
  .brand img { width: 28px; height: 28px; }
  .brand .wordmark { font-size: 22px; }
  .round-btn { width: 40px; height: 40px; }
  .hero { padding: 68px 0 74px; }
  .hero-logo { width: 66px; margin-bottom: 20px; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 24px; }
  .filters { margin-left: 0; }
  .promo { padding: 40px 0; }
  .promo-head { margin-bottom: 20px; }
  .promo-head .btn { margin-left: 0; width: 100%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; }
  .card-body { padding: 14px; }
  /* Plan names are free text and can be long, so buy back a little room. */
  .card-select { font-size: 12.5px; padding: 9px 10px; }
  /* Narrow cards cannot fit price and button side by side. */
  .card-foot { flex-wrap: wrap; gap: 10px; }
  .card-foot .btn { margin-left: 0; width: 100%; }
  .price { font-size: 16px; }
  .detail-body { padding: 22px 22px 26px; }
  .detail-foot { flex-wrap: wrap; gap: 12px; }
  .detail-foot .btn { margin-left: 0; width: 100%; }
  .footer-inner { justify-content: center; text-align: center; gap: 8px; }
}
