/* =========================================================
   THEME TOKENS
   ========================================================= */
:root {
  --bg-outer: #eceef1;
  --bg-page: #ffffff;
  --card: #ffffff;
  --border: #e5e7eb;
  --text: #15181d;
  --muted: #6b7280;

  --accent: #1E7A52;
  --accent-soft: #E4F3EB;
  --accent-dark: #14573A;

  --radius: 16px;
  --shadow-card: 0 4px 10px rgba(15,23,42,0.03);
}

.dark {
  --bg-outer: #14161a;
  --bg-page: #1b1e23;
  --card: #23262d;
  --border: #343842;
  --text: #f3f4f6;
  --muted: #9aa1ab;

  --accent: #22c55e;
  --accent-soft: #23262d;
  --accent-dark: #064e3b;

  --shadow-card: 0 4px 10px rgba(0,0,0,0.3);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg-outer);
  color: var(--text);
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page { min-height: 100dvh; display: flex; flex-direction: column; }
.container { width: min(1120px, 100%); margin-inline: auto; padding: 20px clamp(14px, 3vw, 24px); }

/* Topbar - Header Diperkecil */
.topbar {
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 16px;
  border: 2px solid var(--accent-dark);
  box-shadow: 2px 2px 0 0 var(--accent-dark);
}
.title { font-size: 18px; font-weight: 800; margin: 0; }
.subtitle { color: var(--muted); font-size: 12px; margin: 0; }

/* Theme Toggle */
.theme-toggle {
  position: absolute; top: 10px; right: 16px;
  width: 50px; height: 24px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--accent-soft); display: flex; align-items: center; justify-content: space-between;
  padding: 0 6px; cursor: pointer; font-size: 12px; outline: none;
}
.theme-toggle .icon { z-index: 1; }
.theme-toggle .thumb-toggle {
  position: absolute; top: 1px; left: 1px; width: 20px; height: 20px; border-radius: 999px;
  background: #fff; box-shadow: 0 2px 6px rgba(15,23,42,0.25);
  transition: transform .18s ease-out;
}
.dark .theme-toggle .thumb-toggle { transform: translateX(26px); }

/* Hero Section - Banner Diperkecil */
.hero {
  background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 20px;
  box-shadow: var(--shadow-card);
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: center;
}
.hero h1 { margin: 0 0 6px; font-size: 24px; font-weight: 800; }
.hero p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 13px; }
.hero-ill {
  width: 100%; aspect-ratio: 2/1; border-radius: 14px; border: 1px solid var(--border);
  background: url("img/banner.png") center/cover no-repeat, var(--bg-outer);
  overflow: hidden; box-shadow: var(--shadow-card);
}
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding: 18px; }
  .hero h1 { font-size: 22px; }
  .hero-ill { order: -1; aspect-ratio: 16/9; border-radius: 12px; }
}
@media (max-width: 420px) { .hero-ill { aspect-ratio: 16/10; } }

/* =========================================================
   CAROUSEL KATEGORI BISNIS (kecil, di bawah banner)
   ========================================================= */
.biz-cats { margin-top: 14px; }
.biz-track {
  display: flex; gap: 10px;
  overflow-x: auto; scroll-snap-type: x proximity; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  padding: 4px 2px;
}
.biz-track::-webkit-scrollbar { display: none; }
.biz-card {
  flex: 0 0 auto; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-width: 86px; padding: 12px 12px;
  background: var(--card); color: var(--text);
  border: 2px solid var(--border); border-radius: 14px;
  box-shadow: 2px 2px 0 0 var(--accent-dark);
  font-family: 'Outfit', sans-serif; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: transform .08s ease, box-shadow .08s ease, border-color .12s ease;
}
.biz-card:hover { transform: translate(2px, 2px); box-shadow: 0 0 0 0 var(--accent-dark); }
.biz-card.is-active { border-color: var(--accent); background: var(--accent-soft); }
.biz-ico {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  font-size: 20px; line-height: 1; background: var(--accent-soft);
}
.biz-card.is-active .biz-ico { background: #fff; }
.dark .biz-card.is-active .biz-ico { background: var(--card); }
.biz-label { white-space: nowrap; }

@media (max-width: 480px) {
  .biz-card { min-width: 78px; padding: 10px 10px; font-size: 11px; }
  .biz-ico { width: 34px; height: 34px; font-size: 18px; }
}

/* =========================================================
   SLIDER CARD LAYOUT (MANUAL SWIPE)
   ========================================================= */
.slider-container {
  width: 100%;
  padding-top: 4px;
  padding-bottom: 24px;
}

.slider-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -webkit-overflow-scrolling: touch;
}
.slider-track::-webkit-scrollbar { display: none; /* Chrome/Safari */ }

