/* ============================================================
   BUKAMPUS — Design System v2 "Kertas & Tinta"
   Bahasa visual: kertas krem + hijau tinta + aksen stabilo.
   Semua nilai warna, jarak, dan huruf ada di sini.
   JANGAN nulis warna mentah di file lain.
   ============================================================ */

/* ---------- 1. FONT ---------- */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ---------- 2. TOKEN ---------- */
:root {
  color-scheme: light dark;
  --green-50:  #EDF7F1;
  --green-100: #D3EDDF;
  --green-200: #A8DBBF;
  --green-300: #6FC496;
  --green-400: #3EAB74;
  --green-500: #2E9E63;
  --green-600: #23804F;
  --green-700: #1B653E;
  --green-800: #144C2F;
  --green-900: #0D3320;

  --gray-50:  #F7F9F8;
  --gray-100: #EFF2F0;
  --gray-200: #E1E6E3;
  --gray-300: #C9D1CC;
  --gray-400: #9AA69F;
  --gray-500: #6E7A74;
  --gray-600: #515B56;
  --gray-700: #3A423E;
  --gray-800: #252B28;
  --gray-900: #141816;

  --amber-50:  #FBF2DC;  --amber-600:  #96690A;
  --blue-50:   #EAF1FB;  --blue-600:   #1D5FB8;
  --violet-50: #F2EEFC;  --violet-600: #5B41A8;
  --red-50:    #FBEDEA;  --red-600:    #A63A2C;

  /* PERAN SEMANTIK — putih bersih, aksen hangat dikit */
  --bg:            #FFFFFF;
  --surface:       #FFFFFF;
  --surface-alt:   #F2F0EA;
  --border:        #E8E5DE;
  --border-strong: #D5D1C6;
  --text:          #1F2621;
  --text-2:        #4E5852;
  --text-muted:    #79837C;
  --brand:         var(--green-600);
  --brand-hover:   var(--green-700);
  --brand-text:    var(--green-700);
  --brand-soft:    #E7F0E6;
  --brand-border:  #C4DCC8;
  --on-brand:      #FFFFFF;

  /* Aksen stabilo & tinta (tombol utama, footer) */
  --sorot:      #FFD666;
  --on-sorot:   #2A2308;
  --ink:        #212722;
  --ink-hover:  #10150F;
  --on-ink:     #FFFFFF;

  /* Status buku */
  --status-ada:     var(--green-700);
  --status-ada-bg:  var(--brand-soft);
  --status-hold:    var(--amber-600);
  --status-hold-bg: var(--amber-50);

  /* Jarak — kelipatan 4 */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10:40px; --s-12:56px; --s-16:72px;

  /* Sudut */
  --r-sm: 6px;    /* badge */
  --r-md: 10px;   /* tombol, input */
  --r-lg: 18px;   /* kartu, modal */
  --r-full: 999px;/* chip */

  /* Bayangan */
  --sh-1: 0 1px 2px rgba(31,38,33,.05), 0 2px 8px -2px rgba(31,38,33,.06);
  --sh-2: 0 2px 4px rgba(31,38,33,.06), 0 16px 32px -16px rgba(31,38,33,.28);

  /* Huruf */
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Bricolage Grotesque", "Plus Jakarta Sans", Georgia, serif;
  --t-xs:   0.75rem;
  --t-sm:   0.8125rem;
  --t-base: 0.9375rem;
  --t-md:   1.0625rem;
  --t-lg:   1.25rem;
  --t-xl:   1.5rem;
  --t-2xl:  2rem;
  --t-3xl:  2.75rem;

  --lebar-maks: 1140px;
}

