/* public/css/keranjang.css — panel & halaman "Konsultasi ke Admin" (mockup Produk3/ProdukHP3)
   Laptop: panel dari kanan. HP: lembar dari bawah. Halaman /keranjang: kartu di tengah. */

/* ---------- Panel melayang ---------- */
body.kj-terbuka { overflow: hidden; }
.kj-lapis { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: flex-end; }
.kj-lapis[hidden] { display: none; }
.kj-latar { position: absolute; inset: 0; border: none; background: rgba(10, 31, 77, .45); cursor: pointer; }
.kj-panel {
  position: relative; width: 480px; max-width: 100%; height: 100%; overflow-y: auto; background: var(--putih);
  box-shadow: -20px 0 40px rgba(10, 31, 77, .25); display: flex; flex-direction: column;
}
.kj-pegangan { display: none; }
.kj-kepala { position: sticky; top: 0; z-index: 1; background: var(--putih); display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--garis); }
.kj-kepala h2 { margin: 0; font-size: 24px; color: var(--navy); }
.kj-tutup { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--garis); background: var(--putih); color: var(--navy); font-size: 26px; line-height: 1; }
.kj-isi { padding: 20px 24px 28px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- Isi (dipakai panel & halaman) ---------- */
.kj-daftar { display: flex; flex-direction: column; gap: 10px; }
.kj-item { display: flex; gap: 12px; align-items: center; background: var(--gading); border: 1px solid var(--garis); border-radius: 14px; padding: 12px; }
.kj-item img, .kj-foto-kosong { width: 56px; height: 56px; border-radius: 10px; object-fit: contain; background: var(--krem); flex-shrink: 0; }
.kj-item-teks { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.kj-item-teks a { font-weight: 700; font-size: 14px; color: var(--teks); text-decoration: none; }
.kj-item-teks a:hover { color: var(--navy); text-decoration: underline; }
.kj-item-teks span { font-size: 13px; color: var(--abu); }
.kj-item-teks .kj-diskon { color: #B42318; font-weight: 600; font-size: 12px; }
.kj-subtotal { font-size: 14px; color: var(--navy); white-space: nowrap; }
.kj-hapus { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--garis); background: var(--putih); color: var(--abu); font-size: 22px; line-height: 1; flex-shrink: 0; }
.kj-hapus:hover { color: #B42318; border-color: #F1A49C; }

.kj-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 700; border-top: 1px dashed var(--garis-tegas); padding-top: 12px; }
.kj-total b { font-family: var(--huruf-isi); font-size: 26px; color: var(--navy); font-weight: 800; }
.kj-ongkir { display: block; margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--abu); }
.kj-hemat { align-self: flex-end; font-size: 12px; font-weight: 700; color: #1A6B3C; background: #E9F4EC; padding: 4px 10px; border-radius: 999px; }
.kj-tambah { align-self: flex-start; font-weight: 700; font-size: 14px; text-decoration: none; }

.kj-form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.kj-isian { display: flex; flex-direction: column; gap: 6px; }
.kj-isian label, .kj-label { font-size: 14px; font-weight: 700; }
.wajib { color: #B42318; }
.fld { width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid var(--garis-tegas); padding: 0 12px; font-size: 16px; color: var(--teks); background: var(--putih); }
textarea.fld { padding: 12px; resize: vertical; min-height: 96px; }
.fld:focus { outline: 2px solid var(--emas); outline-offset: 1px; border-color: var(--navy); }
.kj-salah { font-size: 13px; color: #B42318; font-weight: 600; }
.kj-salah[hidden] { display: none; }
.kj-dua { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kj-metode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kj-metode button { height: 48px; border-radius: 12px; font-size: 15px; font-weight: 600; background: var(--putih); color: var(--teks); border: 1.5px solid var(--garis-tegas); }
.kj-metode button.aktif { background: var(--navy); color: var(--putih); border-color: var(--navy); font-weight: 700; }

.kj-pratinjau { border: 1px solid var(--garis); border-radius: 12px; padding: 12px 14px; }
.kj-pratinjau summary { font-size: 14px; font-weight: 700; color: var(--navy); cursor: pointer; }
.kj-pesan { margin-top: 10px; font-size: 13px; line-height: 1.6; white-space: pre-line; background: #E7F6EC; border-radius: 10px; padding: 12px; }

.kj-kirim {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; border: none; border-radius: 12px;
  background: #1F9D55; color: var(--putih); font-weight: 800; font-size: 16px; text-decoration: none;
}
.kj-kirim:hover { filter: brightness(1.06); color: var(--putih); }
.kj-kecil { font-size: 12px; color: var(--abu); text-align: center; line-height: 1.5; }
.kj-kosong { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 8px 0; }
.kj-kosong p { margin: 0; color: var(--abu); }
.kj-terkirim p { color: var(--teks); }

/* ---------- Halaman /keranjang ---------- */
.kj-halaman-wrap { max-width: 680px; padding-top: 24px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 12px; }
.kj-halaman-wrap h1 { margin: 0; font-size: 36px; color: var(--navy); }
.kj-pengantar { margin: 0 0 8px; color: var(--abu); }
.kj-halaman { background: var(--putih); border: 1px solid var(--garis); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- HP ---------- */
@media (max-width: 900px) {
  .kj-lapis { align-items: flex-end; }
  .kj-panel { width: 100%; height: auto; max-height: calc(100% - 56px); border-radius: 22px 22px 0 0; box-shadow: 0 -12px 30px rgba(0, 0, 0, .2); }
  .kj-pegangan { display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--garis-tegas); margin: 8px auto 0; flex-shrink: 0; }
  .kj-kepala { padding: 8px 16px 10px; border-bottom: none; }
  .kj-kepala h2 { font-size: 22px; }
  .kj-isi { padding: 0 16px calc(16px + env(safe-area-inset-bottom)); gap: 14px; }
  .kj-item { padding: 10px; gap: 10px; }
  .kj-item img, .kj-foto-kosong { width: 48px; height: 48px; }
  .kj-item-teks a { font-size: 13px; }
  .kj-item-teks span { font-size: 12px; }
  .kj-subtotal { font-size: 13px; }
  .kj-dua { gap: 10px; }
  .kj-halaman-wrap { padding-top: 16px; padding-bottom: 24px; }
  .kj-halaman-wrap h1 { font-size: 28px; }
  .kj-halaman { padding: 16px; border-radius: 16px; }
  .kj-halaman-wrap .remah { display: none; }
}
/* ---------- Program Diskon di keranjang ---------- */
.kj-potongan { display: flex; justify-content: space-between; gap: 12px; color: #B42318; font-weight: 700; font-size: 14px; }
.kj-maks { align-self: flex-start; font-size: 12px; font-weight: 600; color: #B5590E; background: #FDF0E3; padding: 6px 10px; border-radius: 8px; }
