/* ============================================================
   CekTermurah -- tema terang ala dashboard e-commerce modern.
   Aksen gradasi indigo/ungu untuk CTA utama, hijau untuk harga
   & badge "termurah", merah muda untuk badge diskon.
   ============================================================ */

:root {
  --bg: #F3F4F8;
  --surface: #FFFFFF;
  --surface-alt: #F8F9FC;
  --border: #E7E9F1;
  --border-strong: #D7DAE6;

  --text: #1B1E2B;
  --text-muted: #6B7086;
  --text-faint: #9498AB;

  --indigo: #5B4FE8;
  --indigo-dark: #4438D6;
  --purple: #8B5CF6;
  --grad: linear-gradient(135deg, var(--indigo), var(--purple));

  --green: #14B872;
  --green-bg: #E8F9F1;
  --pink: #EC4C7C;
  --pink-bg: #FDECF1;
  --amber: #F5A623;
  --amber-bg: #FDF3E2;
  --blue: #2F80ED;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(20, 20, 43, 0.05);
  --shadow-md: 0 4px 16px rgba(20, 20, 43, 0.08);
  --shadow-lg: 0 12px 32px rgba(20, 20, 43, 0.12);

  --font-body: "Plus Jakarta Sans", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --sidebar-w: 232px;
}

[data-theme="dark"] {
  --bg: #12131C;
  --surface: #1A1C29;
  --surface-alt: #20222F;
  --border: #2B2E40;
  --border-strong: #383B52;

  --text: #EDEEF5;
  --text-muted: #9CA0B5;
  --text-faint: #6C7086;

  --green-bg: #103326;
  --pink-bg: #3A1826;
  --amber-bg: #3A2E14;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.45);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 15px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.45;
  transition: background 0.2s ease, color 0.2s ease;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ---------------- App shell ---------------- */
.app { display: flex; min-height: 100vh; }

/* ---------------- Sidebar ---------------- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 60;
  transition: width 0.18s ease, padding 0.18s ease;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; }
.sidebar-collapse {
  margin-left: auto; flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-alt);
  color: var(--text-muted); cursor: pointer; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s ease, color 0.12s ease, transform 0.18s ease;
}
.sidebar-collapse:hover { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.brand__mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  overflow: hidden; /* logo persegi/landscape tetap terpotong rapi mengikuti bentuk badge */
}
/* Kalau public/logo.png ada, ini yang tampil (menggantikan teks "Rp"
   fallback) -- ganti file itu kapan saja tanpa perlu ubah kode apapun.
   Nama "CekTermurah" di .brand__name TIDAK PERNAH ikut berubah oleh ini,
   keduanya elemen terpisah. */
.brand__mark-img { width: 100%; height: 100%; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-weight: 800; font-size: 0.98rem; color: var(--text); }
.brand__tagline { font-size: 0.66rem; color: var(--text-faint); }

