/* RecommendEat — monokrom minimalis ala Pilona Coffee.
   Satu aksen: oranye ShopeeFood, dipakai hemat. */

:root {
  --ink: #0a0a0a;
  --ink-soft: #555;
  --ink-faint: #757575;
  --line: #e5e5e5;
  --bg: #fff;
  --bg-soft: #f5f5f5;
  --accent: #ee4d2d;          /* ShopeeFood orange */
  --ok: #0f8a3c;
  --danger: #c0271c;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 720px; }
.center { text-align: center; }

/* ---------- Wordmark & header ---------- */
.wordmark {
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: var(--ink);
}
.wordmark span { color: var(--accent); }
.wordmark-light { color: #fff; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: 16px;
}
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  color: var(--ink-soft);
  padding: 8px 0;
}
.site-nav a.active, .site-nav a:hover { color: var(--ink); }
.site-nav a.btn { color: #fff; padding: 8px 14px; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 12px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 20px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .site-nav a.btn { margin-top: 14px; text-align: center; border-bottom: 0; }
}

/* ---------- Tombol ---------- */
.btn {
  display: inline-block;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: none;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  min-height: 40px;
}
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #333; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 13px; min-height: 34px; }
.btn-lg { padding: 12px 24px; font-size: 15px; width: 100%; }
.btn-shopeefood {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-shopeefood:hover { background: #d43d20; }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }

.linklike {
  background: none;
  border: 0;
  padding: 6px 4px;
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  color: var(--ink-soft);
  min-height: 32px;
}
.linklike:hover { color: var(--ink); }
.linklike.danger, .danger { color: var(--danger); }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 48px; border-bottom: 1px solid var(--line); }
.kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
h1 {
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -1px;
  margin-bottom: 18px;
}
.hero-sub { font-size: 17px; color: var(--ink-soft); max-width: 560px; margin-bottom: 26px; }
.center .hero-sub { margin-left: auto; margin-right: auto; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-cta.center { justify-content: center; }

/* ---------- Browse / filter ---------- */
.browse { padding: 36px 0 64px; }
.tabbar { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tab {
  padding: 12px 20px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  color: var(--ink-faint);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  margin-bottom: 24px;
}
.filter { display: flex; flex-direction: column; gap: 4px; }
.filter span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); }
.filter select, .filter input {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--ink);
  background: #fff;
  min-height: 44px;
  min-width: 170px;
}
.filter-search { flex: 1; min-width: 180px; }
.filter-search input { width: 100%; }
.result-count { font-size: 13px; color: var(--ink-faint); margin-bottom: 14px; }

/* ---------- Grid kartu ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
@media (max-width: 720px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
.card {
  text-decoration: none;
  border: 1px solid var(--line);
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--ink); transform: translateY(-2px); }
.card-media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--bg-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-noimg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 900;
  color: var(--line);
}
.card-body { padding: 12px 14px 14px; }
.card-title { font-size: 15px; font-weight: 700; line-height: 1.3; margin-bottom: 4px; }
.card-price { font-size: 14px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.card-meta { font-size: 12px; color: var(--ink-faint); display: flex; flex-direction: column; gap: 1px; }

.chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border: 1px solid var(--ink);
  background: #fff;
}
.chip-online { position: absolute; top: 8px; left: 8px; background: var(--ink); color: #fff; border-color: var(--ink); }
.card-media .chip-online { position: absolute; }
.detail-meta .chip { position: static; margin-right: 6px; }
.detail-meta .chip-online { background: var(--ink); color: #fff; }

/* ---------- Pagination & empty ---------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.pagination a {
  min-width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 600;
}
.pagination a.current { background: var(--ink); color: #fff; border-color: var(--ink); }

.empty-state {
  border: 1px dashed var(--line);
  padding: 48px 24px;
  text-align: center;
  color: var(--ink-soft);
}
.empty-title { font-weight: 700; font-size: 17px; color: var(--ink); margin-bottom: 6px; }

/* ---------- Notice / disclaimer strip ---------- */
.notice-strip {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: 22px 0;
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------- Detail ---------- */
.detail { padding: 32px 0 64px; }
.breadcrumb { font-size: 13px; color: var(--ink-faint); margin-bottom: 20px; }
.breadcrumb a { text-decoration: none; }
.gallery { display: grid; gap: 10px; margin-bottom: 26px; }
.gallery img { width: 100%; height: auto; border: 1px solid var(--line); }
.detail-head h1 { font-size: clamp(26px, 5vw, 38px); margin-bottom: 12px; }
.detail-meta { margin-bottom: 12px; }
.detail-price { font-size: 17px; margin-bottom: 4px; }
.detail-price strong { color: var(--accent); }
.detail-desc { font-size: 16px; line-height: 1.75; margin: 18px 0 26px; white-space: pre-line; }
.cta-stack { display: flex; flex-direction: column; gap: 10px; max-width: 420px; margin-bottom: 30px; }
.cta-stack .btn { text-align: center; }

.house-rules {
  border: 1px solid var(--ink);
  padding: 20px 22px;
  margin-bottom: 24px;
  background: var(--bg-soft);
}
.house-rules ul { margin: 10px 0 0 20px; }
.house-rules li { margin-bottom: 4px; }
.rules-cta { margin-top: 14px; }

.disclaimer-inline { font-size: 12px; color: var(--ink-faint); margin-top: 12px; }

/* ---------- Form publik ---------- */
.form-page { padding: 48px 0 72px; }
.syarat-box {
  border: 1px solid var(--ink);
  background: var(--bg-soft);
  padding: 22px 24px;
  margin: 26px 0;
}
.syarat-box ol { margin: 8px 0 10px 20px; }
.syarat-box li { margin-bottom: 6px; }

.form fieldset {
  border: 1px solid var(--line);
  padding: 20px;
  margin-bottom: 22px;
}
.form legend {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 8px;
}
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field small { font-weight: 400; color: var(--ink-faint); }
.field em { color: var(--danger); font-style: normal; }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  padding: 12px;
  border: 1px solid var(--ink);
  background: #fff;
  min-height: 44px;
}
.field textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.radio { display: block; margin-bottom: 10px; font-size: 15px; cursor: pointer; }
.radio input { margin-right: 8px; transform: scale(1.2); }
.charcount { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-faint); }

