/* =========================================================
   PasarKita — Design Tokens
   ========================================================= */
:root{
  --clay:#C1440E;
  --clay-dark:#9E370B;
  --cream:#FDF6EC;
  --ink:#3E2C23;
  --leaf:#4A7C59;
  --leaf-dark:#3A6247;
  --gold:#E0A733;
  --white:#FFFFFF;
  --muted:#8A7B6C;
  --line:#EAE0D2;
  --danger:#B3261E;

  --radius-lg:24px;
  --radius-md:18px;
  --radius-sm:12px;

  --shadow-soft:0 10px 30px rgba(62,44,35,.08);
  --shadow-pop:0 16px 40px rgba(62,44,35,.14);

  --font-head:'Poppins', sans-serif;
  --font-body:'Inter', sans-serif;

  --nav-h:68px;
}

*,*::before,*::after{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }

body{
  font-family:var(--font-body);
  background:var(--cream);
  color:var(--ink);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
  padding-bottom:calc(var(--nav-h) + 12px);
}

h1,h2,h3,h4{
  font-family:var(--font-head);
  color:var(--ink);
  margin:0 0 8px;
  line-height:1.25;
}

p{ margin:0 0 8px; color:var(--ink); }

button{ font-family:var(--font-body); cursor:pointer; }
a{ text-decoration:none; color:inherit; }
img{ max-width:100%; display:block; }

:focus-visible{
  outline:3px solid var(--gold);
  outline-offset:2px;
}

/* =========================================================
   LAYOUT / VIEWS
   ========================================================= */
.view{ display:none; }
.view--active{ display:block; }

main{
  max-width:520px;
  margin:0 auto;
  padding:0 0 8px;
}

.section{ padding:32px 20px 8px; }
.section--tint{ background:#FBEFE0; }
.section__title{ font-size:22px; }
.section__sub{ color:var(--muted); font-size:14px; margin-bottom:16px; }
.section__head{
  display:flex; align-items:baseline; justify-content:space-between; gap:8px;
}

.page-head{ padding:28px 20px 8px; }
.page-head h1{ font-size:26px; }
.page-head p{ color:var(--muted); font-size:14px; }

.link-btn{
  background:none; border:none; color:var(--clay); font-weight:600;
  font-size:14px; padding:8px 0; white-space:nowrap;
}

/* =========================================================
   TOPBAR
   ========================================================= */
.topbar{
  position:sticky; top:0; z-index:50;
  background:rgba(253,246,236,.92);
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);
}
.topbar__inner{
  max-width:520px; margin:0 auto;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 20px;
}
.brand{
  display:flex; align-items:center; gap:10px;
  background:none; border:none; padding:0;
}
.brand__mark{
  width:36px; height:36px; border-radius:10px;
  background:var(--clay); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-head); font-weight:700; font-size:14px;
}
.brand__name{
  font-family:var(--font-head); font-weight:700; font-size:17px; color:var(--ink);
}
.topbar__member{
  border:1.5px solid var(--gold); background:#FFF8E8; color:#8A5E00;
  font-weight:600; font-size:13px; border-radius:999px; padding:8px 14px;
}

/* =========================================================
   HERO
   ========================================================= */
