/* =====================================================================
   CuciNow.my — Design System
   Concept: "Fresh Suds" — soft sage backdrop, floating glass cards and
   layered bubble motifs (concentric circles) standing in for suds,
   used ONLY in the hero + empty states so the effect stays a signature
   rather than decoration sprinkled everywhere.
   ===================================================================== */

:root {
  /* Color */
  --sage: #E2EBD8;
  --sage-deep: #CFDDC0;
  --glass: rgba(255, 255, 255, 0.85);
  --glass-soft: rgba(255, 255, 255, 0.6);
  --solid: #FFFFFF;
  --amber: #E5A83B;
  --amber-deep: #C98A1F;
  --ink: #1F2937;
  --ink-muted: #5B6B62;
  --line: rgba(31, 41, 55, 0.08);
  --success: #3F8F5F;
  --success-bg: #E4F2E8;
  --pending-bg: #FDF1DC;
  --pending-fg: #A6720F;
  --danger: #C1483A;
  --danger-bg: #FBE7E4;
  --shadow-glass: 0 12px 30px rgba(31, 41, 55, 0.08);
  --shadow-pop: 0 18px 40px rgba(31, 41, 55, 0.14);

  /* Type */
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Radius */
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 10px;
  --r-pill: 999px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--sage);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 0;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 { margin: 0 0 8px; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0 0 12px; color: var(--ink-muted); }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------------------------------------------------------------
   Bubble motif — a cluster of soft translucent circles used as a
   signature background flourish. Pure CSS, no images.
   --------------------------------------------------------------------- */
.bubble-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.bubble-field span {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0.15) 70%);
  border: 1px solid rgba(255,255,255,0.6);
}
.bubble-field span:nth-child(1) { width: 220px; height: 220px; top: -60px; right: 8%; }
.bubble-field span:nth-child(2) { width: 90px;  height: 90px;  top: 40px;  right: 26%; }
.bubble-field span:nth-child(3) { width: 140px; height: 140px; bottom: -40px; right: 2%; background: radial-gradient(circle at 30% 30%, rgba(229,168,59,0.55), rgba(229,168,59,0.05) 70%); }
.bubble-field span:nth-child(4) { width: 46px;  height: 46px;  top: 120px; right: 40%; }

/* ---------------------------------------------------------------------
   Header (Desktop)
   --------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 76px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.3rem;
  white-space: nowrap;
}
.logo .mark {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--amber), #F3C878);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.05rem;
  box-shadow: var(--shadow-glass);
}
.main-nav { display: flex; gap: 24px; flex: 1; }
.main-nav a {
  font-weight: 600; font-size: 0.95rem; color: var(--ink-muted);
  padding: 8px 2px; border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.main-nav a:hover, .main-nav a.active { color: var(--ink); border-color: var(--amber); }

.header-search {
  flex: 1; max-width: 320px;
  position: relative;
}
.header-search input {
  width: 100%; padding: 11px 16px 11px 40px;
  border-radius: var(--r-pill); border: 1px solid var(--line);
  background: var(--solid); font-family: inherit; font-size: 0.9rem;
}
.header-search i {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  color: var(--ink-muted); font-size: 0.85rem;
}

.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--solid); border: 1px solid var(--line); position: relative;
  transition: transform .15s ease;
}
.icon-btn:hover { transform: translateY(-2px); }
.icon-btn .badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--amber); color: #fff; font-size: 0.65rem; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.user-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--solid); border: 1px solid var(--line);
  padding: 6px 14px 6px 6px; border-radius: var(--r-pill); font-weight: 600; font-size: 0.88rem;
}
.user-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--sage-deep);
  display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--ink);
  font-size: 0.8rem; overflow: hidden;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--r-pill); font-weight: 700; font-size: 0.9rem;
  border: none; transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.btn-amber { background: var(--amber); color: #fff; }
.btn-amber:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(229,168,59,0.35); }
.btn-outline { background: transparent; border: 1.5px solid var(--ink); color: var(--ink); }
.btn-ghost { background: var(--solid); border: 1px solid var(--line); color: var(--ink); }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 64px 0 40px;
  overflow: hidden;
}
.hero .container { position: relative; z-index: 1; }
.hero-inner { max-width: 640px; }
.eyebrow-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--solid); border: 1px solid var(--line);
  padding: 6px 14px; border-radius: var(--r-pill); font-size: 0.8rem; font-weight: 700;
  color: var(--amber-deep); margin-bottom: 18px;
}
.hero h1 { font-size: 3rem; line-height: 1.08; margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: var(--amber-deep); }
.hero p.lead { font-size: 1.08rem; max-width: 480px; margin-bottom: 28px; }

.search-panel {
  background: var(--glass); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--r-lg); padding: 10px; box-shadow: var(--shadow-glass);
  display: flex; gap: 8px; max-width: 560px;
}
.search-panel input {
  flex: 1; border: none; background: transparent; padding: 12px 16px;
  font-family: inherit; font-size: 0.95rem; outline: none;
}
.search-panel button { border-radius: var(--r-md); }

/* ---------------------------------------------------------------------
   Category chips (horizontal scroll on mobile, wrap grid on desktop)
   --------------------------------------------------------------------- */