.hp-field { position: absolute; left: -9999px; top: -9999px; }

.alert { padding: 14px 18px; margin: 18px 0; font-size: 14px; border: 1px solid; }
.alert-error { border-color: var(--danger); color: var(--danger); background: #fdf1f0; }
.alert-error ul { margin: 6px 0 0 18px; }
.alert-ok { border-color: var(--ok); color: var(--ok); background: #eefaf1; }

/* ---------- Prose (halaman statis) ---------- */
.prose h2 { font-size: 20px; font-weight: 800; margin: 30px 0 10px; }
.prose p { margin-bottom: 14px; }
.prose ul, .prose ol { margin: 0 0 16px 22px; }
.prose li { margin-bottom: 6px; }
.prose .btn { margin-top: 8px; }

/* ---------- Footer ---------- */
.site-footer { background: #0a0a0a; color: #d5d5d5; padding: 48px 0 28px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 0.6fr 1.2fr; gap: 32px; margin-bottom: 34px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #888;
  margin-bottom: 10px;
}
.site-footer a { color: #d5d5d5; display: block; text-decoration: none; padding: 4px 0; font-size: 14px; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-note { font-size: 13px; color: #999; line-height: 1.7; }
.footer-note a { display: inline; padding: 0; text-decoration: underline; }
.footer-copy { border-top: 1px solid #262626; padding-top: 20px; font-size: 12px; color: #777; }

/* ---------- Admin ---------- */
.admin { background: var(--bg-soft); }
.admin-header { background: #0a0a0a; }
.admin-header .wordmark { color: #fff; }
.admin-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.admin-nav a {
  color: #bbb;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
}
.admin-nav a:hover, .admin-nav a.active { color: #fff; }
.admin-nav .linklike { color: #bbb; font-size: 13px; }
.badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  text-align: center;
}
.admin-main { padding: 28px 20px 64px; }
.admin-main h1 { font-size: 26px; margin-bottom: 18px; }
.admin-main h2 { font-size: 17px; margin: 26px 0 10px; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 10px; }
@media (max-width: 560px) { .stat-grid { grid-template-columns: 1fr; } }
.stat {
  background: #fff;
  border: 1px solid var(--line);
  padding: 18px 20px;
  text-decoration: none;
  font-size: 13px;
  color: var(--ink-soft);
}
.stat:hover { border-color: var(--ink); }
.stat-num { display: block; font-size: 32px; font-weight: 900; color: var(--ink); }

.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); font-size: 14px; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); }
.table input[type="text"], .table input[type="password"] {
  font: inherit;
  padding: 7px 9px;
  border: 1px solid var(--line);
  width: 100%;
  min-width: 90px;
}
.table input:focus { border-color: var(--ink); }
.thumb { width: 56px; height: 42px; object-fit: cover; border: 1px solid var(--line); }
.actions { white-space: nowrap; }
.inline-form { display: inline; }

.status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border: 1px solid;
}
.status-pending { color: #a06000; border-color: #a06000; background: #fdf6e7; }
.status-published { color: var(--ok); border-color: var(--ok); background: #eefaf1; }
.status-rejected { color: var(--danger); border-color: var(--danger); background: #fdf1f0; }

.filter-links { margin-bottom: 16px; font-size: 14px; }
.filter-links a { margin-right: 14px; text-decoration: none; color: var(--ink-soft); }
.filter-links a.active { font-weight: 700; color: var(--ink); text-decoration: underline; }

.form-inline-add { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.form-inline-add input {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--ink);
  min-height: 44px;
  flex: 1;
  min-width: 160px;
}
.form-narrow { max-width: 420px; }

.edit-cols { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .edit-cols { grid-template-columns: 1fr; } }
.edit-cols fieldset { background: #fff; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.photo-item { border: 1px solid var(--line); }
.photo-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.photo-item figcaption { padding: 4px 6px; font-size: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ---------- Chip row kategori (food-app style) ---------- */
.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0 10px;
  margin-bottom: 14px;
}
.chip-row::-webkit-scrollbar { display: none; }
.fchip {
  flex: 0 0 auto;
  padding: 7px 13px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-soft);
  white-space: nowrap;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.fchip:hover { border-color: var(--ink); color: var(--ink); }
.fchip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Sticky CTA ShopeeFood (mobile) ---------- */
.sticky-cta { display: none; }

/* ---------- Mobile UX ---------- */
#jelajah { scroll-margin-top: 70px; }

/* Font 16px di kontrol form = iOS tidak auto-zoom saat fokus */
.field input, .field select, .field textarea,
.filter select, .filter input,
.form-inline-add input { font-size: 16px; }

.card-meta span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 720px) {
  .hero { padding: 40px 0 32px; }
  .hero-sub { font-size: 15px; }
  .browse { padding: 24px 0 48px; }

  .tabbar { margin-left: -20px; margin-right: -20px; }
  .tab { flex: 1; text-align: center; padding: 13px 8px; }

  .chip-row { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }

  .filters { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
  .filter, .filter-search { min-width: 0; }
  .filter select, .filter input { min-width: 0; width: 100%; }
  .filter { grid-column: 1 / -1; }
  .filter-search { grid-column: 1; }
  .filter-apply { grid-column: 2; align-self: end; }

  .card-body { padding: 10px 10px 12px; }
  .card-title { font-size: 14px; }
  .card-price { font-size: 13px; }

  /* Galeri detail: carousel geser dengan snap */
  .gallery {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    gap: 10px;
    margin-left: -20px;
    margin-right: -20px;
    padding: 0 20px;
  }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery img {
    flex: 0 0 86%;
    width: 86%;
    height: auto;
    object-fit: cover;
    scroll-snap-align: center;
  }
  .gallery img:only-child { flex-basis: 100%; width: 100%; }

  /* CTA ShopeeFood nempel di bawah layar */
  .detail { padding-bottom: 84px; }
  .cta-stack .btn-shopeefood { display: none; }
  .sticky-cta {
    display: flex;
    gap: 8px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
  }
  .sticky-cta .btn {
    display: block;
    flex: 1;
    text-align: center;
    padding: 12px 16px;
    font-size: 15px;
  }
  .sticky-cta .btn-coffee {
    flex: 0 0 auto;
    background: #fff;
    font-size: 13px;
    padding: 12px 10px;
    white-space: nowrap;
  }

  .house-rules { margin-left: -20px; margin-right: -20px; border-left: 0; border-right: 0; }

  .footer-grid { gap: 24px; }
  .form fieldset { padding: 16px 14px; }
}

/* ---------- Admin mobile ---------- */
@media (max-width: 760px) {
  .admin-header .header-inner {
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 4px;
    gap: 4px;
  }
  .admin-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
    gap: 0;
    padding-bottom: 8px;
  }
  .admin-nav::-webkit-scrollbar { display: none; }
  .admin-nav a, .admin-nav .linklike { white-space: nowrap; padding: 8px 9px; }

  .admin-main { padding: 20px 14px 56px; }
  .admin-main h1 { font-size: 22px; }

  /* Tabel jadi panel geser horizontal */
  .table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .table th, .table td { white-space: nowrap; }
  .table td input[type="text"], .table td input[type="password"] { min-width: 130px; }

  .form-inline-add { flex-direction: column; }
  .form-inline-add input { width: 100%; }
  .form-inline-add .btn { width: 100%; }

  .stat-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat { padding: 12px 10px; font-size: 11px; }
  .stat-num { font-size: 24px; }

  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .edit-cols fieldset { padding: 14px 12px; }
}

/* Login */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
}
.login-card h1 { font-size: 22px; margin: 8px 0 18px; }
