/* =========================================================
   godigitalku — style.css
   Token desain: warna, tipografi, layout
   ========================================================= */

:root {
  --ink: #17162B;
  --ink-soft: #55536F;
  --ink-faint: #8B899E;
  --primary: #5B3DF5;
  --primary-dark: #4527D9;
  --primary-soft: #EFEBFF;
  --surface: #FFFFFF;
  --backdrop: #F5F4FC;
  --border: #E6E4F5;
  --success: #16A34A;
  --success-bg: #ECFDF3;
  --warning: #B45309;
  --warning-bg: #FFFBEB;
  --danger: #B91C1C;
  --danger-bg: #FEF2F2;
  --muted-bg: #F1F0F8;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-card: 0 10px 30px rgba(23, 22, 43, 0.08);
  --shadow-pop: 0 16px 40px rgba(91, 61, 245, 0.18);
  --font-head: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--backdrop);
  line-height: 1.55;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 12px;
}

p { margin: 0 0 14px; color: var(--ink-soft); }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}
.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #8C6BFF);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}
.brand__mark--sm { width: 26px; height: 26px; font-size: 13px; border-radius: 8px; }
.site-nav { display: flex; align-items: center; gap: 18px; }
.site-nav__link { font-weight: 600; font-size: 14px; color: var(--ink-soft); }
.site-nav__link:hover { color: var(--primary); }

/* ---------- Alerts / flash ---------- */
.alert {
  margin: 16px 0 0;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
}
.alert--success { background: var(--success-bg); color: #166534; border: 1px solid #BBF7D0; }
.alert--error { background: var(--danger-bg); color: #991B1B; border: 1px solid #FECACA; }
.alert--info { background: var(--primary-soft); color: var(--primary-dark); border: 1px solid #DCD4FF; }

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 40px;
  text-align: center;
}
.hero__eyebrow {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 10px;
}
.hero h1 {
  font-size: 30px;
  font-weight: 700;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}
.hero p.lead {
  max-width: 480px;
  margin: 0 auto 22px;
  font-size: 16px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-align: center;
  min-height: 48px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-pop);
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-whatsapp {
  background: #16A34A;
  color: #fff;
}
.btn-whatsapp:hover { background: #15803D; color: #fff; }
.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; }
.btn-sm { padding: 10px 16px; min-height: 38px; font-size: 14px; border-radius: 10px; }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Product grid & cards ---------- */
.section { padding: 8px 0 48px; }
.section-title { font-size: 22px; margin-bottom: 20px; }

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: 1px solid var(--border);
}

.product-card { display: flex; flex-direction: column; height: 100%; }
.product-card__thumb {
  aspect-ratio: 1 / 1;
  width: 100%;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card__thumb-placeholder {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 28px;
  color: var(--primary);
}
.product-card__body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card__type {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  width: fit-content;
}
.product-card__title { font-family: var(--font-head); font-size: 17px; font-weight: 600; margin: 0; }
.product-card__desc { font-size: 14px; color: var(--ink-faint); margin: 0; flex: 1; }
.product-card__price-row { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.product-card__price { font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--ink); }
.product-card__price-strike { font-size: 13px; color: var(--ink-faint); text-decoration: line-through; }

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--ink-faint);
}
.empty-state__icon {
  width: 64px; height: 64px; border-radius: 18px;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin: 0 auto 16px; font-weight: 700;
}

/* ---------- Detail produk ---------- */
.product-detail { padding: 32px 0 56px; }
.product-detail__thumb {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  aspect-ratio: 16/10;
  background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center;
}
.product-detail__thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-detail__price-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 22px;
  margin: 20px 0;
  border: 1px solid var(--border);
}
.price-now { font-family: var(--font-head); font-size: 26px; font-weight: 700; color: var(--ink); }
.price-strike { font-size: 15px; color: var(--ink-faint); text-decoration: line-through; margin-left: 8px; }
.included-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.included-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 15px; color: var(--ink-soft);
}
.included-list li::before {
  content: '';
  flex-shrink: 0;
  width: 20px; height: 20px; margin-top: 2px;
  border-radius: 50%;
  background: var(--success-bg);
  border: 2px solid var(--success);
}

.sticky-cta {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  box-shadow: 0 -6px 20px rgba(23,22,43,.06);
  z-index: 40;
}

/* ---------- Forms ---------- */
.form-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px;
  border: 1px solid var(--border);
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--ink);
}
.field .hint { font-size: 12px; color: var(--ink-faint); margin-top: 6px; }
.field input[type="text"],
.field input[type="password"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="date"],
.field input[type="file"],
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--ink);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.field-error { color: var(--danger); font-size: 13px; margin-top: 6px; }

/* ---------- Order summary ---------- */
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; color: var(--ink-soft); }
.summary-row.total { border-top: 1px dashed var(--border); margin-top: 8px; padding-top: 14px; font-size: 17px; font-weight: 700; color: var(--ink); font-family: var(--font-head); }

.bank-box {
  background: var(--muted-bg);
  border-radius: var(--radius-md);
  padding: 18px;
  margin: 16px 0;
}
.bank-box__number { font-family: var(--font-head); font-size: 22px; font-weight: 700; letter-spacing: 1px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
}
.badge-success { background: var(--success-bg); color: #166534; }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-muted { background: var(--muted-bg); color: var(--ink-faint); }

/* ---------- Member dashboard ---------- */
.member-product {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.member-product__thumb {
  width: 64px; height: 64px; border-radius: 12px;
  background: var(--primary-soft); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-family: var(--font-head); font-weight: 700;
  overflow: hidden;
}
.member-product__thumb img { width: 100%; height: 100%; object-fit: cover; }
.member-product__body { flex: 1; min-width: 0; }
.member-product__title { font-family: var(--font-head); font-weight: 600; font-size: 15px; margin: 0 0 4px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #C9C7DE;
  padding: 40px 0 28px;
  margin-top: 40px;
  text-align: center;
}
.site-footer__inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.site-footer__brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 700; color: #fff; font-size: 16px;
}
.site-footer__tagline { color: #A6A3C4; font-size: 14px; margin: 0; }
.site-footer__wa {
  color: #fff; background: #16A34A; padding: 10px 18px; border-radius: 10px;
  font-weight: 600; font-size: 14px; margin: 10px 0;
}
.site-footer__wa:hover { background: #15803D; color: #fff; }
.site-footer__watermark { font-size: 12px; color: #75729A; margin-top: 14px; }
.site-footer__watermark a { color: #9C90FF; font-weight: 600; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.narrow { max-width: 440px; margin: 0 auto; }

@media (min-width: 720px) {
  .hero h1 { font-size: 38px; }
}
