/* ==============================
   CSS Variables & Reset
============================== */
:root {
  --green:     #00a651;
  --green-dk:  #007a3d;
  --green-lt:  #e6f7ee;
  --gray-100:  #f7f8fa;
  --gray-200:  #eceef2;
  --gray-400:  #9aa1b0;
  --gray-700:  #3d4452;
  --gray-900:  #1a1e2e;
  --white:     #ffffff;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --radius:    10px;
  --font:      'Plus Jakarta Sans', sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--gray-100);
  color: var(--gray-900);
  line-height: 1.6;
  font-size: 15px;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; object-fit: cover; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ==============================
   Header
============================== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.5px;
}

.site-header nav a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--gray-700);
  padding: 6px 14px;
  border-radius: 6px;
  transition: background .2s;
}

.site-header nav a:hover { background: var(--gray-100); }

/* ==============================
   Hero / Banner (Home)
============================== */
.hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dk) 100%);
  color: white;
  padding: 48px 0 40px;
  text-align: center;
}

.hero h1 { font-size: 2rem; font-weight: 700; margin-bottom: 8px; }
.hero p  { font-size: 1rem; opacity: .88; }

/* ==============================
   Section Titles
============================== */
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
  padding: 28px 0 14px;
  border-bottom: 2px solid var(--green);
  display: inline-block;
  margin-bottom: 18px;
}

/* ==============================
   Product Grid (Tokopedia-style)
============================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding-bottom: 32px;
}

@media (min-width: 600px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  cursor: pointer;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-card .thumb {
  aspect-ratio: 1 / 1;
  background: var(--gray-200);
  overflow: hidden;
}

.product-card .thumb img {
  height: 100%;
  transition: transform .3s;
}

.product-card:hover .thumb img { transform: scale(1.05); }

.product-card .info {
  padding: 10px 10px 12px;
}

.product-card .info h3 {
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .info .lokasi {
  font-size: .73rem;
  color: var(--gray-400);
  margin-top: 5px;
}

/* ==============================
   Detail Page
============================== */
.detail-wrap {
  max-width: 900px;
  margin: 32px auto;
  padding: 0 16px;
}

.detail-card {
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 640px) {
  .detail-card {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.detail-foto {
  aspect-ratio: 1 / 1;
  background: var(--gray-200);
  position: sticky;
  top: 16px;
  border-radius: 14px 0 0 14px;
  overflow: hidden;
}

@media (max-width: 639px) {
  .detail-foto {
    border-radius: 14px 14px 0 0;
    position: static;
  }
}

.detail-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-info {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.detail-info h1 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--gray-900);
}

.badge-lokasi {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--green-dk);
  background: var(--green-lt);
  padding: 4px 10px;
  border-radius: 20px;
  width: fit-content;
}

.detail-info .deskripsi {
  font-size: .9rem;
  color: var(--gray-700);
  line-height: 1.7;
}

.btn-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25D366;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .1s;
  text-decoration: none;
  margin-top: 6px;
}

.btn-wa:hover { background: #1ebe5d; transform: scale(1.02); }

.btn-wa svg { width: 22px; height: 22px; fill: white; flex-shrink: 0; }

/* ==============================
   "Produk Lainnya" Section
============================== */
.produk-lain-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* ==============================
   Breadcrumb
============================== */
.breadcrumb {
  font-size: .8rem;
  color: var(--gray-400);
  margin: 16px 0 4px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 16px;
}

.breadcrumb a { color: var(--green); }
.breadcrumb span { margin: 0 5px; }

/* ==============================
   No Image Placeholder
============================== */
.no-img {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-200);
  color: var(--gray-400);
  font-size: .75rem;
}

/* ==============================
   Pagination
============================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 8px 16px 28px;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-700);
  font-size: .85rem;
  font-weight: 500;
  transition: all .15s;
}

.page-btn:hover {
  border-color: var(--green);
  color: var(--green);
}

.page-btn.active {
  background: var(--green);
  border-color: var(--green);
  color: white;
  font-weight: 700;
}

.page-dots {
  color: var(--gray-400);
  font-size: .85rem;
  padding: 0 4px;
}

/* ==============================
   Internal Linking Section
============================== */
.internal-link-section {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 28px 0 36px;
  margin-top: 8px;
}

.il-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 14px;
}

.il-title a {
  color: var(--green);
}

.il-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.il-link {
  display: inline-block;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
  font-size: .8rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  transition: all .15s;
}

.il-link:hover {
  background: var(--green-lt);
  border-color: var(--green);
  color: var(--green-dk);
}

/* ==============================
   Halaman Wilayah (Provinsi/Kab)
============================== */
.wil-hero {
  background: linear-gradient(135deg, var(--gray-900) 0%, #2d3650 100%);
  color: white;
  padding: 36px 0 30px;
}

.wil-breadcrumb {
  font-size: .78rem;
  opacity: .65;
  margin-bottom: 10px;
}

.wil-breadcrumb a {
  color: white;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wil-hero h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.wil-hero p {
  font-size: .9rem;
  opacity: .75;
}

.wil-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

@media (min-width: 640px) {
  .wil-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

.wil-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  transition: box-shadow .2s, transform .15s;
  border: 1px solid var(--gray-200);
}

.wil-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: var(--green);
}

.wil-name {
  font-size: .9rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.wil-meta {
  display: flex;
  gap: 10px;
  font-size: .75rem;
  color: var(--gray-400);
}

.wil-arrow {
  font-size: 1.2rem;
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
  margin-left: 10px;
}

/* ==============================
   Footer
============================== */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  text-align: center;
  padding: 20px 16px;
  font-size: .83rem;
}

/* ── Silo up links (page.php) ── */
.silo-up-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-200);
}
.silo-up-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-lt);
  color: var(--green-dk);
  font-size: .83rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 20px;
  text-decoration: none;
  transition: background .15s;
}
.silo-up-links a:hover { background: #c8f0d8; }

/* ── Wil desc box (wilayah.php) ── */
.wil-desc-box { background: rgba(255,255,255,.15); border-radius:10px; padding:16px 20px; margin-top:16px; font-size:.92rem; line-height:1.7; }
.wil-desc-box p { color:inherit; margin-bottom:8px; }
.wil-info-geo { font-size:.82rem; opacity:.85; }
.wil-silo-up { margin-top:14px; font-size:.83rem; opacity:.9; }
.wil-silo-up a { color:#fff; text-decoration:underline; }
.btn-maps { display:inline-flex; align-items:center; gap:6px; background:rgba(255,255,255,.2); color:#fff; padding:10px 18px; border-radius:8px; font-size:.9rem; font-weight:600; text-decoration:none; }
.btn-maps:hover { background:rgba(255,255,255,.3); }

/* ── Footer Sitemap Links (crawl discovery) ── */
.footer-sitemap {
  background: #1a1f2e;
  padding: 32px 0 24px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.footer-sitemap .fs-group {
  margin-bottom: 20px;
}
.footer-sitemap .fs-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.4);
  margin-bottom: 8px;
}
.footer-sitemap .fs-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.footer-sitemap .fs-links a {
  font-size: .75rem;
  color: rgba(255,255,255,.55);
  text-decoration: none;
  padding: 2px 0;
  transition: color .15s;
}
.footer-sitemap .fs-links a:hover {
  color: #fff;
  text-decoration: underline;
}
.site-footer {
  background: #111827;
  padding: 16px 0;
  text-align: center;
  font-size: .78rem;
  color: rgba(255,255,255,.35);
  border-top: 1px solid rgba(255,255,255,.06);
}
