/* ZetStore — minimal UI.
   Putih, hitam, abu-abu. Tanpa gradasi, tanpa bayangan tebal,
   tanpa pill berwarna. Satu aksen: hitam. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  margin: 0; color: #111; background: #fff; line-height: 1.6;
}
img { max-width: 100%; }

/* Header */
header, .site-header {
  padding: 0.85rem 1rem; background: #fff;
  border-bottom: 1px solid #e5e5e5;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
header h1, .site-header h1 { margin: 0; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
header h1 a, .site-header h1 a { color: #111; text-decoration: none; }
header h1 a span, .brand-accent { color: #111; }
header p { margin: 0.3rem 0 0; color: #666; }
header nav, .site-header nav { display: flex; gap: 0.25rem; align-items: center; }
header nav a, .nav-link {
  color: #111; text-decoration: none; font-size: 0.95rem;
  padding: 0.6rem 0.75rem; border-radius: 6px; white-space: nowrap;
}
header nav a:hover, .nav-link:hover { background: #f5f5f5; text-decoration: underline; }

/* Hero — tanpa gradasi, hanya teks + garis bawah */
.hero {
  background: #fff; color: #111;
  padding: 2.4rem 1rem 2rem; text-align: left;
  border-bottom: 1px solid #e5e5e5;
}
.hero h2 { margin: 0 auto 0.6rem; max-width: 860px; font-size: 2rem; line-height: 1.2; letter-spacing: -0.03em; }
.hero p { margin: 0 auto; max-width: 860px; color: #555; font-size: 1.05rem; }
.hero .cta-row { margin: 1.4rem auto 0; max-width: 860px; display: flex; gap: 0.6rem; flex-wrap: wrap; }
.hero .cta {
  display: inline-block; background: #111; color: #fff; font-weight: 600;
  padding: 0.7rem 1.3rem; border-radius: 8px; text-decoration: none;
}
.hero .cta:hover { background: #000; }
.hero .cta-ghost {
  display: inline-block; color: #111; font-weight: 600; text-decoration: none;
  padding: 0.7rem 1.2rem; border-radius: 8px; border: 1px solid #d4d4d4; background: #fff;
}
.hero .cta-ghost:hover { border-color: #111; }
.hero .trust { margin-top: 1rem; font-size: 0.9rem; color: #666; }

/* Cara belanja */
.steps { max-width: 860px; margin: 1.4rem auto 0; padding: 0 1rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.step { background: #fff; border: 1px solid #e5e5e5; border-radius: 10px; padding: 1rem; }
.step .num { color: #999; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.05em; }
.step h3 { margin: 0.4rem 0 0.2rem; font-size: 1rem; }
.step p { margin: 0; color: #555; font-size: 0.9rem; }

/* Layout utama */
main { max-width: 860px; margin: 0 auto; padding: 1.2rem 1rem 2rem; }
main.narrow { max-width: 420px; }
main h2 { font-size: 1.3rem; letter-spacing: -0.01em; }
footer, .site-footer { padding: 1.6rem 1rem; color: #666; font-size: 0.88rem; border-top: 1px solid #e5e5e5; text-align: center; }
footer a, .site-footer a { color: #111; text-decoration: none; font-weight: 600; }
footer a:hover, .site-footer a:hover { text-decoration: underline; }

/* Kartu produk — tanpa bayangan, hanya garis tipis */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.card {
  background: #fff; border: 1px solid #e5e5e5; border-radius: 10px; padding: 1.1rem;
}
.card h2, .card h3 { margin: 0.5rem 0 0.3rem; font-size: 1.1rem; line-height: 1.35; }
.card .desc { color: #555; font-size: 0.93rem; margin: 0.2rem 0 0.6rem; }
.card .price { font-weight: 700; font-size: 1.2rem; margin: 0.4rem 0 0.2rem; color: #111; }
.card .stock { color: #666; font-size: 0.88rem; margin: 0.1rem 0 0.8rem; }
.card .stock-low { color: #92400e; font-weight: 700; }
.card button { width: 100%; margin: 0; }
.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: #666; border: 1px solid #e5e5e5; border-radius: 4px;
  padding: 0.15rem 0.45rem;
}
.badge-drive, .badge-file { background: #fff; color: #666; }

/* Tombol & form */
button {
  cursor: pointer; background: #111; color: #fff; border: 1px solid #111; border-radius: 8px;
  padding: 0.65rem 1.1rem; font-size: 0.95rem; font-weight: 600; margin: 0.2rem 0.2rem 0.2rem 0;
}
button:hover { background: #000; }
button:active { transform: scale(0.99); }
button:disabled { background: #ccc; border-color: #ccc; cursor: not-allowed; }
button[type="button"] { background: #fff; color: #111; border: 1px solid #d4d4d4; }
button[type="button"]:hover { border-color: #111; }
input, textarea, select {
  display: block; width: 100%; padding: 0.65rem 0.7rem; margin: 0.3rem 0 0.9rem;
  border: 1px solid #d4d4d4; border-radius: 8px; font-size: 16px; background: #fff; color: #111;
}
input:focus, textarea:focus, select:focus { outline: 2px solid #111; outline-offset: 0; border-color: #111; }
label { font-weight: 600; font-size: 0.95rem; }
.req { color: #b91c1c; }

/* Pesan */
.error { color: #b91c1c; background: #fff; border: 1px solid #e5e5e5; border-left: 3px solid #b91c1c; padding: 0.6rem 0.8rem; border-radius: 6px; }
.ok { color: #15803d; background: #fff; border: 1px solid #e5e5e5; border-left: 3px solid #15803d; padding: 0.6rem 0.8rem; border-radius: 6px; }
.hint { color: #666; font-size: 0.9rem; }
.muted { color: #666; font-weight: 400; }

/* Halaman order */
.order-box { background: #fff; border: 1px solid #e5e5e5; border-radius: 10px; padding: 1.3rem; }
.status { font-weight: 700; }
.status-paid { color: #15803d; }
.status-expired { color: #b91c1c; }
.status-pending { color: #92400e; }
.qris { max-width: 280px; display: block; margin: 1rem 0; border: 1px solid #e5e5e5; border-radius: 8px; }

/* Admin */
.stats { background: #fff; border: 1px solid #e5e5e5; border-radius: 10px; padding: 1rem; margin-bottom: 1.5rem; }
section { margin-bottom: 2rem; }

/* Dialog checkout */
dialog { border: 1px solid #e5e5e5; border-radius: 12px; padding: 1.5rem; max-width: 440px; width: 92%; box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
dialog::backdrop { background: rgba(0,0,0,0.4); }
.row { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* --- Halaman login: card di tengah (seperti SumoPod / Runpod / Itemku) --- */
.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: #f5f5f5; padding: 1rem;
}
.auth-card {
  background: #fff; border: 1px solid #e5e5e5; border-radius: 12px;
  padding: 2rem; width: 100%; max-width: 400px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}
.auth-logo { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; text-align: center; }
.auth-card h2 { text-align: center; font-size: 1.05rem; font-weight: 600; color: #555; margin: 0.4rem 0 1.4rem; }
.btn-block { width: 100%; margin: 0.4rem 0 0; }
.auth-back { text-align: center; margin: 1.2rem 0 0; font-size: 0.9rem; }
.auth-back a { color: #111; text-decoration: none; }
.auth-back a:hover { text-decoration: underline; }

/* --- Toko: topbar, hamburger, filter, footer multi-kolom --- */
.topbar {
  background: #111; color: #fff; text-align: center;
  font-size: 0.85rem; padding: 0.5rem 1rem;
}
.hamburger {
  display: none; background: none; color: #111; border: none;
  font-size: 1.4rem; padding: 0.4rem 0.6rem; margin: 0; cursor: pointer;
}
/* Checkbox tersembunyi penggerak hamburger (tanpa JavaScript):
   label[for] mengaktifkan checkbox, CSS :checked membuka/menutup menu. */
.nav-check { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.filters { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.filter-btn {
  background: #fff; color: #111; border: 1px solid #d4d4d4;
  padding: 0.4rem 0.9rem; font-size: 0.88rem; margin: 0;
}
.filter-btn:hover { border-color: #111; background: #fff; }
.filter-btn.active { background: #111; color: #fff; border-color: #111; }
.card-thumb {
  background: #f5f5f5; border: 1px solid #e5e5e5; border-radius: 8px;
  padding: 1.1rem 1rem; text-align: center;
  font-size: 0.72rem; letter-spacing: 0.08em; color: #666; font-weight: 700;
  margin-bottom: 0.8rem;
}
.footer-grid {
  max-width: 860px; margin: 0 auto; text-align: left;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem;
}
.footer-grid p { margin: 0.4rem 0 0; }
.footer-copy { max-width: 860px; margin: 1.5rem auto 0; padding-top: 1rem; border-top: 1px solid #e5e5e5; }

/* --- Admin: header + sidebar + views --- */
.admin-body { background: #f5f5f5; }
.admin-header {
  position: sticky; top: 0; z-index: 50; background: #fff;
  border-bottom: 1px solid #e5e5e5; padding: 0.7rem 1rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.admin-header h1 { margin: 0; font-size: 1.25rem; flex: 1; }
.admin-header .hamburger { display: block; }
.admin-header nav { display: flex; gap: 0.25rem; align-items: center; }
.admin-header nav a { color: #111; text-decoration: none; font-size: 0.92rem; padding: 0.5rem 0.6rem; }
.admin-header nav button { margin: 0; }
.admin-layout { display: flex; align-items: flex-start; }
.admin-sidebar {
  width: 220px; flex-shrink: 0; background: #fff;
  border-right: 1px solid #e5e5e5; min-height: calc(100vh - 57px);
  padding: 1rem 0.75rem; position: sticky; top: 57px;
}
.side-link {
  display: block; width: 100%; text-align: left;
  background: none; color: #111; border: none; border-radius: 8px;
  padding: 0.65rem 0.8rem; margin: 0 0 0.2rem; font-size: 0.95rem; font-weight: 500;
  text-decoration: none; cursor: pointer;
}
.side-link:hover { background: #f5f5f5; }
.side-link.active { background: #111; color: #fff; }
.admin-main { flex: 1; max-width: none; padding: 1.5rem; min-width: 0; }
.admin-view h2 { margin-top: 0; }
.sidebar-backdrop { display: none; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.stat-card { background: #fff; border: 1px solid #e5e5e5; border-radius: 10px; padding: 1rem; }
.stat-num { font-size: 1.6rem; font-weight: 800; display: block; line-height: 1.2; }
.stat-label { color: #666; font-size: 0.85rem; }

/* --- Admin: heading + form produk, baris produk, sidebar logout --- */
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.view-head h2 { margin: 0; }
.view-head button { margin: 0; }
.form-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.form-head h3 { margin: 0; }
#product-form-close {
  background: none; border: none; color: #111; font-size: 1.5rem;
  line-height: 1; padding: 0.2rem 0.5rem; margin: 0; cursor: pointer;
}
#product-form-wrap { border-top: 1px solid #e5e5e5; margin-top: 1.5rem; padding-top: 0.5rem; }
.product-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.product-info { flex: 1; min-width: 0; }
.product-info h3 { margin: 0 0 0.2rem; font-size: 1.05rem; }
.product-info p { margin: 0; font-size: 0.9rem; }
.product-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: #111; border: 1px solid #d4d4d4; border-radius: 8px;
  padding: 0.5rem; margin: 0; cursor: pointer; line-height: 1;
}
.icon-btn:hover { border-color: #111; background: #fff; }
.icon-btn.danger { color: #b91c1c; }
.icon-btn.danger:hover { border-color: #b91c1c; }
.side-divider { border: none; border-top: 1px solid #e5e5e5; margin: 0.75rem 0; }
.logout-link { color: #b91c1c; }
.logout-link:hover { background: #fef2f2; }

/* --- Layar kecil (HP & tablet) --- */
@media (max-width: 768px) {
  /* Toko: header jadi 1 baris (logo + hamburger), nav dropdown di bawah */
  .site-header { flex-wrap: wrap; padding: 0.75rem 1rem; }
  .site-header h1 { flex: 1; font-size: 1.2rem; }
  .hamburger { display: block; }
  #site-nav {
    display: none; width: 100%; flex-direction: column;
    border-top: 1px solid #e5e5e5; margin-top: 0.6rem; padding-top: 0.4rem; gap: 0;
  }
  #nav-toggle-check:checked ~ #site-nav { display: flex; }
  #site-nav .nav-link {
    padding: 0.8rem 0; border-radius: 0; font-size: 0.95rem;
  }
  #site-nav .nav-link:hover { background: none; }

  /* Hero: teks lebih kecil, tombol full-width bertumpuk */
  .hero { padding: 1.8rem 1rem 1.6rem; }
  .hero h2 { font-size: 1.5rem; }
  .hero p { font-size: 1rem; }
  .hero .cta-row { flex-direction: column; }
  .hero .cta, .hero .cta-ghost { width: 100%; text-align: center; }

  /* Langkah & footer: 1 kolom */
  .steps { grid-template-columns: 1fr; gap: 0.75rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.2rem; }

  /* Produk: 1 kolom, tombol full-width */
  .grid { grid-template-columns: 1fr; }
  .card button { width: 100%; }

  /* Dialog: tombol bertumpuk full-width */
  .row { flex-direction: column; }
  .row button { width: 100%; margin: 0; }
  dialog { width: 94%; padding: 1.2rem; }

  main { padding: 1rem; }

  /* Login card: lebih rapat */
  .auth-card { padding: 1.5rem; }

  /* Admin: sidebar jadi drawer off-canvas, dibuka lewat hamburger */
  .admin-header nav a { display: none; }
  .admin-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 100;
    width: 240px; min-height: 0; transform: translateX(-100%);
    transition: transform 0.2s ease; box-shadow: 8px 0 30px rgba(0,0,0,0.15);
  }
  #sidebar-check:checked ~ .admin-layout .admin-sidebar { transform: translateX(0); }
  #sidebar-check:checked ~ .admin-layout .sidebar-backdrop {
    display: block; position: fixed; inset: 0; z-index: 90;
    background: rgba(0,0,0,0.4); cursor: pointer;
  }
  .admin-main { padding: 1rem; }
}

/* Desktop: hamburger menyembunyikan sidebar */
@media (min-width: 769px) {
  #sidebar-check:checked ~ .admin-layout .admin-sidebar { display: none; }
}