.hero{
  padding:32px 20px 28px;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(74,124,89,.10), transparent 60%),
    linear-gradient(180deg, #FBEFE0 0%, var(--cream) 100%);
}
.hero__badge{
  display:inline-block;
  background:var(--white); border:1px solid var(--line);
  padding:6px 14px; border-radius:999px; font-size:12.5px; font-weight:600;
  color:var(--leaf-dark); margin-bottom:16px;
}
.hero__title{
  font-size:32px; font-weight:800; letter-spacing:-.5px;
}
.hero__sub{
  font-size:15.5px; color:var(--muted); margin-bottom:22px; max-width:44ch;
}
.hero__cta{ display:flex; flex-direction:column; gap:10px; margin-bottom:26px; }
.hero__stats{
  display:flex; gap:10px;
}
.stat{
  flex:1; background:var(--white); border-radius:var(--radius-sm);
  padding:12px 8px; text-align:center; box-shadow:var(--shadow-soft);
}
.stat strong{ display:block; font-family:var(--font-head); font-size:19px; color:var(--clay); }
.stat span{ font-size:11px; color:var(--muted); }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn{
  border:none; border-radius:16px; font-weight:600; font-size:15px;
  padding:14px 22px; transition:transform .12s ease, box-shadow .12s ease, opacity .12s ease;
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
}
.btn:active{ transform:scale(.97); }
.btn--primary{ background:var(--clay); color:#fff; box-shadow:0 10px 22px rgba(193,68,14,.28); }
.btn--primary:hover{ background:var(--clay-dark); }
.btn--ghost{ background:var(--white); color:var(--ink); border:1.5px solid var(--line); }
.btn--ghost:hover{ border-color:var(--clay); color:var(--clay); }
.btn--lg{ padding:16px 24px; font-size:16px; border-radius:18px; width:100%; }
.btn--sm{ padding:9px 14px; font-size:13px; border-radius:12px; }
.btn--block{ width:100%; }
.btn--wa{ background:var(--leaf); color:#fff; }
.btn--wa:hover{ background:var(--leaf-dark); }

.form-row{ display:flex; gap:10px; }
.form-row .btn{ flex:1; }

/* =========================================================
   BENEFIT CARDS
   ========================================================= */
.benefit-grid{ display:grid; gap:14px; margin-top:6px; }
.benefit-card{
  background:var(--white); border-radius:var(--radius-md);
  padding:20px; box-shadow:var(--shadow-soft);
}
.benefit-card__icon{ font-size:26px; margin-bottom:8px; }
.benefit-card h3{ font-size:16px; margin-bottom:4px; }
.benefit-card p{ font-size:14px; color:var(--muted); margin:0; }

/* =========================================================
   STORY (Cerita UMKM) — signature element: "stempel" trust badge
   ========================================================= */
.story-scroller{
  display:flex; gap:14px; overflow-x:auto; padding:4px 0 10px;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
}
.story-scroller::-webkit-scrollbar{ display:none; }
.story-grid{ display:grid; gap:16px; padding:0 20px 20px; }

.story-card{
  position:relative;
  background:var(--white); border-radius:var(--radius-lg);
  box-shadow:var(--shadow-soft);
  overflow:hidden;
  flex:0 0 78%;
  scroll-snap-align:start;
}
.story-grid .story-card{ flex:none; }
.story-card__media{
  height:140px;
  display:flex; align-items:center; justify-content:center;
  font-size:44px;
  background:linear-gradient(135deg, #F4D9B8, #F0C79A);
}
.story-card__body{ padding:16px; }
.story-card__body h3{ font-size:16px; margin-bottom:4px; }
.story-card__body p{ font-size:13.5px; color:var(--muted); margin-bottom:0; }
.story-card__stamp{
  position:absolute; top:12px; right:12px;
  width:52px; height:52px; border-radius:50%;
  border:2px dashed var(--leaf);
  color:var(--leaf-dark);
  display:flex; align-items:center; justify-content:center;
  text-align:center; font-size:8.5px; font-weight:700;
  font-family:var(--font-head);
  transform:rotate(-12deg);
  background:rgba(255,255,255,.9);
  line-height:1.1; letter-spacing:.3px;
}

/* =========================================================
   PRODUCT GRID / CARD
   ========================================================= */
.product-grid{
  display:grid; grid-template-columns:1fr 1fr; gap:14px;
  padding:0 20px 4px;
}
.section > .product-grid{ padding-left:0; padding-right:0; }

.product-card{
  background:var(--white); border-radius:var(--radius-md);
  box-shadow:var(--shadow-soft); overflow:hidden;
  display:flex; flex-direction:column;
  border:1px solid transparent;
  transition:box-shadow .15s ease, transform .15s ease;
}
.product-card:active{ transform:scale(.98); }
.product-card__media{
  height:104px; display:flex; align-items:center; justify-content:center;
  font-size:36px; background:#F4EBDD;
}
.product-card__body{ padding:12px; flex:1; display:flex; flex-direction:column; }
.product-card__cat{ font-size:10.5px; color:var(--leaf-dark); font-weight:700; text-transform:uppercase; letter-spacing:.4px; margin-bottom:2px; }
.product-card__name{ font-size:14px; font-weight:600; margin:0 0 4px; }
.product-card__seller{ font-size:11.5px; color:var(--muted); margin-bottom:8px; }
.product-card__price{ font-family:var(--font-head); font-weight:700; color:var(--clay); font-size:15px; margin-top:auto; }
.product-card__cta{ margin-top:10px; }

/* =========================================================
   SEARCH / CHIPS
   ========================================================= */
.search-bar{ padding:0 20px 12px; }
.search-bar input{
  width:100%; padding:13px 16px; border-radius:14px;
  border:1.5px solid var(--line); background:var(--white);
  font-size:15px; font-family:var(--font-body);
}
.search-bar input:focus{ border-color:var(--clay); outline:none; }

.chip-row{
  display:flex; gap:8px; overflow-x:auto; padding:0 20px 16px;
  -webkit-overflow-scrolling:touch;
}
.chip-row::-webkit-scrollbar{ display:none; }
.chip{
  flex:0 0 auto; background:var(--white); border:1.5px solid var(--line);
  padding:9px 16px; border-radius:999px; font-size:13.5px; font-weight:600;
  color:var(--ink); white-space:nowrap;
}
.chip--active{ background:var(--ink); color:#fff; border-color:var(--ink); }

/* =========================================================
   EMPTY / SUCCESS STATES
   ========================================================= */
.empty-state, .success-state{
  text-align:center; padding:40px 24px; margin:0 20px;
  background:var(--white); border-radius:var(--radius-md);
  box-shadow:var(--shadow-soft);
}
.empty-state__icon, .success-state__icon{ font-size:38px; margin-bottom:10px; }
.empty-state p{ color:var(--muted); font-size:14px; margin:0; }
.success-state h3{ margin-bottom:6px; }
.success-state p{ color:var(--muted); font-size:14px; margin-bottom:16px; }

/* =========================================================
   PRODUCT DETAIL
   ========================================================= */
.back-btn{
  background:none; border:none; color:var(--ink); font-weight:600;
  font-size:14px; padding:16px 20px 4px; display:block;
}
#produk-detail{ padding:8px 20px 20px; }
.pd-media{
  height:220px; border-radius:var(--radius-lg); background:#F4EBDD;
  display:flex; align-items:center; justify-content:center; font-size:72px;
  box-shadow:var(--shadow-soft); margin-bottom:18px;
}
.pd-cat{ font-size:11.5px; font-weight:700; color:var(--leaf-dark); text-transform:uppercase; letter-spacing:.4px; }
.pd-name{ font-size:22px; margin:4px 0 6px; }
.pd-price{ font-family:var(--font-head); font-size:24px; font-weight:800; color:var(--clay); margin-bottom:12px; }
.pd-seller{
  display:flex; align-items:center; gap:10px;
  background:var(--white); border-radius:var(--radius-md); padding:12px 14px;
  box-shadow:var(--shadow-soft); margin-bottom:16px;
}
.pd-seller__avatar{
  width:40px; height:40px; border-radius:50%; background:var(--leaf);
  color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-family:var(--font-head);
  flex-shrink:0;
}
.pd-seller__name{ font-weight:600; font-size:14px; }
.pd-seller__label{ font-size:11.5px; color:var(--muted); }
.pd-desc{ font-size:14.5px; color:var(--ink); margin-bottom:18px; }
.pd-trust{
  display:flex; gap:8px; align-items:flex-start;
  background:#EFF6F1; border:1px solid #D7E9DC; border-radius:var(--radius-sm);
  padding:12px 14px; font-size:13px; color:var(--leaf-dark); margin-bottom:20px;
}
.pd-cta{ margin-bottom:28px; }

.pd-reviews h3{ font-size:17px; margin-bottom:12px; }
.review-card{
  background:var(--white); border-radius:var(--radius-sm); padding:14px;
  box-shadow:var(--shadow-soft); margin-bottom:10px;
}
.review-card__top{ display:flex; justify-content:space-between; font-size:13px; margin-bottom:4px; }
.review-card__name{ font-weight:600; }
.review-card__stars{ color:var(--gold); }
.review-card p{ font-size:13.5px; color:var(--muted); margin:0; }

.review-form{ margin-top:16px; }
.star-picker{ display:flex; gap:6px; font-size:26px; margin-bottom:10px; }
.star-picker span{ cursor:pointer; color:#DDD1BC; }
.star-picker span.active{ color:var(--gold); }

/* =========================================================
   FORMS
   ========================================================= */
.form-card{
  background:var(--white); border-radius:var(--radius-lg);
  padding:20px; box-shadow:var(--shadow-soft); margin:0 20px 20px;
}
.form-field{ margin-bottom:16px; }
.form-field label{ display:block; font-size:13.5px; font-weight:600; margin-bottom:6px; }
.form-field .req{ color:var(--clay); }
.form-field input, .form-field select, .form-field textarea{
  width:100%; padding:13px 14px; border-radius:12px;
  border:1.5px solid var(--line); font-family:var(--font-body); font-size:14.5px;
  background:var(--white); color:var(--ink);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus{
  border-color:var(--clay); outline:none;
}
.form-field textarea{ resize:vertical; }
.field-error{ display:block; color:var(--danger); font-size:12px; margin-top:4px; min-height:14px; }
.hint-text{ font-size:13.5px; color:var(--muted); padding:0 20px; margin-bottom:14px; }

/* =========================================================
   TAB SWITCH (Seller)
   ========================================================= */
.tab-switch{
  display:flex; gap:8px; margin:0 20px 18px;
  background:var(--white); border-radius:14px; padding:4px; box-shadow:var(--shadow-soft);
}
.tab-switch__btn{
  flex:1; border:none; background:transparent; padding:11px; border-radius:10px;
  font-weight:600; font-size:13.5px; color:var(--muted);
}
.tab-switch__btn--active{ background:var(--ink); color:#fff; }

/* =========================================================
   DASHBOARD SELLER
   ========================================================= */
.dash-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:0 20px 16px;
}
.dash-header__label{ font-size:11.5px; color:var(--muted); margin:0; }
.dash-header h3{ font-size:18px; margin:0; }
#btn-tambah-produk{ margin:0 20px 16px; width:calc(100% - 40px); }
.dash-subtitle{ padding:0 20px; font-size:15px; margin-top:8px; }
.dash-product-list{ padding:0 20px; display:grid; gap:10px; }
.dash-product-item{
  background:var(--white); border-radius:var(--radius-sm);
  padding:12px 14px; box-shadow:var(--shadow-soft);
  display:flex; align-items:center; gap:12px;
}
.dash-product-item__icon{ font-size:24px; }
.dash-product-item__info{ flex:1; min-width:0; }
.dash-product-item__info strong{ display:block; font-size:14px; }
.dash-product-item__info span{ font-size:12.5px; color:var(--muted); }
.dash-product-item__actions{ display:flex; gap:6px; }
.icon-btn{
  border:none; background:#F4EBDD; width:32px; height:32px; border-radius:8px;
  display:flex; align-items:center; justify-content:center; font-size:14px;
}
.icon-btn--danger{ background:#FBE7E5; }

/* =========================================================
   MEMBERSHIP PLANS
   ========================================================= */
.plan-grid{ display:grid; gap:16px; padding:0 20px 28px; }
.plan-card{
  background:var(--white); border-radius:var(--radius-lg);
  padding:24px 20px; box-shadow:var(--shadow-soft); position:relative;
}
.plan-card--highlight{
  border:2px solid var(--gold);
  background:linear-gradient(180deg, #FFF9EC 0%, var(--white) 100%);
}
.plan-card__badge{
  position:absolute; top:-12px; left:20px;
  background:var(--gold); color:#4A3300; font-size:11px; font-weight:700;
  padding:5px 12px; border-radius:999px;
}
.plan-price{ font-family:var(--font-head); font-size:20px; font-weight:700; color:var(--clay); margin-bottom:14px; }
.plan-list{ list-style:none; padding:0; margin:0 0 18px; font-size:14px; color:var(--ink); }
.plan-list li{ margin-bottom:8px; }

/* =========================================================
   TESTIMONI
   ========================================================= */
.testi-grid{ display:grid; gap:14px; }
.testi-card{
  background:var(--white); border-radius:var(--radius-md); padding:18px;
  box-shadow:var(--shadow-soft);
}
.testi-card__stars{ color:var(--gold); margin-bottom:8px; letter-spacing:2px; }
.testi-card p{ font-size:14px; font-style:italic; margin-bottom:8px; }
.testi-card span{ font-size:12.5px; color:var(--muted); font-weight:600; }

/* =========================================================
   TENTANG / FAQ
   ========================================================= */
.content-card{
  background:var(--white); border-radius:var(--radius-md); padding:18px 20px;
  margin:0 20px 14px; box-shadow:var(--shadow-soft);
}
.content-card h3{ font-size:16px; }
.content-card p{ font-size:14px; color:var(--muted); margin:0; }
.faq-title{ padding:8px 20px; font-size:17px; }
.faq-list{ padding:0 20px 8px; display:grid; gap:10px; }
.faq-item{
  background:var(--white); border-radius:var(--radius-sm); padding:14px 16px;
  box-shadow:var(--shadow-soft);
}
.faq-item summary{ font-weight:600; font-size:14.5px; cursor:pointer; }
.faq-item p{ font-size:13.5px; color:var(--muted); margin:10px 0 0; }

/* =========================================================
   CTA FINAL
   ========================================================= */
.cta-final{
  margin:24px 20px 32px; padding:32px 22px; text-align:center;
  background:linear-gradient(135deg, var(--ink), #52392A);
  border-radius:var(--radius-lg); color:#fff;
}
.cta-final h2{ color:#fff; font-size:21px; }
.cta-final p{ color:#E6D9CB; font-size:14px; margin-bottom:18px; }
.cta-final .btn--primary{ width:auto; padding:14px 28px; }
.cta-final--compact{ padding:26px 22px; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer{
  text-align:center; padding:24px 20px calc(24px + var(--nav-h));
  color:var(--muted); font-size:12.5px;
}
.footer p{ margin:2px 0; color:var(--muted); }
.footer__tag{ font-family:var(--font-head); font-weight:600; color:var(--ink) !important; }

/* =========================================================
   FLOATING WHATSAPP
   ========================================================= */
.wa-float{
  position:fixed; right:16px; bottom:calc(var(--nav-h) + 16px); z-index:60;
  width:54px; height:54px; border-radius:50%;
  background:var(--leaf); color:#fff;
  display:flex; align-items:center; justify-content:center;
  box-shadow:var(--shadow-pop);
}

/* =========================================================
   BOTTOM NAV
   ========================================================= */
.bottomnav{
  position:fixed; left:0; right:0; bottom:0; z-index:70;
  height:var(--nav-h);
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(10px);
  border-top:1px solid var(--line);
  display:flex;
  max-width:520px; margin:0 auto;
}
.bottomnav__item{
  flex:1; background:none; border:none; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:2px;
  font-size:10.5px; color:var(--muted); font-weight:600;
}
.bottomnav__icon{ font-size:19px; }
.bottomnav__item--active{ color:var(--clay); }

/* =========================================================
   RESPONSIVE: small phones
   ========================================================= */
@media (max-width:360px){
  .hero__title{ font-size:27px; }
  .product-card__media{ height:88px; font-size:30px; }
}

/* Larger screens: keep app centered like a phone canvas, add side frame */
@media (min-width:560px){
  body{ background:#EFE4D2; }
  .topbar, .bottomnav{ box-shadow:0 0 40px rgba(0,0,0,.08); }
  main, .footer{ background:var(--cream); }
  main{ box-shadow:0 0 40px rgba(0,0,0,.06); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; animation:none !important; }
}
