﻿
/* ============ RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Inter", Roboto, sans-serif;
  font-weight: 300;
  color: #1a1d24;
  background: #f5f7fb;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font: inherit; border: none; outline: none; background: transparent; color: inherit; }
ul { list-style: none; }

body::before {
  content: ""; position: fixed; inset: 0;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(120,160,255,.28), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(255,150,200,.20), transparent 55%),
    radial-gradient(700px 500px at 50% 110%, rgba(120,255,220,.18), transparent 60%);
  z-index: -1; pointer-events: none;
}

/* ============ LAYOUT ============ */
.sidebar { display: none; }
.app { min-height: 100vh; }

/* ===== HEADER ===== */
.header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(245,247,251,.72);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,.6);
  padding: 10px 14px;
  padding-top: calc(10px + env(safe-area-inset-top));
}
.header-row { display: flex; align-items: center; gap: 10px; }
.logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 500; font-size: 17px; letter-spacing: -.02em;
}
.logo-mark {
  width: 30px; height: 30px; border-radius: 10px;
  background: linear-gradient(135deg,#7aa2ff,#c58bff 60%,#ff9ec4);
  display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(140,120,255,.35);
  color: #fff;
}
.logo-mark svg { width: 16px; height: 16px; }

.header-title { flex: 1; display: flex; flex-direction: column; }
.header-title h1 { font-size: 17px; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; }
.header-title p { font-size: 11.5px; color: #7a8294; font-weight: 300; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: .2s;
  color: #1a1d24;
  position: relative;
  flex-shrink: 0;
}
.icon-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(120,140,255,.14); }
.icon-btn svg { width: 18px; height: 18px; }

