/*
 * Checkout `/beli` (layouts.checkout, masukan pemilik 2026-10-16): halaman tersendiri tanpa
 * menu situs. Token dan komponen dasar (btn, badge, notice, brand) dari kasirsir.css —
 * FLAT tanpa bayangan, satu aksen emerald. Sudut: kartu 16px (--r-lg), ubin/isian/tombol
 * 12px (--r-md), lencana 8px. HP dulu; dua kolom mulai 960px.
 */
.co { background: var(--canvas); min-height: 100dvh; display: flex; flex-direction: column; }
.co main { flex: 1 0 auto; }
.co [hidden] { display: none !important; }
.co-wrap {
  max-width: 1120px; margin: 0 auto; width: 100%;
  padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right));
}

/* ---------- Bilah atas ---------- */
.co-head { background: var(--surface); border-bottom: 1px solid var(--hairline); }
.co-head__isi { min-height: 56px; display: flex; align-items: center; flex-wrap: wrap; gap: 0 20px; }
.co-head__merek { font-size: 18px; }
.co-head__merek img:first-child { width: 26px; }
.co-head__aman { order: 3; flex-basis: 100%; display: flex; align-items: center; gap: 6px; padding: 0 0 8px; color: var(--body); font-size: 12px; line-height: 16px; font-weight: 500; }
.co-head__aman svg { width: 16px; height: 16px; color: var(--primary); flex: none; }
.co-head__nav { margin-left: auto; display: flex; align-items: center; gap: 4px 16px; }
.co-head__nav a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--body); font-weight: 600; font-size: 14px; }
.co-head__nav a:hover { color: var(--ink); text-decoration: none; }
.co-head__nav svg { width: 18px; height: 18px; }
@media (min-width: 760px) {
  .co-head__isi { min-height: 60px; }
  .co-head__aman { order: 0; flex-basis: auto; padding: 0; font-size: 13px; padding-left: 20px; border-left: 1px solid var(--hairline); min-height: 24px; }
}