.sidenav { display: flex; flex-direction: column; gap: 2px; }
.sidenav--secondary { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.sidenav__item {
  display: flex; align-items: center; gap: 10px;
  border: none; background: none; cursor: pointer;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
  text-align: left; transition: background 0.12s ease, color 0.12s ease;
}
.sidenav__icon { font-size: 1rem; width: 20px; text-align: center; }
.sidenav__item:hover { background: var(--surface-alt); color: var(--text); }
.sidenav__item.is-active { background: var(--indigo); color: #fff; box-shadow: var(--shadow-sm); }

.theme-toggle {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface-alt);
  border-radius: var(--radius-sm); padding: 9px 12px; cursor: pointer;
  font-size: 0.78rem; font-weight: 600; color: var(--text-muted);
  margin-top: 12px;
}
.theme-toggle:hover { border-color: var(--border-strong); color: var(--text); }

/* ---------------- Pemilih bahasa ---------------- */
.lang-switcher-wrap { position: relative; margin-top: 12px; }
.lang-switcher-wrap .theme-toggle { margin-top: 0; width: 100%; }
.lang-menu {
  position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; z-index: 80;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: 4px; display: flex; flex-direction: column; gap: 2px;
  max-height: min(60vh, 280px); overflow-y: auto; /* jaga-jaga kalau daftar bahasa nambah banyak nanti -- jadi scroll di dalam kotaknya sendiri, bukan melebar/terpotong di layar */
}
/* PENTING: tanpa baris ini, atribut `hidden` di HTML tidak berefek apa pun
   -- karena aturan `display: flex` di atas (milik situs) selalu menang
   dibanding aturan bawaan browser untuk [hidden] (cuma "user-agent style",
   prioritas terendah). Ini yang bikin dropdown-nya kemarin tidak pernah
   benar-benar tertutup meski atribut hidden-nya sudah ke-set true. */
.lang-menu[hidden] { display: none; }
.lang-option {
  display: flex; align-items: center; gap: 8px;
  border: none; background: none; cursor: pointer; text-align: left;
  padding: 8px 10px; border-radius: 6px;
  font-size: 0.78rem; font-weight: 600; color: var(--text-muted);
}
.lang-option:hover { background: var(--surface-alt); color: var(--text); }
.lang-option__flag { font-size: 1rem; }

/* ---------------- Pemilih bahasa versi topbar (pojok kanan atas) ---------------- */
/* Beda dari versi sidebar di atas: cuma tombol ikon kecil, dropdown-nya
   turun ke BAWAH (bukan ke atas) & rata ke kanan supaya tidak keluar dari
   tepi layar, karena posisinya sekarang di ujung kanan halaman. */
.lang-switcher-wrap--topbar { position: relative; margin-top: 0; margin-left: auto; flex-shrink: 0; }
.lang-trigger {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  border: 1px solid var(--border); background: var(--surface-alt);
  color: var(--text-muted); cursor: pointer; font-size: 1.15rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.lang-trigger:hover { background: var(--surface); color: var(--text); border-color: var(--border-strong); }

/* ---------------- Chip tag kategori (di bawah kolom pencarian Barang) ---------------- */
.tag-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tag-chip {
  border: 1px solid var(--border); background: var(--surface-alt); color: var(--text-muted);
  font-size: 0.76rem; font-weight: 600; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.tag-chip:hover { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.tag-chip.is-active { background: var(--indigo); color: #fff; border-color: var(--indigo); }

/* ---------------- Notifikasi pengganti (aksesoris tampil karena produk utama tidak ada) --- */
.accessory-fallback-note {
  background: rgba(99, 102, 241, 0.1); border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 0.8rem; color: var(--text-muted);
}

/* ---------------- Produk terkait (aksesoris, ditampilkan di bawah hasil utama) ---------------- */
.related-accessories { margin-top: 24px; padding-top: 18px; border-top: 1px dashed var(--border); }
.related-accessories__title { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); margin-bottom: 10px; }

/* ---------------- Tawaran langsung provider (Backpacker) ---------------- */
.live-offers { margin: 14px 0; padding: 12px; border-radius: 10px; background: rgba(34, 197, 94, 0.06); border: 1px solid rgba(34, 197, 94, 0.25); }
.live-offers__title { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; }
.live-offers .bp-leg { margin-bottom: 6px; }
.lang-menu--topbar { bottom: auto; top: calc(100% + 8px); left: auto; right: 0; min-width: 170px; }

/* ---------------- Sidebar "mini" (icon-only), desktop only ---------------- */
/* Klik tombol « di pojok kanan atas sidebar untuk kecilkan jadi rel ikon;
   klik lagi (atau klik ikonnya, lihat script.js) untuk kembali melebar. */
.sidebar.is-collapsed { width: 68px; padding: 18px 10px; }
.sidebar.is-collapsed .brand { justify-content: center; padding: 4px 0 20px; }
.sidebar.is-collapsed .brand__text,
.sidebar.is-collapsed .sidenav__label,
.sidebar.is-collapsed #theme-toggle-label { display: none; }
.sidebar.is-collapsed .sidebar-collapse { margin-left: 0; }
.sidebar.is-collapsed #sidebar-collapse-icon { transform: rotate(180deg); display: inline-block; }
.sidebar.is-collapsed .sidenav__item,
.sidebar.is-collapsed .theme-toggle { justify-content: center; padding: 10px 0; gap: 0; }
.sidebar.is-collapsed .sidenav__icon { width: auto; }

/* ---------------- Content column ---------------- */
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 24px; background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40;
}

.hamburger {
  display: none;
  border: 1px solid var(--border); background: var(--surface-alt);
  border-radius: var(--radius-sm); width: 36px; height: 36px;
  font-size: 1rem; cursor: pointer; color: var(--text); flex-shrink: 0;
}

.quicksearch {
  flex: 1; max-width: 620px; display: flex; align-items: center; gap: 6px;
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 6px 4px 16px;
}
.quicksearch__icon { color: var(--text-faint); font-size: 1rem; }
.quicksearch input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 0.85rem; padding: 9px 6px; color: var(--text); min-width: 0;
}
.quicksearch input::placeholder { color: var(--text-faint); }
.quicksearch button {
  background: var(--grad); color: #fff; border: none;
  font-weight: 700; font-size: 0.8rem; padding: 9px 18px;
  border-radius: 999px; cursor: pointer; flex-shrink: 0;
}

.scan-inline { flex-shrink: 0; }
.scan-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--pink-bg); border: 1px solid var(--pink);
  color: var(--pink); font-weight: 700; font-size: 0.78rem;
  padding: 10px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.scan-btn:hover { filter: brightness(0.97); }
.scan-status {
  font-size: 0.72rem; color: var(--text-muted); margin: -4px 0 10px;
  min-height: 1.1em;
}

/* ---------------- Modal "Cari lewat foto" ---------------- */
.scan-modal-backdrop {
  position: fixed; inset: 0; z-index: 300; background: rgba(15,17,26,0.55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
/* [hidden] harus lebih spesifik dari .scan-modal-backdrop, sama seperti
   .privacy-backdrop -- lihat catatan di blok itu. */
.scan-modal-backdrop[hidden] { display: none; }
.scan-modal {
  position: relative; width: 100%; max-width: 400px;
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 22px 20px 20px; text-align: center;
}
.scan-modal__close {
  position: absolute; top: 12px; right: 14px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: var(--surface-alt); color: var(--text-muted); font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.scan-modal__close:hover { background: var(--border); color: var(--text); }
.scan-modal__title { font-size: 1rem; font-weight: 800; margin: 0 0 4px; padding-right: 24px; }
.scan-modal__hint { font-size: 0.78rem; color: var(--text-muted); margin: 0 0 16px; }
.scan-modal__option {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 13px 14px; margin-bottom: 10px; font-weight: 700; font-size: 0.85rem; color: var(--text);
  cursor: pointer; text-align: left; transition: border-color 0.12s ease, background-color 0.12s ease;
}
.scan-modal__option:hover { border-color: var(--indigo); background: var(--surface); }
.scan-modal__option-icon { font-size: 1.2rem; flex-shrink: 0; }
.scan-modal__note { font-size: 0.74rem; color: var(--pink); font-weight: 600; margin: 4px 0 0; min-height: 1.2em; }
.scan-modal__video-wrap {
  background: #000; border-radius: var(--radius-md); overflow: hidden; margin-bottom: 14px;
  aspect-ratio: 1 / 1;
}
#scan-camera-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-modal__camera-actions { display: flex; flex-direction: column; gap: 8px; }
.scan-modal__capture {
  padding: 12px; border: none; border-radius: var(--radius-sm);
  background: var(--grad); color: #fff; font-weight: 700; font-size: 0.85rem; cursor: pointer;
}
.scan-modal__cancel {
  padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-muted); font-weight: 600; font-size: 0.8rem; cursor: pointer;
}
.scan-modal__cancel:hover { background: var(--surface-alt); }


/* ---------------- Main / Panels ---------------- */
.main { flex: 1; padding: 22px 24px 40px; }
.panel { display: none; }
.panel.is-active { display: block; animation: fadeIn 0.15s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.panel-head { margin-bottom: 16px; }
.panel-title { font-size: 1.3rem; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.01em; }
.panel-sub { font-size: 0.82rem; color: var(--text-muted); margin: 0; }

/* Search bars */
.search {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 4px 6px;
  flex: 1; min-width: 240px; box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease;
}
.search:focus-within { border-color: var(--indigo); }
.search__icon { color: var(--text-faint); padding-left: 6px; font-size: 0.95rem; }
.search input {
  flex: 1; border: none; outline: none; font-size: 0.86rem;
  padding: 10px 4px; background: transparent; color: var(--text); min-width: 0;
}
.search input::placeholder { color: var(--text-faint); }

/* Input tanggal dibuat ramping -- default browser (ikon kalender besar +
   placeholder "dd/mm/yyyy" lebar) terasa berat dibanding input teks di
   sebelahnya. Lebar dikunci pas, ikon kalender dikecilkan & dipertipis. */
.search input[type="date"] {
  flex: 0 0 auto;
  width: 128px;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
}
.search input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.5;
  cursor: pointer;
  width: 14px; height: 14px;
  transition: opacity 0.15s ease;
}
.search input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 0.9; }
[data-theme="dark"] .search input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1); /* ikon kalender bawaan browser hitam pekat -- dibalik biar kelihatan di tema gelap */
}

