@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ================================================================
   VITRINE — MedHora Commercial Showcase
   Clean Modern Dark, CS-Marketplace inspired
   ================================================================ */

:root {
  --vitrine-surface: #ffffff;
  --vitrine-surface-muted: #f8fafc;
  --vitrine-surface-hover: #f1f5f9;
  --vitrine-surface-emphasis: #eff6ff;
  --vitrine-border: rgba(0,0,0,0.12);
  --vitrine-border-strong: rgba(0,0,0,0.18);
  --vitrine-text: var(--text-main, #1a202c);
  --vitrine-muted: #64748b;
  --vitrine-soft-muted: #94a3b8;
  --vitrine-disabled: #cbd5e1;
  --vitrine-shadow: 0 10px 30px rgba(15,23,42,0.08);
  --vitrine-popover-shadow: 0 18px 48px rgba(15,23,42,0.12);
  --vitrine-toast-bg: #ffffff;
  --vitrine-toast-text: var(--text-main, #1a202c);
}

[data-theme="dark"] {
  --vitrine-surface: #161b27;
  --vitrine-surface-muted: #1a2035;
  --vitrine-surface-hover: #1e2a3b;
  --vitrine-surface-emphasis: rgba(59,130,246,0.15);
  --vitrine-border: rgba(255,255,255,0.10);
  --vitrine-border-strong: rgba(255,255,255,0.18);
  --vitrine-text: #f1f5f9;
  --vitrine-muted: #94a3b8;
  --vitrine-soft-muted: #94a3b8;
  --vitrine-disabled: #334155;
  --vitrine-shadow: 0 2px 16px rgba(0,0,0,0.40);
  --vitrine-popover-shadow: 0 8px 24px rgba(0,0,0,0.50), 0 16px 48px rgba(0,0,0,0.30);
  --vitrine-toast-bg: #1e293b;
  --vitrine-toast-text: #f1f5f9;
}

/* ── AIRBNB PILL SEARCH BAR ────────────────────────────────────── */
.sp-hero {
  position: relative;
  z-index: 40;
  padding: 1.6rem 0 .65rem;
}

/* ─ The pill ─ */
.search-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 860px;
  margin: 0 auto;
  background: var(--vitrine-surface);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  border: 1.5px solid rgba(0,0,0,.10);
  border-radius: 9999px;
  padding: .5rem;
  /* Airbnb-style floating elevation */
  box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 4px 18px rgba(0,0,0,.08);
  transition: box-shadow .22s ease, border-color .22s ease;
  position: relative;
}
.search-pill:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.10), 0 8px 32px rgba(0,0,0,.12);
  border-color: rgba(0,0,0,.18);
}
[data-theme="dark"] .search-pill {
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 2px 8px rgba(0,0,0,.35), 0 8px 28px rgba(0,0,0,.4);
}
[data-theme="dark"] .search-pill:hover {
  border-color: rgba(255,255,255,.25);
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
}

/* ─ Field sections ─ */
.sp-field {
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
  flex: 1;
  padding: .78rem 1.25rem;
  border-radius: .95rem;
  transition: background .16s;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.sp-field:hover { background: var(--vitrine-surface-hover); }
.sp-field:focus-within,
.sp-field.sp-field--open { background: var(--vitrine-surface-hover); }
.sp-top-categories {
  display: flex;
  gap: .44rem;
  flex-direction: column;
}

.sp-bottom-row {
  display: flex;
  align-items: center;
  width: 100%;
}
.sp-field--category {
  flex: .85;
  cursor: pointer;
}
.sp-category-display {
  position: relative;
  color: var(--vitrine-text);
  font-size: .84rem;
  font-weight: 500;
  line-height: 1.4;
  padding-right: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-category-display::after {
  content: "";
  position: absolute;
  right: .1rem;
  top: 50%;
  width: .42rem;
  height: .42rem;
  border-right: 1.6px solid var(--vitrine-soft-muted);
  border-bottom: 1.6px solid var(--vitrine-soft-muted);
  transform: translateY(-65%) rotate(45deg);
  transition: transform .16s ease;
}
.sp-field--category.sp-field--open .sp-category-display::after {
  transform: translateY(-35%) rotate(225deg);
}
.sp-top-pill {
  appearance: none;
  border: 1.5px solid var(--vitrine-border);
  background: var(--vitrine-surface-muted);
  color: var(--vitrine-text);
  min-height: 38px;
  padding: .5rem .75rem;
  border-radius: .8rem;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .16s, border-color .16s, color .16s, transform .16s;
  width: 100%;
  text-align: left;
}
.sp-top-pill:hover {
  border-color: rgba(94,92,230,.45);
  color: #4b48d9;
}
.sp-top-pill--active {
  background: rgba(94,92,230,.12);
  border-color: rgba(94,92,230,.45);
  color: #4b48d9;
  box-shadow: 0 10px 24px rgba(94,92,230,.14);
}
.sp-field--onde   { flex: .95; }
.sp-field--quando { flex: 1.1; }
.sp-field--spec   { flex: 1.4; }
.sp-field--price  { flex: .85; }

/* ─ Labels ─ */
.sp-label {
  display: flex;
  align-items: center;
  gap: .28rem;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .03em;
  color: var(--vitrine-text);
  line-height: 1;
  pointer-events: none;
  margin-bottom: .18rem;
  text-transform: none;
}

/* "(Opcional)" badge inside price label */
.sp-optional-badge {
  font-size: .58rem;
  font-weight: 500;
  color: var(--vitrine-soft-muted);
  margin-left: .22rem;
  letter-spacing: 0;
}

/* Price field label is visually lighter to reinforce the optional nature */
.sp-field--price .sp-label {
  font-weight: 400;
  color: var(--vitrine-soft-muted);
}
.sp-label-icon {
  width: .65rem;
  height: .65rem;
  flex-shrink: 0;
  color: #3b82f6;
}

/* ─ Inputs ─ */
.sp-input {
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: .84rem;
  color: var(--vitrine-text);
  padding: 0;
  width: 100%;
  line-height: 1.4;
}
.sp-input::placeholder {
  color: var(--vitrine-soft-muted);
  font-weight: 400;
}

/* Date display */
.sp-date-display {
  font-size: .84rem;
  color: var(--vitrine-soft-muted);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-date-display--filled { color: var(--vitrine-text); font-weight: 500; }

/* ─ Separator ─ */
.sp-sep {
  width: 1px;
  height: 2rem;
  align-self: center;
  margin: 0;
  background: rgba(148,163,184,.35);
  flex-shrink: 0;
}

/* ─ Search button — brand color #5e5ce6 ─ */
.sp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  /* Brand indigo-violet */
  background: #5e5ce6;
  color: #fff;
  cursor: pointer;
  margin: .1rem .08rem .1rem .18rem;
  transition: transform .18s ease, box-shadow .18s ease, background .18s;
  box-shadow: 0 4px 18px rgba(94, 92, 230, .45);
}
.sp-btn:hover {
  background: #4b48d9;
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(94, 92, 230, .60);
}
.sp-btn:active { transform: scale(.93); }
.sp-btn svg,
.sp-btn i {
  width: 1.1rem;
  height: 1.1rem;
  stroke-width: 2.5;
}

.sp-subfilters {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  max-width: 860px;
  margin: .9rem auto 0;
}

.sp-subfilter-pill {
  appearance: none;
  border: 1.5px solid var(--vitrine-border);
  background: var(--vitrine-surface);
  color: var(--vitrine-muted);
  min-height: 42px;
  padding: .68rem 1rem;
  border-radius: 9999px;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .16s, border-color .16s, color .16s, transform .16s;
}

.sp-subfilter-pill:hover {
  border-color: rgba(94,92,230,.45);
  color: #4b48d9;
}

.sp-subfilter-pill--active {
  background: rgba(94,92,230,.12);
  border-color: rgba(94,92,230,.45);
  color: #4b48d9;
  box-shadow: 0 10px 24px rgba(94,92,230,.14);
}

/* ───────────────────────────────────────────────────────────────
   POPOVERS — shared base
   ─────────────────────────────────────────────────────────────── */
.sp-popover {
  display: none;
  position: absolute;
  top: calc(100% + .55rem);
  left: 0;
  min-width: 260px;
  background: var(--vitrine-surface);
  border: 1px solid var(--vitrine-border);
  border-radius: 1.1rem;
  padding: 1rem 1.15rem;
  box-shadow: var(--vitrine-popover-shadow);
  z-index: 50;
  animation: spPopIn .18s ease;
}
.sp-popover--show { display: block; }
@keyframes spPopIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sp-pop-title {
  font-size: .68rem;
  font-weight: 700;
  color: var(--vitrine-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 .7rem;
}

/* ───────────────────────────────────────────────────────────────
   DUAL CALENDAR POPOVER — Airbnb-style date range
   ─────────────────────────────────────────────────────────────── */
/* Category list popover */
.sp-popover--category {
  min-width: 220px;
  padding: .7rem 0;
}
.sp-popover--category .sp-pop-title { padding: 0 1rem; }
.sp-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sp-category-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .6rem 1.1rem;
  font-size: .84rem;
  color: var(--vitrine-text);
  cursor: pointer;
  transition: background .12s, color .12s;
  border-left: 3px solid transparent;
}
.sp-category-item:hover {
  background: var(--vitrine-surface-hover);
  border-left-color: #3b82f6;
  color: var(--vitrine-text);
}
.sp-category-item--active {
  background: var(--vitrine-surface-emphasis);
  border-left-color: #3b82f6;
  color: #2563eb;
  font-weight: 600;
}
.sp-category-item-icon {
  width: .95rem;
  height: .95rem;
  flex-shrink: 0;
  color: inherit;
}

.sp-popover--cal {
  width: min(760px, calc(100vw - 2rem));
  min-width: 0;
  padding: 1.25rem 1.35rem 1rem;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 1.2rem;
}
.spc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .55rem;
}
.spc-months-title {
  display: flex;
  gap: 4rem;
  font-weight: 700;
  font-size: .88rem;
  color: var(--vitrine-text);
}
.spc-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border: none;
  background: var(--vitrine-surface-muted);
  border-radius: 50%;
  cursor: pointer;
  color: var(--vitrine-text);
  transition: background .15s;
}
.spc-nav:hover { background: var(--vitrine-surface-hover); }
.spc-nav svg, .spc-nav i { width: 1rem; height: 1rem; }