.category-row {
  display: flex; gap: 12px; padding: 28px 0 6px; overflow-x: auto;
  scrollbar-width: none;
}
.category-row::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  background: var(--solid); border: 1px solid var(--line);
  padding: 10px 18px; border-radius: var(--r-pill); font-weight: 600; font-size: 0.88rem;
  white-space: nowrap; transition: background .15s ease, color .15s ease;
}
.cat-chip i { color: var(--amber-deep); }
.cat-chip.active, .cat-chip:hover { background: var(--ink); color: #fff; }
.cat-chip.active i, .cat-chip:hover i { color: var(--amber); }

/* ---------------------------------------------------------------------
   Section headers + view toggle
   --------------------------------------------------------------------- */
.section { padding: 36px 0; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 16px; flex-wrap: wrap;
}
.section-head h2 { font-size: 1.5rem; margin: 0; }
.view-toggle {
  display: inline-flex; background: var(--solid); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 4px; gap: 4px;
}
.view-toggle button {
  border: none; background: transparent; padding: 8px 16px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 0.85rem; color: var(--ink-muted); display: flex; gap: 6px; align-items: center;
}
.view-toggle button.active { background: var(--ink); color: #fff; }

/* ---------------------------------------------------------------------
   Service cards — Grid view
   --------------------------------------------------------------------- */
.service-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px;
}
.service-grid.is-list { grid-template-columns: 1fr; }

.service-card {
  background: var(--solid); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-glass); transition: transform .18s ease, box-shadow .18s ease;
  display: flex; flex-direction: column;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); }
.service-grid.is-list .service-card { flex-direction: row; }
.service-grid.is-list .service-thumb { width: 240px; flex: 0 0 240px; aspect-ratio: auto; height: auto; }

.service-thumb {
  position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--sage-deep);
}
.service-thumb img { width: 100%; height: 100%; object-fit: cover; }
.price-badge {
  position: absolute; bottom: 10px; left: 10px;
  background: var(--glass); backdrop-filter: blur(6px);
  padding: 6px 12px; border-radius: var(--r-pill); font-weight: 800; font-size: 0.9rem;
}
.fav-btn {
  position: absolute; top: 10px; right: 10px;
  width: 34px; height: 34px; border-radius: 50%; background: var(--glass);
  display: flex; align-items: center; justify-content: center; border: none; color: var(--danger);
}

.service-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.service-cat { font-size: 0.75rem; font-weight: 700; color: var(--amber-deep); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.service-title { font-size: 1.05rem; margin-bottom: 6px; }
.service-seller { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--ink-muted); margin-bottom: 10px; }
.service-seller .rating { display: flex; align-items: center; gap: 4px; color: var(--amber-deep); font-weight: 700; }
.service-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }

/* ---------------------------------------------------------------------
   Glass panels (generic content card)
   --------------------------------------------------------------------- */
.panel {
  background: var(--glass); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-glass);
}
.panel-solid { background: var(--solid); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-glass); }

/* ---------------------------------------------------------------------
   Status badges
   --------------------------------------------------------------------- */
.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--r-pill); font-size: 0.78rem; font-weight: 700;
}
.status-pending    { background: var(--pending-bg); color: var(--pending-fg); }
.status-confirmed  { background: #DDEAFB; color: #2A5F9E; }
.status-in_progress{ background: #EBE0FB; color: #6A3FA6; }
.status-completed  { background: var(--success-bg); color: var(--success); }
.status-cancelled  { background: var(--danger-bg); color: var(--danger); }

/* ---------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 0.85rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line);
  font-family: inherit; font-size: 0.92rem; background: var(--solid); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--amber); outline-offset: 1px; border-color: var(--amber);
}
.field-hint { font-size: 0.78rem; color: var(--ink-muted); margin-top: 4px; }
.field-error { font-size: 0.78rem; color: var(--danger); margin-top: 4px; font-weight: 600; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.alert {
  padding: 14px 18px; border-radius: var(--r-md); font-size: 0.9rem; font-weight: 600; margin-bottom: 18px;
  display: flex; gap: 10px; align-items: flex-start;
}
.alert-error   { background: var(--danger-bg); color: var(--danger); }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-info    { background: var(--pending-bg); color: var(--pending-fg); }

/* ---------------------------------------------------------------------
   Footer (desktop)
   --------------------------------------------------------------------- */
.site-footer {
  background: var(--ink); color: rgba(255,255,255,0.72); padding: 56px 0 28px; margin-top: 60px;
}
.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid a { display: block; padding: 5px 0; font-size: 0.88rem; color: rgba(255,255,255,0.65); }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); margin-top: 40px; padding-top: 20px;
  display: flex; justify-content: space-between; font-size: 0.8rem; flex-wrap: wrap; gap: 10px;
}
.footer-logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; margin-bottom: 12px; }