/* ---------- Judul ---------- */
.co-halaman { padding-top: 20px; padding-bottom: 32px; }
.co-judul h1 { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; }
.co-judul__sub { margin-top: 6px; color: var(--body); font-size: 14px; line-height: 21px; max-width: 72ch; text-wrap: pretty; }
.co-judul__sub strong { color: var(--ink); font-weight: 600; }
.co-aturan { margin-top: 6px; color: var(--body); font-size: 14px; line-height: 20px; }
.co-aturan summary { display: inline-flex; align-items: center; min-height: 32px; color: var(--primary-text); font-weight: 600; cursor: pointer; }
.co-aturan ul { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 4px; max-width: 72ch; }
.co-aturan strong { color: var(--ink); font-weight: 600; }
.co-galat { margin-top: 16px; }
.co-menunggu__isi { display: grid; gap: 10px; min-width: 0; }
.co-menunggu__aksi { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.co-menunggu__aksi form { margin: 0; }

/* ---------- Susunan ---------- */
.co-grid { margin-top: 20px; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.co-pilihan, .co-pilihan__form { display: grid; gap: 16px; min-width: 0; align-content: start; }
@media (min-width: 960px) {
  .co-halaman { padding-top: 28px; padding-bottom: 48px; }
  .co-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
  .co-ringkas { position: sticky; top: 20px; }
}

/* ---------- Bagian pilihan ---------- */
.co-bagian { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 12px; min-width: 0; }
@media (min-width: 640px) { .co-bagian { padding: 20px; gap: 14px; } }
.co-bagian__judul { display: flex; align-items: center; gap: 10px; font-size: 16px; line-height: 22px; font-weight: 700; }
.co-bagian__no { width: 24px; height: 24px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-text); font-size: 13px; line-height: 1; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.co-bagian__opsional { color: var(--body); font-weight: 500; font-size: 13px; }
.co-catatan { color: var(--body); font-size: 13px; line-height: 19px; }
.co-catatan a { font-weight: 600; }
.co-noscript { display: flex; }

/* 1. Paket */
.co-paket { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .co-paket { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.co-paket__kartu {
  position: relative; display: grid; gap: 2px; align-content: start; padding: 14px 16px;
  border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface); cursor: pointer;
  transition: border-color .15s;
}
.co-paket__kartu:hover { border-color: var(--outline); }
.co-paket__kartu:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.co-paket__kartu:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.co-paket__input { position: absolute; top: 15px; right: 14px; width: 18px; height: 18px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.co-paket__input:focus-visible { outline: none; }
.co-paket__kepala { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding-right: 26px; min-height: 22px; }
.co-paket__nama { font-size: 16px; line-height: 22px; font-weight: 700; }
.co-paket__harga { margin-top: 4px; font-size: 20px; line-height: 26px; font-weight: 700; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.co-paket__harga small { margin-left: 2px; font-size: 13px; font-weight: 500; color: var(--body); letter-spacing: 0; }
.co-paket__setara { color: var(--body); font-size: 12px; line-height: 16px; }
.co-paket__poin { display: grid; gap: 4px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--hairline); }
.co-paket__poin > span { display: flex; align-items: flex-start; gap: 6px; color: #334155; font-size: 13px; line-height: 18px; }
.co-paket__poin svg { width: 16px; height: 16px; margin-top: 1px; color: var(--primary); flex: none; }
/* HP: kartu ringkas — isi paket hanya untuk paket terpilih, supaya pilihan lain tetap terlihat. */
@media (max-width: 639px) {
  .co-paket__kartu { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 12px 14px; }
  .co-paket__kepala { flex: 0 1 auto; padding-right: 0; padding-left: 28px; }
  .co-paket__input { top: 14px; left: 14px; right: auto; }
  .co-paket__harga { margin: 0 0 0 auto; padding-left: 28px; font-size: 17px; line-height: 22px; text-align: right; }
  .co-paket__harga [data-harga] { white-space: nowrap; }
  .co-paket__kepala .badge { padding: 1px 6px; font-size: 11px; line-height: 16px; }
  .co-paket__harga small { font-size: 12px; }
  .co-paket__setara { flex-basis: 100%; padding-left: 28px; }
  .co-paket__poin { flex-basis: 100%; margin-top: 6px; padding-top: 8px; }
  .co-paket__kartu:not(:has(input:checked)) .co-paket__poin { display: none; }
}

/* 2. Periode: kontrol bersegmen */
.co-segmen {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; max-width: 440px; padding: 4px;
  background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--r-md);
}
.co-segmen__opsi {
  position: relative; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 8px;
  min-height: 44px; padding: 6px 10px; border: 1px solid transparent; border-radius: 9px;
  color: var(--body); font-weight: 600; text-align: center; cursor: pointer; transition: color .15s, background-color .15s;
}
.co-segmen__opsi input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.co-segmen__opsi:hover { color: var(--ink); }
.co-segmen__opsi:has(input:checked) { background: var(--surface); border-color: var(--primary); color: var(--primary-text); }
.co-segmen__opsi:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

/* 3. Tambahan: penghitung − n + */
.co-tambah { display: grid; gap: 8px; }
.co-tambah__baris { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; padding: 10px 10px 10px 14px; background: var(--canvas); border-radius: var(--r-md); }
.co-tambah__teks { display: grid; gap: 2px; min-width: 0; flex: 1 1 140px; }
.co-tambah__teks label { color: var(--ink); font-size: 15px; line-height: 20px; font-weight: 600; }
.co-tambah__harga { color: var(--body); font-size: 13px; line-height: 18px; }
.co-tambah__harga span { color: var(--ink); font-weight: 600; }
.co-stepper { display: inline-flex; align-items: center; flex: none; background: var(--surface); border: 1px solid var(--outline); border-radius: var(--r-md); overflow: hidden; }
.co-stepper:focus-within { border-color: var(--primary); }
.co-stepper__btn { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; transition: background-color .15s; }
.co-stepper__btn svg { width: 18px; height: 18px; }
.co-stepper__btn:hover:not(:disabled) { background: var(--primary-soft); color: var(--primary-text); }
.co-stepper__btn:active:not(:disabled) { transform: translateY(1px); }
.co-stepper__btn:disabled { color: var(--muted); cursor: not-allowed; }
.co-stepper__btn:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.co-stepper__isi {
  width: 64px; height: 44px; padding: 0 4px; border: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 16px; font-weight: 700; text-align: center;
}
.co-stepper__isi:focus { outline: none; box-shadow: inset 0 0 0 2px var(--primary); }
.js .co-stepper__isi { width: 52px; -moz-appearance: textfield; appearance: textfield; }
.js .co-stepper__isi::-webkit-inner-spin-button, .js .co-stepper__isi::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* 4. Metode pembayaran */
.co-metode { display: grid; gap: 16px; }
.co-metode__grup { margin: 0; padding: 0; border: 0; min-width: 0; }
.co-metode__judul { display: block; margin: 0 0 8px; padding: 0; color: var(--body); font-size: 13px; line-height: 18px; font-weight: 600; }
.co-metode__daftar { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.co-metode__ubin {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 12px;
  border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface);
  font-size: 13px; line-height: 17px; font-weight: 600; cursor: pointer; transition: border-color .15s;
}
.co-metode__ubin input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.co-metode__ubin:hover { border-color: var(--outline); }
.co-metode__ubin:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.co-metode__ubin:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.co-metode__ubin img { width: auto; height: 20px; max-width: 56px; object-fit: contain; flex: none; }
.co-metode__ubin span { min-width: 0; overflow-wrap: anywhere; }
.co-metode__ubin--info { min-height: 44px; font-weight: 500; cursor: default; }
.co-metode__ubin--info:hover { border-color: var(--hairline); }
.co-metode__semua {
  margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0;
  border: 0; background: none; color: var(--primary-text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.co-metode__semua:hover { text-decoration: underline; }

/* ---------- Ringkasan ---------- */
.co-ringkas { min-width: 0; }
.co-ringkas__kartu { display: grid; gap: 14px; padding: 20px; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); }
.co-ringkas__judul { font-size: 16px; line-height: 22px; font-weight: 700; }
.co-ringkas__baris { display: grid; gap: 8px; transition: opacity .15s; }
.co-baris { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; line-height: 20px; }
.co-baris span:first-child { min-width: 0; color: #334155; }
.co-baris span:last-child { white-space: nowrap; font-weight: 600; }
.co-baris--potong span:last-child { color: var(--primary-text); }
.co-hemat { color: var(--primary-text); font-size: 13px; line-height: 18px; font-weight: 600; }
.co-keterangan { padding: 12px 14px; font-size: 13px; line-height: 19px; }
.co-keterangan svg { width: 18px; height: 18px; }
.co-total { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.co-total__label { display: grid; font-weight: 600; font-size: 15px; line-height: 20px; }
.co-total__label small { color: var(--body); font-size: 12px; line-height: 16px; font-weight: 500; }
.co-total strong { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.02em; transition: opacity .15s; }
.co-total__setara { margin-top: -10px; color: var(--body); font-size: 13px; line-height: 18px; text-align: right; }
.co-aksi { display: grid; gap: 10px; }
.co-aksi .btn--block { min-height: 50px; }
/* `.btn` bawaan tidak membungkus teks; di 320px + teks 130% tombol ini melebarkan kartu. */
.co-aksi .btn { white-space: normal; text-align: center; }
.co-aksi > * { min-width: 0; }
.co-aksi .btn[disabled] { opacity: .55; }
.co-tengah { text-align: center; }
.co-setuju { color: var(--body); font-size: 12px; line-height: 17px; }
.co-setuju a { font-weight: 600; }
.co-penyedia { display: flex; align-items: flex-start; gap: 8px; padding-top: 12px; border-top: 1px solid var(--hairline); color: var(--body); font-size: 12px; line-height: 17px; }
.co-penyedia svg { width: 18px; height: 18px; color: var(--primary); flex: none; }
.is-menghitung .co-ringkas__baris, .is-menghitung .co-total strong, .is-menghitung [data-bar-total] { opacity: .45; }

/* ---------- Bilah bayar di HP ---------- */
.co-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--hairline);
  padding: 10px max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.co-bar.is-tersembunyi { transform: translateY(110%); visibility: hidden; }
@media (prefers-reduced-motion: no-preference) { .co-bar { transition: transform .2s ease, visibility .2s; } }
.co-bar__isi, .co-bar__setuju, .co-bar__panel { max-width: 1120px; margin: 0 auto; }
.co-bar__isi { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.co-bar__total { display: grid; justify-items: start; min-width: 0; }
.co-bar__label { color: var(--body); font-size: 12px; line-height: 16px; }
.co-bar__total strong { font-size: 20px; line-height: 26px; letter-spacing: -0.01em; transition: opacity .15s; }
.co-bar__rincian {
  display: inline-flex; align-items: center; gap: 2px; padding: 0; border: 0; background: none;
  color: var(--primary-text); font: inherit; font-size: 13px; line-height: 18px; font-weight: 600; cursor: pointer;
}
.co-bar__rincian svg { width: 16px; height: 16px; transition: transform .15s; }
.co-bar__rincian[aria-expanded="true"] svg { transform: rotate(180deg); }
.co-bar__aksi { flex: 1 1 150px; max-width: 260px; min-height: 48px; font-size: 15px; white-space: normal; text-align: center; }
.co-bar__aksi[disabled] { opacity: .55; }
.co-bar__setuju { margin-top: 6px; }
.co-bar__setuju .co-setuju { font-size: 11px; line-height: 15px; }
.co-bar__panel { display: grid; gap: 6px; max-height: 45vh; overflow: auto; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--hairline); }
.co-bar__panel .co-baris { font-size: 13px; line-height: 18px; }
/* Ruang setinggi bilah di bawah kaki (bukan di bawah halaman): kaki tidak pernah tertutup. */
@media (max-width: 959px) { .co:has(.co-bar) .co-foot { padding-bottom: calc(24px + var(--co-bar, 132px)); } }
@media (min-width: 960px) { .co-bar { display: none; } }

/* ---------- Kaki ringkas ---------- */
.co-foot { padding: 20px 0 24px; background: var(--surface); border-top: 1px solid var(--hairline); color: var(--body); font-size: 12px; line-height: 18px; }
.co-foot .co-wrap { display: grid; gap: 8px; }
.kontak-situs--baris { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0; line-height: 18px; }
.co-foot__tautan { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.co-foot__tautan a { color: var(--body); text-decoration: underline; text-underline-offset: 2px; }
.co-foot__tautan a:hover { color: var(--ink); }