/* THE CARD DETAILS */
.card {
  width: 150px; /* Paksa lebar konsisten 150px */
  flex: 0 0 150px;
  scroll-snap-align: start;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .18s ease, border-color .18s ease;
  height: auto;
}
@media (min-width: 500px) {
  .card { width: 180px; flex: 0 0 180px; }
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.thumb {
  width: 64px; height: 64px; border-radius: 14px; border: 1px solid var(--border);
  background: #ffffff center/contain no-repeat; flex-shrink: 0;
  margin-bottom: 2px;
}

.card h3 {
  margin: 0; font-size: 15px; font-weight: 700; line-height: 1.2;
  white-space: normal;
  word-wrap: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis;
}
.card p {
  margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

.actions {
  display: flex; gap: 10px; flex-wrap: wrap; width: 100%;
  margin-top: auto;
}

/* Buttons */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 12px; border-radius: 10px; font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 700;
  text-decoration: none; cursor: pointer; width: 100%;
}
.btn-primary {
  background: var(--accent) !important;
  color: #fff !important;
  border: 2px solid var(--accent-dark) !important;
  box-shadow: 3px 3px 0 0 var(--accent-dark) !important;
  transition: transform .08s ease, box-shadow .08s ease !important;
}
.btn-primary:hover {
  transform: translate(2px, 2px) !important;
  box-shadow: 1px 1px 0 0 var(--accent-dark) !important;
}
.btn-primary:active {
  transform: translate(3px, 3px) !important;
  box-shadow: 0 0 0 0 var(--accent-dark) !important;
}

/* Flash Sale Header */
.fs-head {
  position: relative; border-radius: 16px; border: 1px solid var(--border);
  background: var(--card); padding: 12px 14px; margin-bottom: 12px;
}
.fs-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fs-left { font-weight: 800; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.fs-tags {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; white-space: nowrap;
  overflow-x: auto; max-width: 60%; flex-shrink: 0; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.fs-tags::-webkit-scrollbar { display: none; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 800; color: #fff; background: var(--accent);
  border: 1px solid var(--accent-dark); white-space: nowrap; flex: 0 0 auto;
}

@media (max-width: 480px) {
  .fs-left { font-size: 14px; }
  .badge { font-size: 11px; padding: 5px 10px; }
  .fs-tags { max-width: 58%; }
}

.footer { color: var(--muted); font-size: 13px; text-align: center; padding: 24px 0; font-weight: 500; }
/* ============================================================
   STORE BANNER (v2) — di-load via JS dari panel get-store-meta
   ============================================================ */
.store-banner{
  width:100%;
  aspect-ratio:16/5;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  border-radius:14px;
  margin:14px 0 6px;
  box-shadow:0 6px 18px rgba(15,23,42,.08);
}
@media (max-width:600px){
  .store-banner{ aspect-ratio:16/7; border-radius:10px; }
}
.dark .store-banner{ box-shadow:0 6px 18px rgba(0,0,0,.4); }

/* ============================================================
   STORE IDENTITY v3 — logo header & hero banner upload override
   ============================================================ */
/* Kalau ada logo header upload, kotak ".logo" berubah jadi image holder.
   Background-color & text "TD" di-hide otomatis via .has-image. */
.logo.has-image{
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  background-color:transparent !important;
  color:transparent;
  text-indent:-9999px;       /* fallback untuk screen reader / aksesibilitas tetap aman */
  overflow:hidden;
}
/* Banner di hero-ill: kalau toko upload banner, gantikan ilustrasi default.
   Kelas .has-banner ditambah JS supaya CSS default (ilustrasi statis) tidak menabrak. */
#heroBanner.has-banner{
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}