/* ---------------------------------------------------------------------
   Mobile floating nav — hidden on desktop
   --------------------------------------------------------------------- */
.mobile-nav { display: none; }

/* ---------------------------------------------------------------------
   Mobile app header — hidden on desktop
   --------------------------------------------------------------------- */
.mobile-app-header { display: none; }

/* =====================================================================
   RESPONSIVE — Mobile "app view" (< 860px)
   ===================================================================== */
@media (max-width: 860px) {
  .site-header { display: none; }
  .main-nav, .header-search { display: none; }

  .mobile-app-header {
    display: block;
    position: sticky; top: 0; z-index: 50;
    background: var(--glass); backdrop-filter: blur(16px);
    border-radius: 0 0 28px 28px;
    padding: 16px 20px 18px;
    box-shadow: 0 6px 20px rgba(31,41,55,0.06);
  }
  .mobile-app-header .row1 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
  .mobile-app-header .greet { display: flex; align-items: center; gap: 10px; }
  .mobile-app-header .greet .avatar {
    width: 42px; height: 42px; border-radius: 50%; background: var(--sage-deep);
    display: flex; align-items: center; justify-content: center; font-weight: 800; overflow: hidden;
  }
  .mobile-app-header .greet small { display: block; color: var(--ink-muted); font-size: 0.72rem; font-weight: 600; }
  .mobile-app-header .greet strong { font-size: 0.98rem; }
  .mobile-app-header .icons { display: flex; gap: 10px; }
  .mobile-app-header .icons a {
    width: 38px; height: 38px; border-radius: 50%; background: var(--solid);
    display: flex; align-items: center; justify-content: center; position: relative; border: 1px solid var(--line);
  }
  .mobile-app-header form { position: relative; }
  .mobile-app-header input {
    width: 100%; padding: 13px 16px 13px 42px; border-radius: var(--r-pill); border: none;
    background: var(--solid); font-family: inherit; font-size: 0.9rem;
  }
  .mobile-app-header form i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-muted); }

  .hero { display: none; } /* replaced by mobile-app-header + category row */
  .container { padding: 0 18px; }
  .section { padding: 20px 0; }
  .section-head h2 { font-size: 1.2rem; }
  .view-toggle { display: none; } /* mobile is grid-only, app-style */

  .service-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .service-grid.is-list .service-card { flex-direction: column; }
  .service-grid.is-list .service-thumb { width: auto; flex: auto; aspect-ratio: 4/3; height: auto; }
  .service-body { padding: 12px; }
  .service-title { font-size: 0.92rem; }

  .footer-grid { display: none; }
  .site-footer { display: none; } /* mobile uses floating dock instead */

  body { padding-bottom: 96px; } /* room for floating dock */

  .mobile-nav {
    display: flex; justify-content: space-around; align-items: center;
    position: fixed; left: 16px; right: 16px; bottom: 18px; z-index: 60;
    background: rgba(31,41,55,0.92); backdrop-filter: blur(14px);
    border-radius: var(--r-pill); padding: 10px 8px; box-shadow: 0 16px 34px rgba(31,41,55,0.28);
  }
  .mobile-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    color: rgba(255,255,255,0.55); font-size: 0.62rem; font-weight: 700; padding: 6px 14px; border-radius: var(--r-pill);
    transition: background .15s ease, color .15s ease;
  }
  .mobile-nav a i { font-size: 1.05rem; }
  .mobile-nav a.active { background: var(--amber); color: #fff; }

  .form-row { grid-template-columns: 1fr; }
}

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.flex { display: flex; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .bubble-icon {
  width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 18px;
  background: radial-gradient(circle at 30% 30%, #fff, var(--sage-deep) 75%);
  display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: var(--amber-deep);
  box-shadow: var(--shadow-glass);
}
