/* ============================================================
   IKLAN BARIS — Global Stylesheet (OLX-style, responsive)
   ============================================================ */
:root {
  --dark: #002f34;
  --teal: #23e5db;
  --teal-dark: #1ac8bf;
  --accent: #ffce32;
  --green: #38a73e;
  --red: #e0352b;
  --orange: #f68c1f;
  --blue: #0f6fbf;
  --bg: #f2f4f5;
  --card: #ffffff;
  --border: #e8ecef;
  --text: #002f34;
  --muted: #6a7d85;
  --shadow: 0 2px 8px rgba(0,47,52,.06);
  --shadow-lg: 0 6px 24px rgba(0,47,52,.12);
  --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding-bottom: 64px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 14px; border-radius: 8px; padding: 10px 18px;
  border: none; cursor: pointer; transition: .18s; line-height: 1.2; white-space: nowrap;
}
.btn-primary { background: var(--teal); color: var(--dark); }
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-1px); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #003d44; }
.btn-outline { background: #fff; color: var(--dark); border: 2px solid var(--border); }
.btn-outline:hover { border-color: var(--dark); }
.btn-ghost { background: transparent; color: var(--dark); font-weight: 600; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #c02a21; }
.btn-google { background: #fff; color: #444; border: 1.5px solid var(--border); font-weight: 600; }
.btn-google:hover { background: #f5f5f5; border-color: #bbb; }
.btn-google i { color: #4285f4; font-size: 17px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 4px 0 16px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #2c8f31; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header { background: #fff; box-shadow: 0 1px 4px rgba(0,47,52,.08); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; gap: 20px; padding: 14px 16px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-icon {
  width: 40px; height: 40px; border-radius: 9px; background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  display: flex; align-items: center; justify-content: center; color: var(--dark); font-size: 18px; box-shadow: var(--shadow);
}
.brand-logo { height: 40px; width: auto; max-width: 160px; object-fit: contain; }
.brand-logo-light { filter: none; }
.brand-text { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; color: var(--dark); white-space: nowrap; }
.brand-text span { color: var(--teal-dark); }
.brand-light .brand-text { color: #fff; }

.header-search { flex: 1; display: flex; align-items: center; background: var(--bg); border-radius: 8px; overflow: hidden; border: 2px solid transparent; }
.header-search:focus-within { border-color: var(--teal); background: #fff; }
.header-search input { flex: 1; border: none; background: transparent; padding: 11px 14px; font-size: 14px; outline: none; min-width: 0; }
.header-search select { border: none; background: var(--bg); padding: 11px 10px; font-size: 14px; outline: none; border-left: 1px solid var(--border); cursor: pointer; max-width: 170px; }
.header-search button { background: var(--dark); color: #fff; border: none; padding: 0 18px; cursor: pointer; font-size: 15px; align-self: stretch; }
.header-search button:hover { background: #003d44; }

.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; flex-shrink: 0; }

/* User dropdown */
.user-menu { position: relative; }
.user-trigger { display: flex; align-items: center; gap: 8px; background: none; border: none; cursor: pointer; padding: 6px; border-radius: 8px; font-family: inherit; }
.user-trigger:hover { background: var(--bg); }
.user-trigger img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--teal); }
.user-name { font-weight: 600; font-size: 14px; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); background: #fff; min-width: 220px; border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 8px; display: none; z-index: 50;
}
.dropdown.open { display: block; animation: fadeIn .18s; }
.dropdown a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; font-size: 14px; color: var(--text); }
.dropdown a i { width: 18px; color: var(--muted); }
.dropdown a:hover { background: var(--bg); }
.dropdown a.danger { color: var(--red); }
.dropdown .badge { background: var(--red); color: #fff; border-radius: 10px; padding: 1px 7px; font-size: 11px; margin-left: auto; }

.hamburger { display: none; background: none; border: none; font-size: 22px; color: var(--dark); cursor: pointer; }

/* Category nav */
.cat-nav { background: var(--dark); position: relative; z-index: 50; }
.cat-nav .container { display: flex; align-items: center; gap: 4px; overflow: visible; padding: 0 16px; scrollbar-width: none; }
.cat-nav .container::-webkit-scrollbar { display: none; }
.cat-nav a {
  color: rgba(255,255,255,.85); font-size: 13px; font-weight: 500; padding: 12px 12px; white-space: nowrap;
  border-bottom: 3px solid transparent; display: flex; align-items: center; gap: 6px;
}
.cat-nav a i { font-size: 13px; }
.cat-nav a:hover, .cat-nav a.active { color: var(--teal); border-bottom-color: var(--teal); }

/* Dropdown menu Kategori */
.cat-nav-item { position: relative; }
.cat-nav-item .cat-nav-btn {
  background: none; border: none; color: rgba(255,255,255,.85); font-size: 13px; font-weight: 500;
  padding: 12px 12px; cursor: pointer; white-space: nowrap; display: flex; align-items: center; gap: 6px;
  border-bottom: 3px solid transparent; font-family: inherit;
}
.cat-nav-item .cat-nav-btn i { font-size: 13px; }
.cat-nav-item .cat-nav-btn .fa-chevron-down { font-size: 10px; transition: transform .2s; }
.cat-nav-item:hover .cat-nav-btn, .cat-nav-item.active .cat-nav-btn { color: var(--teal); border-bottom-color: var(--teal); }
.cat-nav-item:hover .cat-nav-btn .fa-chevron-down { transform: rotate(180deg); }

.cat-dropdown {
  position: absolute; top: 100%; left: 0; background: #fff; min-width: 280px; max-height: 420px; overflow-y: auto;
  border-radius: 0 0 12px 12px; box-shadow: var(--shadow-lg); padding: 8px; z-index: 60;
  display: none; opacity: 0; transform: translateY(-6px); transition: opacity .18s, transform .18s;
}
.cat-nav-item:hover .cat-dropdown, .cat-nav-item.open .cat-dropdown { display: block; opacity: 1; transform: none; }
.cat-dropdown a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  color: var(--text); border-bottom: none !important; font-size: 13.5px;
}
.cat-dropdown a i { color: var(--teal-dark); width: 18px; text-align: center; }
.cat-dropdown a:hover { background: var(--bg); color: var(--teal-dark); }
.cat-dropdown a.active { background: #f0fbfa; color: var(--teal-dark); font-weight: 700; }
.cat-dropdown .cat-count { margin-left: auto; font-size: 11px; color: var(--muted); background: var(--bg); padding: 1px 8px; border-radius: 10px; }
.cat-dropdown a:hover .cat-count { color: var(--teal-dark); }

/* ---------- Flash ---------- */
.flash { padding: 12px 16px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.flash-success { background: #e7f7e7; color: #1c7d1c; border-bottom: 1px solid #cdeccd; }
.flash-error { background: #fdecea; color: var(--red); border-bottom: 1px solid #f7c9c6; }
.flash-warning { background: #fff6e5; color: #b06a00; border-bottom: 1px solid #fbe4bb; }
.flash-info { background: #e7f3fb; color: var(--blue); border-bottom: 1px solid #c8e3f5; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(135deg, var(--dark) 0%, #00555f 100%); color: #fff; padding: 48px 0 60px; }
.hero h1 { font-size: 34px; font-weight: 800; margin-bottom: 8px; }
.hero p { opacity: .85; margin-bottom: 24px; font-size: 16px; }
.hero .search-lg { display: flex; background: #fff; border-radius: 10px; overflow: hidden; max-width: 720px; box-shadow: var(--shadow-lg); }
.hero .search-lg input { flex: 1; border: none; padding: 16px 18px; font-size: 15px; outline: none; }
.hero .search-lg select { border: none; border-left: 1px solid var(--border); padding: 0 12px; outline: none; font-size: 14px; }
.hero .search-lg button { background: var(--teal); color: var(--dark); border: none; padding: 0 26px; font-size: 17px; cursor: pointer; font-weight: 600; }

/* ---------- Categories chips ---------- */
.section { padding: 28px 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-title h2 { font-size: 22px; font-weight: 800; }
.section-title a { color: var(--teal-dark); font-weight: 600; font-size: 14px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.cat-card {
  border-radius: var(--radius); padding: 20px 12px;
  text-align: center; cursor: pointer; transition: .22s; color: var(--dark);
  border: none; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.cat-card::after {
  content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.45), transparent 60%);
  pointer-events: none;
}
.cat-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: var(--shadow-lg); }
.cat-card i { font-size: 28px; margin-bottom: 8px; color: var(--dark); text-shadow: 0 1px 2px rgba(255,255,255,.6); }
.cat-card .name { font-size: 13px; font-weight: 700; }
.cat-card .count { font-size: 12px; font-weight: 500; background: rgba(255,255,255,.55); display: inline-block; padding: 1px 8px; border-radius: 10px; margin-top: 4px; }

/* Tombol lihat lebih banyak */
.view-more { text-align: center; margin-top: 24px; }
.view-more .btn { font-size: 15px; padding: 13px 26px; border-radius: 50px; }

/* ---------- Ad cards grid ---------- */
.ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.ad-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: .2s; border: 1px solid var(--border); display: flex; flex-direction: column; position: relative;
}
.ad-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.ad-thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--bg); position: relative; }
.ad-thumb img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.ad-card:hover .ad-thumb img { transform: scale(1.05); }
.ad-tag { position: absolute; top: 10px; left: 10px; background: var(--accent); color: var(--dark); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px; }
.ad-featured { position: absolute; top: 10px; right: 10px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 4px; }
.ad-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ad-price { font-size: 17px; font-weight: 800; color: var(--text); }
.ad-price .nego { font-size: 11px; color: var(--green); font-weight: 600; }
.ad-title { font-size: 14px; color: var(--text); font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ad-meta { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); padding-top: 8px; border-top: 1px solid var(--border); }
.ad-meta .loc { display: flex; align-items: center; gap: 4px; }
.ad-meta .loc i { font-size: 11px; }

/* ---------- Ad detail ---------- */
.breadcrumb { font-size: 13px; color: var(--muted); margin: 20px 0; }
.breadcrumb a:hover { color: var(--teal-dark); }
.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.gallery { background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.gallery .main { aspect-ratio: 16/10; background: var(--bg); }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.info-card { background: var(--card); border-radius: var(--radius); padding: 20px; border: 1px solid var(--border); margin-bottom: 20px; }
.info-card h1 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.info-card .price-big { font-size: 26px; font-weight: 800; color: var(--text); margin-bottom: 16px; }
.info-card .price-big .nego { font-size: 13px; color: var(--green); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { background: var(--bg); border-radius: 6px; padding: 5px 10px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.chip i { color: var(--muted); }
.seller-box { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.seller-box img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.seller-box .s-name { font-weight: 700; }
.seller-box .s-since { font-size: 12px; color: var(--muted); }
.action-btns { display: flex; flex-direction: column; gap: 10px; }
.desc-card { background: var(--card); border-radius: var(--radius); padding: 20px; border: 1px solid var(--border); }
.desc-card h3 { font-size: 16px; margin-bottom: 10px; }
.desc-card p { font-size: 14px; white-space: pre-wrap; }
.desc-card .spec { margin-top: 16px; display: grid; gap: 8px; }
.desc-card .spec li { display: flex; justify-content: space-between; padding: 8px 12px; background: var(--bg); border-radius: 6px; font-size: 13px; }
.desc-card .spec b { color: var(--muted); font-weight: 600; }
.views-note { font-size: 12px; color: var(--muted); margin-top: 12px; }
.report { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; cursor: pointer; }
.report:hover { color: var(--red); }

/* Tombol share sosial media */
.share-box { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.share-label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.share-label i { color: var(--teal-dark); }
.share-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
  width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 17px; transition: transform .15s, opacity .15s; box-shadow: var(--shadow);
}
.share-btn:hover { transform: translateY(-2px); opacity: .9; }
.share-fb  { background: #1877f2; }
.share-x   { background: #111; }
.share-wa  { background: #25d366; }
.share-tg  { background: #229ed9; }
.share-copy{ background: var(--dark); cursor: pointer; }

/* ---------- Login / Register ---------- */
.auth-wrap { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-card { background: var(--card); border-radius: 16px; padding: 34px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; outline: none; transition: .15s; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(35,229,219,.15); }
.field textarea { resize: vertical; min-height: 110px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.form-footer { font-size: 13px; color: var(--muted); text-align: center; margin-top: 18px; }
.form-footer a { color: var(--teal-dark); font-weight: 600; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon input { padding-left: 38px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 12px 0; }
.check-row input { width: 16px; height: 16px; accent-color: var(--teal-dark); }

/* ---------- Cards / panels ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }

/* Page heading */
.page-head { background: #fff; border-bottom: 1px solid var(--border); padding: 22px 0; }
.page-head h1 { font-size: 24px; font-weight: 800; }
.page-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; padding: 12px 14px; background: var(--bg); font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:hover td { background: #fafbfc; }
.unread-row td { background: #f0fbfa; font-weight: 500; }
.table .cell-img { width: 52px; height: 40px; object-fit: cover; border-radius: 6px; }
.badge-status { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; display: inline-block; }
.badge-success { background: #e7f7e7; color: #1c7d1c; }
.badge-warning { background: #fff6e5; color: #b06a00; }
.badge-danger { background: #fdecea; color: var(--red); }
.badge-muted { background: #eef0f1; color: var(--muted); }
.badge-primary { background: #e7f3fb; color: var(--blue); }
.badge-donor { background: #ffe9f0; color: #c2185b; }

/* ---------- Dashboard layout (user & admin) ---------- */
.dash-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 28px 0; align-items: start; }
.dash-side { position: sticky; top: 80px; }
.dash-side .card { padding: 10px; }
.dash-user { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.dash-user img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.dash-user .du-name { font-weight: 700; font-size: 14px; }
.dash-user .du-role { font-size: 12px; color: var(--muted); }
.dash-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--text); }
.dash-link i { width: 18px; color: var(--muted); font-size: 15px; }
.dash-link:hover { background: var(--bg); }
.dash-link.active { background: var(--teal); color: var(--dark); font-weight: 700; }
.dash-link.active i { color: var(--dark); }
.dash-link .badge { background: var(--red); color: #fff; border-radius: 10px; padding: 1px 7px; font-size: 11px; margin-left: auto; }

/* Dash group title */
.dash-group { margin-top: 14px; padding: 6px 12px 4px; }
.dash-group-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.dash-group-title i { font-size: 12px; }

/* Color picker preset */
.color-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.color-presets button { width: 34px; height: 34px; border-radius: 8px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.color-presets button.sel { box-shadow: 0 0 0 2px var(--dark); }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow); }
.stat-card .sc-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.stat-card .sc-val { font-size: 22px; font-weight: 800; }
.stat-card .sc-label { font-size: 12px; color: var(--muted); }
.stat-teal { background: #e4fcfb; color: var(--teal-dark); }
.stat-dark { background: #e5eff0; color: var(--dark); }
.stat-orange { background: #fff1e0; color: var(--orange); }
.stat-red { background: #fdecea; color: var(--red); }
.stat-green { background: #e7f7e7; color: var(--green); }
.stat-blue { background: #e7f3fb; color: var(--blue); }

/* ---------- Toolbar / filters ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar h2 { font-size: 18px; margin-right: auto; }
.toolbar input, .toolbar select { padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 13.5px; outline: none; background: #fff; }
.toolbar input:focus, .toolbar select:focus { border-color: var(--teal); }

/* Filter sidebar for search */
.search-layout { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
.filter-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.filter-panel h3 { font-size: 14px; margin-bottom: 12px; }
.filter-panel .field { margin-bottom: 12px; }

/* ---------- Banner iklan ---------- */
.banner-slot { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.banner-top { background: var(--bg); padding: 6px 0; border-bottom: 1px solid var(--border); }
.banner-bottom { background: var(--bg); padding: 14px 0; border-top: 1px solid var(--border); }.banner-link { display: block; overflow: hidden; border-radius: 8px; box-shadow: var(--shadow); line-height: 0; }
.banner-img { width: 100%; height: auto; max-width: 100%; }
.banner-sidebar { flex-direction: column; align-items: stretch; margin-top: 16px; }
.banner-sidebar .banner-img { border-radius: 8px; }
.banner-in_listing { grid-column: 1 / -1; justify-content: center; }
/* Banner bawah Iklan Terbaru: selebar halaman & tinggi 300px seperti banner top */
.banner-in_listing { width: 100% !important; max-width: 1200px !important; margin: 0 auto; }
.banner-in_listing .banner-link { width: 100%; max-width: 100%; }
.banner-in_listing .banner-img { width: 100% !important; max-width: 100% !important; height: 200px !important; object-fit: cover; }
.banner-slot { margin-left: auto; margin-right: auto; }
.banner-sidebar { margin-left: 0; }
/* Banner di widget kanan: selebar kolom widget (mengalahkan max-width inline dari posisi) */
.banner-sidebar, .banner-half_page { width: 100% !important; max-width: 100% !important; }
.banner-sidebar .banner-link, .banner-half_page .banner-link { width: 100%; }
.banner-sidebar .banner-img, .banner-half_page .banner-img { width: 100%; height: auto; object-fit: cover; }
/* Banner atas & bawah: selebar halaman website (mengabaikan max-width inline) */
.banner-top, .banner-bottom { width: 100% !important; max-width: 1200px !important; margin: 0 auto; justify-content: center; }
.banner-top .banner-link, .banner-bottom .banner-link { width: 100%; max-width: 100%; }
.banner-top .banner-img, .banner-bottom .banner-img { width: 100% !important; max-width: 100% !important; height: 200px !important; object-fit: cover; }
.banner-link .banner-img { width: 100%; height: auto; object-fit: contain; }
/* Banner di atas Iklan Terkait: selebar kolom isi iklan (kolom deskripsi), tinggi fleksibel */
.banner-before_related { width: 100% !important; max-width: 100% !important; margin: 26px auto; justify-content: center; }
.banner-before_related .banner-link { width: 100%; max-width: 100%; }
.banner-before_related .banner-img { width: 100% !important; max-width: 100% !important; height: auto !important; object-fit: contain; }

/* Iklan Terkait */
.related-ads { border-top: 1px solid var(--border); margin-top: 8px; }
.related-ads .section-title h2 { font-size: 19px; }
.related-ads .section-title h2 i { color: var(--teal-dark); }
/* Iklan Terkait: 4 sebaris di desktop */
.related-ads .ad-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) {
  /* Mobile: 2 per baris */
  .related-ads .ad-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* Donasi / pembayaran */
.bank-card { border: 1.5px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; background: var(--bg); }
.bank-card .bank-label { font-weight: 700; font-size: 14px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.bank-card .bank-number { font-size: 22px; font-weight: 800; letter-spacing: 1px; }
.unique-code { display: inline-block; background: var(--accent); color: var(--dark); font-weight: 800; padding: 2px 8px; border-radius: 4px; }
.total-amount { font-size: 26px; font-weight: 800; }
.donation-steps { counter-reset: step; }
.donation-steps li { position: relative; padding-left: 40px; margin-bottom: 14px; }
.donation-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; background: var(--teal); color: var(--dark); border-radius: 50%; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 13px; }

/* ---------- Kontak Kami ---------- */
.contact-hero { background: linear-gradient(135deg, var(--dark), #00555f); color: #fff; border-radius: 14px; padding: 26px; display: flex; gap: 18px; align-items: flex-start; margin-bottom: 26px; }
.contact-hero-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--teal); color: var(--dark); display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.contact-hero h2 { font-size: 22px; margin-bottom: 6px; }
.contact-hero p { opacity: .9; font-size: 14px; line-height: 1.7; }
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: start; }
.contact-info { list-style: none; }
.contact-info li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.contact-info li:last-child { border-bottom: none; }
.contact-info li i { width: 38px; height: 38px; border-radius: 10px; background: var(--bg); color: var(--teal-dark); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.contact-info li b { display: block; font-size: 13px; color: var(--muted); }
.contact-info li span { font-size: 15px; font-weight: 600; }
.map-wrap { border-radius: 8px; overflow: hidden; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- Static page (halaman dinamis) ---------- */
.static-page { max-width: 860px; line-height: 1.8; font-size: 15px; }
.static-page h2 { font-size: 22px; margin: 22px 0 12px; color: var(--text); }
.static-page h3 { font-size: 18px; margin: 18px 0 10px; }
.static-page p { margin-bottom: 12px; }
.static-page ul, .static-page ol { margin: 0 0 12px 22px; }
.static-page li { margin-bottom: 8px; }
.static-page a { color: var(--teal-dark); text-decoration: underline; }
.static-page img { border-radius: 8px; margin: 12px 0; }
.static-page blockquote { border-left: 4px solid var(--teal); background: var(--bg); padding: 10px 16px; margin: 12px 0; border-radius: 4px; }
.static-page table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.static-page th, .static-page td { border: 1px solid var(--border); padding: 8px 10px; }

/* ---------- Misc ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty i { font-size: 52px; opacity: .35; margin-bottom: 14px; }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.pagination { display: flex; gap: 6px; justify-content: center; margin: 24px 0; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: 8px; background: #fff; border: 1px solid var(--border); font-size: 13px; font-weight: 600; }
.pagination a:hover { border-color: var(--teal); }
.pagination .cur { background: var(--dark); color: #fff; border-color: var(--dark); }

/* Alert box */
.alert { padding: 14px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; }
.alert-success { background: #e7f7e7; color: #1c7d1c; border: 1px solid #cdeccd; }
.alert-error { background: #fdecea; color: var(--red); border: 1px solid #f7c9c6; }
.alert-info { background: #e7f3fb; color: var(--blue); border: 1px solid #c8e3f5; }

/* Favorite heart button */
.fav-btn { background: #fff; border: 1.5px solid var(--border); border-radius: 8px; width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; cursor: pointer; color: var(--muted); transition: .15s; }
.fav-btn.on { color: var(--red); border-color: var(--red); background: #fff5f4; }

/* Chat / messages */
.chat-layout { display: grid; grid-template-columns: 340px 1fr; min-height: 520px; }
.chat-layout .msg-list { max-height: 560px; overflow-y: auto; border-right: 1px solid var(--border); }
.msg-list { max-height: 560px; overflow-y: auto; }
.msg-thread { padding: 14px 16px; border-bottom: 1px solid var(--border); display: block; }
.msg-thread:hover { background: var(--bg); }
.msg-thread.unread { background: #f0fbfa; }
.msg-thread .mt-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.msg-thread .mt-title { font-weight: 700; margin: 4px 0; font-size: 14px; }
.msg-thread .mt-preview { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.msg-thread .dot { width: 8px; height: 8px; background: var(--teal); border-radius: 50%; }
.msg-bubble { margin-bottom: 12px; max-width: 75%; }
.msg-bubble .mb-b { padding: 10px 14px; border-radius: 14px; font-size: 14px; }
.msg-bubble.in .mb-b { background: var(--bg); }
.msg-bubble.out { margin-left: auto; }
.msg-bubble.out .mb-b { background: var(--dark); color: #fff; border-top-right-radius: 4px; }
.msg-bubble.in .mb-b { border-top-left-radius: 4px; }
.msg-bubble .mb-time { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: rgba(255,255,255,.8); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; padding: 40px 16px 30px; }
.footer-grid h4 { color: #fff; margin-bottom: 14px; font-size: 15px; }
.footer-grid ul li { margin-bottom: 9px; font-size: 13.5px; }
.footer-grid ul li a:hover { color: var(--teal); }
.footer-desc { font-size: 13.5px; margin: 14px 0; line-height: 1.7; }
.social { display: flex; gap: 10px; }
.social a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.social a:hover { background: var(--teal); color: var(--dark); }
.contact-list li { display: flex; align-items: center; gap: 9px; }
.contact-list i { color: var(--teal); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12.5px; }

/* Mobile bottom nav */
.mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; z-index: 90;
  border-top: 1px solid var(--border); box-shadow: 0 -2px 10px rgba(0,47,52,.08);
  grid-template-columns: repeat(4, 1fr);
}
#btn-install-app { display: none; }
#btn-install-app i { color: var(--teal-dark); }
.mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 10px; font-size: 10.5px; color: var(--muted); }
.mobile-nav a i { font-size: 19px; }
.mobile-nav a:active { color: var(--teal-dark); }

/* Responsive mobile nav (show when hamburger open) */
@media (max-width: 900px) {
  .header-search { order: 3; width: 100%; }
  .header-inner { flex-wrap: wrap; }
  .header-actions { margin-left: auto; }
  .detail-grid { grid-template-columns: 1fr; }
  .search-layout { grid-template-columns: 1fr; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-layout .msg-list { border-right: none; border-bottom: 1px solid var(--border); max-height: 260px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-side { position: static; }
  .dash-side .card { padding: 10px; display: flex; overflow-x: auto; gap: 4px; }
  .dash-user { display: none; }
  .dash-link { white-space: nowrap; padding: 10px 12px; }
  .user-edit-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
  .hamburger { display: block; }
  .header-actions .user-name, .header-actions .btn-ghost { display: none; }
  .cat-nav { position: fixed; top: 0; right: -280px; bottom: 0; width: 280px; background: #fff; box-shadow: var(--shadow-lg); transition: right .25s; z-index: 200; }
  .cat-nav .container { flex-direction: column; align-items: stretch; padding: 24px 0; overflow-y: auto; }
  .cat-nav a { color: var(--text); border-bottom: 1px solid var(--border); padding: 14px 20px; border-radius: 0; border-left: 3px solid transparent; }
  .cat-nav a:hover, .cat-nav a.active { color: var(--teal-dark); background: #f0fbfa; border-bottom-color: var(--border); border-left-color: var(--teal); }
  /* Kategori dropdown menjadi ekspansi vertikal di sidebar mobile */
  .cat-nav-item { position: static; }
  .cat-nav-item .cat-nav-btn { color: var(--text); width: 100%; justify-content: flex-start; padding: 14px 20px; border-bottom: 1px solid var(--border); border-left: 3px solid transparent; }
  .cat-nav-item.active .cat-nav-btn { color: var(--teal-dark); border-left-color: var(--teal); background: #f0fbfa; }
  .cat-nav-item .cat-dropdown { position: static; display: block; opacity: 1; transform: none; background: var(--bg); box-shadow: none; padding: 0; max-height: none; border-radius: 0; }
  .cat-dropdown a { padding: 11px 24px 11px 40px; border-bottom: 1px solid var(--border); border-left: 3px solid transparent; }
  .cat-dropdown a:hover, .cat-dropdown a.active { background: #f0fbfa; border-left-color: var(--teal); }
  body.nav-open .cat-nav { right: 0; }
  body.nav-open::before { content: ""; position: fixed; inset: 0; background: rgba(0,47,52,.4); z-index: 190; }
  .mobile-nav { display: grid; }
  .hero h1 { font-size: 24px; }
  .hero .search-lg { flex-direction: column; }
  .hero .search-lg select { border-left: none; border-top: 1px solid var(--border); padding: 12px; }
  .hero .search-lg button { padding: 13px; }
  .ad-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .ad-price { font-size: 15px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .btn-post span { display: inline; }
  .auth-card { padding: 26px; }
  .header-inner { gap: 12px; }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .row2 { grid-template-columns: 1fr !important; gap: 0 !important; }
}