.spc-grid-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}
.spc-month {
  min-width: 0;
}
.spc-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: .6rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .2rem;
}
.spc-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px 0;
}
.spc-day {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  font-size: .8rem;
  color: var(--vitrine-text);
  border-radius: 50%;
  cursor: pointer;
  transition: background .12s, color .12s;
  position: relative;
}
.spc-day:hover:not(.spc-day--disabled):not(.spc-day--empty) {
  background: var(--vitrine-surface-hover);
}
.spc-day--empty { cursor: default; }
.spc-day--disabled {
  color: var(--vitrine-disabled);
  cursor: not-allowed;
  text-decoration: line-through;
}
.spc-day--today {
  font-weight: 700;
  box-shadow: inset 0 0 0 1.5px #3b82f6;
}
/* Selected endpoints */
.spc-day--start,
.spc-day--end {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
  color: #fff !important;
  font-weight: 700;
}
/* Range between start & end */
.spc-day--inrange {
  background: rgba(59,130,246,0.15);
  border-radius: 0;
  color: #93c5fd;
}
.spc-day--start { border-radius: 50% 0 0 50%; }
.spc-day--end   { border-radius: 0 50% 50% 0; }
.spc-day--start.spc-day--end { border-radius: 50%; }

.spc-tolerance {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--vitrine-border);
}
.spc-tolerance-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: .5rem 1rem;
  border: 1.5px solid var(--vitrine-border);
  border-radius: 999px;
  background: var(--vitrine-surface);
  color: var(--vitrine-text);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.spc-tolerance-pill:hover {
  border-color: var(--vitrine-border-strong);
  background: var(--vitrine-surface-hover);
}
.spc-tolerance-pill--active {
  border-color: #111827;
  background: #ffffff;
  color: #111827;
  box-shadow: inset 0 0 0 1px #111827;
}

.spc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: .55rem;
  padding-top: .25rem;
}
.spc-confirm {
  appearance: none;
  border: none;
  border-radius: .55rem;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: .78rem;
  font-weight: 700;
  padding: .48rem .8rem;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  box-shadow: 0 8px 18px rgba(59, 130, 246, .22);
}
.spc-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(59, 130, 246, .28);
}
.spc-confirm:disabled {
  cursor: default;
  opacity: .55;
  transform: none;
  box-shadow: none;
}
.spc-confirm[hidden] {
  display: none;
}
.spc-clear {
  background: none;
  border: none;
  font-family: inherit;
  font-size: .78rem;
  font-weight: 600;
  color: #3b82f6;
  cursor: pointer;
  padding: .25rem .5rem;
  border-radius: .4rem;
  transition: background .15s;
}
.spc-clear:hover { background: var(--vitrine-surface-hover); }

/* ───────────────────────────────────────────────────────────────
   LOCATION LIST POPOVER — "Onde"
   ─────────────────────────────────────────────────────────────── */
/* Location display text */
.sp-loc-display {
  font-size: .84rem;
  color: #94a3b8;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-loc-display--filled { color: var(--vitrine-text); font-weight: 500; }

.sp-popover--loclist {
  min-width: 260px;
  max-height: 300px;
  overflow-y: auto;
  padding: .7rem 0;
}
.sp-popover--loclist .sp-pop-title { padding: 0 1rem; }
.spl-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.spl-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem 1.1rem;
  font-size: .84rem;
  color: var(--vitrine-text);
  cursor: pointer;
  transition: background .12s, color .12s;
  border-left: 3px solid transparent;
}
.spl-item:hover {
  background: var(--vitrine-surface-hover);
  border-left-color: #3b82f6;
  color: var(--vitrine-text);
}
.spl-item--active {
  background: var(--vitrine-surface-emphasis);
  border-left-color: #3b82f6;
  color: #2563eb;
  font-weight: 600;
}
.spl-item-icon {
  width: .95rem;
  height: .95rem;
  flex-shrink: 0;
  color: inherit;
}

/* ───────────────────────────────────────────────────────────────
   SPECIALTY LIST POPOVER
   ─────────────────────────────────────────────────────────────── */
.sp-popover--speclist {
  min-width: 280px;
  max-height: 340px;
  overflow-y: auto;
  padding: .7rem 0;
}
.sp-popover--speclist .sp-pop-title { padding: 0 1rem; }
.sps-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sps-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem 1.1rem;
  font-size: .84rem;
  color: var(--vitrine-text);
  cursor: pointer;
  transition: background .12s, color .12s;
  border-left: 3px solid transparent;
}
.sps-item:hover {
  background: var(--vitrine-surface-hover);
  border-left-color: #3b82f6;
  color: var(--vitrine-text);
}
.sps-item--active {
  background: var(--vitrine-surface-emphasis);
  border-left-color: #3b82f6;
  color: #2563eb;
  font-weight: 600;
}
.sps-item-icon {
  width: .95rem;
  height: .95rem;
  flex-shrink: 0;
  color: inherit;
}

/* ───────────────────────────────────────────────────────────────
   PRICE POPOVER
   ─────────────────────────────────────────────────────────────── */