/* Mode gelap — ikut setelan HP, TANPA tombol. Palet soft & hangat. */
:root[data-theme="dark"] {
  --bg:            #1C211D;
  --surface:       #252B26;
  --surface-alt:   #2F3630;
  --border:        #3B443C;
  --border-strong: #4B554C;
  --text:          #DAE2DB;
  --text-2:        #ACB7AE;
  --text-muted:    #8D988F;
  --brand:         var(--green-400);
  --brand-hover:   var(--green-300);
  --brand-text:    var(--green-300);
  --brand-soft:    #24382C;
  --brand-border:  #32573F;
  --on-brand:      #0A1710;

  --sorot:      #E9C25C;
  --on-sorot:   #241D04;
  --ink:        #121713;
  --on-ink:     #DAE2DB;

  --status-ada:     var(--green-300);
  --status-ada-bg:  #24382C;
  --status-hold:    #E3BC66;
  --status-hold-bg: #3A3220;

  --amber-50:#3A3220;  --amber-600:#E3BC66;
  --blue-50:#223048;   --blue-600:#8FBAF2;
  --violet-50:#2A2440; --violet-600:#BCA5EF;
  --red-50:#3A2521;    --red-600:#E6A087;

  --sh-1: 0 1px 2px rgba(0,0,0,.25);
  --sh-2: 0 2px 4px rgba(0,0,0,.25), 0 16px 32px -16px rgba(0,0,0,.6);
}

/* ---------- 3. DASAR ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0; line-height: 1.18; text-wrap: balance;
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: -.02em;
}
h1 { font-size: var(--t-2xl); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); }
h4 { font-size: var(--t-md); font-weight: 600; font-family: var(--font); letter-spacing: 0; }
p  { margin: 0; }

a { color: var(--brand-text); text-underline-offset: 3px; }

img { max-width: 100%; display: block; }

/* Aksen stabilo — efek stabilo di buku catatan */
.sorot {
  background: var(--sorot);
  color: var(--on-sorot);
  box-shadow: 0 0 0 5px var(--sorot);
  border-radius: 6px;
  padding: 0 .12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Label kecil di atas judul */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-3);
  font-size: var(--t-xs); font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand-text);
}
.eyebrow::before {
  content: ""; width: 26px; height: 3px; border-radius: var(--r-full);
  background: var(--brand);
}

/* Fokus keyboard — WAJIB kelihatan */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.wrap { max-width: var(--lebar-maks); margin: 0 auto; padding: 0 var(--s-4); }
@media (min-width: 768px) { .wrap { padding: 0 var(--s-6); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- 4. TOMBOL ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-5);
  border: 1px solid transparent; border-radius: var(--r-md);
  font-family: var(--font); font-size: var(--t-base); font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease,
              transform .15s ease, box-shadow .15s ease;
}
.btn-primer {
  background: var(--ink); color: var(--on-ink);
  box-shadow: 0 1px 2px rgba(31,38,33,.15);
}
.btn-primer:hover {
  background: var(--ink-hover);
  transform: translateY(-1px);
  box-shadow: var(--sh-2);
}

.btn-sekunder {
  background: var(--surface); color: var(--brand-text); border-color: var(--brand-border);
}
.btn-sekunder:hover { background: var(--brand-soft); }

.btn-netral {
  background: transparent; color: var(--text-2); border-color: var(--border-strong);
}
.btn-netral:hover { background: var(--surface-alt); }

.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--surface-alt); color: var(--text-muted);
  border-color: var(--border); cursor: not-allowed;
  transform: none; box-shadow: none;
}
.btn-blok { width: 100%; }
.btn-lg { min-height: 52px; font-size: var(--t-md); }

/* ---------- 5. HERO ---------- */
.hero {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-4);
  padding: var(--s-12) 0 var(--s-10);
}
.hero::before {
  content: ""; position: absolute; z-index: -1;
  top: -140px; left: -180px; width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--brand-soft), transparent);
  pointer-events: none;
}
.hero h1 {
  max-width: 17ch;
  font-size: clamp(var(--t-2xl), 4.4vw, var(--t-3xl) + 8px);
  font-weight: 800;
  line-height: 1.08;
}
.hero-sub { color: var(--text-2); font-size: var(--t-md); }
.hero-aksi { flex-wrap: wrap; }
#katalog { scroll-margin-top: 88px; }

