/* Tanam Emas — papan harga TV. Palet & metrik dari te-mobile (lib/brand.dart,
   lib/theme.dart, lib/screens/harga_screen.dart). */

@font-face {
  font-family: 'Gilroy';
  src: url('../assets/Gilroy-Medium.ttf') format('truetype');
}

:root {
  --green: #0A4F3C;
  --green-dark: #08382A;
  --gold: #C5A971;
  --gold-light: #D9C49A;
  --cream: #FEF7FF;
  --text-muted: #6B6B6B;
  --border-light: #ECE6E9;
  --conn-on: #7BE0A1;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: 'Gilroy', system-ui, sans-serif;
  background: var(--cream);
  color: var(--green);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: none; /* display TV: tanpa kursor */
}

/* ---- App bar ---- */
.appbar {
  flex: none;
  height: 56px;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}
.appbar-spacer { width: 11px; } /* penyeimbang dot agar logo tetap di tengah */
.appbar-logo { height: 40px; }
.conn-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(254, 247, 255, 0.4); /* cream 40%: putus */
}
.conn-dot.on { background: var(--conn-on); }

/* ---- Halaman + watermark daun ---- */
.page { flex: 1; min-height: 0; position: relative; }
.leaf-bg {
  position: absolute;
  inset: 0;
  /* Asset punya alpha bawaan ~10%; app menaikkannya ~3x lewat color matrix
     (leaf_background.dart). Tiga lapis background yang sama ≈ efek serupa. */
  background-image: url('../assets/backgroud_leaf.png'),
                    url('../assets/backgroud_leaf.png'),
                    url('../assets/backgroud_leaf.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}
.content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ---- Header ---- */
.home-header {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 4px;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hello { font-weight: 600; flex: 1; }
.header-right { display: flex; flex-direction: column; align-items: flex-end; }
.today { color: var(--text-muted); font-size: 12px; }
.chart-link { color: var(--gold); font-style: italic; font-size: 12px; font-weight: 600; }

/* ---- Promo carousel ---- */
.promo { flex: none; }
.promo-track {
  position: relative;
  height: 150px;
  display: flex;
  gap: 8px;
  overflow-x: hidden;
  padding: 8px 8px 4px;
}
.banner {
  position: relative;
  flex: 0 0 90%; /* viewportFraction 0.9 seperti PageView app */
  border-radius: 16px;
  overflow: hidden;
  background: var(--green); /* fallback saat gambar gagal, seperti app */
}
.banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.banner-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px 12px 12px;
  color: var(--cream);
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  background: linear-gradient(to top, rgba(8, 56, 42, 0.88), transparent);
}
.promo-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 0 2px;
}
.promo-dots .dot {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: rgba(10, 79, 60, 0.25);
  transition: all 0.25s;
}
.promo-dots .dot.active { width: 18px; background: var(--green); }

/* ---- Judul seksi ---- */
.section-title {
  flex: none;
  font-size: 16px;
  font-weight: 700;
  padding: 8px 16px 4px;
}

/* ---- List produk (scroll hanya di area ini, seperti app) ----
   Meniru ListView.separated + ListTile app: thumb 46px, nama kiri,
   harga kanan, Divider 1px antar baris. */
.list-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none; /* display: tanpa scrollbar */
}
.list-area::-webkit-scrollbar { display: none; }
.row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px; /* tinggi ListTile */
  padding: 5px 16px;
}
.row + .row { border-top: 1px solid var(--border-light); }
.row-thumb {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
}
.row-thumb.placeholder { object-fit: contain; padding: 5px; }
.row-name {
  flex: 1;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-price {
  font-weight: 700;
  font-size: 15px;
}

/* ---- Spinner ---- */
.spinner {
  width: 36px;
  height: 36px;
  margin: 48px auto;
  border: 4px solid rgba(10, 79, 60, 0.15);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Footer: buyback + disclaimer + last update ---- */
.bottom { flex: none; }
.buyback {
  margin: 8px 12px 4px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(to right, var(--gold-light), var(--gold));
  color: var(--green-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}
.buyback strong { font-size: 16px; font-weight: 700; }
.disclaimer {
  padding: 2px 16px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 10.5px;
  font-style: italic;
}
.last-update {
  padding: 2px 0 8px;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
}