.sp-popover--pricebox {
  min-width: 240px;
  padding: 1rem 1.15rem;
}
.spp-input-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .7rem;
}
.spp-prefix {
  font-size: .82rem;
  font-weight: 700;
  color: #64748b;
}
.spp-input {
  flex: 1;
  border: 1px solid var(--vitrine-border);
  border-radius: .55rem;
  padding: .42rem .6rem;
  font-size: .84rem;
  font-family: inherit;
  color: var(--vitrine-text);
  background: var(--vitrine-surface-muted);
  outline: none;
  transition: border-color .15s;
}
.spp-input:focus { border-color: #3b82f6; }
.spp-input::placeholder { color: #475569; }
.spp-presets {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.spp-pill {
  display: inline-flex;
  align-items: center;
  background: var(--vitrine-surface-muted);
  border: 1px solid var(--vitrine-border);
  border-radius: 99px;
  padding: .3rem .7rem;
  font-size: .74rem;
  font-weight: 600;
  color: var(--vitrine-muted);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s, color .15s;
}
.spp-pill:hover {
  background: var(--vitrine-surface-hover);
  border-color: var(--vitrine-border-strong);
  color: var(--vitrine-text);
}
.spp-pill--active,
.spp-pill--active:hover {
  background: var(--vitrine-surface-emphasis);
  border-color: #3b82f6;
  color: #2563eb;
}
.spp-pill--free {
  background: rgba(16,185,129,0.10);
  border-color: rgba(16,185,129,0.30);
  color: #10b981;
}
.spp-pill--free:hover {
  background: rgba(16,185,129,0.18);
}
.spp-pill--free.spp-pill--active {
  background: rgba(16,185,129,0.22);
  border-color: #10b981;
  color: #6ee7b7;
}

/* ─ Responsive ─ */
@media (max-width: 700px) {
  .sp-search-layout {
    flex-direction: column;
    align-items: stretch;
    gap: .55rem;
  }
  .sp-category-panel {
    width: 100%;
    border-radius: 1rem;
    padding: .62rem;
  }
  .search-pill {
    border-radius: 1.25rem;
    max-width: 100%;
  }
  .sp-top-categories {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    flex-direction: row;
  }
  .sp-top-pill {
    flex: 0 0 auto;
    width: auto;
    border-radius: 9999px;
    min-height: 36px;
  }
  .sp-field {
    flex: unset;
    width: 100%;
    border-radius: .8rem;
    padding: .55rem 1rem;
  }
  .sp-sep {
    width: calc(100% - 2rem);
    height: 1px;
    margin: 0 auto;
    align-self: center;
  }
  .sp-btn {
    width: calc(100% - 1rem);
    border-radius: .8rem;
    height: 44px;
    margin: .25rem .5rem .5rem;
  }
  .sp-popover {
    left: 0; right: 0;
    min-width: unset;
  }
  /* Calendar collapses to single month on mobile */
  .sp-popover--cal {
    min-width: unset;
    width: min(420px, calc(100vw - 2rem));
    transform: none;
    left: 0;
  }
  .sp-subfilters {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 0 .1rem .2rem;
  }
  .sp-subfilter-pill {
    flex: 0 0 auto;
  }
  .spc-grid-wrap {
    grid-template-columns: 1fr;
    gap: .8rem;
  }
  .spc-month:nth-child(2) {
    display: none;
  }
  .spc-months-title span:nth-child(2) {
    display: none;
  }
  .spc-tolerance {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: .15rem;
    scrollbar-width: none;
  }
  .spc-tolerance::-webkit-scrollbar { display: none; }
  .spc-tolerance-pill {
    flex: 0 0 auto;
  }
  .spc-months-title { gap: 1.5rem; }
}
/* Mobile collapse: pill becomes search icon */
@media (max-width: 480px) {
  .sp-hero { padding: 1rem 0 .35rem; }
  .search-pill { border-radius: 1rem; }
}

/* ── OUTER LAYOUT ──────────────────────────────────────────────── */
/* vitrine-wrap is now the left column inside .vitrine-outer */
.vitrine-wrap {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  /* max-width / margin / padding owned by .vitrine-outer */
}

/* ── HERO CAROUSEL ─────────────────────────────────────────────── */
.hero-carousel-section {
  padding: .8rem 0 0;
}

.hero-swiper {
  border-radius: 1.1rem;
  overflow: hidden;
  background: var(--bg2);
}

/* Slide shell */
.hi-slide {
  display: block;
  position: relative;
  width: 100%;
  height: 340px;
  text-decoration: none;
  color: #f8fafc;
  overflow: hidden;
}
@media (max-width: 640px) { .hi-slide { height: 210px; } }
@media (min-width: 1024px) { .hi-slide { height: 400px; } }

/* Background image */
.hi-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s ease;
  will-change: transform;
}
.hi-slide:hover .hi-bg { transform: scale(1.04); }

/* Gradient overlay: strong left, fade right */
.hi-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(
    to right,
    rgba(10, 14, 24, 0.94) 0%,
    rgba(10, 14, 24, 0.72) 55%,
    rgba(10, 14, 24, 0.22) 100%
  );
}

/* Content area */
.hi-content {
  position: absolute;
  bottom: 0; left: 0;
  padding: 1.75rem 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  max-width: 520px;
}
@media (max-width: 640px) {
  .hi-content { padding: 1rem 1.1rem; gap: .4rem; max-width: 85%; }
}

.hi-tag {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .22rem .6rem;
  border-radius: .35rem;
  width: fit-content;
}

.hi-title {
  font-size: clamp(1.05rem, 2.4vw, 1.6rem);
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff !important;
  text-shadow: 0 0 10px rgba(255,255,255,.20);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hi-doctor {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  color: #94a3b8;
}
@media (max-width: 480px) { .hi-doctor { display: none; } }

.hi-price {
  font-size: clamp(.95rem, 2vw, 1.3rem);
  font-weight: 800;
  color: #4ade80;
  letter-spacing: -.02em;
}

.hi-btn {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  background: var(--gradient-cta);
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  padding: .55rem 1.2rem;
  border-radius: .55rem;
  width: fit-content;
  box-shadow: 0 4px 18px rgba(59,130,246,.35);
  transition: opacity .2s, transform .2s;
}
.hi-slide:hover .hi-btn { opacity: .9; transform: translateY(-1px); }
@media (max-width: 480px) { .hi-btn { font-size: .72rem; padding: .42rem .9rem; } }

/* Clinic name badge (bottom-right) */
.hi-clinic-badge {
  position: absolute;
  bottom: 1rem; right: 1rem;
  display: flex;
  align-items: center;
  gap: .35rem;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,.08);
  color: var(--text-main, #1a202c);
  font-size: .67rem; font-weight: 600;
  padding: .28rem .65rem;
  border-radius: .4rem;
  max-width: 200px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 10px 24px rgba(15,23,42,.10);
}
[data-theme="dark"] .hi-clinic-badge {
  background: rgba(0,0,0,.55);
  border-color: rgba(255,255,255,.1);
  color: rgba(255,255,255,.75);
  box-shadow: none;
}
@media (max-width: 480px) { .hi-clinic-badge { display: none; } }

/* Swiper UI overrides */
.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next {
  width: 2.4rem; height: 2.4rem;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 50%;
  transition: background .2s;
  box-shadow: 0 10px 24px rgba(15,23,42,.10);
}
.hero-swiper .swiper-button-prev:hover,
.hero-swiper .swiper-button-next:hover {
  background: #ffffff;
}
.hero-swiper .swiper-button-prev::after,
.hero-swiper .swiper-button-next::after {
  font-size: .75rem; font-weight: 900;
  color: var(--text-main, #1a202c);
}
.hero-swiper .swiper-pagination-bullet {
  background: rgba(15,23,42,.18);
  transition: background .2s, transform .2s;
}
.hero-swiper .swiper-pagination-bullet-active {
  background: var(--primary);
  transform: scale(1.3);
}
[data-theme="dark"] .hero-swiper .swiper-button-prev,
[data-theme="dark"] .hero-swiper .swiper-button-next {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.18);
  box-shadow: none;
}
[data-theme="dark"] .hero-swiper .swiper-button-prev:hover,
[data-theme="dark"] .hero-swiper .swiper-button-next:hover {
  background: rgba(255,255,255,.22);
}
[data-theme="dark"] .hero-swiper .swiper-button-prev::after,
[data-theme="dark"] .hero-swiper .swiper-button-next::after {
  color: #fff;
}
[data-theme="dark"] .hero-swiper .swiper-pagination-bullet {
  background: rgba(255,255,255,.45);
}

/* ── SORT DROPDOWN ─ */
/* (sidebar CSS removed — no longer in template) */

/* ── MAIN CONTENT AREA (vitrine-wrap is now the main container) ─── */
/* .vitrine-main no longer used — vitrine-wrap handles the column layout */

/* Partners compact strip */
.partners-strip {
  display: flex;
  align-items: center;
  gap: .9rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: .85rem;
  padding: .6rem .9rem;
  overflow: hidden;
}
.partners-label {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .67rem; font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  white-space: nowrap;
  flex-shrink: 0;
}
.partners-scroll {
  display: flex;
  gap: .55rem;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.partners-scroll::-webkit-scrollbar { display: none; }
.partner-chip {
  display: flex;
  align-items: center;
  gap: .42rem;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: .55rem;
  padding: .3rem .6rem;
  text-decoration: none;
  color: var(--fg);
  flex-shrink: 0;
  transition: border-color .2s, background .2s;
}
.partner-chip:hover {
  border-color: rgba(59,130,246,.4);
  background: rgba(59,130,246,.06);
}
.partner-av {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59,130,246,.22), rgba(168,85,247,.18));
  display: flex; align-items: center; justify-content: center;
  font-size: .74rem; font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
}

/* Results header */
.vitrine-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.vitrine-count {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
}

/* ── VM CARD GRID ──────────────────────────────────────────────── */
.vm-grid {
  display: grid;
  grid-template-columns: 1fr;          /* xs: single column — readable on phone */
  gap: .75rem;
}
@media (min-width: 480px)  { .vm-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 640px)  { .vm-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .vm-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .vm-grid { grid-template-columns: repeat(5, 1fr); } }

/* ── VM CARD ───────────────────────────────────────────────────── */
.vm-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: .9rem;
  overflow: hidden;
  text-decoration: none;
  color: var(--fg);
  transition: border-color .22s, box-shadow .22s, transform .18s;
  position: relative;
}
.vm-card:hover {
  border-color: rgba(59,130,246,.55);
  box-shadow: 0 6px 32px rgba(59,130,246,.14), 0 1px 8px rgba(0,0,0,.4);
  transform: translateY(-3px);
}

/* Card image */
.vm-img-wrap {
  position: relative;
  aspect-ratio: 3/2;
  overflow: hidden;
  background: var(--bg2);
}
.vm-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .42s ease;
}
.vm-card:hover .vm-img { transform: scale(1.08); }

