*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f5f3ef; --surface: #fff; --border: rgba(0,0,0,0.08);
  --text: #1a1916; --muted: #6b6860; --accent: #1a5fb4; /* Indigo/blue accent for services */
  --accent-light: #edf4fd;
  --accent-dark: #104380;
  --orange: #f97316;
}
body { background: var(--bg); font-family: 'Plus Jakarta Sans', sans-serif; color: var(--text); line-height: 1.5; padding-bottom: 40px; }

/* HEADER */
.header { background: var(--surface); padding: 14px 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; gap: 12px; }
.header-left { display: flex; align-items: center; gap: 15px; }
.btn-back { font-size: 20px; color: var(--text); text-decoration: none; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--bg); transition: background 0.2s; }
.btn-back:hover { background: #e8e6e2; }
.header-title { font-size: 18px; font-weight: 800; color: var(--accent); }
.header-search { display: flex; flex: 1; max-width: 400px; position: relative; }
.header-search input { width: 100%; padding: 8px 16px 8px 36px; border-radius: 99px; border: 1px solid var(--border); background: var(--bg); font-family: inherit; font-size: 13px; outline: none; transition: all 0.2s; }
.header-search input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(26,95,180,0.1); }
.header-search::before { content: "🔍"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); }
.btn-post-ad { background: var(--accent); color: white; border: none; padding: 10px 18px; border-radius: 99px; font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 4px 12px rgba(26,95,180,0.25); text-decoration: none; transition: transform 0.1s; }
.btn-post-ad:active { transform: scale(0.97); }