@media (max-width: 759px) {
  .hero { gap: var(--s-5); }
  .hero h1 { line-height: 1.25; }
  .hero h1 + .hero-sub { margin-top: var(--s-2); }
  .hero .hero-sub { line-height: 1.7; }
}

/* ---------- 6. KARTU BUKU ---------- */
.kartu {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--sh-1);
  display: flex; flex-direction: column;
  text-align: left; width: 100%; padding: 0;
  font-family: var(--font); cursor: pointer;
  transition: box-shadow .2s ease, border-color .2s ease, translate .2s ease;
}
.kartu:hover {
  box-shadow: var(--sh-2); border-color: var(--border-strong);
  translate: 0 -3px;
}

.kartu-foto {
  position: relative; aspect-ratio: 1 / 1;
  background: var(--surface-alt); overflow: hidden;
}
.kartu-foto img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s cubic-bezier(.2, .7, .3, 1);
}
.kartu:hover .kartu-foto img { transform: scale(1.045); }

.kartu[data-status="dipesan"] .kartu-foto img { opacity: .45; }

.kartu-badges {
  position: absolute; top: var(--s-2); left: var(--s-2);
  display: flex; gap: var(--s-1); flex-wrap: wrap;
}

.kartu-isi { padding: var(--s-3) var(--s-3) var(--s-4); display: flex; flex-direction: column; gap: var(--s-1); }
.kartu-judul {
  font-size: var(--t-md); font-weight: 600; color: var(--text); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.kartu-meta { font-size: var(--t-xs); color: var(--text-muted); }
.kartu-harga {
  font-size: var(--t-md); font-weight: 800; color: var(--brand-text);
  font-variant-numeric: tabular-nums; margin-top: var(--s-1);
}

.foto-kosong {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: var(--s-4); text-align: center;
  background: var(--surface-alt); color: var(--text-muted);
  font-size: var(--t-sm); font-weight: 500;
}

/* Animasi masuk kartu — delay diatur inline dari JS */
@keyframes muncul {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.grid-buku .kartu { animation: muncul .45s cubic-bezier(.2, .7, .3, 1) both; }
#daftar-dicari .baris-dicari { animation: muncul .45s cubic-bezier(.2, .7, .3, 1) both; }

/* ---------- 7. BADGE ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: var(--r-sm);
  font-size: var(--t-xs); font-weight: 700; line-height: 1.4;
  border: 1px solid transparent; white-space: nowrap;
  backdrop-filter: blur(4px);
}
.badge-kondisi {
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  color: var(--text-2); border-color: var(--border-strong);
}
.badge-baru    { background: var(--brand-soft); color: var(--brand-text); border-color: var(--brand-border); }
.badge-dipesan { background: var(--status-hold-bg); color: var(--status-hold); border-color: currentColor; }

/* ---------- 8. CHIP KATEGORI ---------- */
.chip {
  display: inline-flex; align-items: center;
  min-height: 38px; padding: 0 var(--s-4);
  background: var(--surface); color: var(--text-2);
  border: 1px solid var(--border-strong); border-radius: var(--r-full);
  font-family: var(--font); font-size: var(--t-sm); font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.chip:hover { background: var(--surface-alt); transform: translateY(-1px); }
.chip[aria-pressed="true"] {
  background: var(--text); color: var(--bg); border-color: var(--text);
}
.chip-baris {
  display: flex; gap: var(--s-2);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 2px 10px 2px;
}
.chip-baris::-webkit-scrollbar { display: none; }
.chip-baris.bisa-scroll {
  -webkit-mask-image: linear-gradient(90deg, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 94%, transparent 100%);
}

.filter-baris { display: flex; align-items: center; gap: var(--s-3); }
.filter-baris .chip-baris { flex: 1 1 auto; min-width: 0; }
.filter-aksi { display: flex; align-items: center; gap: var(--s-2); flex: none; }

.btn-saring {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-4);
  background: var(--surface); color: var(--text-2);
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  font-family: var(--font); font-size: var(--t-sm); font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .15s ease;
}
.btn-saring:hover { border-color: var(--brand); color: var(--brand-text); }
.btn-saring:active { transform: scale(.97); }
.btn-saring svg { width: 15px; height: 15px; }

/* ---------- 9. KOLOM CARI ---------- */
.cari { position: relative; }
.cari input {
  width: 100%; min-height: 52px;
  padding: 0 var(--s-4) 0 46px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  font-family: var(--font); font-size: var(--t-base);
  box-shadow: var(--sh-1);
}
.cari input::placeholder { color: var(--text-muted); }
.cari input:focus { border-color: var(--brand); }
.cari svg {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-muted); pointer-events: none;
}

/* ---------- 10. BARIS BADGE KEPERCAYAAN ---------- */
.percaya {
  display: grid; gap: var(--s-3);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  width: 100%;
}
.percaya-item {
  display: flex; gap: var(--s-3); align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s-4);
  box-shadow: var(--sh-1);
}
.percaya-ikon {
  flex: none; width: 40px; height: 40px; border-radius: var(--r-full);
  display: grid; place-items: center;
}
.percaya-ikon svg { width: 20px; height: 20px; }
.percaya-ikon.hijau  { background: var(--brand-soft);  color: var(--brand-text); }
.percaya-ikon.amber  { background: var(--amber-50);    color: var(--amber-600); }
.percaya-ikon.biru   { background: var(--blue-50);     color: var(--blue-600); }
.percaya-ikon.ungu   { background: var(--violet-50);   color: var(--violet-600); }
.percaya-item h4 { margin-bottom: 2px; }
.percaya-item p  { font-size: var(--t-sm); color: var(--text-muted); line-height: 1.5; }