/* Floating badges */
.vm-badge-cat {
  position: absolute;
  top: .5rem; left: .5rem;
  background: rgba(255,255,255,.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(37,99,235,.22);
  color: #1d4ed8;
  font-size: .58rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: .18rem .48rem;
  border-radius: .3rem;
  max-width: 112px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 8px 20px rgba(15,23,42,.10);
}
[data-theme="dark"] .vm-badge-cat {
  background: rgba(10,12,20,.84);
  border-color: rgba(59,130,246,.35);
  color: var(--primary);
  box-shadow: none;
}
/* ── Type badges (Consulta / Exame / Pacote) ── */
.vm-badge-tipo {
  position: absolute;
  bottom: .5rem; left: .5rem;
  font-size: .6rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
  padding: .18rem .52rem;
  border-radius: .3rem;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.vm-badge-tipo--consulta {
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.24);
  color: #1d4ed8;
}
.vm-badge-tipo--exame {
  background: rgba(16,185,129,.12);
  border: 1px solid rgba(16,185,129,.24);
  color: #047857;
}
.vm-badge-tipo--pacote {
  background: rgba(168,85,247,.10);
  border: 1px solid rgba(168,85,247,.24);
  color: #7c3aed;
}
.vm-badge-status {
  position: absolute;
  top: .5rem; right: .5rem;
  background: rgba(16,185,129,.12);
  border: 1px solid rgba(16,185,129,.4);
  color: #047857;
  font-size: .56rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  padding: .18rem .44rem;
  border-radius: .3rem;
  display: flex;
  align-items: center;
  gap: .28rem;
}
/* Variant with pulse dot when slots are available */
.vm-badge-status--avail {
  background: rgba(16,185,129,.14);
  border-color: rgba(16,185,129,.60);
  color: #047857;
  text-transform: none;
  letter-spacing: 0;
  font-size: .6rem;
}
[data-theme="dark"] .vm-badge-tipo--consulta {
  background: rgba(59,130,246,.18);
  border-color: rgba(59,130,246,.35);
  color: #93c5fd;
}
[data-theme="dark"] .vm-badge-tipo--exame {
  background: rgba(16,185,129,.18);
  border-color: rgba(16,185,129,.35);
  color: #6ee7b7;
}
[data-theme="dark"] .vm-badge-tipo--pacote {
  background: rgba(168,85,247,.18);
  border-color: rgba(168,85,247,.35);
  color: #d8b4fe;
}
[data-theme="dark"] .vm-badge-status {
  background: rgba(16,185,129,.16);
  color: #4ade80;
}
[data-theme="dark"] .vm-badge-status--avail {
  background: rgba(16,185,129,.22);
  color: #6ee7b7;
}
.vm-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
  animation: vmPulse 1.8s ease-in-out infinite;
}
@keyframes vmPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .4; transform: scale(.65); }
}

/* Hover overlay with action button */
.vm-overlay {
  position: absolute; inset: 0;
  background: rgba(248,250,252,.56);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .2s;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.vm-card:hover .vm-overlay { opacity: 1; }
[data-theme="dark"] .vm-overlay {
  background: rgba(0,0,0,.46);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.vm-overlay-btn {
  width: 44px; height: 44px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transform: scale(.72);
  transition: transform .22s;
  box-shadow: 0 4px 16px rgba(59,130,246,.5);
}
.vm-card:hover .vm-overlay-btn { transform: scale(1); }

/* Card body */
.vm-body {
  padding: .9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .38rem;
  flex: 1;
}
.vm-clinic-row {
  display: flex;
  align-items: center;
  gap: .42rem;
}
.vm-av {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(94,92,230,.18), rgba(46,204,113,.12));
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; font-weight: 800;
  color: #5e5ce6;
  flex-shrink: 0;
}
.vm-clinic-nm {
  font-size: .7rem;
  color: var(--muted);
  font-weight: 500;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.vm-card-title {
  font-size: .92rem;              /* Airbnb: bold, readable title */
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s;
  color: var(--fg);
}
/* On phones allow a third line so nothing gets cut off */
@media (max-width: 479px) {
  .vm-card-title {
    -webkit-line-clamp: 3;
    line-clamp: 3;
    font-size: .95rem;
  }
}
.vm-card:hover .vm-card-title { color: var(--primary); }
.vm-doctor {
  display: flex;
  align-items: center;
  gap: .28rem;
  font-size: .68rem;
  color: var(--muted);
}

/* Card footer */
.vm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: .42rem;
  border-top: 1px solid var(--border);
}
.vm-price {
  font-size: .94rem;
  font-weight: 800;
  color: #2ecc71;   /* Brand green */
  letter-spacing: -.02em;
}
.vm-cta-hint {
  display: flex;
  align-items: center;
  gap: .26rem;
  font-size: .65rem; font-weight: 700;
  color: var(--primary);
  background: rgba(59,130,246,.1);
  border: 1px solid rgba(59,130,246,.2);
  border-radius: .32rem;
  padding: .22rem .48rem;
  transition: background .15s, border-color .15s;
}
.vm-card:hover .vm-cta-hint {
  background: rgba(59,130,246,.2);
  border-color: rgba(59,130,246,.45);
}

/* ── ACTIVE FILTER CHIPS ─────────────────────────────────────── */
.sp-active-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .1rem 0 .25rem;
}
.sp-filters-label {
  font-size: .68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-right: .15rem;
}
.sp-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  background: rgba(59,130,246,.10);
  border: 1px solid rgba(59,130,246,.25);
  color: #93c5fd;
  border-radius: 99px;
  padding: .25rem .65rem;
  font-size: .72rem;
  font-weight: 600;
}
.sp-fc-icon {
  width: .62rem;
  height: .62rem;
  flex-shrink: 0;
}
.sp-filter-clear {
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color .15s;
  margin-left: .2rem;
}
.sp-filter-clear:hover { color: var(--fg); }

/* Empty state */
.vm-empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted);
}

/* ── VITRINE + MAP TWO-COLUMN LAYOUT ────────────────────────────── */
.vitrine-outer {
  display: flex;
  gap: 1rem;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 1rem 5rem;
  align-items: flex-start;
}

/* Full-width mode: no map, grid takes entire width */
.vitrine-outer--full {
  display: block;
  max-width: 1600px;
}
.vitrine-outer--full .vitrine-wrap {
  max-width: 1600px;
  margin: 0 auto;
}
/* xs: 1 column; progressively wider as viewport grows */
.vitrine-outer--full .vm-grid {
  grid-template-columns: 1fr;
}
@media (min-width: 480px)  { .vitrine-outer--full .vm-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 640px)  { .vitrine-outer--full .vm-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .vitrine-outer--full .vm-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .vitrine-outer--full .vm-grid { grid-template-columns: repeat(5, 1fr); } }

/* Split-view mode (with map): fewer columns to leave room */
.vitrine-outer:not(.vitrine-outer--full) .vm-grid {
  grid-template-columns: repeat(1, 1fr);
}
@media (min-width: 640px)  { .vitrine-outer:not(.vitrine-outer--full) .vm-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .vitrine-outer:not(.vitrine-outer--full) .vm-grid { grid-template-columns: repeat(3, 1fr); } }

/* Main listings column — takes available space */
.vitrine-wrap {
  flex: 1;
  min-width: 0;
  max-width: none;   /* override old max-width */
  margin: 0;
  padding: 1rem 0 0;
}

/* Map column — sticky, 44% width */
.vm-map-col {
  flex: 0 0 44%;
  width: 44%;
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 84px);
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg2);
  z-index: 10;
}

.vm-map-header {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .9rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}

.vm-map-toggle {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: .35rem;
  color: var(--muted);
  cursor: pointer;
  padding: .15rem .3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.vm-map-toggle:hover { background: var(--secondary); color: var(--fg); }

#map {
  /* Explicit height so the map reads a non-zero offsetHeight at init time.
   * overflow:visible allows markers/popups to extend slightly beyond the pane. */
  height: 600px;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* ── Map loader / spinner ──
   The loader is a SIBLING of #vmMap inside .vm-map-col (position:relative).
   It overlays the entire map column body area.
*/
.vm-map-loader {
  position: absolute;
  /* sit below the header (header is ~2.2rem); cover the rest */
  top: 2.2rem;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  background: var(--bg2);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 500;
  pointer-events: none;
}
.vm-map-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid rgba(0,0,0,.12);
  border-top-color: #10b981;
  border-radius: 50%;
  animation: vm-spin .75s linear infinite;
}
@keyframes vm-spin {
  to { transform: rotate(360deg); }
}

/* ── Leaflet popup — glassmorphism card, no arrow, smooth entrance ── */
@keyframes mm-popup-in {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
.mm-leaflet-popup .leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow:
    0 20px 40px -8px rgba(0,0,0,0.14),
    0 6px 16px -4px rgba(0,0,0,0.07),
    0 2px 4px rgba(0,0,0,0.04);
  animation: mm-popup-in .3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.mm-leaflet-popup .leaflet-popup-content {
  margin: 0;
  width: auto !important;
}
/* Remove arrow tip entirely */
.mm-leaflet-popup .leaflet-popup-tip-container { display: none; }
.mm-leaflet-popup .leaflet-popup-close-button {
  top: 12px !important;
  right: 12px !important;
  width: 26px !important;
  height: 26px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #6b7280 !important;
  font-size: .72rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: #f3f4f6 !important;
  transition: background .15s ease, color .15s ease !important;
  touch-action: manipulation !important;
  position: absolute !important;
  z-index: 10 !important;
}
.mm-leaflet-popup .leaflet-popup-close-button::after {
  content: '';
  position: absolute;
  inset: -4px;
}
.mm-leaflet-popup .leaflet-popup-close-button:hover {
  color: #1a202c !important;
  background: #e5e7eb !important;
}

/* ── Leaflet divIcon wrapper — no default background/shadow ── */
.mm-leaflet-icon-wrap {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
  pointer-events: auto;
}

/* ── MedHora InfoWindow popup — horizontal Google-Maps-style card ── */
.mm-infowin {
  min-width: 300px;
  background: transparent;
  font-family: inherit;
  padding: 16px;
}

/* ── Top row: thumbnail + text column ── */
.mm-iw-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

/* Thumbnail — square with rounded corners */
.mm-iw-thumb-wrap {
  position: relative;
  flex-shrink: 0;
}
.mm-iw-thumb {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
/* Small medical badge overlay on thumb */
.mm-iw-thumb-badge {
  position: absolute;
  bottom: -5px;
  right: -5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #4f46e5;
  color: #ffffff;
  font-size: .6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(79,70,229,.35);
  line-height: 1;
}

/* Text column */
.mm-iw-texts {
  flex: 1;
  min-width: 0;
  padding-right: 28px; /* clearance for close button */
}
/* Service title */
.mm-iw-spec {
  font-size: 1rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 4px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Clinic name */
.mm-iw-name {
  font-size: .78rem;
  font-weight: 400;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Pills row ── */
.mm-iw-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.mm-iw-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #f3f4f6;
  border-radius: 9999px;
  font-size: .72rem;
  font-weight: 500;
  color: #374151;
  line-height: 1;
}
/* Availability pill — green tint */
.mm-iw-pill--avail {
  background: #ecfdf5;
  color: #065f46;
}
/* Green pulsing dot inside availability pill */
.mm-iw-avail-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
  animation: mm-dot-pulse 2s ease-in-out infinite;
}
@keyframes mm-dot-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .45; }
}