/* Search */
.search {
  display: flex; align-items: center; gap: 8px;
  height: 44px;
  margin-top: 12px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #6b7280;
  font-weight: 300;
  font-size: 13.5px;
  transition: .25s;
}
.search:focus-within {
  background: #fff;
  box-shadow: 0 6px 20px rgba(120,140,255,.15);
}
.search svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .7; }
.search input { width: 100%; font-weight: 400; color: #1a1d24; }
.search input::placeholder { color: #b8bec9; font-weight: 300; }
.search .filter-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg,#7aa2ff,#c58bff);
  display: grid; place-items: center;
  color: #fff;
  flex-shrink: 0;
  transition: .2s;
  position: relative;
}
.search .filter-btn:hover { transform: scale(1.05); }
.search .filter-btn svg { width: 15px; height: 15px; opacity: 1; }
.search .filter-btn .badge {
  position: absolute; top: -3px; right: -3px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px;
  background: #ff5d8f;
  color: #fff;
  font-size: 9.5px; font-weight: 600;
  display: grid; place-items: center;
  border: 1.5px solid #fff;
}

/* ============ CATEGORIES ============ */
.categories {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 12px 14px 6px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.categories::-webkit-scrollbar { display: none; }
.cat-chip {
  scroll-snap-align: start;
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 13px; font-weight: 400;
  color: #404652;
  transition: .2s;
  white-space: nowrap;
  cursor: pointer;
}
.cat-chip:hover { transform: translateY(-1px); }
.cat-chip.active {
  background: linear-gradient(135deg,#1a1d24,#333846);
  color: #fff; border-color: transparent;
  box-shadow: 0 8px 20px rgba(26,29,36,.25);
  font-weight: 500;
}
.cat-chip .em { font-size: 15px; }

/* ============ TOOLBAR ============ */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px 12px;
  gap: 10px;
}
.toolbar-count {
  font-size: 12.5px; color: #7a8294;
  font-weight: 400;
}
.toolbar-count strong { color: #1a1d24; font-weight: 500; }
.toolbar-actions {
  display: flex; align-items: center; gap: 6px;
}
.view-toggle {
  display: flex; gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0,0,0,.045);
}
.view-toggle button {
  width: 28px; height: 24px;
  border-radius: 999px;
  display: grid; place-items: center;
  color: #7a8294;
  transition: .2s;
}
.view-toggle button svg { width: 14px; height: 14px; }
.view-toggle button.on {
  background: #fff;
  color: #1a1d24;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}

.sort-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.9);
  font-size: 12px; color: #4a5162;
  font-weight: 400;
  transition: .2s;
}
.sort-btn:hover { background: #fff; }
.sort-btn svg { width: 12px; height: 12px; }

/* ============ ACTIVE FILTERS ============ */
.active-filters {
  display: flex; gap: 6px;
  overflow-x: auto;
  padding: 0 14px 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.active-filters::-webkit-scrollbar { display: none; }
.active-chip {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(122,162,255,.15), rgba(197,139,255,.15));
  border: 1px solid rgba(122,162,255,.3);
  font-size: 11.5px; color: #4a5a8a;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.active-chip .x {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: rgba(74,90,138,.15);
  display: grid; place-items: center;
  transition: .2s;
}
.active-chip:hover .x { background: rgba(74,90,138,.3); }
.active-chip .x svg { width: 8px; height: 8px; }
.active-clear {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  color: #ff5d8f;
  font-weight: 500;
  background: rgba(255,93,143,.08);
  border: 1px solid rgba(255,93,143,.2);
}

/* ============ MASTERS LIST ============ */
.masters-wrap {
  padding: 0 14px;
  display: flex; flex-direction: column; gap: 12px;
}

.master {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(255,255,255,.9);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 6px 22px rgba(20,30,60,.05);
  transition: .28s;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.master:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(20,30,60,.1); }

/* Top badge */
.master-top-badge {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 4px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg,#f59e0b,#ff5d8f);
  color: #fff;
  display: inline-flex; align-items: center; gap: 4px;
  z-index: 2;
}
.master-top-badge svg { width: 10px; height: 10px; }

/* Master head */
.master-head {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 12px;
}
.master-avatar {
  width: 56px; height: 56px; border-radius: 18px;
  flex-shrink: 0;
  display: grid; place-items: center;
  font-weight: 500; font-size: 19px; color: #fff;
  background: linear-gradient(135deg,#7aa2ff,#c58bff);
  position: relative;
  border: 2.5px solid rgba(255,255,255,.95);
  box-shadow: 0 8px 20px rgba(140,120,255,.22);
}
.master-avatar img,
.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.master-avatar.green { background: linear-gradient(135deg,#34d399,#22d3ee); }
.master-avatar.orange { background: linear-gradient(135deg,#f59e0b,#ff5d8f); }
.master-avatar.pink { background: linear-gradient(135deg,#ff9ec4,#c58bff); }
.master-avatar.blue { background: linear-gradient(135deg,#60a5fa,#7aa2ff); }
.master-avatar .online {
  position: absolute; bottom: -2px; right: -2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #10b981;
  border: 2.5px solid #fff;
  box-shadow: 0 0 0 2px rgba(16,185,129,.15);
  z-index: 2;
}
.master-info { flex: 1; min-width: 0; }
.master-name {
  font-size: 15px; font-weight: 500;
  letter-spacing: -.01em;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}
.master-name svg.verified {
  width: 14px; height: 14px;
  color: #3b82f6;
  flex-shrink: 0;
}
.master-name .pro {
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .05em;
  padding: 2px 6px; border-radius: 5px;
  background: linear-gradient(135deg,#f59e0b,#ff5d8f);
  color: #fff;
}
.master-spec {
  font-size: 12.5px; color: #7a8294;
  margin-bottom: 6px;
}
.master-meta-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: #7a8294;
  flex-wrap: wrap;
}
.master-meta-row .item {
  display: inline-flex; align-items: center; gap: 3px;
}
.master-meta-row .item svg { width: 11px; height: 11px; }
.master-meta-row .item.gold { color: #f59e0b; font-weight: 500; }
.master-meta-row .item.green { color: #10b981; }
.master-meta-row .sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #c8cdd8;
}

/* Fav button */
.master-fav {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(0,0,0,.05);
  color: #c8cdd8;
  transition: .2s;
  flex-shrink: 0;
  cursor: pointer;
}
.master-fav:hover { background: #fff; color: #ff5d8f; }
.master-fav.on { color: #ff5d8f; background: rgba(255,93,143,.12); border-color: rgba(255,93,143,.2); }
.master-fav svg { width: 15px; height: 15px; }

/* Master skills */
.master-skills {
  display: flex; gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.skill-tag {
  font-size: 10.5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(0,0,0,.04);
  color: #5a6274;
}
.skill-tag.primary {
  background: linear-gradient(135deg, rgba(122,162,255,.15), rgba(197,139,255,.15));
  color: #4a5a8a;
  font-weight: 500;
}

/* Master stats */
.master-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 10px 0;
  margin-bottom: 12px;
  border-top: 1px solid rgba(0,0,0,.05);
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.ms-stat {
  text-align: center;
  padding: 0 2px;
  border-right: 1px solid rgba(0,0,0,.05);
}
.ms-stat:last-child { border-right: none; }
.ms-stat .v {
  font-size: 14px; font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.2;
  margin-bottom: 2px;
}
.ms-stat .v.gold { color: #f59e0b; }
.ms-stat .v.green { color: #10b981; }
.ms-stat .l {
  font-size: 10px; color: #97a0b0;
}

/* Master footer */
.master-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.master-price {
  display: flex; flex-direction: column; gap: 2px;
}
.master-price .amount {
  font-size: 17px; font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1;
}
.master-price .amount sup {
  font-size: 11px; color: #7a8294; font-weight: 400;
  margin-left: 2px;
}
.master-price .per {
  font-size: 10.5px; color: #97a0b0;
}
.master-actions {
  display: flex; gap: 6px;
}
.btn-sm {
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 12.5px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  transition: .2s;
  white-space: nowrap;
}
.btn-sm svg { width: 13px; height: 13px; }
.btn-primary {
  background: linear-gradient(135deg,#1a1d24,#333846);
  color: #fff;
  box-shadow: 0 6px 16px rgba(26,29,36,.22);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(26,29,36,.3); }
.btn-ghost {
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(0,0,0,.06);
  color: #4a5162;
}
.btn-ghost:hover { background: #fff; color: #1a1d24; }
.btn-icon {
  width: 36px; height: 36px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(0,0,0,.06);
  color: #6b7280;
  transition: .2s;
  flex-shrink: 0;
}
.btn-icon:hover { background: #fff; color: #1a1d24; }
.btn-icon svg { width: 15px; height: 15px; }

/* ============ MAP PLACEHOLDER ============ */
.map-preview {
  margin: 0 14px;
  height: 180px;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(400px 200px at 30% 40%, rgba(122,162,255,.15), transparent 70%),
    radial-gradient(400px 200px at 70% 60%, rgba(197,139,255,.15), transparent 70%),
    linear-gradient(135deg, #e8efff 0%, #f0e5ff 50%, #ffe5f0 100%);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 6px 22px rgba(20,30,60,.05);
  cursor: pointer;
  transition: .25s;
}
.map-preview:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(20,30,60,.1); }
.map-preview::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.4) 1px, transparent 1px);
  background-size: 40px 40px;
}
.map-marker {
  position: absolute;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg,#7aa2ff,#c58bff);
  color: #fff;
  font-size: 12px; font-weight: 600;
  border: 3px solid #fff;
  box-shadow: 0 6px 16px rgba(140,120,255,.35);
  z-index: 2;
  transition: .25s;
}
.map-marker:hover { transform: scale(1.1); }
.map-marker.you {
  background: linear-gradient(135deg,#10b981,#22d3ee);
  box-shadow: 0 6px 16px rgba(34,211,238,.4);
  animation: pulseG 2s infinite;
}
@keyframes pulseG {
  0%,100% { box-shadow: 0 6px 16px rgba(34,211,238,.4), 0 0 0 0 rgba(34,211,238,.5); }
  50% { box-shadow: 0 6px 16px rgba(34,211,238,.4), 0 0 0 12px rgba(34,211,238,0); }
}
.map-overlay-btn {
  position: absolute;
  bottom: 12px; left: 12px; right: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px;
  font-weight: 500;
  z-index: 3;
  box-shadow: 0 6px 16px rgba(20,30,60,.08);
}
.map-overlay-btn .l {
  display: flex; align-items: center; gap: 8px;
  color: #1a1d24;
}
.map-overlay-btn .l svg { width: 15px; height: 15px; color: #4a5a8a; }
.map-overlay-btn .arrow {
  color: #6b7280;
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11.5px;
  font-weight: 400;
}
.map-overlay-btn .arrow svg { width: 11px; height: 11px; }

/* ============ LOAD MORE ============ */
.load-more {
  margin: 16px 14px 0;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.6);
  border: 1px dashed rgba(0,0,0,.08);
  text-align: center;
  font-size: 13px; color: #6b7280;
  font-weight: 400;
  transition: .2s;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.load-more:hover { background: rgba(255,255,255,.85); color: #1a1d24; }
.load-more svg { width: 14px; height: 14px; }

/* ============ SECTION ============ */
.section { padding: 18px 0 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 0 16px 10px;
  gap: 8px;
}
.section-head h2 {
  font-size: 16px; font-weight: 500; letter-spacing: -.02em;
  display: flex; align-items: center; gap: 8px;
}
.section-head a {
  font-size: 12.5px; color: #6b7280; font-weight: 400;
  display: inline-flex; align-items: center; gap: 3px;
}
.section-head a svg { width: 11px; height: 11px; }

/* ============ ASIDE (DESKTOP FILTERS) ============ */
.aside-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(255,255,255,.9);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 12px 32px rgba(20,30,60,.06);
}
.aside-sec-title {
  font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .08em; color: #97a0b0;
  font-weight: 500;
  margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.aside-sec-title a {
  font-size: 11px; color: #7aa2ff;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

/* Filter sections */
.filter-group {
  margin-bottom: 16px;
}
.filter-group:last-child { margin-bottom: 0; }
.filter-group h4 {
  font-size: 12.5px; font-weight: 500;
  color: #1a1d24;
  margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.filter-group h4 .val {
  font-size: 11.5px;
  color: #7aa2ff;
  font-weight: 500;
}

/* Sort options */
.sort-list {
  display: flex; flex-direction: column; gap: 2px;
}
.sort-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px; color: #4a5162;
  cursor: pointer;
  transition: .2s;
}
.sort-item:hover { background: rgba(122,162,255,.06); }
.sort-item.active {
  background: linear-gradient(135deg, rgba(122,162,255,.12), rgba(197,139,255,.12));
  color: #1a1d24;
  font-weight: 500;
}
.sort-item .check {
  color: #7aa2ff;
  opacity: 0;
  transition: .2s;
}
.sort-item.active .check { opacity: 1; }
.sort-item .check svg { width: 14px; height: 14px; }

/* Range slider */
.range-slider {
  padding: 4px 0;
}
.range-value {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 10px;
}
.range-value .v {
  font-size: 16px; font-weight: 500;
  letter-spacing: -.02em;
}
.range-value .v sup { font-size: 11px; color: #7a8294; font-weight: 400; }
.range-value .hint {
  font-size: 11px; color: #97a0b0;
}
.range-track {
  height: 6px;
  border-radius: 3px;
  background: rgba(0,0,0,.06);
  position: relative;
  margin-bottom: 6px;
}
.range-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg,#7aa2ff,#c58bff);
  width: 60%;
}
.range-thumb {
  position: absolute;
  top: 50%; left: 60%;
  transform: translate(-50%,-50%);
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #7aa2ff;
  box-shadow: 0 4px 10px rgba(120,140,255,.3);
  cursor: grab;
}
.range-marks {
  display: flex; justify-content: space-between;
  font-size: 10.5px;
  color: #97a0b0;
}

/* Checkbox rows */
.check-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0;
  cursor: pointer;
  font-size: 13px;
  color: #4a5162;
  transition: .18s;
}
.check-row:hover { color: #1a1d24; }
.check-box {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 2px solid #d5dae5;
  background: #fff;
  display: grid; place-items: center;
  flex-shrink: 0;
  transition: .2s;
}
.check-box svg {
  width: 12px; height: 12px;
  color: #fff;
  opacity: 0;
  transition: .2s;
}
.check-row.on .check-box {
  background: linear-gradient(135deg,#7aa2ff,#c58bff);
  border-color: transparent;
}
.check-row.on .check-box svg { opacity: 1; }
.check-row .count {
  margin-left: auto;
  font-size: 11px;
  color: #97a0b0;
}

/* Rating pills */
.rating-pills {
  display: flex; gap: 6px;
  flex-wrap: wrap;
}
.rating-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(0,0,0,.06);
  font-size: 12px;
  color: #4a5162;
  cursor: pointer;
  transition: .2s;
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 400;
}
.rating-pill:hover { background: #fff; }
.rating-pill svg { width: 11px; height: 11px; color: #f59e0b; }
.rating-pill.active {
  background: linear-gradient(135deg,#1a1d24,#333846);
  color: #fff;
  border-color: transparent;
  font-weight: 500;
  box-shadow: 0 6px 14px rgba(26,29,36,.2);
}
.rating-pill.active svg { color: #fbbf24; }

/* Distance chips */
.dist-chips {
  display: flex; gap: 6px;
  flex-wrap: wrap;
}
.dist-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(0,0,0,.06);
  font-size: 12px;
  color: #4a5162;
  cursor: pointer;
  transition: .2s;
  font-weight: 400;
}
.dist-chip:hover { background: #fff; }
.dist-chip.active {
  background: linear-gradient(135deg, rgba(122,162,255,.15), rgba(197,139,255,.15));
  border-color: rgba(122,162,255,.35);
  color: #4a5a8a;
  font-weight: 500;
}

/* Availability toggle */
.avail-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.8);
  font-size: 12.5px;
  color: #4a5162;
  margin-bottom: 8px;
}
.avail-row:last-child { margin-bottom: 0; }
.toggle {
  width: 40px; height: 22px;
  border-radius: 999px;
  background: #10b981;
  position: relative;
  cursor: pointer;
  transition: .22s;
  flex-shrink: 0;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 20px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,.15);
  transition: .22s;
}
.toggle.off { background: #d5dae5; }
.toggle.off::after { left: 2px; }

/* Filter CTA */
.filter-cta {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,.05);
  display: flex; gap: 8px;
}
.filter-cta button {
  flex: 1;
  padding: 12px;
  border-radius: 14px;
  font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: .22s;
}
.filter-cta .btn-apply {
  background: linear-gradient(135deg,#1a1d24,#333846);
  color: #fff;
  box-shadow: 0 8px 20px rgba(26,29,36,.22);
}
.filter-cta .btn-apply:hover { transform: translateY(-1px); }
.filter-cta .btn-reset {
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(0,0,0,.06);
  color: #4a5162;
  flex: 0 0 auto;
  padding: 12px 16px;
}
.filter-cta .btn-reset:hover { background: #fff; color: #1a1d24; }

/* ============ AD BANNER ============ */
.ad-banner {
  margin: 16px 14px 0;
  padding: 14px 16px;
  border-radius: 18px;
  display: flex; align-items: center; gap: 12px;
  background:
    linear-gradient(120deg, rgba(122,162,255,.14), rgba(197,139,255,.14)),
    rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: .25s;
}
.ad-banner:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(120,140,255,.14); }
a.ad-banner { text-decoration: none; color: inherit; cursor: pointer; }
.ad-banner::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(300px 120px at 90% 0%, rgba(255,255,255,.5), transparent 60%);
  pointer-events: none;
}
.ad-thumb {
  width: 56px; height: 56px; border-radius: 14px;
  overflow: hidden; flex-shrink: 0; position: relative; z-index: 1;
}
.ad-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-ic {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg,#7aa2ff,#c58bff);
  color: #fff; flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(140,120,255,.32);
}
.ad-ic svg { width: 20px; height: 20px; }
.ad-text { flex: 1; position: relative; z-index: 1; }
.ad-text h4 { font-size: 13.5px; font-weight: 500; letter-spacing: -.01em; margin-bottom: 2px; }
.ad-text p { font-size: 11.5px; color: #6b7280; font-weight: 300; }
.ad-badge {
  position: absolute; top: 8px; right: 10px;
  font-size: 9px; letter-spacing: .06em;
  color: #97a0b0; text-transform: uppercase; font-weight: 400;
}
.ad-arrow {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,.8);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.ad-arrow svg { width: 13px; height: 13px; }

/* ============ FOOTER ============ */
.footer {
  margin-top: 26px;
  padding: 20px 18px calc(100px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255,255,255,.7);
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.35));
}
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.footer-bottom p { font-size: 11.5px; color: #97a0b0; font-weight: 300; }
.socials { display: flex; gap: 8px; }
.socials a {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.9);
  transition: .2s;
}
.socials a:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(120,140,255,.16); }
.socials svg { width: 15px; height: 15px; color: #4a5162; }

/* ============ BOTTOM NAV ============ */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 70;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-top: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 -6px 24px rgba(20,30,60,.06);
  display: flex; justify-content: space-around; align-items: center;
}
.nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 2px;
  color: #8a90a0;
  font-size: 10.5px; font-weight: 400;
  border-radius: 14px;
  transition: .2s;
  position: relative;
}
.nav-item svg { width: 20px; height: 20px; transition: .2s; }
.nav-item.active { color: #1a1d24; }
.nav-item.active svg { transform: translateY(-1px); }
.nav-item.active::before {
  content: ""; position: absolute; top: -1px;
  width: 22px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg,#7aa2ff,#c58bff);
}
.nav-item .dot {
  position: absolute; top: 4px; right: calc(50% - 14px);
  width: 6px; height: 6px; border-radius: 50%; background: #ff5d8f;
}
.fab {
  width: 46px; height: 46px; border-radius: 16px;
  background: linear-gradient(135deg,#7aa2ff,#c58bff 60%,#ff9ec4);
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 22px rgba(140,120,255,.4);
  transition: .22s;
  flex: 0 0 46px;
}
.fab:hover { transform: translateY(-2px) scale(1.03); }
.fab svg { width: 22px; height: 22px; }

/* ============ FILTER DRAWER (MOBILE) ============ */
.filter-drawer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  max-height: 88vh;
  border-radius: 26px 26px 0 0;
  padding: 8px 16px calc(24px + env(safe-area-inset-bottom));
  background: rgba(252,253,255,.92);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-top: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 -20px 50px rgba(20,30,60,.16);
  transform: translateY(105%);
  transition: transform .38s cubic-bezier(.2,.8,.2,1);
  overflow-y: auto;
}
.filter-drawer.open { transform: translateY(0); }
.filter-drawer .drawer-handle {
  width: 38px; height: 4px; border-radius: 3px;
  background: #d5dae5; margin: 6px auto 14px;
}
.filter-drawer-title {
  font-size: 17px; font-weight: 500;
  letter-spacing: -.02em;
  margin-bottom: 16px;
  text-align: center;
}

/* ============ MAIN DRAWER ============ */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(10,15,30,.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: .3s;
  z-index: 90;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  max-height: 82vh;
  border-radius: 26px 26px 0 0;
  padding: 8px 16px calc(24px + env(safe-area-inset-bottom));
  background: rgba(252,253,255,.86);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-top: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 -20px 50px rgba(20,30,60,.16);
  transform: translateY(105%);
  transition: transform .38s cubic-bezier(.2,.8,.2,1);
  overflow-y: auto;
}
.drawer.open { transform: translateY(0); }
.drawer-handle {
  width: 38px; height: 4px; border-radius: 3px;
  background: #d5dae5; margin: 6px auto 14px;
}
.drawer-user {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 18px;
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.9);
  margin-bottom: 16px;
}
.drawer-avatar {
  width: 46px; height: 46px; border-radius: 15px;
  background: linear-gradient(135deg,#7aa2ff,#c58bff);
  display: grid; place-items: center;
  color: #fff; font-weight: 500; font-size: 17px;
}
.drawer-user h4 { font-size: 14px; font-weight: 500; }
.drawer-user p { font-size: 12px; color: #7a8294; font-weight: 300; }

.drawer-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.drawer-stat {
  padding: 10px; border-radius: 14px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.9);
  text-align: center;
}
.drawer-stat .v { font-size: 15px; font-weight: 500; }
.drawer-stat .l { font-size: 10px; color: #7a8294; }

.drawer-nav { display: flex; flex-direction: column; gap: 2px; }
.drawer-link {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-radius: 14px;
  font-size: 14px; font-weight: 400;
  transition: .18s;
}
.drawer-link:hover { background: rgba(122,162,255,.09); }
.drawer-link.active {
  background: linear-gradient(135deg, rgba(122,162,255,.15), rgba(197,139,255,.15));
  color: #1a1d24; font-weight: 500;
}
.drawer-link svg { width: 19px; height: 19px; color: #5a6478; }
.drawer-link .chev { margin-left: auto; color: #b8bec9; }
.drawer-link .tag {
  margin-left: auto;
  padding: 2px 8px; border-radius: 999px;
  background: linear-gradient(135deg,#7aa2ff,#c58bff);
  color: #fff; font-size: 10px; font-weight: 500;
}
.drawer-link .tag.green { background: linear-gradient(135deg,#10b981,#22d3ee); }
.drawer-link .tag.red { background: linear-gradient(135deg,#ff5d8f,#f59e0b); }

/* ============ GRID VIEW (desktop) ============ */
.masters-wrap.grid-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ============ TABLET / DESKTOP ============ */
@media (min-width: 640px) {
  .masters-wrap.grid-view { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .bottom-nav { display: none; }
  .header { padding: 12px 24px; }
  .search { max-width: 560px; }
  .categories { padding: 12px 24px 6px; }
  .toolbar { padding: 10px 24px 12px; }
  .active-filters { padding: 0 24px 10px; }
  .masters-wrap { padding: 0 24px; }
  .masters-wrap.grid-view { grid-template-columns: repeat(3, 1fr); }
  .map-preview { margin: 0 24px; height: 220px; }
  .load-more { margin: 16px 24px 0; }
  .ad-banner { margin: 16px 24px 0; }
  .footer { padding: 24px 24px 30px; }
  .section-head { padding: 0 26px 12px; }
}

@media (min-width: 1100px) {
  .app { display: grid; grid-template-columns: 250px 1fr; max-width: 1440px; margin: 0 auto; }
  .sidebar {
    display: flex; flex-direction: column; gap: 4px;
    padding: 20px 14px;
    position: sticky; top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid rgba(255,255,255,.7);
    background: rgba(255,255,255,.35);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
  }
  .sidebar .logo { padding: 6px 10px 18px; font-size: 18px; }

  .side-user {
    display: flex; align-items: center; gap: 10px;
    padding: 10px; border-radius: 16px;
    background: rgba(255,255,255,.6);
    border: 1px solid rgba(255,255,255,.85);
    margin-bottom: 14px;
  }
  .side-user-avatar {
    width: 38px; height: 38px; border-radius: 12px;
    background: linear-gradient(135deg,#7aa2ff,#c58bff);
    display: grid; place-items: center;
    color: #fff; font-weight: 500; font-size: 14px;
    flex-shrink: 0;
  }
  .side-user-info { min-width: 0; }
  .side-user-info h4 { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-user-info p { font-size: 11px; color: #7a8294; }

  .side-link {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; border-radius: 14px;
    font-size: 13.5px; font-weight: 400; color: #404652;
    transition: .18s;
    cursor: pointer;
  }
  .side-link:hover { background: rgba(122,162,255,.09); color: #1a1d24; }
  .side-link.active {
    background: linear-gradient(135deg, rgba(122,162,255,.18), rgba(197,139,255,.18));
    color: #1a1d24; font-weight: 500;
  }
  .side-link svg { width: 18px; height: 18px; }
  .side-link .tag {
    margin-left: auto; padding: 2px 8px; border-radius: 999px;
    background: rgba(122,162,255,.22); font-size: 10px; font-weight: 500; color: #4a5a8a;
  }
  .side-link .tag.green { background: rgba(16,185,129,.16); color: #059669; }
  .side-sep { height: 1px; background: rgba(0,0,0,.05); margin: 10px 8px; }

  .side-promo {
    margin-top: auto;
    padding: 14px;
    border-radius: 16px;
    background: linear-gradient(140deg, rgba(122,162,255,.2), rgba(255,158,196,.2));
    border: 1px solid rgba(255,255,255,.85);
    font-size: 12px; color: #4a5162; font-weight: 300;
  }
  .side-promo strong { display: block; font-weight: 500; font-size: 13px; color: #1a1d24; margin-bottom: 3px; }
  .side-promo p { margin-bottom: 8px; }
  .side-promo button {
    width: 100%;
    padding: 8px 12px; border-radius: 999px;
    background: #1a1d24; color: #fff;
    font-size: 11.5px; font-weight: 500;
  }

  .header { padding: 14px 24px; }
  .main { min-width: 0; }

  /* Two-column layout: sidebar filters + main list */
  .search-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    padding: 16px 24px 0;
  }
  .search-aside {
    min-width: 0;
  }
  .search-main { min-width: 0; }

  /* Reset margins inside layout */
  .search-layout .categories { padding: 0 0 6px; }
  .search-layout .toolbar { padding: 10px 0 12px; }
  .search-layout .active-filters { padding: 0 0 10px; }
  .search-layout .masters-wrap { padding: 0; }
  .search-layout .masters-wrap.grid-view { grid-template-columns: repeat(2, 1fr); }
  .search-layout .map-preview { margin: 0; }
  .search-layout .load-more { margin: 14px 0 0; }
  .search-layout .ad-banner { margin: 14px 0 0; }
  .search-layout .section { padding: 0; }

  .aside-sticky {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 4px;
  }

  /* Hide mobile filters button on desktop */
  .search .filter-btn { display: none; }

  /* Hide filter drawer */
  .filter-drawer { display: none !important; }
  #filterBackdrop { display: none !important; }
}