/* ---------- 11. SKELETON ---------- */
.skel { background: var(--surface-alt); border-radius: var(--r-sm); position: relative; overflow: hidden; }
.skel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  animation: geser 1.4s infinite;
}
:root[data-theme="dark"] .skel::after {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
}
@keyframes geser { 100% { transform: translateX(100%); } }
.skel-kartu { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.skel-foto  { aspect-ratio: 1/1; }

/* ---------- 12. KEADAAN KOSONG / ERROR ---------- */
.kosong {
  grid-column: 1 / -1;
  text-align: center; padding: var(--s-12) var(--s-4);
  display: flex; flex-direction: column; align-items: center; gap: var(--s-3);
  background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--r-lg);
}
.kosong h3 { font-size: var(--t-md); }
.kosong p  { color: var(--text-muted); font-size: var(--t-base); max-width: 42ch; }

/* ---------- 13. GRID KATALOG ---------- */
.grid-buku {
  display: grid; gap: var(--s-3);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 600px)  { .grid-buku { grid-template-columns: repeat(3, 1fr); gap: var(--s-4); } }
@media (min-width: 900px)  { .grid-buku { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .grid-buku { grid-template-columns: repeat(5, 1fr); } }

/* ---------- 14. MODAL DETAIL ---------- */
/* hidden WAJIB menang: .modal-tirai display:flex bakal menimpa atribut
   hidden dari browser tanpa aturan ini. Tanpa ini modal/sheet nggak
   bisa ditutup. */
[hidden] { display: none !important; }

.modal-tirai {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(20, 26, 22, .6);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
@media (min-width: 768px) { .modal-tirai { align-items: center; padding: var(--s-6); } }

.modal {
  background: var(--surface); width: 100%; max-width: 880px;
  max-height: 92vh; overflow-y: auto;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--sh-2);
}
@media (min-width: 768px) { .modal { border-radius: var(--r-lg); } }

.modal-grid { display: grid; gap: var(--s-5); padding: var(--s-5); }
@media (min-width: 768px) { .modal-grid { grid-template-columns: 5fr 6fr; padding: var(--s-6); gap: var(--s-6); } }

.spek { width: 100%; border-collapse: collapse; font-size: var(--t-base); }
.spek th, .spek td { padding: var(--s-2) 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.spek th { color: var(--text-muted); font-weight: 500; width: 40%; }
.spek tr:last-child th, .spek tr:last-child td { border-bottom: none; }

/* ---------- 15. HEADER & FOOTER ---------- */
.header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-isi {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2) var(--s-5);
  min-height: 60px; padding-top: var(--s-2); padding-bottom: var(--s-2);
}
.header-cari { flex: 1 1 240px; max-width: 460px; margin-inline: auto; }
.header-cari .cari input { min-height: 44px; box-shadow: none; }
@media (max-width: 759px) {
  .header-cari { order: 1; flex: 1 1 auto; max-width: none; margin-inline: 0; }
  .nav { order: 2; flex-basis: 100%; justify-content: space-between; gap: var(--s-2); }
  .chip { min-height: 44px; }
  .chip-baris { display: none; }
  .filter-baris { gap: var(--s-2); }
  .filter-aksi { flex: 1 1 auto; gap: var(--s-2); }
  .filter-aksi .btn-saring,
  .filter-aksi .urut { flex: 1 1 0; }
  .filter-aksi .urut-tombol { width: 100%; }
}
.logo {
  display: flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-display); font-weight: 800; font-size: var(--t-lg);
  letter-spacing: -.01em; color: var(--text); text-decoration: none;
}
.logo svg { width: 26px; height: 26px; color: var(--brand); }
.nav { display: flex; gap: var(--s-4); }
.nav a {
  display: inline-flex; align-items: center; gap: var(--s-1);
  color: var(--text-2); font-size: var(--t-base); font-weight: 500; text-decoration: none;
  transition: color .15s ease;
}
.nav a svg { width: 17px; height: 17px; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--brand-text); font-weight: 700; }