/* ── Action buttons row ── */
.mm-iw-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}
/* Primary CTA */
.mm-iw-btn-primary {
  flex: 1;
  display: block;
  padding: .55rem 1rem;
  background: #4f46e5;
  color: #ffffff;
  font-size: .82rem;
  font-weight: 700;
  border-radius: 9999px;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 4px 14px rgba(79,70,229,.30);
  transition: background .15s, transform .15s, box-shadow .15s;
  letter-spacing: .01em;
}
.mm-iw-btn-primary:hover {
  background: #4338ca;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79,70,229,.45);
}
/* Secondary icon button */
.mm-iw-btn-secondary {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 50%;
  color: #374151;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.mm-iw-btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #111827;
}

/* Hide map when toggled */
.vm-map-col.vm-map--hidden { display: none; }

/* ── Responsive: stack map below grid on small screens ─────────── */
@media (max-width: 900px) {
  .vitrine-outer {
    flex-direction: column;
  }
  .vitrine-outer--full {
    display: block;
  }
  .vm-map-col {
    flex: none;
    width: 100%;
    position: static;
    max-height: none;
  }
  #map {
    height: 300px;
  }
}

/* ── Airbnb 2.0 price badge — pill branca, micro-interações suaves ── */
@keyframes mm-badge-fadein {
  from { opacity: 0; transform: translateY(4px) scale(0.8); }
  to   { opacity: 1; transform: translateY(0)   scale(1);   }
}
.mm-price-badge {
  display: inline-block;
  position: relative;          /* centred on coordinate by Leaflet divIcon */
  background: #ffffff;
  color: #111827;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1;
  padding: 6px 12px;
  border-radius: 9999px;        /* fully rounded — pill shape */
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  white-space: nowrap;
  /* shadow-md equivalent */
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 0.10),
    0 2px 4px -2px rgb(0 0 0 / 0.10);
  cursor: pointer;
  user-select: none;
  /* animation-delay set per-badge in JS for stagger */
  animation: mm-badge-fadein 0.3s cubic-bezier(0.34, 1.4, 0.64, 1) both;
  /* 0.2s smooth transitions for all state changes */
  transition:
    transform      0.2s cubic-bezier(0.34, 1.4, 0.64, 1),
    box-shadow     0.2s ease,
    background     0.2s ease,
    color          0.2s ease,
    border-color   0.2s ease;
  z-index: 2;
}
/* Hover: lift 2px + shadow-lg — badge still white */
.mm-price-badge:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 15px -3px rgb(0 0 0 / 0.12),
    0  4px  6px -4px rgb(0 0 0 / 0.08);
  border-color: rgba(0, 0, 0, 0.14);
}
/* Active (clicked): dark background, white text — clearly selected */
.mm-price-badge--active {
  transform: translateY(-2px);
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow:
    0 10px 20px -4px rgba(37, 99, 235, 0.28),
    0  4px  6px -4px rgba(37, 99, 235, 0.18);
}
/* Exam badge variant — emerald tinted */
.mm-price-badge--exame {
  background: #ecfdf5;
  color: #065f46;
  border-color: rgba(16, 185, 129, 0.38);
  box-shadow:
    0 4px 6px -1px rgba(16, 185, 129, 0.18),
    0 2px 4px -2px rgba(16, 185, 129, 0.10);
}
.mm-price-badge--exame:hover {
  background: #d1fae5;
  border-color: rgba(16, 185, 129, 0.6);
}
.mm-price-badge--exame.mm-price-badge--active {
  background: #065f46;
  color: #ecfdf5;
  border-color: #065f46;
}
.mm-pin-tipo {
  display: block;
  font-size: .52rem; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase;
  opacity: .8; margin-bottom: 2px; line-height: 1;
}

/* ════════════════════════════════════════════════════════════════
   GPS / GEOLOCATION — Search pill + Map markers
   ════════════════════════════════════════════════════════════════ */

/* ── Crosshair GPS button inside "Onde" field ─────────────────── */
.sp-gps-btn {
  position: absolute;
  right: .65rem;
  bottom: .55rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #64748b;
  padding: .22rem;
  border-radius: .3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, background .15s;
  line-height: 1;
  z-index: 2;
  flex-shrink: 0;
}
.sp-gps-btn svg { width: .88rem; height: .88rem; }
.sp-gps-btn:hover { color: #3b82f6; background: rgba(59,130,246,.10); }
.sp-gps-btn--active { color: #3b82f6; }
.sp-gps-btn--loading { color: #3b82f6; animation: sp-gps-spin .75s linear infinite; }
@keyframes sp-gps-spin { to { transform: rotate(360deg); } }

/* ── GPS "Minha Localização" dropdown item ────────────────────── */
.spl-item--geo {
  border-bottom: 1px solid rgba(255,255,255,.07);
  margin-bottom: .25rem;
  padding-bottom: .4rem;
}
.spl-geo-status {
  font-size: .68rem;
  color: #3b82f6;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── GPS filter chip ──────────────────────────────────────────── */
.sp-filter-chip--gps {
  border-color: rgba(59,130,246,.35);
  color: #3b82f6;
}

/* ── Toast notification for geolocation errors ────────────────── */
.sp-geo-toast {
  position: fixed;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--vitrine-toast-bg);
  color: var(--vitrine-toast-text);
  font-size: .82rem;
  font-family: 'Inter', -apple-system, sans-serif;
  padding: .65rem 1.25rem;
  border-radius: .55rem;
  border: 1px solid var(--vitrine-border);
  box-shadow: 0 8px 24px rgba(15,23,42,.12);
  z-index: 9999;
  white-space: nowrap;
  animation: sp-toast-in .2s ease;
}
@keyframes sp-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0);   }
}

/* ================================================================
   LIGHT THEME OVERRIDES — Vitrine / Search
   ================================================================ */