/* HERO BANNER */
.hero-banner { background: linear-gradient(135deg, #1a5fb4 0%, #0f3d73 100%); color: white; padding: 32px 20px; text-align: center; position: relative; overflow: hidden; margin-bottom: 24px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.hero-banner::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 50%); }
.hero-title { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.hero-desc { font-size: 13px; color: #d6e4f7; max-width: 500px; margin: 0 auto; line-height: 1.6; }

/* CONTAINER & FILTER */
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.filter-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 20px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.fchip { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 99px; white-space: nowrap; flex-shrink: 0; font-size: 12px; font-weight: 700; font-family: inherit; cursor: pointer; border: 1px solid var(--border); background: var(--surface); color: var(--muted); transition: all 0.15s; }
.fchip:hover { border-color: #ccc; color: var(--text); }
.fchip.active { background: var(--accent); color: white; border-color: var(--accent); }

/* SERVICES GRID & CARDS */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
}
.scard { background: var(--surface); border-radius: 14px; border: 1px solid var(--border); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.2s; position: relative; cursor: pointer; }
.scard:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.scard-img-wrap { width: 100%; height: 120px; background: #eae7e2; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
@media (min-width: 640px) { .scard-img-wrap { height: 160px; } }
.scard-img-wrap img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.25s ease; }
.scard-img-wrap img.loaded { opacity: 1; }
.scard-no-img { font-size: 36px; color: rgba(0,0,0,0.15); user-select: none; }
@media (min-width: 640px) { .scard-no-img { font-size: 48px; } }
.scard-badge { position: absolute; top: 8px; left: 8px; font-size: 9px; font-weight: 700; padding: 3px 7px; border-radius: 99px; z-index: 2; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
@media (min-width: 640px) { .scard-badge { top: 12px; left: 12px; font-size: 10px; padding: 4px 10px; } }
.scard-content { padding: 10px; flex: 1; display: flex; flex-direction: column; }
@media (min-width: 640px) { .scard-content { padding: 16px; } }
.scard-title { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.3; height: 34px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px; }
@media (min-width: 640px) { .scard-title { font-size: 15px; height: 42px; margin-bottom: 8px; } }
.scard-price-wrap { display: flex; align-items: baseline; gap: 3px; margin-bottom: 6px; }
.scard-price { font-size: 14px; font-weight: 800; color: var(--accent); }
@media (min-width: 640px) { .scard-price { font-size: 17px; } }
.scard-price-type { font-size: 10px; color: var(--muted); font-weight: 600; }
@media (min-width: 640px) { .scard-price-type { font-size: 11px; } }
.scard-desc-preview { font-size: 11px; color: var(--muted); line-height: 1.4; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 640px) { .scard-desc-preview { font-size: 12px; line-height: 1.5; margin-bottom: 12px; } }
.scard-meta { display: flex; flex-direction: column; gap: 2px; font-size: 10px; color: var(--muted); margin-top: auto; border-top: 1px solid rgba(0,0,0,0.04); padding-top: 8px; }
@media (min-width: 640px) { .scard-meta { flex-direction: row; align-items: center; justify-content: space-between; font-size: 11px; padding-top: 10px; } }
.scard-loc { font-weight: 600; display: inline-flex; align-items: center; gap: 2px; color: var(--accent); }
.scard-provider { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100px; }

/* MODALS */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,15,12,0.55); display: none; align-items: flex-end; justify-content: center; z-index: 1000; backdrop-filter: blur(4px); transition: all 0.3s ease; }
.modal-backdrop.show { display: flex; }
.modal-content { background: var(--surface); border-radius: 24px 24px 0 0; width: 100%; max-width: 520px; max-height: calc(100vh - 10px); overflow-y: auto; padding: 8px 24px 32px; position: relative; box-shadow: 0 20px 40px rgba(0,0,0,0.15); animation: slideUp 0.35s cubic-bezier(.32,.72,0,1) both; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-bar { width: 36px; height: 4px; border-radius: 99px; background: rgba(0,0,0,0.12); margin: 8px auto 16px; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; position: absolute; top: 20px; right: 20px; color: var(--muted); }
.modal-title { font-size: 18px; font-weight: 800; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.form-control { width: 100%; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); font-family: inherit; font-size: 13px; color: var(--text); transition: border-color 0.2s; }
.form-control:focus { outline: none; border-color: var(--accent); background: var(--surface); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 0.8rem center; background-size: 1em; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; }
.btn-submit { width: 100%; padding: 12px; background: var(--accent); color: white; border: none; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; box-shadow: 0 4px 12px rgba(26,95,180,0.25); margin-top: 12px; transition: background 0.2s; }
.btn-submit:hover { background: var(--accent-dark); }
.btn-submit:active { transform: scale(0.98); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-cancel { width: 100%; padding: 10px; background: var(--bg); color: var(--muted); border: 1px solid var(--border); border-radius: 12px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; margin-top: 8px; text-align: center; display: block; text-decoration: none; }

/* OPTIMIZE CARD / LOADING */
.shimmer { background: linear-gradient(90deg, #ece9e4 25%, #f5f3ef 50%, #ece9e4 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.compress-overlay { display: none; margin-top: 10px; padding: 10px; background: rgba(26,95,180,0.1); border-radius: 8px; font-size: 12px; color: var(--accent); text-align: center; }
.compress-spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid #e3e3e3; border-top: 2px solid var(--accent); border-radius: 50%; animation: spin 1s linear infinite; vertical-align: middle; margin-right: 6px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 60px 20px; background: var(--surface); border-radius: 20px; border: 1px solid var(--border); margin-top: 20px; }
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.empty-desc { font-size: 12px; color: var(--muted); }

/* MOBILE RESPONSIVE MODAL */
@media (min-width: 640px) {
  .modal-backdrop { align-items: center; }
  .modal-content { border-radius: 24px; margin: 0 auto; max-height: 85vh; }
}

/* SERVICE DETAIL VIEW */
.detail-modal-content { max-width: 680px; }
.detail-layout { display: flex; flex-direction: column; gap: 20px; margin-top: 10px; }
.detail-media-wrap { width: 100%; height: 260px; background: var(--bg); border-radius: 16px; overflow: hidden; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); position: relative; }
.detail-media-wrap img { width: 100%; height: 100%; object-fit: cover; }
.detail-no-media { font-size: 80px; opacity: 0.15; user-select: none; }
.detail-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.info-block { background: var(--bg); padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(0,0,0,0.03); }
.info-block-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin-bottom: 4px; display: block; }
.info-block-value { font-size: 15px; font-weight: 800; color: var(--text); }
.detail-body { font-size: 13px; color: var(--text); line-height: 1.6; border-top: 1px solid var(--border); padding-top: 20px; white-space: pre-wrap; word-break: break-word; }
.detail-footer-actions { display: flex; gap: 12px; margin-top: 24px; }
.btn-wa-action { flex: 1; background: #25d366; color: white; border: none; padding: 14px; border-radius: 14px; font-size: 14px; font-weight: 700; text-decoration: none; text-align: center; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; box-shadow: 0 4px 14px rgba(37,211,102,0.3); transition: transform 0.1s; }
.btn-wa-action:active { transform: scale(0.97); }
.btn-share-action { width: 50px; height: 50px; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px; transition: background 0.2s; }
.btn-share-action:hover { background: #e8e6e2; }

@media (max-width: 640px) {
  .detail-info-grid { grid-template-columns: 1fr; gap: 12px; }
  .detail-media-wrap { height: 180px; }
}

/* FLOATING FOOTER MOBILE */
.floating-footer { display: none; position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); width: calc(100% - 40px); max-width: 480px; background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 20px; padding: 10px 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); z-index: 900; align-items: center; justify-content: center; }
.floating-footer .btn-post-ad { flex: 1; justify-content: center; padding: 12px; }

@media (max-width: 640px) {
  .floating-footer { display: flex; }
  .header .btn-post-ad { display: none; }
  body { padding-bottom: 90px; }

  /* Compact Search & Sort Row on Mobile */
  .jasa-search-wrap {
    flex-direction: row !important;
    gap: 6px !important;
    margin-top: 2px !important;
    margin-bottom: 10px !important;
  }
  .jasa-search-control input {
    padding: 8px 12px 8px 30px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
  }
  .jasa-search-control::before {
    left: 10px !important;
    font-size: 12px !important;
  }
  .jasa-sort-control {
    width: 110px !important;
    flex-shrink: 0 !important;
  }
  .form-control-sort {
    padding: 8px 20px 8px 6px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
    background-position: right 0.4rem center !important;
  }
}

/* TOAST */
.toast-container { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px); background: rgba(26, 25, 22, 0.95); color: white; padding: 12px 20px; border-radius: 12px; font-size: 12px; font-weight: 700; z-index: 2000; box-shadow: 0 10px 30px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 8px; transition: transform 0.30s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, visibility 0.3s ease; pointer-events: none; text-align: center; max-width: 90vw; backdrop-filter: blur(8px); opacity: 0; visibility: hidden; }
.toast-container.show { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }
@media (max-width: 640px) {
  .toast-container { bottom: 85px; } /* Don't collide with floating footer */
}

/* MAIN SEARCH BAR ABOVE CATEGORIES */
.jasa-search-wrap {
  margin-top: 8px;
  margin-bottom: 16px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (min-width: 640px) {
  .jasa-search-wrap {
    flex-direction: row;
    gap: 12px;
  }
}
.jasa-search-control {
  position: relative;
  flex: 1;
}
.jasa-search-control input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.jasa-search-control input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 4px 16px rgba(26, 95, 180, 0.08), 0 0 0 3px rgba(26, 95, 180, 0.04);
}
.jasa-search-control::before {
  content: "🔍";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--muted);
  pointer-events: none;
  z-index: 2;
}
.jasa-sort-control {
  position: relative;
  width: 100%;
}
@media (min-width: 640px) {
  .jasa-sort-control {
    width: 220px;
  }
}
.form-control-sort {
  width: 100%;
  padding: 12px 32px 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
  cursor: pointer;
}
.form-control-sort:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 4px 16px rgba(26, 95, 180, 0.08), 0 0 0 3px rgba(26, 95, 180, 0.04);
}

/* LOAD MORE BUTTON */
.btn-load-more {
  padding: 12px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.btn-load-more:hover {
  background: var(--bg);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 95, 180, 0.1);
}
.btn-load-more:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