/* Bottom nav — pola aplikasi mobile */
.nav-bawah { display: none; }
@media (max-width: 759px) {
  .nav { display: none; }
  .nav-bawah { display: flex; }
  body { padding-bottom: 78px; }
}
.nav-bawah {
  position: fixed; inset: auto 0 0 0; z-index: 40;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(31, 38, 33, .08);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-bawah a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 60px;
  font-size: var(--t-xs); font-weight: 600;
  color: var(--text-2); text-decoration: none;
  transition: color .15s ease;
}
.nav-bawah a svg { width: 22px; height: 22px; }
.nav-bawah a[aria-current="page"] { color: var(--brand-text); }

.footer { border-top: none; background: var(--ink); color: var(--on-ink); margin-top: var(--s-16); }
.footer-isi { padding: var(--s-10) 0; display: flex; flex-direction: column; gap: var(--s-3); align-items: flex-start; }
.footer .kecil { color: var(--on-ink); opacity: .72; }
.footer .btn-sekunder {
  background: transparent; color: var(--on-ink); border-color: color-mix(in srgb, var(--on-ink) 40%, transparent);
}
.footer .btn-sekunder:hover { background: color-mix(in srgb, var(--on-ink) 12%, transparent); }

/* ---------- 16. KOMPONEN HALAMAN ---------- */
.urut { position: relative; }
.urut-tombol {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-4);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  font-family: var(--font); font-size: var(--t-base);
  cursor: pointer;
  box-shadow: var(--sh-1);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.urut-tombol:hover { border-color: var(--brand); box-shadow: var(--sh-2); }
