/* ─── css/style.css ─────────────────────────────────────────── */
/* DESIGN TOKENS */
:root {
  --cream-base   : #F7F3EC;  /* latar utama */
  --cream-light  : #FDFBF7;  /* kartu / surface */
  --cream-mid    : #EDE8DF;  /* border & divider */
  --cream-deep   : #D9D1C3;  /* shadow lembut */
  --sand         : #C5B99A;  /* aksen netral */
  --warm-brown   : #8B6F4E;  /* aksen utama */
  --soft-text    : #5C5043;  /* teks sekunder */
  --dark-text    : #2E2519;  /* teks utama */
  --white        : #FFFFFF;

  --radius-sm    : 10px;
  --radius-md    : 16px;
  --radius-lg    : 24px;
  --radius-full  : 999px;

  --shadow-card  : 0 2px 12px rgba(139,111,78,.10);
  --shadow-nav   : 0 -1px 0 var(--cream-mid), 0 -8px 24px rgba(139,111,78,.06);

  --font-display : 'Lora', serif;
  --font-body    : 'Plus Jakarta Sans', sans-serif;

  --nav-h        : 68px;
  --header-h     : 60px;
  --safe-bottom  : env(safe-area-inset-bottom, 0px);
}

/* RESET & BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--cream-base);
  color: var(--dark-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* MOBILE SHELL */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 430px;
  margin: 0 auto;
  background: var(--cream-base);
  position: relative;
}

/* TOP HEADER */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(247,243,236,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cream-mid);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.header-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--warm-brown);
  letter-spacing: -.02em;
}

.header-logo span {
  font-style: italic;
  color: var(--sand);
}

.header-actions {
  display: flex;
  gap: 4px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--soft-text);
  transition: background .15s;
}
.icon-btn:active { background: var(--cream-mid); }

/* MAIN CONTENT AREA */
.app-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 12px);
  -webkit-overflow-scrolling: touch;
}

/* PAGE SECTIONS */
.page-section { display: none; }
.page-section.active { display: block; }

/* BOTTOM NAV */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(253,251,247,.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-nav);
  display: flex;
  align-items: flex-start;
  padding-top: 8px;
  z-index: 200;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 4px 0;
  border: none;
  background: transparent;
  color: var(--sand);
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .02em;
  transition: color .2s;
  position: relative;
}

.nav-item ion-icon {
  font-size: 1.5rem;
  transition: transform .2s;
}

.nav-item.active {
  color: var(--warm-brown);
}

.nav-item.active ion-icon {
  transform: translateY(-2px);
}

.nav-dot {
  position: absolute;
  top: 3px;
  right: calc(50% - 14px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warm-brown);
  opacity: 0;
  transform: scale(0);
  transition: opacity .2s, transform .2s;
}

.nav-item.active .nav-dot {
  opacity: 1;
  transform: scale(1);
}

/* COMMON COMPONENTS */

/* Section heading */
.section-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 12px;
}

/* Card */
.card {
  background: var(--cream-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--cream-mid);
  overflow: hidden;
}

/* Pill badge */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: .7rem;
  font-weight: 600;
  background: var(--cream-mid);
  color: var(--soft-text);
}
.badge-accent {
  background: var(--warm-brown);
  color: var(--white);
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  border: none;
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.btn:active { transform: scale(.97); opacity: .85; }
.btn-primary { background: var(--warm-brown); color: var(--white); }
.btn-outline  { background: transparent; border: 1.5px solid var(--cream-deep); color: var(--soft-text); }

/* Search bar */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--cream-light);
  border: 1.5px solid var(--cream-mid);
  border-radius: var(--radius-full);
  padding: 10px 16px;
}
.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--dark-text);
  outline: none;
}
.search-bar input::placeholder { color: var(--sand); }
.search-bar ion-icon { color: var(--sand); font-size: 1.1rem; }

/* Horizontal scroll strip */
.h-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.h-scroll::-webkit-scrollbar { display: none; }

/* Avatar */
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--cream-mid);
  object-fit: cover;
  border: 2px solid var(--cream-light);
}

/* Divider */
.divider {
  height: 1px;
  background: var(--cream-mid);
  margin: 20px 0;
}

/* PAGE: BERANDA */
#page-beranda .hero {
  padding: 24px 20px 20px;
}

#page-beranda .hero-greeting {
  font-size: .82rem;
  color: var(--soft-text);
  margin-bottom: 2px;
}

#page-beranda .hero-name {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--dark-text);
  margin-bottom: 16px;
}

#page-beranda .hero-name em {
  font-style: italic;
  color: var(--warm-brown);
}

#page-beranda .banner-card {
  background: linear-gradient(135deg, #C5B99A 0%, #A8906E 100%);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  color: var(--white);
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
}

