:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --accent: #22c55e;
  --bg: #f8f9fc;
  --text: #1f2333;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 14px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Poppins', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand { font-weight: 700; font-size: 22px; color: var(--primary); }
.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav a { font-weight: 500; color: var(--text); font-size: 15px; }
.main-nav a.active, .main-nav a:hover { color: var(--primary); }
.btn-sell {
  background: var(--accent);
  color: #fff !important;
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 600;
}
.nav-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 10px; margin: 16px 0; font-size: 14px; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-info { background: #dbeafe; color: #1e40af; }

/* Banner / Hero */
.hero {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  border-radius: 0 0 32px 32px;
  padding: 60px 0 70px;
  margin-bottom: -40px;
}
.hero h1 { font-size: 34px; margin-bottom: 10px; }
.hero p { opacity: .9; max-width: 560px; }
.hero-slider { display: flex; gap: 16px; overflow-x: auto; margin-top: 28px; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.hero-slide { flex: 0 0 auto; width: 320px; border-radius: 16px; overflow: hidden; scroll-snap-align: start; box-shadow: 0 12px 30px rgba(0,0,0,.2); }
.hero-slide img { height: 160px; object-fit: cover; width: 100%; }

/* Sections */
section { padding: 50px 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.section-title h2 { font-size: 24px; margin: 0; }
.section-title span { color: var(--muted); font-size: 14px; }

/* Category chips */
.categories { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.categories a {
  padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--border);
  font-size: 14px; font-weight: 500;
}
.categories a.active, .categories a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Item grid */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.item-card {
  background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  transition: transform .15s, box-shadow .15s;
}
.item-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(20,20,50,.08); }
.item-card .thumb { height: 150px; overflow: hidden; background: #eef0f8; }
.item-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-card .body { padding: 14px 16px; }
.item-card .badge {
  display: inline-block; background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 999px; margin-bottom: 8px;
}
.item-card h3 { font-size: 15px; margin: 0 0 6px; min-height: 40px; }
.item-card .price { font-weight: 700; color: var(--primary); font-size: 16px; }
.item-card .buy-btn {
  display: block; text-align: center; margin-top: 12px; background: var(--primary); color: #fff;
  padding: 9px; border-radius: 8px; font-weight: 600; font-size: 14px;
}
.item-card .buy-btn:hover { background: var(--primary-dark); }

/* Detail page */
.detail-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.detail-wrap .thumb { border-radius: var(--radius); overflow: hidden; }
.detail-info h1 { font-size: 26px; margin: 0 0 12px; }
.detail-info .price { font-size: 28px; color: var(--primary); font-weight: 700; margin-bottom: 18px; }
.detail-desc { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-top: 20px; white-space: pre-wrap; }
.stock-info { font-size: 14px; color: var(--muted); margin-bottom: 18px; }

/* Forms */
.form-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
  max-width: 480px;
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit;
}
.btn {
  display: inline-block; background: var(--primary); color: #fff; border: none; padding: 12px 22px;
  border-radius: 8px; font-weight: 600; font-size: 15px; cursor: pointer;
}
.btn:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn-block { width: 100%; text-align: center; }

/* Payment page */
.payment-card { max-width: 460px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; text-align: center; }
.payment-card img.qr { width: 240px; height: 240px; margin: 20px auto; border: 8px solid #f4f4f7; border-radius: 12px; }
.payment-amount { font-size: 30px; font-weight: 700; color: var(--primary); margin: 8px 0; }
.payment-status { font-weight: 600; padding: 10px; border-radius: 8px; margin-top: 16px; }
.status-pending { background: #fef9c3; color: #854d0e; }
.status-paid { background: #dcfce7; color: #166534; }
.status-expired { background: #fee2e2; color: #991b1b; }
.countdown { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* Static content pages */
.content-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; white-space: pre-wrap; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 18px; }
.step { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.step .num { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 12px; }

/* Footer */
.site-footer { background: #111324; color: #cbd0e0; margin-top: 60px; padding-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; padding-bottom: 30px; }
.footer-inner h3 { color: #fff; margin: 0 0 8px; }
.footer-inner h4 { color: #fff; margin: 0 0 10px; font-size: 15px; }
.footer-inner a { display: block; color: #cbd0e0; font-size: 14px; margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 16px 0; font-size: 13px; text-align: center; color: #8b90a8; }

/* Table (admin & cek pesanan) */
table { width: 100%; border-collapse: collapse; background: #fff; }
table th, table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px; text-align: left; }
table th { background: #f4f5fa; font-weight: 600; }
.badge-status { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-pending { background: #fef9c3; color: #854d0e; }
.badge-paid { background: #dcfce7; color: #166534; }
.badge-expired, .badge-failed, .badge-cancelled { background: #fee2e2; color: #991b1b; }

@media (max-width: 860px) {
  .detail-wrap { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .main-nav {
    position: absolute; top: 68px; left: 0; right: 0; background: #fff; flex-direction: column;
    align-items: flex-start; padding: 16px 20px; border-bottom: 1px solid var(--border); display: none; gap: 14px;
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 26px; }
}