.search--backpacker input[name="nights"] { flex: 0 0 76px; text-align: center; }
.search--backpacker .bp-roundtrip,
.search--backpacker .bp-toggle {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.78rem; color: var(--text-muted); padding: 0 4px; white-space: nowrap;
}
.search--backpacker .bp-hotel-dates { display: flex; align-items: center; gap: 6px; }
.search__arrow { color: var(--text-faint); padding: 0 2px; }

.search button {
  font-weight: 700; font-size: 0.82rem;
  background: var(--grad); color: #fff; border: none;
  padding: 10px 20px; border-radius: var(--radius-sm); cursor: pointer;
  white-space: nowrap; transition: filter 0.15s ease, transform 0.1s ease;
}
.search button:hover { filter: brightness(1.08); }
.search button:active { transform: scale(0.98); }

.hint { color: var(--text-faint); font-size: 0.74rem; margin: 6px 0 16px; }

.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; align-items: center; }
.filters__label { font-size: 0.68rem; font-weight: 700; color: var(--text-faint); letter-spacing: 0.06em; }
.filter-chip {
  font-weight: 600; font-size: 0.76rem;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
  padding: 6px 14px; border-radius: 999px; cursor: pointer; transition: all 0.15s ease;
}
.filter-chip.is-on { border-color: var(--indigo); color: var(--indigo); background: #EEECFD; }

/* ---------------- Status ---------------- */
.status { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 12px; min-height: 1.2em; }
.status.is-error { color: #D63C5E; }

/* ---------------- Results: GRID (Barang) ---------------- */
.results--grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .results--grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 860px) { .results--grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }

.gcard {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 10px;
  display: flex; flex-direction: column; gap: 7px;
  position: relative; cursor: pointer; text-decoration: none; color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.gcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }

.gcard__thumb {
  position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius-sm);
  background: var(--surface-alt); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.gcard__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gcard__thumb-fallback { font-size: 2rem; display: none; }
.gcard__thumb-fallback.is-shown { display: block; }

.gcard__badge-best {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: var(--green); color: #fff; font-size: 0.58rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.03em;
  padding: 3px 7px; border-radius: 5px;
}
.gcard__badge-match {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: var(--indigo); color: #fff; font-size: 0.58rem; font-weight: 800;
  text-transform: uppercase; padding: 3px 7px; border-radius: 5px;
}
.gcard__badge-discount {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: var(--pink); color: #fff; font-size: 0.62rem; font-weight: 800;
  padding: 3px 7px; border-radius: 5px; box-shadow: var(--shadow-sm);
}
.gcard__price-strike { color: var(--text-faint); font-size: 0.72rem; text-decoration: line-through; margin-left: 6px; }

.gcard__title {
  font-weight: 500; font-size: 0.78rem; line-height: 1.3; margin: 0; color: var(--text);
  min-height: 2em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gcard__meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 0.66rem; color: var(--text-muted); }
.gcard__price { font-family: var(--font-mono); font-weight: 700; font-size: 0.92rem; color: var(--text); margin-top: auto; }
.gcard__price-original { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-faint); font-weight: 400; }
.gcard__note { font-size: 0.6rem; color: var(--pink); }

