/* ============================================================
   Rumah Organik Jember - Frontend Stylesheet
   ============================================================ */

:root {
  --brand:        #2e7d32;
  --brand-dark:   #1b5e20;
  --brand-light:  #e8f5e9;
  --accent:       #f9a825;
  --accent-soft:  #fff8e1;
  --ink:          #1f2724;
  --muted:        #6b7770;
  --line:         #e3ebe4;
  --bg-soft:      #f6f9f6;
  --radius:       16px;
  --shadow-sm:    0 2px 10px rgba(24, 48, 30, .06);
  --shadow-md:    0 12px 32px rgba(24, 48, 30, .10);
  --shadow-lg:    0 24px 60px rgba(24, 48, 30, .14);
}

* { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 { font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }

a { text-decoration: none; }

.text-brand   { color: var(--brand) !important; }
.text-accent  { color: var(--accent) !important; }
.bg-soft      { background: var(--bg-soft); }
.bg-brand     { background: var(--brand) !important; }
.bg-brand-light { background: var(--brand-light); }

/* ---------------------------------------------- Buttons */
.btn { border-radius: 10px; font-weight: 600; padding: .65rem 1.5rem; transition: .25s; }

.btn-brand {
  background: var(--brand); color: #fff; border: 1px solid var(--brand);
}
.btn-brand:hover {
  background: var(--brand-dark); border-color: var(--brand-dark);
  color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md);
}
.btn-outline-brand {
  border: 1px solid var(--brand); color: var(--brand); background: transparent;
}
.btn-outline-brand:hover { background: var(--brand); color: #fff; }

.btn-accent { background: var(--accent); border: 1px solid var(--accent); color: #3a2c00; }
.btn-accent:hover { background: #f57f17; border-color: #f57f17; color: #fff; }

/* ---------------------------------------------- Navbar */
.navbar {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
  padding: .7rem 0;
  transition: .3s;
}
.navbar.scrolled { box-shadow: var(--shadow-sm); padding: .45rem 0; }
.navbar-brand img { height: 46px; width: auto; }
.navbar .nav-link {
  font-weight: 600; color: var(--ink); padding: .5rem .95rem !important;
  border-radius: 8px; position: relative;
}
.navbar .nav-link:hover,
.navbar .nav-link.active { color: var(--brand); }
.navbar .nav-link.active::after {
  content: ''; position: absolute; left: .95rem; right: .95rem; bottom: .15rem;
  height: 2px; background: var(--accent); border-radius: 2px;
}

/* ---------------------------------------------- Hero */
.hero {
  position: relative;
  padding: clamp(4rem, 10vw, 7rem) 0 clamp(3.5rem, 8vw, 6rem);
  background:
    radial-gradient(1000px 500px at 85% -10%, var(--accent-soft), transparent 60%),
    linear-gradient(160deg, var(--brand-light) 0%, #ffffff 55%);
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url('../img/pattern-leaf.svg') repeat;
  opacity: .5; pointer-events: none;
}
.hero > .container { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
.hero .lead { color: var(--muted); font-size: 1.075rem; max-width: 34rem; }

.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: #fff; border: 1px solid var(--line);
  color: var(--brand-dark); font-weight: 600; font-size: .85rem;
  padding: .4rem .9rem; border-radius: 999px; box-shadow: var(--shadow-sm);
}

.hero-visual { position: relative; }
.hero-visual img {
  border-radius: 24px; box-shadow: var(--shadow-lg);
  width: 100%; object-fit: cover;
}
.hero-blob {
  position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: var(--accent); opacity: .13; filter: blur(60px);
  top: -40px; right: -40px; z-index: -1;
}

/* ---------------------------------------------- Section */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }

.section-tag {
  display: inline-block; font-size: .78rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--brand);
  background: var(--brand-light); padding: .35rem .85rem; border-radius: 999px;
  margin-bottom: .9rem;
}
.section-title { font-size: clamp(1.6rem, 3.2vw, 2.35rem); margin-bottom: .75rem; }
.section-sub   { color: var(--muted); max-width: 42rem; }

/* ---------------------------------------------- Cards */
/* Tinggi dibiarkan mengikuti isi. Untuk kartu berjajar yang perlu tinggi
   seragam, tambahkan utilitas .h-100 pada elemen kartunya. */
.card-soft {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: .3s;
}
.card-soft:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: #cfe0d1; }

/* Product card */
.product-card { overflow: hidden; }
.product-thumb {
  position: relative; aspect-ratio: 4/3; overflow: hidden;
  background: linear-gradient(140deg, #f4f8f4, #eaf2ea);
}
.product-thumb img {
  width: 100%; height: 100%; object-fit: contain; padding: .75rem;
  transition: transform .5s ease;
}
.product-card:hover .product-thumb img { transform: scale(1.06); }
.product-badge {
  position: absolute; top: .7rem; left: .7rem; z-index: 2;
  background: var(--accent); color: #3a2c00; font-size: .7rem; font-weight: 700;
  padding: .25rem .6rem; border-radius: 6px; letter-spacing: .04em;
}
.product-cat {
  font-size: .74rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent);
}
.product-title { font-size: 1.02rem; margin: .3rem 0 .35rem; color: var(--ink); }
.product-card:hover .product-title { color: var(--brand); }
.product-desc { font-size: .875rem; color: var(--muted); }
.product-meta {
  font-size: .8rem; color: var(--muted);
  border-top: 1px dashed var(--line); padding-top: .65rem; margin-top: .65rem;
}

/* ---------------------------------------------- Stats */
.stat-box { text-align: center; padding: 1.25rem .5rem; }
.stat-num {
  font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 800;
  color: var(--brand); line-height: 1;
}
.stat-label { font-size: .85rem; color: var(--muted); margin-top: .4rem; }

/* ---------------------------------------------- Process timeline */
.process-step {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem 1.25rem 1.25rem;
  height: 100%; transition: .3s;
}
.process-step:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.process-num {
  position: absolute; top: -16px; left: 1.25rem;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--brand); color: #fff; font-weight: 700; font-size: .95rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(46,125,50,.3);
}
.process-icon { font-size: 1.7rem; color: var(--accent); margin-bottom: .5rem; }
.process-step h5 { font-size: 1rem; margin-bottom: .35rem; }
.process-step p  { font-size: .86rem; color: var(--muted); margin: 0; }

/* ---------------------------------------------- Certificate */
.cert-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem 1.5rem; height: 100%; transition: .3s; text-align: center;
}
.cert-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.cert-icon {
  width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 1rem;
  background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 1.8rem;
}
.cert-card h5 { font-size: 1.05rem; margin-bottom: .2rem; }
.cert-issuer { font-size: .8rem; color: var(--accent); font-weight: 600; margin-bottom: .65rem; }
.cert-card p { font-size: .875rem; color: var(--muted); margin: 0; }
.cert-thumb img { border-radius: 12px; max-height: 180px; object-fit: contain; }