.urut-tombol:active { transform: scale(.97); }
.urut-tombol[aria-expanded="true"] { border-color: var(--brand); }
.urut-kap { font-size: var(--t-sm); color: var(--text-muted); }
.urut-nilai { font-weight: 600; color: var(--brand-text); }
.urut-chevron {
  width: 16px; height: 16px; color: var(--text-muted);
  transition: transform .2s ease;
}
.urut-tombol[aria-expanded="true"] .urut-chevron { transform: rotate(180deg); }
.urut-menu {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 30;
  min-width: 190px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--sh-2);
  padding: var(--s-1);
  animation: muncul-menu .18s cubic-bezier(.2, .7, .3, 1);
}
@keyframes muncul-menu {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.urut-item {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  width: 100%; min-height: 40px; padding: 0 var(--s-3);
  background: none; border: 0; border-radius: var(--r-sm);
  font-family: var(--font); font-size: var(--t-base); color: var(--text-2);
  cursor: pointer; text-align: left;
  transition: background-color .12s ease, color .12s ease;
}
.urut-item:hover { background: var(--brand-soft); color: var(--brand-text); }
.urut-item[aria-selected="true"] { color: var(--brand-text); font-weight: 600; }
.urut-cek {
  flex: none; width: 14px; height: 14px; color: var(--brand);
  opacity: 0; transform: scale(.5);
  transition: opacity .15s ease, transform .15s ease;
}
.urut-item[aria-selected="true"] .urut-cek { opacity: 1; transform: scale(1); }

.skel-teks { height: 12px; }
.skel-teks.panjang { width: 85%; }
.skel-teks.pendek { width: 55%; }

.modal { position: relative; }
.modal-tutup {
  position: absolute; top: var(--s-2); right: var(--s-2); z-index: 2;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--border-strong); border-radius: var(--r-full);
  background: var(--surface); color: var(--text-2); cursor: pointer;
}
.modal-tutup:hover { background: var(--surface-alt); }
.modal-tutup svg { width: 18px; height: 18px; }

.galeri { display: flex; flex-direction: column; gap: var(--s-2); }
.galeri-utama {
  display: flex; align-items: center; justify-content: center;
  min-height: 240px;
  background: var(--surface-alt); border-radius: var(--r-md); overflow: hidden;
}
.galeri-utama img { max-height: 56vh; width: auto; max-width: 100%; }
.galeri-thumb { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.thumb {
  width: 64px; height: 64px; padding: 0;
  border: 2px solid var(--border); border-radius: var(--r-sm);
  overflow: hidden; background: var(--surface-alt); cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-current="true"] { border-color: var(--brand); }

.modal-harga { font-size: var(--t-xl); font-weight: 800; color: var(--brand-text); }

.baris-dicari {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s-4);
  box-shadow: var(--sh-1);
}
.baris-dicari h3 { font-size: var(--t-base); font-weight: 600; font-family: var(--font); letter-spacing: 0; }
@media (max-width: 599px) {
  .baris-dicari { flex-direction: column; align-items: flex-start; }
  .baris-dicari .btn { width: 100%; }
}

.bagian {
  display: flex; flex-direction: column; gap: var(--s-3);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s-5);
  box-shadow: var(--sh-1);
}
.bagian ol { margin: 0; padding-left: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); }
.prosa { display: flex; flex-direction: column; gap: var(--s-3); }

/* Sheet "Saring" — pola marketplace */
.sheet { max-width: 520px; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-5);
  border-bottom: 1px solid var(--border);
}
.sheet-head h2 { font-size: var(--t-lg); }
.sheet-tutup { position: static; }
.sheet-body {
  padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-5);
  max-height: 70vh; overflow-y: auto;
}
.grup-filter { display: flex; flex-direction: column; gap: var(--s-2); }
.grup-filter h3 {
  font-size: var(--t-xs); font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted);
}
.grup-chip { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* ---------- 17. BANTU ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.tumpuk   { display: flex; flex-direction: column; gap: var(--s-4); }
.baris    { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.antara   { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.kecil    { font-size: var(--t-sm); color: var(--text-muted); }
.angka    { font-variant-numeric: tabular-nums; }
/* ---------- TOMBOL TEMA ---------- */
.tombol-tema {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; flex: none;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.tombol-tema:hover { color: var(--text); border-color: var(--border-strong); }
.tombol-tema svg { width: 18px; height: 18px; }
.tombol-tema .ikon-terang { display: none; }
:root[data-theme="dark"] .tombol-tema .ikon-terang { display: block; }
:root[data-theme="dark"] .tombol-tema .ikon-gelap  { display: none; }