/* Tombol Beli & Bagikan: ukuran/bentuk sama persis, cuma beda warna, ditumpuk vertikal */
.gcard__footer { display: flex; flex-direction: column; gap: 6px; }
.gcard__btn {
  display: block; width: 100%; text-align: center; font-weight: 700; font-size: 0.72rem;
  padding: 8px 0; border-radius: var(--radius-sm); border: none; cursor: pointer; font-family: inherit;
}
.gcard__cta { color: #fff; background: var(--indigo); }
.gcard:hover .gcard__cta { background: var(--indigo-dark); }
.gcard__share { color: var(--blue); background: #E8F1FD; }
.gcard__share:hover { background: #D9E8FC; }

/* ---------------- Results: LIST (Tiket, Hotel, Wisata) ---------------- */
.results--list { display: grid; gap: 10px; }

.card {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 13px 14px; position: relative; cursor: pointer; text-decoration: none; color: inherit;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.12s ease, border-color 0.12s ease;
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card.is-cheapest { border-color: var(--green); box-shadow: 0 0 0 1px var(--green) inset; }

.card__icon { font-size: 1.35rem; text-align: center; }
.card__icon--photo {
  width: 44px; height: 44px; border-radius: var(--radius-sm); overflow: hidden;
  font-size: 1.1rem; display: flex; align-items: center; justify-content: center; background: var(--surface-alt);
}
.card__icon--photo img { width: 100%; height: 100%; object-fit: cover; }

.card__body { min-width: 0; }
.card__title { font-weight: 700; font-size: 0.85rem; margin: 0 0 3px; color: var(--text); }
.card__meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 0.68rem; color: var(--text-muted); align-items: center; margin-bottom: 8px; }

.platform-tag {
  display: inline-flex; align-items: center; text-transform: uppercase;
  font-size: 0.58rem; font-weight: 800; letter-spacing: 0.02em;
  padding: 2px 7px; border-radius: 4px; color: var(--indigo); background: #EEECFD;
}
.type-tag { font-size: 0.6rem; text-transform: uppercase; color: var(--text-muted); border: 1px solid var(--border); padding: 1px 6px; border-radius: 4px; }

.card__price { text-align: right; white-space: nowrap; }
.price__idr { font-family: var(--font-mono); font-weight: 700; font-size: 0.95rem; color: var(--text); }
.price__original { font-family: var(--font-mono); font-size: 0.64rem; color: var(--text-faint); }

/* Tombol Pesan & Bagikan: ukuran/bentuk sama persis, ditumpuk vertikal di bawah meta */
.card__btn-group { display: flex; flex-direction: column; gap: 6px; max-width: 220px; }
.card__btn {
  display: block; width: 100%; text-align: center; font-weight: 700; font-size: 0.74rem;
  padding: 7px 12px; border-radius: var(--radius-sm); border: none; cursor: pointer; font-family: inherit;
}
.card__cta { color: #fff; background: var(--indigo); }
.card__share { color: var(--blue); background: #E8F1FD; }
.card__share:hover { background: #D9E8FC; }

.badge-cheapest-list {
  position: absolute; top: -8px; left: 14px;
  background: var(--green); color: #fff; font-size: 0.58rem; font-weight: 800;
  text-transform: uppercase; padding: 3px 8px; border-radius: 5px; box-shadow: var(--shadow-sm);
}

.empty { color: var(--text-muted); padding: 30px 0; text-align: center; font-size: 0.85rem; }



.date-callout { border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; font-size: 0.85rem; line-height: 1.5; }
.date-callout--found { background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.35); }
.date-callout--empty { background: rgba(148, 163, 184, 0.12); border: 1px solid rgba(148, 163, 184, 0.3); color: var(--text-muted); }
.date-callout__price { font-weight: 700; font-size: 1rem; margin-top: 4px; }

.gcard__date-estimate { font-size: 0.72rem; color: var(--text-muted); margin: -4px 0 6px; }
.gcard__date-estimate span { display: block; font-size: 0.68rem; color: var(--text-faint); }
.price__stay { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.price__stay strong { color: var(--text-strong, inherit); }

/* ---------------- Backpacker ---------------- */
.bp-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 6px; }
.bp-mode-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 15px; cursor: pointer; transition: all 0.15s ease; box-shadow: var(--shadow-sm);
}
.bp-mode-card:hover { box-shadow: var(--shadow-md); }
.bp-mode-card.is-selected { border-color: var(--indigo); box-shadow: 0 0 0 1px var(--indigo) inset; }
.bp-mode-card.is-unavailable { opacity: 0.45; cursor: not-allowed; }
.bp-mode-card__icon { font-size: 1.5rem; margin-bottom: 6px; }
.bp-mode-card__name { font-weight: 700; font-size: 0.88rem; margin: 0 0 4px; text-transform: capitalize; }
.bp-mode-card__total { font-family: var(--font-mono); font-weight: 700; font-size: 0.98rem; color: var(--green); }
.bp-mode-card__hint { font-size: 0.62rem; color: var(--text-faint); margin-top: 3px; }

.bp-detail { margin-top: 16px; }
.bp-leg {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px;
  text-decoration: none; color: inherit; background: var(--surface);
}
.bp-leg--link { cursor: pointer; transition: border-color 0.12s ease, box-shadow 0.12s ease; }
.bp-leg--link:hover { border-color: var(--indigo); box-shadow: var(--shadow-sm); }
.bp-leg__num { font-family: var(--font-mono); color: var(--indigo); font-weight: 700; width: 20px; flex-shrink: 0; font-size: 0.85rem; }
.bp-leg__body { flex: 1; min-width: 0; }
.bp-leg__title { font-weight: 700; font-size: 0.8rem; margin: 0 0 2px; }
.bp-leg__meta { font-size: 0.68rem; color: var(--text-muted); }
.bp-leg__price { font-family: var(--font-mono); font-weight: 700; color: var(--amber); white-space: nowrap; font-size: 0.85rem; }

.bp-summary { margin-top: 12px; padding: 14px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-md); }
.bp-summary__row { display: flex; justify-content: space-between; font-size: 0.8rem; padding: 3px 0; color: var(--text-muted); }
.bp-summary__row.total { color: var(--text); font-weight: 700; font-size: 0.98rem; border-top: 1px solid var(--border); margin-top: 5px; padding-top: 9px; }
.bp-summary__row.total .bp-summary__value { color: var(--green); font-family: var(--font-mono); }
.bp-summary__value { font-family: var(--font-mono); }

/* ---------------- Share popover ---------------- */
.share-popover__backdrop { position: fixed; inset: 0; z-index: 200; background: transparent; }
.share-popover {
  position: fixed; z-index: 201; width: 240px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); padding: 12px; animation: fadeIn 0.12s ease;
}
.share-popover__title { font-weight: 700; font-size: 0.78rem; margin: 0 0 8px; }
.share-popover__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.share-opt {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 1px solid var(--border); background: var(--surface-alt); border-radius: var(--radius-sm);
  padding: 8px 4px; font-size: 0.62rem; font-weight: 600; color: var(--text-muted);
  text-decoration: none; cursor: pointer;
}
.share-opt:hover { border-color: var(--border-strong); color: var(--text); }
.share-opt__icon {
  width: 26px; height: 26px; border-radius: 50%; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
}
.share-opt__icon--wa { background: #25D366; }
.share-opt__icon--tg { background: #229ED9; }
.share-opt__icon--fb { background: #1877F2; font-weight: 800; }
.share-opt__icon--tw { background: #0F1419; }
.share-opt__icon--ig { background: radial-gradient(circle at 30% 110%, #fdf497, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.share-opt__icon--tt { background: #000; }
.share-opt__icon--copy { background: var(--text-faint); }
.share-opt__icon--ok { background: var(--green); }
.share-popover__note { font-size: 0.7rem; color: var(--green); font-weight: 700; margin: 8px 0 0; text-align: center; min-height: 1.2em; }
.share-popover__note.is-error { color: var(--pink); font-weight: 600; word-break: break-all; }

/* ---------------- Footer ---------------- */
.foot { padding: 16px 24px 30px; color: var(--text-faint); font-size: 0.7rem; text-align: center; }
.foot p { margin: 0; }

/* ---------------- Responsive (mobile-safe) ---------------- */
@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; height: 100vh;
    transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: var(--shadow-lg);
  }
  .sidebar.is-open { transform: translateX(0); }
  .hamburger { display: flex; align-items: center; justify-content: center; }
  /* Mode "mini" cuma relevan di desktop -- di mobile sidebar sudah off-canvas
     (muncul penuh lewat tombol ☰), jadi tombol « disembunyikan & lebar
     dipaksa penuh supaya tidak ada dua state tumpang tindih. */
  .sidebar-collapse { display: none; }
  .sidebar.is-collapsed { width: var(--sidebar-w); padding: 18px 14px; }
  .sidebar.is-collapsed .brand__text { display: flex; }
  .sidebar.is-collapsed .sidenav__label,
  .sidebar.is-collapsed #theme-toggle-label { display: initial; }
  .sidebar.is-collapsed .sidenav__item,
  .sidebar.is-collapsed .theme-toggle { justify-content: flex-start; padding: 10px 12px; gap: 10px; }
}

@media (max-width: 640px) {
  .main { padding: 16px 14px 32px; }
  .topbar { padding: 10px 12px; flex-wrap: wrap; }
  .quicksearch { order: 1; flex: 1 1 100%; max-width: none; }
  .scan-inline { order: 2; }
  .scan-btn__text { display: none; }
  .scan-btn { padding: 10px; }
  .search { min-width: 0; flex-wrap: wrap; }
  .search input[type="date"] { width: 118px; }
  .card { grid-template-columns: 36px 1fr; row-gap: 6px; padding: 12px; }
  .card__price { grid-column: 1 / -1; text-align: left; padding-top: 6px; border-top: 1px dashed var(--border); }
  .card__btn-group { max-width: none; }
  .search--backpacker { flex-wrap: wrap; }
  .search--backpacker input[name="nights"] { flex: 1 1 100%; text-align: left; }
  .share-popover { width: calc(100vw - 32px); left: 16px !important; right: 16px; }
  .privacy-modal { width: calc(100vw - 24px); max-height: 88vh; }
}

@media (max-width: 380px) {
  .search input[type="date"] { width: 104px; font-size: 0.72rem; }
  .results--grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gcard__title { font-size: 0.72rem; }
}

@media (prefers-reduced-motion: reduce) {
  .panel.is-active { animation: none; }
}

/* ---------------- Static pages: Tentang Kami, Contact Center ---------------- */
.static-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 20px; box-shadow: var(--shadow-sm); max-width: 680px;
}
.static-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; margin: 0 0 12px; }
.static-card p:last-child { margin-bottom: 0; }

.contact-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.contact-row:last-of-type { border-bottom: none; }
.contact-row__icon {
  width: 38px; height: 38px; border-radius: 50%; background: var(--surface-alt);
  display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0;
}
.contact-row__label { font-size: 0.68rem; color: var(--text-faint); margin: 0 0 2px; }
.contact-row__value { font-size: 0.85rem; font-weight: 700; color: var(--indigo); text-decoration: none; }
.contact-note { font-size: 0.72rem; color: var(--text-faint); margin-top: 14px; font-style: italic; }
.contact-note code { background: var(--surface-alt); border: 1px solid var(--border); padding: 1px 5px; border-radius: 3px; }

/* ---------------- Privacy policy popup ---------------- */
.privacy-backdrop {
  position: fixed; inset: 0; z-index: 300; background: rgba(15,17,26,0.55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
/* PENTING: [hidden] harus lebih spesifik dari .privacy-backdrop supaya
   benar-benar menyembunyikan popup -- tanpa baris ini, popup tidak akan
   pernah tertutup meski atribut `hidden` sudah di-set lewat JavaScript,
   karena keduanya sama-sama mengatur `display` dengan spesifisitas setara. */
.privacy-backdrop[hidden] { display: none; }
.privacy-modal {
  position: relative; width: 100%; max-width: 560px; max-height: 82vh;
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
}
.privacy-modal__close {
  position: absolute; top: 12px; right: 14px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: var(--surface-alt); color: var(--text-muted); font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.privacy-modal__close:hover { background: var(--border); color: var(--text); }
.privacy-modal__title { font-size: 1.05rem; font-weight: 800; margin: 0; padding: 20px 44px 12px 20px; }
.privacy-modal__body { overflow-y: auto; padding: 0 20px 12px; font-size: 0.8rem; color: var(--text-muted); line-height: 1.6; }
.privacy-modal__body h3 { font-size: 0.86rem; color: var(--text); margin: 16px 0 6px; }
.privacy-modal__body h3:first-child { margin-top: 0; }
.privacy-modal__body p { margin: 0 0 10px; }
.privacy-modal__warning-title { color: #B45309; }
.privacy-modal__warning {
  background: #FFF7E6; border: 1px solid var(--amber); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 10px;
}
.privacy-modal__warning p { color: #92400E; margin: 0; }
.privacy-modal__disclaimer { font-size: 0.7rem; font-style: italic; color: var(--text-faint); border-top: 1px dashed var(--border); padding-top: 10px; }
.privacy-modal__accept {
  margin: 12px 20px 20px; padding: 12px; border: none; border-radius: var(--radius-sm);
  background: var(--grad); color: #fff; font-weight: 700; font-size: 0.85rem; cursor: pointer; flex-shrink: 0;
}

/* ============================================================
   FITUR TAMBAHAN -- kalkulator hemat, tren harga, transparansi
   data, kartu perjalanan Backpacker.
   Lihat public/enhancements.js untuk logikanya.
   ============================================================ */

/* ---- strip transparansi data (atas semua panel) ---- */
.trust-strip {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.72rem; color: var(--text-muted);
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 7px 12px; margin-bottom: 14px;
}
.trust-strip strong { color: var(--text); }

/* ---- info-tip: ikon "i" kecil dengan tooltip murni CSS (hover/focus, jalan juga di layar sentuh via :focus) ---- */
.info-tip { position: relative; display: inline-flex; margin-left: 4px; }
.info-tip__icon {
  display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px;
  border-radius: 50%; background: rgba(255,255,255,0.35); color: inherit; font-size: 0.62rem; font-style: italic;
  font-weight: 700; cursor: help; font-family: Georgia, serif;
}
.trust-strip .info-tip__icon { background: var(--border-strong); color: var(--text-muted); }
.info-tip__bubble {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px);
  width: 220px; background: var(--text); color: var(--surface); font-size: 0.68rem; font-weight: 400;
  line-height: 1.4; padding: 8px 10px; border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transition: opacity 0.15s ease, transform 0.15s ease; pointer-events: none; z-index: 30;
}
.info-tip__bubble::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--text);
}
.info-tip:hover .info-tip__bubble, .info-tip:focus .info-tip__bubble, .info-tip:focus-within .info-tip__bubble {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.info-tip--on-badge { vertical-align: middle; }

/* ---- Suggestion Dropdown (Auto-complete) ---- */
.suggestion-dropdown {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 220px;
  overflow-y: auto;
  font-size: 14px;
  z-index: 10000;
}

.suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid var(--border);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: var(--surface-alt);
}

.suggestion-item:active {
  background: var(--indigo);
  color: #fff;
}

/* ---- badge tren harga ---- */
.trend-badge {
  display: inline-flex; align-items: center; font-size: 0.68rem; font-weight: 700;
  padding: 1px 6px; border-radius: 999px; vertical-align: middle; white-space: nowrap;
}
.trend-badge--down { background: var(--green-bg); color: var(--green); }
.trend-badge--up { background: var(--amber-bg); color: var(--amber); }

/* ---- baris footer kedua (Bagikan) di kartu grid & list ---- */
.gcard__footer-row, .card__btn-row { display: flex; gap: 6px; }
.gcard__footer-row .gcard__btn, .card__btn-row .card__btn { flex: 1; padding: 8px 4px; font-size: 0.66rem; }

/* ---- tab Arena Cerdas: layout fullscreen tanpa scroll halaman ----
   Cuma aktif kalau body.arena-cerdas-active (di-toggle switchTab() di
   script.js) -- tab lain (Barang/Tiket/dst) sama sekali tidak kepengaruh &
   tetap boleh scroll seperti biasa. */
body.arena-cerdas-active { overflow: hidden; }
body.arena-cerdas-active .app { height: 100vh; overflow: hidden; }
body.arena-cerdas-active .content { overflow: hidden; }
body.arena-cerdas-active .main { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
body.arena-cerdas-active #trust-strip { display: none !important; }

#panel-arena-cerdas.is-active { display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* ---- Suggestion Dropdown (Auto-complete) ---- */
.suggestion-dropdown {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  min-width: 200px;
}

.suggestion-dropdown .suggestion-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.suggestion-dropdown .suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-dropdown .suggestion-item:hover {
  background: var(--surface-alt);
  color: var(--indigo);
}

.suggestion-dropdown .suggestion-item strong {
  font-weight: 600;
  color: var(--indigo);
}

/* ---- hub: kartu daftar game (public/arena-cerdas-hub.js, GET /api/arena-cerdas/games) ---- */
.arena-hub:not([hidden]) { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 18px 24px; overflow-y: auto; }
.arena-hub__head { flex-shrink: 0; margin-bottom: 14px; }
.arena-hub__title { font-size: 1.3rem; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.01em; }
.arena-hub__sub { font-size: 0.82rem; color: var(--text-muted); margin: 0; }
.arena-hub__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.arena-hub__empty { color: var(--text-muted); font-size: 0.85rem; }

.arena-game-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 18px 16px; cursor: pointer; font-family: var(--font-body); box-shadow: var(--shadow-sm);
}
.arena-game-card:hover { border-color: var(--indigo); box-shadow: var(--shadow-md); }
.arena-game-card__icon { font-size: 1.8rem; line-height: 1; }
.arena-game-card__title { font-weight: 700; font-size: 0.95rem; color: var(--text); }
.arena-game-card__desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }

/* ---- tampilan game aktif: tombol kembali + iframe, isi penuh sisa ruang ---- */
.arena-game:not([hidden]) { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.arena-cerdas-frame { flex: 1; min-height: 0; width: 100%; border: none; display: block; }

/* ---- kartu perjalanan Backpacker (visual, bisa dibagikan) ---- */
.trip-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 18px 20px; margin-top: 18px; max-width: 480px;
}
.trip-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.trip-card__eyebrow { font-size: 0.7rem; color: var(--text-muted); margin: 0 0 3px; text-transform: uppercase; letter-spacing: 0.03em; }
.trip-card__route { font-size: 1.05rem; font-weight: 800; margin: 0; }
.trip-card__arrow { color: var(--indigo); }
.trip-card__badge { background: var(--grad); color: #fff; font-size: 0.68rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.trip-card__legs { border-top: 1px dashed var(--border-strong); margin-top: 12px; }
.trip-card__leg { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.trip-card__leg:last-child { border-bottom: none; }
.trip-card__leg--link { cursor: pointer; border-radius: var(--radius-sm); transition: background-color 0.12s ease; margin: 0 -8px; padding: 9px 8px; }
.trip-card__leg--link:hover { background: var(--surface-alt); }
.trip-card__leg-icon { font-size: 1.15rem; flex-shrink: 0; }
.trip-card__leg-body { flex: 1; min-width: 0; }
.trip-card__leg-title { font-size: 0.8rem; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-card__leg-meta { margin: 3px 0 0; }
.trip-card__leg-price { font-family: var(--font-mono); font-weight: 700; font-size: 0.82rem; white-space: nowrap; }
.trip-card__total {
  display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--border-strong);
  margin-top: 6px; padding-top: 12px; font-size: 0.85rem; color: var(--text-muted);
}
.trip-card__total strong { font-size: 1.2rem; color: var(--green); font-family: var(--font-mono); }
.trip-card__share {
  width: 100%; margin-top: 14px; padding: 11px; border: none; border-radius: var(--radius-sm);
  background: var(--grad); color: #fff; font-weight: 700; font-size: 0.82rem; cursor: pointer; font-family: var(--font-body);
}
.trip-card__share:hover { opacity: 0.92; }

@media (max-width: 640px) {
  .info-tip__bubble { width: 180px; }
  .trip-card { padding: 14px 16px; max-width: 100%; }
  .arena-hub { padding: 14px 16px; }
  .arena-hub__grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ---- Search Auto-Complete Suggestion Dropdown ---- */
.search-suggestion-dropdown {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
}

.search-suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.search-suggestion-item:last-child {
  border-bottom: none;
}

.search-suggestion-item:hover {
  background: var(--surface-alt);
}

.search-suggestion-item strong {
  color: var(--indigo);
  font-weight: 600;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .search-suggestion-dropdown {
    width: calc(100% - 32px) !important;
    left: 16px !important;
  }
}