#page-beranda .banner-card::after {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,.10);
}

#page-beranda .banner-card::before {
  content: '';
  position: absolute;
  right: 30px;
  bottom: -30px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
}

#page-beranda .banner-eyebrow {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .75;
  margin-bottom: 6px;
}

#page-beranda .banner-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 14px;
  line-height: 1.3;
}

#page-beranda .quick-actions {
  padding: 0 20px;
  margin-bottom: 28px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.quick-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: var(--cream-light);
  border: 1.5px solid var(--cream-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--warm-brown);
  font-size: 1.4rem;
  transition: background .15s;
}

.quick-item:active .quick-icon { background: var(--cream-mid); }

.quick-label {
  font-size: .68rem;
  font-weight: 600;
  color: var(--soft-text);
  text-align: center;
}

#page-beranda .list-section {
  padding: 0 20px;
  margin-bottom: 24px;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--cream-mid);
}
.list-item:last-child { border-bottom: none; }

.list-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--cream-mid);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sand);
  font-size: 1.3rem;
}

.list-body { flex: 1; min-width: 0; }
.list-title { font-weight: 600; font-size: .9rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-sub { font-size: .77rem; color: var(--soft-text); }
.list-meta { font-size: .72rem; color: var(--sand); font-weight: 500; text-align: right; }

/* PAGE: JELAJAHI */
#page-jelajahi .search-area {
  padding: 20px 20px 0;
}

#page-jelajahi .categories {
  padding: 20px 0 0 20px;
  margin-bottom: 20px;
}

.cat-chip {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--cream-mid);
  font-size: .8rem;
  font-weight: 600;
  color: var(--soft-text);
  background: var(--cream-light);
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.cat-chip.active {
  background: var(--warm-brown);
  border-color: var(--warm-brown);
  color: var(--white);
}

#page-jelajahi .grid-section {
  padding: 0 20px;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.grid-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--cream-light);
  border: 1px solid var(--cream-mid);
  box-shadow: var(--shadow-card);
}

.grid-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--cream-mid) 0%, var(--cream-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sand);
  font-size: 2rem;
}

.grid-card-body {
  padding: 10px 12px 12px;
}

.grid-card-title { font-size: .85rem; font-weight: 600; margin-bottom: 3px; }
.grid-card-sub { font-size: .73rem; color: var(--soft-text); }

/* PAGE: FAVORIT */
#page-favorit .fav-header {
  padding: 24px 20px 16px;
}

#page-favorit .fav-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--dark-text);
}

#page-favorit .fav-list {
  padding: 0 20px;
}

.fav-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: var(--cream-light);
  border-radius: var(--radius-md);
  border: 1px solid var(--cream-mid);
  box-shadow: var(--shadow-card);
  margin-bottom: 12px;
}

.fav-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--cream-mid), var(--cream-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--warm-brown);
  flex-shrink: 0;
}

.fav-body { flex: 1; min-width: 0; }
.fav-title { font-weight: 600; font-size: .9rem; margin-bottom: 2px; }
.fav-sub { font-size: .77rem; color: var(--soft-text); }

.fav-heart {
  color: var(--warm-brown);
  font-size: 1.3rem;
  cursor: pointer;
}

/* PAGE: PROFIL */
#page-profil .profil-hero {
  padding: 30px 20px 24px;
  text-align: center;
}

.profil-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sand), var(--warm-brown));
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--white);
}

.profil-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
}

.profil-email {
  font-size: .82rem;
  color: var(--soft-text);
  margin-top: 3px;
}

.stats-row {
  display: flex;
  border-radius: var(--radius-md);
  background: var(--cream-light);
  border: 1px solid var(--cream-mid);
  margin: 0 20px 24px;
  overflow: hidden;
}

.stat-item {
  flex: 1;
  padding: 14px 8px;
  text-align: center;
  border-right: 1px solid var(--cream-mid);
}
.stat-item:last-child { border-right: none; }
.stat-val { font-weight: 700; font-size: 1.1rem; color: var(--warm-brown); }
.stat-label { font-size: .68rem; color: var(--soft-text); font-weight: 500; }

#page-profil .menu-list {
  padding: 0 20px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--cream-mid);
  cursor: pointer;
}
.menu-item:last-child { border-bottom: none; }
.menu-item-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--cream-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--warm-brown);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.menu-item-label { flex: 1; font-size: .9rem; font-weight: 500; }
.menu-item-arrow { color: var(--sand); font-size: 1rem; }

/* UTILITY */
.px-20 { padding-left: 20px; padding-right: 20px; }
.mb-24 { margin-bottom: 24px; }
.mt-8  { margin-top: 8px; }