[data-theme="light"] .search-pill {
  background: #ffffff;
  border-color: rgba(0,0,0,0.12);
  box-shadow: 0 2px 16px rgba(0,0,0,.09);
}
[data-theme="light"] .search-pill:hover {
  border-color: rgba(0,0,0,0.22);
}
[data-theme="light"] .sp-field:hover,
[data-theme="light"] .sp-field:focus-within,
[data-theme="light"] .sp-field.sp-field--open {
  background: #f1f5f9;
}
[data-theme="light"] .sp-input { color: #1e293b; }
[data-theme="light"] .sp-input::placeholder { color: #94a3b8; }
[data-theme="light"] .sp-label { color: #1e293b; }
[data-theme="light"] .sp-optional-badge { color: #94a3b8; }
[data-theme="light"] .sp-field--price .sp-label { color: #94a3b8; }
[data-theme="light"] .sp-sep { background: rgba(0,0,0,0.10); }
[data-theme="light"] .sp-date-display { color: #94a3b8; }
[data-theme="light"] .sp-date-display--filled { color: #1e293b; }
[data-theme="light"] .sp-loc-display { color: #94a3b8; }
[data-theme="light"] .sp-loc-display--filled { color: #1e293b; }

/* Search button (inside pill) */
[data-theme="light"] .sp-search-btn {
  background: linear-gradient(135deg, #2563eb, #4338ca);
  box-shadow: 0 2px 10px rgba(37,99,235,.35);
}

/* Popover overlays */
[data-theme="light"] .sp-popover {
  background: #ffffff;
  border-color: rgba(0,0,0,0.10);
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
}
[data-theme="light"] .sp-pop-title { color: #64748b; }
[data-theme="light"] .spl-item { color: #1e293b; }
[data-theme="light"] .spl-item:hover,
[data-theme="light"] .spl-item--active { background: #f1f5f9; }
[data-theme="light"] .sp-category-item { color: #1e293b; }
[data-theme="light"] .sp-category-item:hover,
[data-theme="light"] .sp-category-item--active { background: #f1f5f9; }
[data-theme="light"] .spc-nav { background: #f1f5f9; color: #1e293b; }
[data-theme="light"] .spc-nav:hover { background: #e2e8f0; }
[data-theme="light"] .spc-months-title { color: #1e293b; }
[data-theme="light"] .spc-day { color: #1e293b; }
[data-theme="light"] .spc-day:hover:not(.spc-day--disabled):not(.spc-day--selected) { background: #f1f5f9; }
[data-theme="light"] .spc-day--disabled { color: #cbd5e1; }
[data-theme="light"] .spc-clear { color: #64748b; }
[data-theme="light"] .spc-clear:hover { color: #1e293b; }
[data-theme="light"] .spc-tolerance-pill {
  background: #ffffff;
  border-color: #e5e7eb;
  color: #1e293b;
}
[data-theme="light"] .spc-tolerance-pill:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
[data-theme="light"] .spc-tolerance-pill--active {
  border-color: #111827;
  color: #111827;
  box-shadow: inset 0 0 0 1px #111827;
}

/* Filter chips */
[data-theme="light"] .sp-filter-chip {
  background: #ffffff;
  border-color: rgba(0,0,0,0.12);
  color: #1e293b;
}
[data-theme="light"] .sp-filter-chip:hover { background: #f1f5f9; }
[data-theme="light"] .sp-filter-chip--active { background: #eff6ff; border-color: #3b82f6; color: #2563eb; }

/* Spec dropdown inside popover */
[data-theme="light"] .sp-spec-list { background: #ffffff; border-color: rgba(0,0,0,0.10); }
[data-theme="light"] .sp-spec-item:hover,
[data-theme="light"] .sp-spec-item--active { background: #f1f5f9; }

/* Toast */
[data-theme="light"] .sp-geo-toast {
  background: #ffffff;
  color: var(--text-main, #1a202c);
}

/* ── Pulsing user location marker on the Leaflet map ──────────── */
.mm-user-location-wrap {
  background: transparent !important;
  border: none !important;
}
.mm-user-location-marker {
  position: relative;
  width: 20px;
  height: 20px;
}
.mm-user-location-dot {
  position: absolute;
  inset: 4px;
  background: #3b82f6;
  border-radius: 50%;
  border: 2.5px solid #ffffff;
  box-shadow: 0 1px 6px rgba(59,130,246,.65);
  z-index: 2;
}
.mm-user-location-pulse {
  position: absolute;
  inset: 0;
  background: rgba(59,130,246,.28);
  border-radius: 50%;
  animation: mm-gps-pulse 1.8s ease-out infinite;
  z-index: 1;
}
@keyframes mm-gps-pulse {
  0%   { transform: scale(.5);  opacity: 1; }
  100% { transform: scale(2.8); opacity: 0; }
}

/* ── Recenter map button (Leaflet control) ────────────────────── */
.mm-recenter-btn {
  background: #ffffff;
  border: 2px solid rgba(0,0,0,.15) !important;
  border-radius: .4rem !important;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 5px rgba(0,0,0,.18);
  transition: background .15s, box-shadow .15s;
  padding: 0;
  color: #374151;
  margin-top: .4rem;
}
.mm-recenter-btn:hover {
  background: #eff6ff;
  color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59,130,246,.25);
}

/* ── User location tooltip ────────────────────────────────────── */
.mm-user-tooltip.leaflet-tooltip {
  background: var(--vitrine-toast-bg);
  color: var(--vitrine-toast-text);
  border: none;
  border-radius: .4rem;
  font-size: .72rem;
  font-weight: 600;
  padding: .25rem .55rem;
  box-shadow: 0 8px 24px rgba(15,23,42,.12);
  white-space: nowrap;
}
.mm-user-tooltip.leaflet-tooltip::before {
  border-top-color: var(--vitrine-toast-bg);
}

/* ================================================================
   LIGHT THEME OVERRIDES — VM Service Cards & Related Components
   ================================================================ */

/* ── Service card image badges: ensure readability over light photos ── */
[data-theme="light"] .vm-badge-cat {
  background: rgba(255,255,255,0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-color: rgba(37,99,235,.35);
  color: #1d4ed8;
  text-shadow: none;
}
[data-theme="light"] .vm-badge-tipo--consulta {
  background: rgba(239,246,255,0.92);
  border-color: rgba(59,130,246,.5);
  color: #1d4ed8;
  text-shadow: none;
}
[data-theme="light"] .vm-badge-tipo--exame {
  background: rgba(236,253,245,0.92);
  border-color: rgba(16,185,129,.5);
  color: #065f46;
  text-shadow: none;
}
[data-theme="light"] .vm-badge-tipo--pacote {
  background: rgba(250,245,255,0.92);
  border-color: rgba(168,85,247,.5);
  color: #6b21a8;
  text-shadow: none;
}

/* ================================================================
   WELCOME CARD — VISUAL GUIDE POP-UP
   ================================================================ */

/* ── Keyframes ── */

/* Desktop: slides down from behind the search bar */
@keyframes wlcSlideDown {
  0%   { opacity: 0; transform: translateX(-50%) translateY(-20px) scale(.95); }
  60%  { opacity: 1; transform: translateX(-50%) translateY(5px)   scale(1.01); }
  80%  {             transform: translateX(-50%) translateY(-2px)  scale(.995); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0)     scale(1);    }
}

/* Mobile: slides up from behind the pill */
@keyframes wlcSlideUp {
  0%   { opacity: 0; transform: translateX(-50%) translateY(18px) scale(.95); }
  60%  { opacity: 1; transform: translateX(-50%) translateY(-4px) scale(1.01); }
  80%  {             transform: translateX(-50%) translateY(2px)  scale(.995); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0)    scale(1);    }
}

/* ── Card base ── */
.wlc-popup {
  display: none;
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 1.5rem;           /* rounded-3xl */
  box-shadow: 0 20px 50px rgba(0,0,0,.20), 0 6px 20px rgba(0,0,0,.08);
  padding: 1.4rem 1.5rem 1.25rem;  /* extra top room for arrow breathing */
  max-width: 420px;
  width: max-content;
  pointer-events: auto;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-align: center;
}

/* Brand-colored arrow pointing UP toward the search pill */
.wlc-popup::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-bottom: 14px solid rgba(139,92,246,.22); /* soft halo */
}
.wlc-popup::after {
  content: '';
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 13px solid #8b5cf6;  /* brand purple — visual pointer */
}

/* Visible state */
.wlc-popup--visible {
  display: block;
  animation: wlcSlideDown .6s cubic-bezier(.22,.68,0,1.15) forwards;
}

/* ── Badge ── */
.wlc-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: linear-gradient(90deg, rgba(59,130,246,.1), rgba(139,92,246,.12));
  border: 1px solid rgba(139,92,246,.28);
  border-radius: 50px;
  padding: .22rem .82rem;
  font-size: .7rem;
  font-weight: 700;
  color: #7c3aed;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: .72rem;
}

/* ── Title ── */
.wlc-title {
  margin: 0 0 .5rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
  padding: 0 1.2rem;  /* symmetric — clears X button on both sides */
}

/* ── Body ── */
.wlc-body {
  margin: 0;
  font-size: .875rem;
  line-height: 1.6;
  color: #475569;
  padding: 0 .5rem;
}

/* ── Close button ── */
.wlc-close {
  position: absolute;
  top: .7rem;
  right: .75rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: .2rem;
  line-height: 1;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  transition: background .15s, color .15s;
}
.wlc-close:hover {
  background: #f1f5f9;
  color: #1e293b;
}
.wlc-close svg { width: 14px; height: 14px; }

/* ── Dark theme ── */
[data-theme="dark"] .wlc-popup {
  background: #1e2a3b;
  border-color: rgba(255,255,255,.10);
  box-shadow: 0 20px 50px rgba(0,0,0,.50), 0 6px 20px rgba(0,0,0,.30);
}
[data-theme="dark"] .wlc-popup::after  { border-bottom-color: #a78bfa; }  /* lighter purple on dark bg */
[data-theme="dark"] .wlc-popup::before { border-bottom-color: rgba(167,139,250,.18); }
[data-theme="dark"] .wlc-title         { color: #f1f5f9; }
[data-theme="dark"] .wlc-body          { color: #94a3b8; }
[data-theme="dark"] .wlc-badge         { color: #a78bfa; border-color: rgba(167,139,250,.3); }
[data-theme="dark"] .wlc-close         { color: #64748b; }
[data-theme="dark"] .wlc-close:hover   { background: rgba(255,255,255,.08); color: #e2e8f0; }

/* ── Mobile: fixed at bottom of viewport, arrow points UP toward search ── */
@media (max-width: 700px) {
  .wlc-popup {
    position: fixed;
    top: auto;
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%) translateY(0);
    width: min(92vw, 380px);
    max-width: 92vw;
    /* no upward arrow — popup floats above kb */
  }
  .wlc-popup--visible {
    animation-name: wlcSlideUp;
  }
  /* Hide pseudo-arrows on fixed-bottom popup for cleaner look */
  .wlc-popup::before,
  .wlc-popup::after {
    display: none;
  }
  [data-theme="dark"] .wlc-popup::after,
  [data-theme="dark"] .wlc-popup::before { display: none; }
}
[data-theme="light"] .vm-badge-status {
  background: rgba(236,253,245,0.92);
  border-color: rgba(16,185,129,.5);
  color: #065f46;
}
[data-theme="light"] .vm-badge-status--avail {
  background: rgba(236,253,245,0.92);
  border-color: rgba(16,185,129,.65);
  color: #065f46;
}

/* ── Service card price: brand green on light backgrounds ── */
[data-theme="light"] .vm-price {
  color: #27ae60;  /* Slightly darker brand green for light bg */
}
[data-theme="light"] .vm-cta-hint {
  color: #5e5ce6;
}

/* ── Hero carousel slide: keep title high-contrast in all themes ── */
[data-theme="light"] .hi-title,
[data-theme="dark"] .hi-title {
  color: #ffffff !important;
}
[data-theme="light"] .hi-price {
  text-shadow: 0 2px 8px rgba(0,0,0,.55);
}
[data-theme="light"] .hi-tag {
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  background: rgba(30,41,59,0.65);
}
[data-theme="light"] .hi-gradient {
  background: linear-gradient(
    to right,
    rgba(10,14,24,0.94) 0%,
    rgba(10,14,24,0.72) 55%,
    rgba(10,14,24,0.22) 100%
  );
}

/* ── Map spinner: visible on light map background ── */
[data-theme="light"] .vm-map-spinner {
  border-color: rgba(0,0,0,.12);
  border-top-color: #10b981;
}

/* ── Active filter chips ── */
[data-theme="light"] .sp-filter-chip {
  background: #eff6ff;
  border-color: rgba(37,99,235,.35);
  color: #1d4ed8;
}

/* ── GPS popover item separator ── */
[data-theme="light"] .spl-item--geo {
  border-bottom-color: rgba(0,0,0,.07);
}

/* ── Spl / Sps items in light mode ── */
[data-theme="light"] .sps-item { color: #1e293b; }
[data-theme="light"] .sps-item:hover,
[data-theme="light"] .sps-item--active { background: #f1f5f9; }

/* ── Price popover inputs ── */
[data-theme="light"] .spp-input {
  background: #f8fafc;
  border-color: rgba(0,0,0,.12);
  color: #1e293b;
}
[data-theme="light"] .spp-input::placeholder { color: #94a3b8; }
[data-theme="light"] .spp-prefix { color: #64748b; }
[data-theme="light"] .spp-pill {
  background: #f1f5f9;
  border-color: rgba(0,0,0,.10);
  color: #475569;
}
[data-theme="light"] .spp-pill:hover {
  background: #e2e8f0;
  border-color: rgba(0,0,0,.18);
  color: #1e293b;
}
[data-theme="light"] .spp-pill--active,
[data-theme="light"] .spp-pill--active:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}
[data-theme="light"] .spc-footer {
  border-top-color: rgba(0,0,0,.08);
}
[data-theme="light"] .spc-clear:hover { background: #f1f5f9; }

/* ======================================================================
   MOBILE-FIRST SUPPLEMENTS — vitrine-specific responsive enhancements
   ====================================================================== */

/* Category bar: bigger tap targets on phone */
@media (max-width: 767px) {
  .category-item {
    padding: .6rem .9rem;
    font-size: .7rem;
    min-width: 64px;
  }
  .category-item i,
  .category-item svg { width: 1.2rem; height: 1.2rem; }
  .swiper-button-prev,
  .swiper-button-next { display: none !important; }
}

/* ── vitrine-outer: stack vertically on mobile ── */
@media (max-width: 767px) {
  .vitrine-outer {
    flex-direction: column;
    padding: 0 .75rem 3.5rem;
    gap: .5rem;
  }
  /* Map column full-width below listings */
  .vm-map-col {
    width: 100%;
    min-height: 260px;
  }
  #map { height: 260px !important; }
}

/* ── vitrine header row: wrap sort dropdown below count on xs ── */
@media (max-width: 479px) {
  .vitrine-hdr {
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
  }
  .vsb-select { width: 100% !important; }
}

/* ── Search pill: make fields full-height tappable on touch devices ── */
@media (max-width: 700px) {
  .sp-field {
    min-height: 52px;
    justify-content: center;
  }
  /* Search submit button must hit 48px */
  .sp-btn {
    height: 52px;
  }
  /* Active filter chips: larger pills */
  .sp-filter-chip {
    min-height: 36px;
    padding: .45rem .75rem;
    font-size: .78rem;
  }
  .sp-filter-clear {
    min-height: 36px;
    padding: .4rem .7rem;
  }
}

/* ── partners-strip: smooth horizontal scroll on mobile ── */
@media (max-width: 767px) {
  .partners-strip {
    padding: .6rem .75rem;
  }
  .partner-chip {
    min-width: 120px;
    padding: .55rem .7rem;
  }
}

/* ================================================================
   MOBILE-FIRST REDESIGN � Airbnb style
   Applied via media queries so desktop is untouched
   ================================================================ */

/* ----------------------------------------------------------------
   1. COLLAPSED SEARCH CAPSULE (mobile =767px)
      The 4-field desktop pill collapses to a single tappable row
   ---------------------------------------------------------------- */
@media (max-width: 767px) {
  .sp-category-panel {
    display: none;
  }
  /* Hero section: tighter vertical rhythm */
  .sp-hero {
    padding: 1rem 0 .5rem;
  }

  /* Collapse the multi-field pill into a single capsule button */
  .search-pill {
    flex-direction: row;
    align-items: center;
    max-width: 100%;
    border-radius: 9999px;
    padding: 0 .35rem 0 1rem;
    min-height: 56px;
    gap: 0;
    cursor: pointer;
    /* More prominent shadow on mobile */
    box-shadow: 0 4px 18px rgba(0,0,0,.13), 0 1px 4px rgba(0,0,0,.07);
  }

  /* Hide the individual fields on mobile */
  .sp-field, .sp-sep { display: none; }

  /* Show the collapsed ghost text instead */
  .sp-pill-ghost {
    display: flex !important; /* shown only on mobile */
    align-items: center;
    gap: .6rem;
    flex: 1;
    pointer-events: all;
    cursor: pointer;
  }
  .sp-pill-ghost-icon {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(94,92,230,.1);
    flex-shrink: 0;
  }
  .sp-pill-ghost-icon svg,
  .sp-pill-ghost-icon i { width: 1rem; height: 1rem; color: #5e5ce6; }
  .sp-pill-ghost-text { display: flex; flex-direction: column; gap: .06rem; }
  .sp-pill-ghost-main {
    font-size: .88rem; font-weight: 700; color: var(--vitrine-text); line-height: 1.2;
  }
  .sp-pill-ghost-sub {
    font-size: .7rem; color: var(--vitrine-muted); line-height: 1;
  }

  /* The submit button stays, right-aligned */
  .sp-btn {
    margin: .28rem .28rem .28rem .5rem;
    width: 44px; height: 44px;
  }
}

/* On very small screens (=479px) the pill is full-width with less padding */
@media (max-width: 479px) {
  .sp-hero .container {
    padding: 0 .75rem;
  }
}

/* ----------------------------------------------------------------
   2. VM CARD — Airbnb vertical card with large image on mobile
   ---------------------------------------------------------------- */
@media (max-width: 767px) {

  /* Vertical layout — full-width card, large top image, rounded-2xl */
  .vm-card {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    border-radius: 1.5rem;
    overflow: hidden;
  }

  /* Large top image — 4:3 fills card width */
  .vm-img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-width: unset;
    height: auto;
    border-radius: 0;
    overflow: hidden;
    flex-shrink: unset;
    position: relative;
  }

  .vm-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
  }

  /* Badges visible on the image */
  .vm-badge-cat  { display: block; top: .65rem; left: .65rem; }
  .vm-badge-tipo { display: block; bottom: .65rem; left: .65rem; }
  .vm-badge-status { display: flex; top: .65rem; right: .65rem; }

  /* Overlay: hidden — touch devices don't hover */
  .vm-overlay { display: none; }

  /* Card body */
  .vm-body {
    flex: 1;
    min-width: 0;
    padding: .75rem 1rem .9rem;
    gap: .28rem;
  }

  /* Clinic row */
  .vm-clinic-row { gap: .38rem; }
  .vm-av { width: 20px; height: 20px; font-size: .58rem; }
  .vm-clinic-nm { font-size: .7rem; }

  /* Service title — bold, 2 lines */
  .vm-card-title {
    font-size: .96rem;
    font-weight: 700;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    color: var(--fg);
  }
  [data-theme="dark"] .vm-card-title { color: #f0f0f0; }

  /* Doctor row */
  .vm-doctor { font-size: .68rem; }

  /* Footer: price left, Agendar pill right */
  .vm-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    border-top: 1px solid var(--border);
    padding-top: .45rem;
    margin-top: .2rem;
  }

  /* Price — bold brand green */
  .vm-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: #2ecc71;
    letter-spacing: -.01em;
  }
  [data-theme="light"] .vm-price { color: #27ae60; }

  /* Agendar pill */
  .vm-cta-hint {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .35rem .85rem;
    background: #5e5ce6;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    border-radius: 9999px;
    border: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(94,92,230,.35);
    transition: background .15s;
  }
  .vm-cta-hint:hover { background: #4b48d9; }
  .vm-cta-hint svg,
  .vm-cta-hint i { width: .68rem; height: .68rem; }

  /* Single-column grid */
  .vm-grid {
    grid-template-columns: 1fr !important;
    gap: .85rem !important;
  }
}

/* ----------------------------------------------------------------
   2b. Hero carousel — hidden on mobile (cards replace it)
   ---------------------------------------------------------------- */
@media (max-width: 767px) {
  .hero-carousel-section { display: none !important; }
}


/* ----------------------------------------------------------------
   3. WELCOME POPUP � completely hidden on mobile
   ---------------------------------------------------------------- */
@media (max-width: 767px) {
  .wlc-popup { display: none !important; }
}


/* ----------------------------------------------------------------
   4. MAP full-screen mode on mobile when search is active
   ---------------------------------------------------------------- */
@media (max-width: 767px) {
  /* Ensure the map column is always shown below listings on mobile */
  .vm-map-col {
    border-radius: 1.15rem;
    overflow: hidden;
  }

  /* Map-first fullscreen: flush to screen edges, height set by JS */
  .vm-map-col.vm-map-fullscreen {
    border-radius: 0 !important;
    margin-left: -1rem;
    margin-right: -1rem;
    width: calc(100% + 2rem);
  }
  .vm-map-col.vm-map-fullscreen .vm-map-header {
    border-radius: 0;
  }

  /* Map height on mobile: taller for usability */
  #map {
    height: 340px !important;
  }
}

/* ----------------------------------------------------------------
   5. MAP PRICE PINS � Airbnb white pill style
   ---------------------------------------------------------------- */
.mm-price-badge {
  display: inline-flex;
  align-items: center;
  gap: .18rem;
  padding: .3rem .65rem;
  background: #ffffff;
  color: #222222;
  font-size: .72rem;
  font-weight: 800;
  font-family: 'Inter', system-ui, sans-serif;
  border-radius: 9999px;
  border: 1.5px solid rgba(0,0,0,.12);
  box-shadow: 0 2px 8px rgba(0,0,0,.18), 0 1px 3px rgba(0,0,0,.1);
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s, transform .14s;
  /* Stack above tiles */
  z-index: 400;
  position: relative;
  /* Pop-out animation on first render */
  animation: mm-pin-pop .25s ease both;
}
@keyframes mm-pin-pop {
  from { transform: scale(.7); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* Tipo text inside the pin (now hidden � keeps price clean) */
.mm-pin-tipo { display: none; }

/* Exame variant: subtle green tint */
.mm-price-badge--exame {
  border-color: rgba(46,204,113,.35);
}

/* SELECTED state: turns brand blue */
.mm-price-badge--active {
  background: #5e5ce6;
  color: #ffffff;
  border-color: #5e5ce6;
  box-shadow: 0 4px 16px rgba(94,92,230,.50), 0 1px 4px rgba(0,0,0,.15);
  transform: scale(1.1);
  z-index: 500;
}

[data-theme="dark"] .mm-price-badge {
  background: #1c2030;
  color: #f0f0f0;
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 2px 10px rgba(0,0,0,.45);
}
[data-theme="dark"] .mm-price-badge--active {
  background: #5e5ce6;
  color: #fff;
  border-color: #5e5ce6;
}

/* -- MAP BOTTOM SHEET (mobile pin preview) -- */
.mbs-sheet {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 710;
  background: var(--card);
  border-radius: 1.35rem 1.35rem 0 0;
  padding: .55rem 1rem 1rem;
  box-shadow: 0 -6px 28px rgba(0,0,0,.13);
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.mbs-sheet[aria-hidden="false"] {
  transform: translateY(0);
}
.mbs-handle-bar {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 9999px;
  margin: 0 auto .65rem;
}
.mbs-row {
  display: flex; align-items: center; gap: .75rem;
}
.mbs-thumb {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
  background: var(--secondary);
}
.mbs-info {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .12rem;
}
.mbs-title {
  font-size: .88rem; font-weight: 800;
  color: var(--fg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 0;
}
.mbs-subtitle {
  font-size: .72rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 0;
}
.mbs-price {
  font-size: .92rem; font-weight: 800;
  color: #2ecc71; margin: .1rem 0 0;
}
.mbs-btn {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  padding: .6rem 1.1rem;
  background: #7c7aed;
  color: #fff;
  border-radius: 9999px;
  font-size: .82rem; font-weight: 800;
  text-decoration: none;
  transition: background .15s;
  min-height: 44px; white-space: nowrap;
}
.mbs-btn:hover { background: #5e5ce6; }
.mbs-scrim {
  display: none;
  position: fixed; inset: 0; z-index: 709;
  background: rgba(0,0,0,.42);
  /* Off by default — enabled only when bottom sheet is open */
  opacity: 0;
  pointer-events: none;
  transition: opacity .32s cubic-bezier(.4,0,.2,1);
}

@media (min-width: 768px) {
  .mbs-sheet, .mbs-scrim { display: none !important; }
}
@media (max-width: 767px) {
  .mbs-sheet { display: block; }
  .mbs-scrim { display: block; }
  /* Push sheet above the bottom nav */
  .mbs-sheet { bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* ================================================================
   ETAPA 1 — Featured section label & Floating Map Toggle
   ================================================================ */

/* "Primeiros Anunciados" label above the card grid (mobile only) */
.vm-featured-label {
  display: none; /* hidden on desktop */
}
@media (max-width: 767px) {
  .vm-featured-label {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .78rem;
    font-weight: 800;
    color: #5e5ce6;
    letter-spacing: .01em;
    padding: .6rem 0 .35rem;
  }
  .vm-featured-label i,
  .vm-featured-label svg { width: .9rem; height: .9rem; flex-shrink: 0; }
}

/* Floating Mapa/Lista pill toggle — center bottom, above bottom nav */
.vm-map-float-btn {
  display: none; /* hidden on desktop */
}
@media (max-width: 767px) {
  .vm-map-float-btn {
    display: flex;
    align-items: center;
    gap: .45rem;
    position: fixed;
    bottom: calc(72px + env(safe-area-inset-bottom) + .85rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 650;
    padding: .65rem 1.45rem;
    background: #222222;
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,.38), 0 1px 6px rgba(0,0,0,.16);
    white-space: nowrap;
    transition: background .18s, box-shadow .18s, transform .18s;
  }
  .vm-map-float-btn:hover {
    background: #111111;
    box-shadow: 0 6px 28px rgba(0,0,0,.45);
    transform: translateX(-50%) translateY(-2px);
  }
  .vm-map-float-btn:active {
    transform: translateX(-50%) scale(.96);
  }
  .vm-map-float-btn i,
  .vm-map-float-btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }
  /* "Lista" state: brand purple */
  .vm-map-float-btn--list {
    background: #5e5ce6;
    box-shadow: 0 4px 20px rgba(94,92,230,.45);
  }
  .vm-map-float-btn--list:hover {
    background: #4b48d9;
    box-shadow: 0 6px 28px rgba(94,92,230,.55);
  }
}

/* ================================================================
   MOBILE UX CONSOLIDATION
   Keeps older responsive rules, but settles the final phone behavior.
   ================================================================ */
@media (max-width: 767px) {
  .vitrine-outer {
    padding: 0 .75rem 5rem;
    gap: .75rem;
  }

  .search-pill {
    touch-action: manipulation;
  }

  .sp-pill-ghost-text {
    min-width: 0;
  }

  .sp-pill-ghost-main,
  .sp-pill-ghost-sub {
    max-width: calc(100vw - 8.25rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sp-subfilters,
  .sp-active-filters {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-left: -.75rem;
    margin-right: -.75rem;
    padding-left: .75rem;
    padding-right: .75rem;
    padding-bottom: .25rem;
    scrollbar-width: none;
  }

  .sp-subfilters::-webkit-scrollbar,
  .sp-active-filters::-webkit-scrollbar {
    display: none;
  }

  .sp-subfilter-pill,
  .sp-filter-chip,
  .sp-filter-clear {
    flex: 0 0 auto;
  }

  .vm-card {
    border-radius: 1.1rem;
  }

  .vm-grid {
    gap: 1rem !important;
  }

  .vm-footer {
    min-height: 42px;
  }

  .vm-map-col {
    border-radius: 1rem;
    min-height: 340px;
  }

  .vm-map-col.vm-map-fullscreen {
    margin-left: -.75rem;
    margin-right: -.75rem;
    width: calc(100% + 1.5rem);
    border-left: 0;
    border-right: 0;
  }

  .vm-map-float-btn {
    min-height: 48px;
  }

  .mbs-row {
    align-items: flex-start;
  }

  .mbs-btn {
    padding-left: .85rem;
    padding-right: .85rem;
  }
}
