:root{
  --bg: #ffffff;
  --bg-soft: #f2f1f7;
  --surface: #ffffff;
  --text: #191821;
  --text-dim: #6b6878;
  --accent: #6d5cf0;
  --accent-soft: #e7e3fc;
  --border: #000000;
  --shadow: 0 12px 30px -14px rgba(24,20,50,0.18);
}

[data-theme="dark"]{
  --bg: #000000;
  --bg-soft: #17161d;
  --surface: #131218;
  --text: #f3f2f8;
  --text-dim: #98958f;
  --accent: #8b7bf7;
  --accent-soft: #241f3d;
  --border: #636363;
  --shadow: 0 16px 34px -14px rgba(0,0,0,0.7);
}
*{ box-sizing: border-box; }

html, body{
  margin: 0;
  padding: 0;
}

body{
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  transition: background .3s ease, color .3s ease;
  min-height: 100vh;
}

h1, h2, h3, .brand-name{
  font-family: 'Fraunces', serif;
  letter-spacing: -0.01em;
  margin: 0;
}

a{ color: inherit; text-decoration: none; }

/* ---------- Topbar ---------- */
.topbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(16px, 5vw, 48px);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  z-index: 20;
  border-bottom: 1px solid var(--border);
}

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

.brand-mark{
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-mark svg{
  width: 100%;
  height: 100%;
}

.brand-name{
  font-size: 19px;
  font-weight: 600;
}

.theme-toggle{
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
}

.theme-toggle:hover{ border-color: var(--accent); transform: translateY(-1px); }
.theme-toggle svg{ width: 19px; height: 19px; stroke: var(--text); }
[data-theme="dark"] .icon-sun{ display: block; }
[data-theme="dark"] .icon-moon{ display: none; }
.icon-sun{ display: none; }
.icon-moon{ display: block; }

/* ---------- Hero / Profile ---------- */
.hero{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 20px 12px;
}

.avatar{
  width: 108px;
  height: 108px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 3px var(--accent), var(--shadow);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 12px;
}

.avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero h1{
  margin-top: 18px;
  font-size: clamp(24px, 4vw, 32px);
}

.hero p{
  margin: 6px 0 0;
  color: var(--text-dim);
  font-size: 14.5px;
}

/* ---------- Slider ---------- */
.slider-wrap{
  max-width: 720px;
  margin: 32px auto 0;
  padding: 0 20px;
}

.slider{
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.slide{
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide.active{ opacity: 1; }

.slide img,
.slide video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slide .placeholder{
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
  padding: 20px;
}

.dots{
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .25s ease, width .25s ease;
}

.dot.active{
  background: var(--accent);
  width: 22px;
  border-radius: 5px;
}

/* ---------- Produk ---------- */
.products{
  max-width: 720px;
  margin: 40px auto 0;
  padding: 0 20px;
}

.products h2{
  font-size: 18px;
  margin-bottom: 14px;
}

.product-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.product-card{
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  position: relative;
}

.product-status{
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.product-status.soon{
  background: var(--accent-soft);
  color: var(--accent);
}

.product-status.maintenance{
  background: #fbe3c7;
  color: #b5651d;
}

.product-status.available{
  background: #d7f4e0;
  color: #1f9d55;
}

[data-theme="dark"] .product-status.maintenance{
  background: #3a2a15;
  color: #e2a35c;
}

[data-theme="dark"] .product-status.available{
  background: #143523;
  color: #4ade80;
}

.product-card.disabled{
  opacity: .7;
}

.buy-btn:disabled{
  background: var(--border);
  color: var(--text-dim);
  cursor: not-allowed;
}

.buy-btn:disabled:hover{ opacity: 1; }

.product-icon{
  width: 68px;
  height: 68px;
  border-radius: 14px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-icon svg{
  width: 30px;
  height: 30px;
  stroke: #ffffff;
}

.product-icon img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-card h3{
  font-size: 14.5px;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.product-card p{
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
}

.buy-btn{
  width: 100%;
  margin-top: 4px;
  padding: 8px 0;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s ease;
}

.buy-btn:hover{ opacity: .88; }

/* ---------- Modal pilih aplikasi ---------- */
.modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(15,14,20,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}

.modal-overlay.open{ display: flex; }

.modal{
  width: 100%;
  max-width: 380px;
  max-height: 78vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.modal-head h3{
  font-size: 15px;
  font-family: 'Fraunces', serif;
}

.modal-close{
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--bg-soft);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.modal-list{
  overflow-y: auto;
  padding: 10px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}

.app-item:hover{
  border-color: var(--accent);
  background: var(--accent-soft);
}

.app-name{
  font-size: 13px;
  font-weight: 600;
}

.app-price{
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.modal-msg{
  padding: 24px 12px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.7;
}

/* Konfirmasi pilih aplikasi */
.confirm-box{
  padding: 8px 4px 4px;
  text-align: center;
}

.confirm-label{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-dim);
  font-weight: 600;
}

.confirm-name{
  font-family: 'Fraunces', serif;
  font-size: 19px;
  margin-top: 8px;
}

.confirm-price{
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin-top: 6px;
}

.confirm-actions{
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.confirm-actions .pay-cancel,
.confirm-actions .buy-btn{
  flex: 1;
  margin-top: 0;
}

/* ---------- Modal pembayaran & struk ---------- */
.pay-body{
  padding: 18px;
}

.pay-amount{
  text-align: center;
  margin-bottom: 14px;
}

.pay-amount .big{
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 600;
}

.pay-amount .label{
  font-size: 12px;
  color: var(--text-dim);
}

.pay-qr{
  width: 180px;
  height: 180px;
  margin: 0 auto 14px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}

.pay-qr img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pay-status{
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pay-spinner{
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin{ to{ transform: rotate(360deg); } }

.pay-invoice{
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 14px;
  word-break: break-all;
}

.pay-cancel{
  width: 100%;
  padding: 10px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text-dim);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.pay-cancel:hover{ border-color: var(--accent); color: var(--accent); }

/* Struk */
.receipt{
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 20px 18px;
  font-size: 13px;
}

.receipt-head{
  text-align: center;
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.receipt-row{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--border);
}

.receipt-row:last-of-type{ border-bottom: none; }

.receipt-row .k{ color: var(--text-dim); }
.receipt-row .v{ font-weight: 600; text-align: right; }

.receipt-thanks{
  margin-top: 14px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-dim);
}

.receipt-note{
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  font-style: italic;
}

.receipt-actions{
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* ---------- CS ---------- */
.cs-hero{
  max-width: 560px;
  margin: 44px auto 0;
  padding: 0 20px;
  text-align: center;
}

.cs-hero h1{
  font-size: 22px;
}

.cs-hero p{
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
}

.cs-section{
  max-width: 720px;
  margin: 28px auto 0;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.cs-card{
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.cs-icon{
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-icon svg{
  width: 24px;
  height: 24px;
  stroke: #ffffff;
}

.cs-icon.wa{ background: #25D366; }
.cs-icon.report{ background: var(--accent); }

.cs-hours{
  max-width: 400px;
  margin: 28px auto 0;
  padding: 4px 20px;
}

.cs-hours-row{
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}

.cs-hours-row:last-child{ border-bottom: none; }

.cs-hours-row span:first-child{ color: var(--text-dim); }
.cs-hours-row span:last-child{ font-weight: 600; }

/* ---------- About / highlights ---------- */
.about{
  max-width: 560px;
  margin: 40px auto 0;
  padding: 0 20px;
  text-align: center;
}

.about > p{
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0;
}

.highlights{
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.highlight-item{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 96px;
}

.highlight-icon{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.highlight-icon svg{
  width: 20px;
  height: 20px;
  stroke: var(--accent);
}

.highlight-item span{
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
}

/* ---------- Footer ---------- */
.site-footer{
  position: fixed;
  left: 50%;
  bottom: 82px;
  transform: translateX(-50%);
  width: 100%;
  max-width: 960px;
  padding: 0 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 11.5px;
  z-index: 25;
}

/* ---------- Bottom navigation ---------- */
body{ padding-bottom: 130px; }

.bottom-nav{
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 30;
  width: calc(100% - 32px);
  max-width: 360px;
  padding: 8px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.nav-btn{
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.nav-btn svg{
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.nav-btn:hover{
  background: var(--bg-soft);
}

.nav-btn.active{
  color: var(--accent);
  background: var(--accent-soft);
}
