/* >>>>>>>> 1. AREA KONTEN HALAMAN <<<<<<<< */
.page-content { height: 100%; overflow-y: auto; padding: calc(20px + env(safe-area-inset-top, 0px)) 16px 120px 16px; -webkit-overflow-scrolling: touch; }

/* >>>>>>>> 2. HEADER BERANDA <<<<<<<< */
.home-header { margin-bottom: 16px; }
.logo { display: flex; align-items: center; gap: 4px; font-size: 26px; font-weight: 800; color: var(--text-main); }
.logo i { font-size: 24px; color: var(--amber); }
.greeting { margin-top: 2px; font-size: 14px; color: var(--text-muted); font-weight: 500; }

/* >>>>>>>> 3. KOLOM PENCARIAN <<<<<<<< */
.search-box { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; background: #ffffff; border-radius: 16px; box-shadow: 0 2px 8px rgba(120, 80, 20, 0.08); margin-bottom: 10px; }
.search-box i { font-size: 22px; color: var(--text-muted); flex-shrink: 0; }
.search-box input { flex: 1; min-width: 0; height: 100%; border: none; outline: none; background: transparent; color: var(--text-main); }
.search-box input::placeholder { color: #9ca3af; }

/* >>>>>>>> 4. CHIP FILTER JENIS LAYANAN <<<<<<<< */
.chip-row { display: flex; gap: 8px; overflow-x: auto; touch-action: pan-x pan-y; margin: 0 -16px 8px; padding: 4px 16px 14px; }
.chip { position: relative; display: inline-flex; align-items: center; flex-shrink: 0; height: 38px; padding: 0 16px; border: none; border-radius: 19px; background: #ffffff; color: var(--text-muted); font-family: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: 0 2px 6px rgba(120, 80, 20, 0.07); transition: background 0.2s, color 0.2s, transform 0.1s; }
.chip::before { content: ''; position: absolute; inset: -3px 0; }
.chip:active { transform: scale(0.95); }
.chip.active { background: linear-gradient(145deg, #ffb83d, #ff9f00); color: #ffffff; box-shadow: 0 4px 10px rgba(255, 159, 0, 0.3); }

/* >>>>>>>> 5. DAFTAR KARTU <<<<<<<< */
.empty-note { text-align: center; margin-top: 40px; color: var(--text-muted); font-size: 14px; line-height: 1.6; word-wrap: break-word; }

/* >>>>>>>> 6. KARTU PENYEDIA <<<<<<<< */
.feed-list { display: grid; grid-template-columns: 1fr; gap: 12px; }

.provider-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 2px 8px rgba(120, 80, 20, 0.08);
  transition: transform 0.1s;
}
.provider-card:active { transform: scale(0.99); }

.avatar-initial {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 800; color: #ffffff; letter-spacing: 0.5px;
}
.av-1 { background: linear-gradient(145deg, #ffb83d, #ff9f00); }
.av-2 { background: linear-gradient(145deg, #60a5fa, #2563eb); }
.av-3 { background: linear-gradient(145deg, #4ade80, #16a34a); }
.av-4 { background: linear-gradient(145deg, #c084fc, #9333ea); }
.av-5 { background: linear-gradient(145deg, #fb7185, #e11d48); }

.card-body { flex: 1; min-width: 0; }
.card-name-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-name { font-size: 15px; font-weight: 700; color: var(--text-main); line-height: 1.25; overflow-wrap: anywhere; }
.card-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }

.card-city { display: flex; align-items: center; gap: 3px; margin-top: 3px; font-size: 12.5px; font-weight: 500; color: var(--text-muted); }
.card-city i { font-size: 14px; flex-shrink: 0; }
.card-city span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.card-meta { display: flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); flex-wrap: wrap; }
.rating { display: inline-flex; align-items: center; gap: 2px; color: #b45309; }
.rating i { font-size: 14px; color: var(--amber); }
.rating-count { color: var(--text-muted); }

.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.price { font-size: 14px; font-weight: 800; color: var(--text-main); }
.price.free { color: var(--green); }
.price-unit { margin-left: 3px; font-size: 11.5px; font-weight: 600; color: var(--text-muted); }

.card-actions { display: flex; gap: 2px; }
.icon-btn {
  position: relative;
  width: 36px; height: 36px;
  border: none; background: transparent; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #9ca3af; font-size: 20px; cursor: pointer;
  transition: color 0.2s, background 0.2s, transform 0.1s;
}
.icon-btn::before { content: ''; position: absolute; inset: -4px; }
.icon-btn:active { transform: scale(0.92); background: #f3f4f6; }
.icon-btn.fav.active { color: #ef4444; }

/* >>>>>>>> 8. HEADER JUMPA + BAR FILTER (CHIP + REKOMENDASI) STICKY, TANPA CELAH <<<<<<<< */
.page-content { padding-top: 0; }
.home-header { position: sticky; top: 0; z-index: 30; margin: 0 -16px; padding: calc(18px + env(safe-area-inset-top, 0px)) 16px 10px; }
.home-header.stuck { background: var(--bg-top); }
.home-header + .search-box { margin-top: 12px; }
.sticky-bar { position: sticky; top: calc(var(--hdr-h, 64px) - 1px); z-index: 29; margin: 0 -16px; padding: 0 16px; }
.sticky-bar.stuck { background: var(--bg-top); box-shadow: 0 8px 12px -8px rgba(120, 60, 0, 0.4); }
.sticky-bar .chip-row { margin: 0 -16px; padding: 4px 16px 8px; }
.sticky-bar .section-head { margin: 0; padding: 0 0 10px; }
.greeting { color: #7a4a12; }

/* >>>>>>>> 9. KARTU RAMPING (ISI SAMA, UKURAN LEBIH KECIL, FAVORIT + BAGIKAN DI KANAN ATAS) <<<<<<<< */
.feed-list { gap: 10px; }
.provider-card { position: relative; gap: 10px; padding: 10px 12px; border-radius: 16px; }
.provider-card .avatar-initial { width: 46px; height: 46px; border-radius: 14px; font-size: 17px; }
.provider-card .card-name-row { padding-right: 70px; }
.provider-card .card-name { font-size: 14px; }
.provider-card .card-badges { margin-top: 4px; }
.provider-card .badge { height: 18px; padding: 0 8px 0 6px; font-size: 9px; }
.provider-card .badge i { font-size: 11px; }
.provider-card .card-city { margin-top: 2px; font-size: 12px; }
.provider-card .card-meta { margin-top: 4px; font-size: 12px; }
.provider-card .card-foot { margin-top: 6px; }
.provider-card .card-foot .price { padding: 4px 10px; font-size: 12.5px; }
.provider-card .price-unit { font-size: 11px; }
.provider-card .card-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 0; }
.provider-card .icon-btn { width: 32px; height: 32px; font-size: 19px; }
.provider-card .icon-btn.fav.active { color: #ef4444; background: #fee2e2; }
.provider-card .icon-btn.fav.active i { text-shadow: 0 0 0 currentColor, 0 0 1px currentColor; }


/* >>>>>>>> 10. POPUP PROFIL: PENUH, BIO 3 BARIS, TOMBOL PROFIL + ATUR JADWAL <<<<<<<< */
.sheet.profile-sheet { max-height: 92dvh; overflow-y: auto; }
.profile-sheet .pf-bio { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pf-btns { display: flex; gap: 10px; margin-top: 4px; }
.pf-btns > button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 12px; font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.pf-btns > .btn-secondary { flex: 0 0 38%; background: #ffffff; color: #f08a00; border: 1.5px solid #ff9f00; }
.pf-btns > .btn-secondary i { font-size: 18px; }
.pf-btns > .btn-primary { flex: 1; }


/* >>>>>>>> 11. JUDUL REKOMENDASI TIPIS + WARNA LOKASI COKLAT <<<<<<<< */
.sticky-bar .section-head h2 { font-size: 15px; font-weight: 600; }
.loc-btn { color: #8b5a2b; }
.loc-btn.set { color: #111827; }
.loc-sep { color: #c9a77c; }

/* >>>>>>>> 12. KARTU LEBIH PENDEK + NAMA PANJANG DISINGKAT (...) <<<<<<<< */
.provider-card { padding: 8px 12px; }
.provider-card .card-name-row { flex-wrap: nowrap; min-width: 0; padding-right: 70px; }
.provider-card .card-name { display: block; min-width: 0; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.provider-card .card-badges { margin-top: 3px; }
.provider-card .badge { height: 16px; }
.provider-card .card-city { margin-top: 1px; min-width: 0; line-height: 1.25; }
.provider-card .card-meta { margin-top: 2px; line-height: 1.25; }
.provider-card .card-foot { margin-top: 4px; }
.provider-card .card-foot .price { padding: 3px 9px; }
.provider-card .card-actions { top: 4px; right: 6px; }
.pf-title h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* >>>>>>>> 13. NAVBAR LEBIH RAMPING <<<<<<<< */
.bottom-nav-container { height: calc(68px + env(safe-area-inset-bottom, 0px)); }
.nav-side { padding-top: 14px; }
.page-content { padding-bottom: 104px; }

/* >>>>>>>> 14. REVISI: SEARCH RAMPING, LONCENG KECIL, LOKASI TIDAK STICKY, GRID 2 KOLOM <<<<<<<< */
.search-box { height: 40px; padding: 0 12px; gap: 8px; border-radius: 14px; }
.search-box i { font-size: 19px; }
.search-box .filter-btn { width: 28px; height: 28px; border-radius: 9px; }
.search-box .filter-btn i { font-size: 16px; }
.bell-btn { width: 36px; height: 36px; }
.bell-btn i { font-size: 19px; }
.bell-dot { top: 7px; right: 9px; width: 8px; height: 8px; }

/* Lokasi: ikut scroll (tidak sticky), tanpa judul Rekomendasi */
.section-head { margin: 4px 0 10px; padding: 0; }
.sticky-bar .chip-row { padding-bottom: 10px; }

/* Grid 2 kolom untuk semua jenis (Warlok, Kelana, Guide) */
.feed-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.provider-card { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px; }
.provider-card .avatar-wrap { align-self: center; }
.provider-card .avatar-initial { width: 64px; height: 64px; border-radius: 20px; font-size: 22px; }
.provider-card .avatar-check { width: 22px; height: 22px; }
.provider-card .card-body { text-align: center; display: flex; flex-direction: column; align-items: center; }
.provider-card .card-name-row { justify-content: center; padding-right: 0; max-width: 100%; }
.provider-card .card-badges { justify-content: center; margin-top: 4px; }
.provider-card .card-city { justify-content: center; max-width: 100%; margin-top: 3px; }
.provider-card .card-meta { justify-content: center; margin-top: 4px; }
.provider-card .card-foot { margin-top: 8px; justify-content: center; }
.provider-card .card-actions { top: 6px; right: 6px; flex-direction: column; }
.provider-card .icon-btn { width: 30px; height: 30px; font-size: 18px; }

/* >>>>>>>> 15. REVISI: STICKY MEMBULAT, CHIP TENGAH, NAVBAR RAMPING, WARNA LEMBUT <<<<<<<< */
/* Sticky bar membulat kiri-kanan bawah saat menempel */
.sticky-bar.stuck { border-radius: 0 0 22px 22px; }

/* Chip rata tengah (tetap bisa digeser kalau tidak muat) */
.sticky-bar .chip-row > :first-child { margin-left: auto; }
.sticky-bar .chip-row > :last-child { margin-right: auto; }

/* Search lebih ramping */
.search-box { height: 36px; padding: 0 10px; gap: 8px; border-radius: 12px; margin-bottom: 8px; }
.search-box i { font-size: 17px; }
.search-box .filter-btn { width: 26px; height: 26px; border-radius: 8px; }
.search-box .filter-btn i { font-size: 15px; }

/* Titik merah lonceng lebih kecil */
.bell-dot { top: 8px; right: 10px; width: 6px; height: 6px; border-width: 1.5px; }

/* Baris "Semua" kiri, "Aktifkan Lokasi" paling kanan */
.section-head { justify-content: space-between; }
.feed-title { font-size: 15px; font-weight: 700; color: var(--text-main); }

/* Navbar lebih ramping, ikon lebih besar, bayangan rapat */
.bottom-nav-container { height: calc(62px + env(safe-area-inset-bottom, 0px)); }
.bottom-nav { filter: drop-shadow(0 -1px 3px rgba(0, 0, 0, 0.14)); }
.nav-side { padding-top: 10px; }
.nav-item i { font-size: 25px; }
.nav-item::before { width: 38px; height: 38px; }
.fab { filter: drop-shadow(0 -1px 3px rgba(0, 0, 0, 0.14)); }

/* Jarak kartu terakhir ke navbar lebih dekat (tetap lolos dari FAB) */
.page-content { padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }

/* Warna Certified & Premium lebih lembut */
.badge-certified { color: #f4e8bd; background: linear-gradient(135deg, #5668b3 0%, #3b4a8f 100%) padding-box, linear-gradient(135deg, #f6e7b0 0%, #d9bc5a 50%, #f9eec2 70%, #c4a13a 100%) border-box; box-shadow: 0 1px 3px rgba(59, 74, 143, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.badge-certified i { color: #f3dd8f; }
.badge-premium { background: linear-gradient(135deg, #bba6f8 0%, #8f72e6 100%); box-shadow: 0 1px 3px rgba(143, 114, 230, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.check-certified { background: linear-gradient(135deg, #5668b3, #3b4a8f); color: #f3dd8f; }
.check-verified { background: linear-gradient(135deg, #bba6f8, #8f72e6); color: #ffffff; }

/* Ikon centang di foto: lebih tebal dan rapi */
.avatar-check { text-shadow: none; font-size: 11px; }
.avatar-wrap.big .avatar-check { font-size: 13px; }

/* >>>>>>>> 16. REVISI: SEARCH, LOKASI KIRI + LIHAT SEMUA KANAN, CHIP MUAT TENGAH, HEADER MEMBULAT <<<<<<<< */
.search-box { height: 42px; padding: 0 12px; border-radius: 14px; }
.search-box i { font-size: 19px; }
.search-box .filter-btn { width: 30px; height: 30px; border-radius: 9px; }
.search-box .filter-btn i { font-size: 17px; }

.see-all { border: none; background: none; min-height: 32px; padding: 0 2px; font-family: inherit; font-size: 12px; font-weight: 700; color: #b45309; }
.see-all:active { opacity: 0.6; }

/* Chip diperkecil agar 4 chip muat satu baris lalu rata tengah */
.sticky-bar .chip-row { gap: 6px; }
.sticky-bar .chip { height: 36px; padding: 0 10px; font-size: 12px; }
.sticky-bar .chip > i:first-child { font-size: 14px; margin-right: 4px; }

/* Header membulat saat sticky sendirian; menyatu (kotak) saat chip bar juga menempel */
.home-header.stuck { border-radius: 0 0 22px 22px; box-shadow: 0 8px 12px -8px rgba(120, 60, 0, 0.4); }
.home-header.stuck.joined { border-radius: 0; box-shadow: none; }