/* ---------------------------------------------- Material chip */
.material-card {
  border-radius: var(--radius); overflow: hidden; position: relative;
  background: var(--brand-light); border: 1px solid var(--line);
  padding: 1.35rem; height: 100%; transition: .3s;
}
.material-card:hover { background: #fff; box-shadow: var(--shadow-md); }
.material-card h6 { font-size: 1rem; margin-bottom: .3rem; color: var(--brand-dark); }
.material-card p  { font-size: .85rem; color: var(--muted); margin: 0; }

/* ---------------------------------------------- Article */
.article-card { overflow: hidden; }
.article-thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-soft); }
.article-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.article-card:hover .article-thumb img { transform: scale(1.05); }
.article-meta { font-size: .78rem; color: var(--muted); }
.article-card h5 { font-size: 1.05rem; margin: .45rem 0 .4rem; color: var(--ink); }
.article-card:hover h5 { color: var(--brand); }
.article-card p { font-size: .875rem; color: var(--muted); }

.article-body { font-size: 1.03rem; color: #303a35; }
.article-body h3 { font-size: 1.3rem; margin: 1.8rem 0 .7rem; }
.article-body img { max-width: 100%; border-radius: 12px; margin: 1rem 0; }
.article-body ul, .article-body ol { padding-left: 1.35rem; }
.article-body blockquote {
  border-left: 4px solid var(--accent); background: var(--accent-soft);
  padding: 1rem 1.25rem; border-radius: 0 10px 10px 0; margin: 1.25rem 0;
}

/* ---------------------------------------------- Gallery */
.gallery-item {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 1/1; background: var(--bg-soft); display: block;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-cap {
  position: absolute; inset: auto 0 0 0; padding: 2rem .9rem .8rem;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  color: #fff; font-size: .85rem; font-weight: 600;
  opacity: 0; transition: .3s;
}
.gallery-item:hover .gallery-cap { opacity: 1; }

/* ---------------------------------------------- Page header */
.page-head {
  background:
    radial-gradient(700px 320px at 80% 0%, var(--accent-soft), transparent 65%),
    linear-gradient(160deg, var(--brand-light), #fff);
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 5vw, 3rem);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); margin-bottom: .5rem; }
.breadcrumb { --bs-breadcrumb-divider-color: var(--muted); font-size: .875rem; margin: 0; }
.breadcrumb a { color: var(--brand); }
.breadcrumb-item.active { color: var(--muted); }

/* ---------------------------------------------- Detail produk */
.pd-gallery {
  border-radius: 20px; background: linear-gradient(140deg,#f4f8f4,#eaf2ea);
  border: 1px solid var(--line); padding: 1.5rem; text-align: center;
}
.pd-gallery img { max-width: 100%; border-radius: 12px; }
.spec-table th {
  width: 42%; font-weight: 600; color: var(--muted);
  font-size: .875rem; padding: .6rem .75rem .6rem 0; vertical-align: top;
}
.spec-table td { font-size: .9rem; padding: .6rem 0; font-weight: 500; }
.spec-table tr + tr th, .spec-table tr + tr td { border-top: 1px solid var(--line); }

.tick-list { list-style: none; padding: 0; margin: 0; }
.tick-list li {
  position: relative; padding-left: 1.7rem; margin-bottom: .55rem;
  font-size: .93rem; color: #384540;
}
.tick-list li::before {
  content: '\F26E'; font-family: 'bootstrap-icons';
  position: absolute; left: 0; top: -.05rem; color: var(--brand); font-size: .95rem;
}

/* ---------------------------------------------- CTA */
.cta-band {
  background: linear-gradient(120deg, var(--brand-dark), var(--brand));
  color: #fff; border-radius: 24px; padding: clamp(2rem,5vw,3.25rem);
  position: relative; overflow: hidden;
}
.cta-band::after {
  content: ''; position: absolute; right: -60px; top: -60px;
  width: 260px; height: 260px; border-radius: 50%;
  background: var(--accent); opacity: .18;
}
.cta-band h3 { font-size: clamp(1.4rem, 3vw, 2rem); }
.cta-band p { opacity: .9; margin-bottom: 0; }

/* ---------------------------------------------- Footer */
.site-footer { background: #16211b; color: #b9c7bf; padding-top: 3.5rem; }
.site-footer h6 {
  color: #fff; font-size: .95rem; letter-spacing: .04em;
  text-transform: uppercase; margin-bottom: 1.1rem;
}
.site-footer a { color: #b9c7bf; transition: .2s; }
.site-footer a:hover { color: var(--accent); }
.site-footer img.f-logo { height: 52px; filter: brightness(0) invert(1); opacity: .95; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: .55rem; font-size: .9rem; }
.footer-contact li { display: flex; gap: .65rem; margin-bottom: .8rem; font-size: .9rem; }
.footer-contact i { color: var(--accent); margin-top: .2rem; }
.social-btn {
  width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.08);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff !important; transition: .25s;
}
.social-btn:hover { background: var(--accent); color: #16211b !important; transform: translateY(-2px); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08); margin-top: 2.5rem;
  padding: 1.25rem 0; font-size: .84rem;
}

/* ---------------------------------------------- WhatsApp float */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 1030;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff; font-size: 1.6rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,.42); transition: .25s;
}
.wa-float:hover { transform: scale(1.08); color: #fff; }

/* ---------------------------------------------- Misc */
.empty-state { text-align: center; padding: 3.5rem 1rem; color: var(--muted); }
.empty-state i { font-size: 3rem; color: #cfdcd2; display: block; margin-bottom: .75rem; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 991.98px) {
  .navbar .nav-link.active::after { display: none; }
  .hero { text-align: center; }
  .hero .lead { margin-inline: auto; }
}

/* ---------------------------------------------- Perbaikan layar kecil */

/* Di bawah 576px .container bersifat cair dengan padding 12px, sedangkan
   .row.g-5 memakai margin negatif -24px. Selisih 12px membuat dokumen
   melebar melewati layar. Samakan gutter horizontalnya di ukuran ini. */
@media (max-width: 575.98px) {
  .container > .row.g-5,
  .container > .row.gx-5 { --bs-gutter-x: 1.5rem; }
}

/* Di layar kecil, daftar kategori berubah menjadi deretan chip yang dapat
   digeser mendatar, agar produk tidak terdorong jauh ke bawah layar. */
@media (max-width: 991.98px) {
  .filter-cats .list-group {
    flex-direction: row; gap: .5rem; overflow-x: auto;
    padding-bottom: .35rem; scrollbar-width: thin;
  }
  /* .list-group-item-action bawaan Bootstrap memakai width:100%,
     sehingga perlu dikembalikan ke lebar isi agar berbentuk chip. */
  .filter-cats .list-group-item {
    white-space: nowrap; flex: none; width: auto;
    border: 1px solid var(--line) !important; border-radius: 999px;
    padding: .4rem .9rem !important; font-size: .875rem;
  }
  .filter-cats .list-group-item .badge { display: none; }
  /* Ajakan grosir sudah diwakili tombol WhatsApp mengambang */
  .filter-sidebar .promo-card { display: none; }
}

@media (max-width: 767.98px) {
  /* Perbesar area sentuh tautan kontak & footer */
  .footer-list a,
  .footer-contact a,
  .breadcrumb-item a { display: inline-block; padding-block: .25rem; }

  /* Tabel spesifikasi produk agar tetap terbaca */
  .spec-table th { width: 45%; font-size: .82rem; }
  .spec-table td { font-size: .85rem; }

  /* Tombol penuh agar mudah ditekan */
  .cta-band .btn { width: 100%; }
}
