:root {
  --text: #111;
  --muted: #555;
  --bg: #fff;
  --border: #e5e7eb;
  --primary: #0ea5e9;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.top-header {
  text-align: center;
  font-weight: 700;
  padding: 16px 12px;
}

.nav { display: flex; gap: 12px; justify-content: center; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.nav-link { text-decoration: none; color: var(--text); padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; }
.nav-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.hidden { display: none; }
.no-scroll { overflow: hidden; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { border: 1px solid var(--border); border-radius: 12px; padding: 16px; }

.hero { text-align: center; }
.qr {
  width: 220px;
  height: 220px;
  margin: 12px auto 24px;
  border: 8px solid #000;
}
.qr img { width: 100%; height: 100%; display: block; }

.title { font-size: 28px; margin: 0 0 8px; }
.subtitle { font-size: 20px; margin: 0 0 24px; color: var(--muted); font-weight: 600; }
.hero-details .title { color: #16a34a; font-size: 32px; }

.price-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.price-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
}

.price-text { flex: 1; }
.price-text .installment { font-weight: 600; }
.price-text .total { color: var(--muted); font-size: 14px; }
.price-text .total .amount { font-weight: 700; font-size: 18px; }

.btn {
  appearance: none;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn.disabled { opacity: .6; pointer-events: none; }

.btn + .btn { margin-left: 8px; }

.btn-show {
  background: #16a34a;
  font-size: 18px;
  padding: 12px 18px;
  display: inline-block;
  margin: 8px 0 16px;
}

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal-content { background: #fff; border-radius: 12px; width: 90%; max-width: 420px; box-shadow: 0 10px 30px rgba(0,0,0,.2); overflow: hidden; }
.modal-header { padding: 12px 16px; font-weight: 700; border-bottom: 1px solid var(--border); }
.modal-body { padding: 16px; display: flex; align-items: center; justify-content: center; }
.modal-body img { width: 220px; height: 220px; }
.modal-actions { padding: 12px 16px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--border); }
.modal.hidden { display: none !important; }

.collapse { border-top: 1px solid var(--border); }
.collapse-summary { list-style: none; cursor: pointer; padding: 10px 12px; font-weight: 600; border: 1px solid var(--border); border-radius: 8px; }
.collapse[open] .collapse-summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.collapse-content { border: 1px solid var(--border); border-top: none; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; padding: 12px; }

@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .qr { width: 180px; height: 180px; }
  .title { font-size: 24px; }
  .subtitle { font-size: 18px; }
  .price-text .total .amount { font-size: 17px; }
  .hero-details .title { font-size: 28px; }
  .btn-show { font-size: 17px; padding: 11px 16px; margin: 8px 0 14px; }
}

@media (max-width: 640px) {
  .container { max-width: 100%; padding: 16px 12px 32px; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .card { padding: 12px; }
  .qr { width: 150px; height: 150px; }
  .title { font-size: 22px; }
  .subtitle { font-size: 16px; }
  .price-item { align-items: flex-start; gap: 8px; }
  .btn { padding: 10px 12px; }
  .nav { flex-wrap: wrap; }
  .price-text .total .amount { font-size: 16px; }
  .hero-details .title { font-size: 24px; }
  .btn-show { font-size: 16px; padding: 10px 14px; margin: 8px 0 12px; }
}
