/* ===== ServiçoJá — HTML5/CSS3/JS ===== */
/* Cores: #a8d963 (lime) e #9463d9 (purple) */

:root {
  --brand-lime: #a8d963;
  --brand-lime-soft: #e8f5d3;
  --brand-purple: #9463d9;
  --brand-purple-soft: #f0e6fa;
  --brand-purple-foreground: #ffffff;
  --brand-ink: #2d2d2d;

  --bg: #f9f9f7;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #666666;
  --border: #e5e5e5;
  --shadow: rgba(0, 0, 0, 0.06);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 36px;
  --radius-2xl: 50px;

  --max-width: 1440px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: url('./img/fundofa.png') var(--bg);
  color: var(--text);
  line-height: 1.5;
}

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

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

button, input, select { font: inherit; }

/* ===== Ticker de anúncios ===== */
.ticker {
  height: 30px;
  background: var(--brand-purple);
  color: var(--brand-purple-foreground);
  overflow: hidden;
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  padding-left: 100%;
  animation: ticker-scroll 30s linear infinite;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.ticker-item::before {
  content: "★";
  color: var(--brand-lime);
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.btn:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-primary {
  background: var(--brand-purple);
  color: var(--brand-purple-foreground);
}

.btn-lime {
  background: var(--brand-lime);
  color: var(--brand-purple);
}

.btn-outline {
  background: transparent;
  color: var(--brand-purple);
  border: 2px solid var(--brand-purple);
}

.btn-sm { padding: 8px 14px; font-size: 13px; }

.logo {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.logo-purple { color: var(--brand-purple); }
.logo-lime { color: var(--brand-lime); }

.search-box {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-box input {
  width: 100%;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 0 16px 0 40px;
  font-size: 14px;
  outline: none;
}

.search-box input:focus {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 3px rgba(148, 99, 217, 0.15);
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  width: 16px;
  height: 16px;
}

.btn-signup-top {
  display: none;
}

@media (min-width: 768px) {
  .btn-signup-top {
    display: inline-flex;
  }
}

/* ===== Drawer ===== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 320px;
  max-width: 85vw;
  background: var(--brand-purple);
  color: var(--brand-purple-foreground);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
}

.drawer-overlay.open .drawer {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  flex-shrink: 0;
}

.drawer-header span {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.drawer-close {
  background: none;
  border: none;
  color: var(--brand-purple-foreground);
  cursor: pointer;
  padding: 4px;
}

.drawer-search {
  position: relative;
  padding: 0 16px;
  flex-shrink: 0;
}

.drawer-search svg {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand-purple);
  width: 16px;
  height: 16px;
}

.drawer-search input {
  width: 100%;
  height: 42px;
  border-radius: 999px;
  border: none;
  padding: 0 16px 0 40px;
  font-size: 14px;
  outline: none;
}

.drawer-signup {
  padding: 12px 16px;
  flex-shrink: 0;
}

.drawer-signup .btn {
  width: 100%;
}

.drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 24px;
}

.drawer-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
  transition: background 0.2s;
}

.drawer-nav a:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Links de Serviços de Emergência dentro do drawer: vermelho puro sobre o fundo lilás
   ficava difícil de ler — texto branco com uma faixa vermelha bem clara por trás. */
.drawer-nav a.drawer-emergencia {
  color: #fff;
  background: rgba(255, 90, 90, 0.28);
  font-weight: 600;
}
.drawer-nav a.drawer-emergencia:hover {
  background: rgba(255, 90, 90, 0.42);
}

/* ===== Layout ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

main { padding-bottom: 40px; }

.section-title {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.section-title h2 {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.3px;
  margin: 0;
  white-space: nowrap;
}

.section-title .bar {
  height: 6px;
  flex: 1;
  border-radius: 999px;
  background: var(--brand-lime-soft);
  margin-bottom: 6px;
}

/* ===== Carousel ===== */
.hero-carousel {
  background: var(--brand-purple);
  color: var(--brand-purple-foreground);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  position: relative;
  margin-top: 24px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-out;
}

.carousel-slide {
  width: 100%;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 24px;
  padding: 32px;
}

@media (min-width: 768px) {
  .carousel-slide {
    grid-template-columns: 1fr 1fr;
    padding: 48px 56px;
  }
}

.carousel-slide .eyebrow {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--brand-lime);
  margin: 0 0 8px;
}

.carousel-slide h2 {
  font-size: 26px;
  line-height: 1.15;
  margin: 0 0 12px;
}

@media (min-width: 768px) {
  .carousel-slide h2 { font-size: 38px; }
}

.carousel-slide p {
  font-size: 15px;
  opacity: 0.92;
  margin: 0 0 10px;
}

.carousel-slide .slide-type {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.8;
  margin: 0 0 20px;
}

.carousel-slide img {
  width: 100%;
  height: 176px;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

@media (min-width: 768px) {
  .carousel-slide img { height: 208px; }
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.85);
  color: var(--brand-purple);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.carousel-btn.prev { left: 16px; }
.carousel-btn.next { right: 16px; }

.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s, background 0.2s;
}

.carousel-dot.active {
  width: 24px;
  border-radius: 999px;
  background: var(--brand-lime);
}

/* ===== Cards ===== */
.grid-section { padding: 28px 0; }

.grid-section + .grid-section { border-top: 1px solid var(--border); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.services-grid + .services-grid { margin-top: 16px; }

@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .services-grid { grid-template-columns: repeat(6, 1fr); }
}

.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.service-card .thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--brand-purple-soft);
}

.service-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.service-card:hover .thumb img { transform: scale(1.05); }

.service-card .body {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.distance {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-purple);
  display: flex;
  align-items: center;
  gap: 4px;
}

.distance svg { width: 13px; height: 13px; }

.star-rating {
  display: flex;
  align-items: center;
  gap: 6px;
}

.star-rating .stars {
  display: flex;
  gap: 2px;
}

.star-rating svg {
  width: 14px;
  height: 14px;
}

.star-rating .filled { fill: var(--brand-lime); color: var(--brand-lime); }
.star-rating .empty { fill: #e2e2e2; color: #e2e2e2; }

.star-rating .score {
  font-size: 12px;
  font-weight: 700;
}

.star-rating .reviews {
  font-size: 12px;
  color: var(--muted);
}

.service-card h3 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}

.service-card .desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.card-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
}

.card-actions .details-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-purple);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.card-actions .details-link:hover { text-decoration: underline; }

/* ===== Ads ===== */
.ads-section {
  margin: 32px 0;
}

.ads-grid {
  display: grid;
  gap: 16px;
}

.ads-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.ads-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.ads-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1023px) {
  .ads-grid.cols-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 639px) {
  .ads-grid.cols-6, .ads-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .ads-grid.cols-2 { grid-template-columns: 1fr; }
}

.ad-card {
  position: relative;
  display: block;
  background: var(--brand-purple);
  color: var(--brand-purple-foreground);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 170px;
  text-decoration: none;
  isolation: isolate;
}

.ad-card .ad-photo {
  width: 100%;
  height: 100%;
  min-height: 170px;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.ad-card:hover .ad-photo { transform: scale(1.06); }

.ad-card .ad-label {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--brand-lime);
  color: var(--brand-purple);
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
}

.ad-card .ad-overlay {
  position: absolute;
  inset: auto 0 0 0;
  background: rgba(148, 99, 217, 0.92);
  backdrop-filter: blur(3px);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.ad-card:hover .ad-overlay,
.ad-card:focus-visible .ad-overlay {
  transform: translateY(0);
  opacity: 1;
}

.ad-card .ad-title {
  font-size: 14px;
  font-weight: 800;
}

.ad-card .ad-desc {
  font-size: 11px;
  line-height: 1.4;
  opacity: 0.95;
}

.ad-card .ad-cta {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  background: var(--brand-lime);
  color: var(--brand-purple);
  padding: 6px 12px;
  border-radius: 999px;
}

@media (hover: none) {
  .ad-card .ad-overlay { transform: translateY(0); opacity: 1; }
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.modal-header {
  padding: 20px 20px 0;
}

.modal-header h3 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
}

.modal-header p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.modal img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  margin-top: 16px;
}

.modal-body {
  padding: 16px 20px 20px;
}

.modal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-price {
  font-size: 22px;
  font-weight: 900;
  color: var(--brand-purple);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Service detail page ===== */
.detail-main { padding-top: 24px; }

.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.breadcrumb a { color: var(--brand-purple); }
.breadcrumb a:hover { text-decoration: underline; }

.detail-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .detail-grid { grid-template-columns: 96px 1fr 360px; }
}

.thumbs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
}

@media (min-width: 1024px) {
  .thumbs {
    flex-direction: column;
    overflow-x: visible;
  }
}

.thumbs button {
  width: 96px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  background: var(--brand-purple-soft);
  opacity: 0.7;
  transition: opacity 0.2s, border-color 0.2s;
}

.thumbs button.active {
  opacity: 1;
  border-color: var(--brand-purple);
}

.thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.main-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--brand-purple-soft);
}

.main-image {
  line-height: 0;
  font-size: 0;
  align-self: start;
}

.main-image img,
.main-image iframe {
  display: block;
  width: 100%;
  height: 300px;
  border: 0;
  object-fit: cover;
}

@media (min-width: 768px) {
  .main-image img,
  .main-image iframe { height: 460px; }
}

.thumbs button { position: relative; }

.thumbs button.is-video .thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(148, 99, 217, 0.45);
  color: #fff;
  font-size: 20px;
}

.detail-info {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 2px 8px var(--shadow);
}

.detail-info h1 {
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 4px;
}

.detail-info .category {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-purple);
  margin-bottom: 16px;
}

.detail-info .description {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.detail-info .price {
  font-size: 28px;
  font-weight: 900;
  color: var(--brand-purple);
  margin-bottom: 12px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-purple);
  margin-top: 10px;
}

.social-link:hover { text-decoration: underline; }

.social-link svg { width: 18px; height: 18px; }

/* ===== Cadastro ===== */
.form-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 2px 8px var(--shadow);
}

.form-card h1 {
  font-size: 28px;
  font-weight: 900;
  margin: 0 0 8px;
}

.form-card .subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  background: var(--bg);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 3px rgba(148, 99, 217, 0.15);
}

.form-error {
  font-size: 12px;
  color: #d32f2f;
  margin-top: 4px;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--brand-purple);
  color: var(--brand-purple-foreground);
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 16px;
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .footer-inner { grid-template-columns: repeat(4, 1fr); }
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 16px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li { margin-bottom: 8px; }

.footer-col a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--brand-lime); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  padding: 20px 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

/* ===== Helpers ===== */
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.w-full { width: 100%; }

@media (min-width: 640px) {
  .sm-cols-2 { grid-template-columns: repeat(2, 1fr); }
}


/* ===== Página de buscas ===== */
.search-row {
  display: flex;
  flex: 1;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.search-row .search-box { flex: 1 1 200px; }
.btn-geo { white-space: nowrap; }
.search-title {
  margin: 14px 0 2px;
  font-size: 26px;
  font-weight: 800;
  color: var(--brand-purple);
}
.search-count {
  margin: 0 0 14px;
  font-size: 14px;
  color: #6b7280;
}
@media (max-width: 640px) {
  .btn-geo { width: 100%; justify-content: center; }
}


/* ===== Login / Admin ===== */
.auth-wrap {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 18px 40px rgba(148, 99, 217, 0.12);
}
.auth-card h1 { margin: 0 0 6px; font-size: 24px; color: var(--brand-purple); }
.auth-card .subtitle { margin: 0 0 22px; color: #6b7280; font-size: 14px; }
.auth-hint {
  margin-top: 16px;
  font-size: 13px;
  background: var(--brand-purple-soft, #f4edfd);
  color: var(--brand-purple);
  padding: 10px 12px;
  border-radius: 12px;
}
.admin-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 18px;
}
.admin-head h1 { font-size: 24px; margin: 0; color: var(--brand-purple); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (min-width: 900px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card {
  background: var(--brand-purple);
  color: #fff;
  border-radius: 18px;
  padding: 18px;
}
.stat-card .label { font-size: 13px; opacity: 0.85; }
.stat-card .value { font-size: 28px; font-weight: 800; margin-top: 4px; }
.stat-card.lime { background: var(--brand-lime); color: #2b2b2b; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.admin-toolbar input, .admin-toolbar select {
  height: 42px; border: 1px solid var(--border); border-radius: 999px;
  padding: 0 16px; font-size: 14px; background: #fff; min-width: 200px; flex: 1;
}
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 18px; background: #fff; }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
table.admin-table th {
  text-align: left; padding: 12px 14px; background: var(--brand-purple); color: #fff; font-weight: 600;
}
table.admin-table td { padding: 12px 14px; border-top: 1px solid var(--border); }
table.admin-table tr:hover td { background: #faf7ff; }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--brand-lime); color: #2b2b2b;
}
.badge.muted { background: #eee; color: #666; }

/* ===== Admin tabs + área do anunciante ===== */
.admin-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border);
  margin: 8px 0 20px;
  flex-wrap: wrap;
}

.admin-tab {
  border: none;
  background: transparent;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  color: #6b7280;
  cursor: pointer;
  border-radius: 12px 12px 0 0;
  margin-bottom: -2px;
  border-bottom: 3px solid transparent;
}

.admin-tab:hover { color: var(--brand-purple); background: var(--brand-purple-soft); }
.admin-tab.active { color: var(--brand-purple); border-bottom-color: var(--brand-purple); }

.adv-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }

.adv-aside {
  background: var(--brand-purple);
  border-radius: 18px;
  padding: 18px 14px;
  color: #fff;
  position: sticky;
  top: 90px;
}

.adv-aside-head { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; opacity: .8; margin-bottom: 12px; }
.adv-aside nav { display: flex; flex-direction: column; gap: 6px; }

.adv-aside nav a {
  color: #fff;
  text-decoration: none;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

.adv-aside nav a:hover { background: rgba(255,255,255,.16); }
.adv-aside nav a.active { background: var(--brand-lime); color: var(--brand-purple); }

.adv-aside-toggle { display: none; }
.adv-aside-overlay { display: none; }

.adv-panel { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 22px; margin-top: 20px; }
.adv-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.adv-panel-head h2 { margin: 0; font-size: 20px; color: var(--brand-purple); }

.adv-edit-link { color: var(--brand-purple); font-weight: 800; text-decoration: underline; font-size: 14px; }

.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }

.form-group textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: var(--bg);
  resize: vertical;
}

.form-group input[readonly], .form-group textarea[readonly] { background: #f4f4f6; color: #555; }

.adv-saved { margin-left: 12px; color: #2e7d32; font-weight: 700; font-size: 14px; }

.adv-reviews { display: grid; gap: 12px; }
.adv-review { border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.adv-review-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.adv-review p { margin: 8px 0 4px; font-size: 14px; }
.adv-review small { color: #6b7280; }

@media (max-width: 900px) {
  .adv-layout { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .adv-aside-toggle { display: inline-flex; margin-bottom: 12px; }
  .adv-aside {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 260px;
    border-radius: 0;
    z-index: 1200;
    transform: translateX(-100%);
    transition: transform .28s ease;
    overflow-y: auto;
  }
  .adv-aside.open { transform: translateX(0); }
  .adv-aside-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s ease;
    z-index: 1100;
  }
  .adv-aside-overlay.open { opacity: 1; pointer-events: auto; }
}

.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; background: #f3f0fb; padding: 6px; border-radius: 999px; }
.auth-tabs .auth-tab { flex: 1; text-align: center; padding: 10px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--brand-purple); text-decoration: none; transition: background .2s, color .2s; }
.auth-tabs .auth-tab.active { background: var(--brand-purple); color: #fff; }

/* ===== Logotipo ===== */
.logo { display: flex; align-items: center; }
.logo-img { height: 34px; width: auto; display: block; }
.footer-bottom { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.footer-logo { height: 34px; width: auto; opacity: 0.95; }

/* ===== Botões verdes ===== */
.btn-green {
  background: var(--brand-lime);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.btn-green:hover { background: #97c94f; }

/* ===== Cidade no card ===== */
.service-card .city,
.service-list-item .city {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-purple);
}

/* ===== Menu hambúrguer mobile (direita) ===== */
.mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: var(--brand-purple);
  color: #fff;
  cursor: pointer;
}
.mobile-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.mobile-panel-overlay.open { opacity: 1; visibility: visible; }
.mobile-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 300px;
  max-width: 85vw;
  background: var(--brand-purple);
  color: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
}
.mobile-panel-overlay.open .mobile-panel { transform: translateX(0); }
.mobile-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 14px;
}
.mobile-panel-head button { background: none; border: none; color: #fff; cursor: pointer; }
.mobile-panel-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px 24px;
  overflow-y: auto;
}
.mobile-panel-body .search-box { flex: none; width: 100%; }
.mobile-panel-body .btn { width: 100%; justify-content: center; }
@media (min-width: 1100px) {
  .mobile-menu-btn { display: none; }
}
@media (max-width: 1099px) {
  .site-header .search-row { display: none; }
  .site-header .btn-signup-top { display: none; }
  .site-header .header-inner { flex-wrap: nowrap; }
  .site-header .mobile-menu-btn { margin-left: auto; }
}

/* ===== Barra de filtros da busca ===== */
.busca-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 16px;
}
.busca-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}
.busca-toolbar select {
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0 14px;
  background: #fff;
  font-size: 14px;
  color: var(--brand-purple);
  font-weight: 600;
}
.busca-toolbar .search-count { margin: 0; }
.view-switch {
  display: inline-flex;
  border: 1px solid var(--brand-purple);
  border-radius: 999px;
  overflow: hidden;
}
.view-switch button {
  border: none;
  background: #fff;
  color: var(--brand-purple);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.view-switch button.active { background: var(--brand-purple); color: #fff; }

/* ===== Visualização em lista ===== */
.services-list { display: flex; flex-direction: column; gap: 12px; }
.service-list-item {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 14px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
}
.service-list-item img { width: 140px; height: 100px; object-fit: cover; border-radius: 12px; }
.service-list-item h3 { margin: 0 0 4px; font-size: 16px; }
.sli-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sli-provider { margin: 4px 0 0; font-size: 13px; color: #6b7280; }
.sli-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.sli-actions .details-link {
  background: none;
  border: none;
  color: var(--brand-purple);
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
}
@media (max-width: 700px) {
  .service-list-item { grid-template-columns: 1fr; }
  .service-list-item img { width: 100%; height: 160px; }
  .sli-actions { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ===== Visualização em mapa ===== */
.busca-map-layout {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  align-items: start;
}
.map-side-list {
  grid-column: span 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.map-panel {
  grid-column: span 3;
  position: sticky;
  top: 90px;
}
.gmap {
  width: 100%;
  height: 620px;
  border-radius: 18px;
  overflow: hidden;
  background: #eef0f4;
  border: 1px solid var(--border);
}
.map-fallback {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  height: 100%;
  padding: 24px;
  text-align: center;
  color: var(--brand-purple);
}
.map-fallback p { color: #6b7280; font-size: 14px; margin: 0; }
.gmap .maplibregl-popup-content, .gmap .maptiler-popup-content { border-radius: 12px; padding: 12px; }
.map-popup { display: flex; gap: 10px; max-width: 280px; }
.map-popup img { width: 74px; height: 74px; object-fit: cover; border-radius: 10px; }
.map-popup strong { display: block; font-size: 14px; }
.map-popup .mp-name { font-size: 13px; color: #374151; }
.map-popup .mp-phone { font-size: 13px; font-weight: 700; color: var(--brand-purple); }
.map-popup .mp-city { font-size: 12px; color: #6b7280; }
.map-popup a { display: inline-block; margin-top: 6px; font-weight: 700; color: var(--brand-purple); }
@media (max-width: 1023px) {
  .busca-map-layout { grid-template-columns: 1fr; }
  .map-side-list { grid-column: auto; grid-template-columns: repeat(2, 1fr); }
  .map-panel { grid-column: auto; position: static; }
  .gmap { height: 420px; }
}

/* ===== Ads carousel (anúncios do topo) ===== */
.ads-carousel { position: relative; }
.ads-carousel .ads-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.ads-carousel .ads-viewport::-webkit-scrollbar { display: none; }
.ads-carousel .ads-track {
  display: flex;
  gap: 16px;
}
.ads-carousel .ads-track .ad-card {
  flex: 0 0 calc((100% - 16px * 5) / 6);
  scroll-snap-align: start;
}
.ads-carousel .ads-nav {
  position: absolute;
  top: calc(50% - 14px);
  transform: translateY(-50%);
  z-index: 3;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: var(--brand-purple);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
.ads-carousel .ads-nav.prev { left: -12px; }
.ads-carousel .ads-nav.next { right: -12px; }
.ads-carousel .ads-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}
.ads-carousel .ads-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(148, 99, 217, .3);
  cursor: pointer;
}
.ads-carousel .ads-dot.active { width: 22px; background: var(--brand-lime); }

@media (max-width: 1023px) {
  .ads-carousel .ads-track .ad-card { flex: 0 0 calc((100% - 16px * 2) / 3); }
}
@media (max-width: 639px) {
  .ads-carousel .ads-track .ad-card { flex: 0 0 calc((100% - 16px) / 2); }
  .ads-carousel .ads-nav.prev { left: 0; }
  .ads-carousel .ads-nav.next { right: 0; }
}


/* ===== Ajustes v14: fotos de anúncios e tags ===== */
.ads-grid.cols-3 .ad-card,
.ads-grid.cols-3 .ad-card .ad-photo { min-height: 132px; }
.ads-grid.cols-3 .ad-card .ad-photo { height: 132px; }
.ads-grid.cols-6 .ad-card,
.ads-grid.cols-6 .ad-card .ad-photo { min-height: 150px; }
.ads-grid.cols-6 .ad-card .ad-photo { height: 150px; }
.ads-carousel .ads-track .ad-card,
.ads-carousel .ads-track .ad-card .ad-photo { min-height: 150px; }
.ads-carousel .ads-track .ad-card .ad-photo { height: 150px; }

.ad-card .ad-label {
  /*background: #fdf3c4;*/
  background:#fdfbd4;
  color: #000;
  border: 1px solid #f2e39a;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.ad-label{
  font-family:arial, Arial, Helvetica, sans-serif !important;
  font-weight:bold;
}

/* =====================================================================
   Extensões ServiçoJá (PHP/MVC) — mantém 100% de compatibilidade com o
   CSS original acima; apenas adiciona o que não existia.
   ===================================================================== */

/* Nos anúncios do tipo "3 colunas" (o maior dos três tipos de grade — grid.cols-2, já que
   menos cards por linha = cada um mais largo) a tarjinha amarela vai para a direita, pois
   à esquerda ela atrapalha a leitura do texto nesse formato mais largo. */
.ads-grid.cols-2 .ad-card .ad-label {
  left: auto;
  right: 10px;
}

/* Em todos os anúncios (grade e carrossel) o botão "Ver oferta" não aparece mais: o card
   inteiro já é um link clicável, então o botão era redundante. Sem ele, a faixa lilás cobre
   o card inteiro (não só o rodapé) e o texto desce, ficando ancorado embaixo — mais legível
   e usa melhor o espaço. */
.ad-card .ad-cta { display: none; }
.ad-card .ad-overlay {
  inset: 0;
  justify-content: flex-end;
}

/* Cards de avaliação na página do serviço (substituem o formulário público de antes) */
.review-cards { display: flex; flex-direction: column; gap: 12px; max-width: 520px; margin-top: 16px; }
.review-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.review-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.review-card-stars { color: var(--brand-lime); font-size: 14px; letter-spacing: 1px; }
.review-card-text { margin: 8px 0 0; color: #444; font-size: 14px; line-height: 1.5; }
.review-card-date { display: block; margin-top: 8px; font-size: 12px; color: #999; }

/* Alerta de Serviços de Emergência — mesmas proporções do hero-carousel, em vermelho (estilo bootstrap-danger) */
.emergency-alert {
  background: #dc3545;
  color: #fff;
  border-radius: var(--radius-2xl, 20px);
  overflow: hidden;
  position: relative;
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 24px;
  padding: 32px;
}
@media (min-width: 768px) {
  .emergency-alert { grid-template-columns: 1fr 1fr; padding: 48px 56px; }
}
.emergency-alert .eyebrow {
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px;
  color: #ffe1e1; margin: 0 0 8px;
}
.emergency-alert h1 { font-size: 26px; line-height: 1.15; margin: 0 0 12px; color: #fff; }
@media (min-width: 768px) { .emergency-alert h1 { font-size: 38px; } }
.emergency-alert h2 { font-size: 16px; font-weight: 600; opacity: 0.95; margin: 0 0 20px; color: #fff; }
.emergency-alert .emergency-photos {
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
}
.emergency-alert .emergency-icon {
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 84px;
}
.emergency-alert .emergency-icon .icon-badge {
  width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.4); display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.emergency-alert .emergency-icon span.label {
  font-size: 11px; font-weight: 700; color: #fff; text-align: center; line-height: 1.2;
}
.emergency-alert .btn-emergency {
  background: #fff; color: #dc3545; font-weight: 700; padding: 12px 24px; border-radius: 999px;
  display: inline-flex; text-decoration: none; border: none; cursor: pointer;
}
.emergency-alert .btn-emergency:hover { background: #ffe1e1; }
.ad-card .ad-city {
  font-size: 11px;
  opacity: 0.9;
  font-weight: 600;
  letter-spacing: .2px;
}

/* Cards de autenticação (login/esqueci senha/redefinir senha): faixa lilás no topo */
.auth-card { border-top: 3px solid var(--brand-purple); }

/* Mensagem de erro/sucesso nas telas de auth: lilás semi-transparente (reaproveita .auth-hint) */
.auth-hint-error {
  background: rgba(148, 99, 217, 0.12);
  color: #6b3fb0;
  border: 1px solid rgba(148, 99, 217, 0.25);
}

/* Select de categoria pesquisável (painel admin) — estilo "DataTables via Ajax" */
.cat-select-wrap { position: relative; min-width: 240px; flex: 1; }
.cat-select-trigger {
  width: 100%; height: 42px; border: 1px solid var(--border); border-radius: 999px;
  padding: 0 16px; font-size: 14px; background: #fff; text-align: left; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; color: #333;
}
.cat-select-trigger::after { content: '▾'; color: #999; margin-left: 8px; }
.cat-select-trigger:hover { border-color: var(--brand-purple); }
.cat-select-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 80;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.12); display: none; overflow: hidden;
}
.cat-select-dropdown.open { display: block; }
.cat-select-dropdown input {
  width: 100%; border: none; border-bottom: 1px solid var(--border); padding: 12px 16px;
  font-size: 14px; outline: none;
}
.cat-select-options { max-height: 280px; overflow-y: auto; }
.cat-select-option { padding: 10px 16px; font-size: 14px; cursor: pointer; color: #333; }
.cat-select-option:hover { background: var(--brand-purple-soft); }
.cat-select-option.active { color: var(--brand-purple); font-weight: 700; background: var(--brand-purple-soft); }

/* Destaque vermelho bem clarinho para tudo que é ligado a emergência: linhas da tabela
   de serviços no admin, opções de categoria de emergência no dropdown pesquisável, e
   <option> nativas de <select> (suportado na maioria dos navegadores). */
.linha-emergencia, .cat-select-option.opcao-emergencia, option.opcao-emergencia {
  background: #fdecec;
}
.linha-emergencia:hover { background: #fbdada; }
.cat-select-option.opcao-emergencia:hover { background: #fbdada; }
.cat-select-option.opcao-emergencia.active { background: #f7c6c6; color: #b02a2a; }

/* Upload de fotos do anúncio/serviço — botão único + nome do arquivo em lilás translúcido */
.photo-upload-field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.photo-upload-btn {
  background: var(--brand-purple); color: #fff; border: none; border-radius: 999px;
  padding: 10px 20px; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.photo-upload-btn:hover { background: #7f4fc9; }
.photo-upload-filename {
  background: rgba(148, 99, 217, 0.10); color: var(--brand-purple); border-radius: 10px;
  padding: 8px 14px; font-size: 13px; font-weight: 600; flex: 1; min-width: 120px;
}
.photo-upload-input { display: none; }
.photo-upload-preview { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.photo-upload-preview img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }

/* Cards de plano (Mensal/Anual) da página de cadastro */
.pricing-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 780px; margin: 0 auto; }
@media (max-width: 700px) { .pricing-cards { grid-template-columns: 1fr; } }
.pricing-card {
  background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--brand-purple);
  border-radius: 22px; padding: 32px 28px; text-align: center;
  box-shadow: 0 18px 40px rgba(148, 99, 217, 0.10); display: flex; flex-direction: column;
}
.pricing-card .crowns { display: flex; justify-content: center; align-items: flex-end; gap: 8px; margin-bottom: 14px; }
.pricing-card .crowns img { height: 70px; width: auto; }
.pricing-card h2 { color: var(--brand-purple); font-size: 22px; margin: 0 0 4px; }
.pricing-card .pricing-badge {
  display: inline-block; background: var(--brand-lime); color: #2b2b2b; font-size: 12px; font-weight: 800;
  padding: 4px 14px; border-radius: 999px; margin-bottom: 18px;
}
.pricing-card ul { list-style: none; padding: 0; margin: 0 0 20px; text-align: left; flex: 1; }
.pricing-card ul li {
  font-size: 14px; color: #333; padding: 9px 0; border-bottom: 1px solid #f1eef9;
  display: flex; align-items: flex-start; gap: 8px;
}
.pricing-card ul li:last-child { border-bottom: none; }
.pricing-card ul li::before { content: '✓'; color: var(--brand-purple); font-weight: 800; flex-shrink: 0; }
.pricing-card .pricing-price { margin-bottom: 20px; }
.pricing-card .pricing-price .old { text-decoration: line-through; color: #ccc; font-size: 16px; margin-right: 6px; }
.pricing-card .pricing-price .new { color: var(--brand-purple); font-size: 30px; font-weight: 800; }
.pricing-card .pricing-price .new .period { font-size: 14px; font-weight: 600; color: #6b7280; }
.pricing-card .btn { width: 100%; }

/* Estado "clicável e selecionado" — usado no seletor de plano da tela de renovação
   (payment_pending.blade.php), onde os cards não têm botão, o card inteiro é o clique. */
.pricing-card[role="button"] { cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s; }
.pricing-card[role="button"].selecionada {
  border-color: var(--brand-purple); border-width: 2px;
  box-shadow: 0 0 0 3px rgba(148, 99, 217, 0.15), 0 18px 40px rgba(148, 99, 217, 0.10);
}

/* Sanfona (accordion) da página de pagamento */
.payment-accordion { max-width: 620px; margin: 0 auto; }
.accordion-item { border: 1px solid var(--border); border-radius: 14px; margin-bottom: 12px; overflow: hidden; background: #fff; }
.accordion-header {
  padding: 18px 22px; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  font-weight: 700; color: var(--brand-purple); font-size: 16px; user-select: none;
}
.accordion-header.active { background: var(--brand-purple-soft); }
.accordion-header .chevron { transition: transform .25s ease; color: var(--brand-purple); }
.accordion-header.active .chevron { transform: rotate(180deg); }
.accordion-body { display: none; padding: 0 22px 22px; border-top: 1px solid var(--border); }
.payment-summary {
  background: var(--brand-purple-soft); border-radius: 14px; padding: 16px 20px;
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}
.payment-summary .label { font-size: 13px; color: #6b7280; }
.payment-summary .value { font-size: 24px; font-weight: 800; color: var(--brand-purple); }
.pix-qr-box { width: 180px; height: 180px; margin: 16px auto; border-radius: 8px;
  background: repeating-linear-gradient(45deg, #1f1440, #1f1440 6px, #fff 6px, #fff 12px); }

/* Campos seguros do Checkout Transparente (Mercado Pago) — o SDK monta um iframe dentro
   destes containers; o CSS aqui só cuida da moldura visível, o conteúdo interno é do SDK. */
.mp-secure-field {
  height: 42px; border: 1px solid var(--border); border-radius: 999px;
  padding: 0 16px; display: flex; align-items: center; background: #fff;
}
.mp-secure-field.focused { border-color: var(--brand-purple); box-shadow: 0 0 0 3px rgba(148, 99, 217, 0.15); }
.mp-secure-field.error { border-color: #dc3545; }
.pix-code-box {
  background: #f7f6fb; border: 1px dashed var(--border); border-radius: 8px; padding: 10px;
  font-size: 12px; word-break: break-all; margin-bottom: 12px;
}
.boleto-result { background: #f7f6fb; border-radius: 10px; padding: 16px; margin-top: 16px; display: none; }
.payment-status-ok { display: none; text-align: center; padding: 20px; }
.payment-status-ok .icon { font-size: 40px; margin-bottom: 8px; }

/* Autocomplete AJAX (jQuery) do campo de busca */
.search-box select {
  width: 100%; height: 42px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card); padding: 0 16px 0 40px; font-size: 14px; outline: none;
  appearance: none; -webkit-appearance: none; cursor: pointer;
}
.search-box select:focus {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 3px rgba(148, 99, 217, 0.15);
}
.search-box { position: relative; }
.autocomplete-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1px solid #e2e2e2; border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0,0,0,.12); z-index: 60; overflow: hidden;
  max-height: 320px; overflow-y: auto; display: none;
}
.autocomplete-list.open { display: block; }
.autocomplete-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  cursor: pointer; font-size: 14px; color: #222;
}
.autocomplete-item:hover, .autocomplete-item.active { background: #f4f2ff; }
.autocomplete-item .tag {
  font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #eee; color: #666;
}
.autocomplete-empty { padding: 12px 14px; font-size: 13px; color: #888; }

/* Google Places suggestion dropdown (o próprio widget do Google já estiliza,
   isso apenas garante que ele não fique atrás de outros elementos do layout) */
.pac-container { z-index: 9999 !important; }

/* Scroll infinito: sentinela e spinner de carregamento */
.infinite-scroll-sentinel { height: 1px; }
.infinite-scroll-loading {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 24px 0; color: #7a7a7a; font-size: 14px;
}
.infinite-scroll-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid #e4e4e4; border-top-color: #7c5cff;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.infinite-scroll-end { text-align: center; padding: 18px 0; color: #999; font-size: 13px; }

/* Painel (Anunciante/Admin) */
.panel-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 70vh; }
.panel-sidebar { background: #1f1440; color: #fff; padding: 24px 0; }
.panel-sidebar .panel-brand { padding: 0 20px 20px; font-weight: 700; font-size: 18px; }
.panel-nav a {
  display: flex; align-items: center; gap: 10px; padding: 12px 20px;
  color: #d8d0ff; text-decoration: none; font-size: 14px; border-left: 3px solid transparent;
}
.panel-nav a:hover, .panel-nav a.active { background: rgba(255,255,255,.08); color: #fff; border-left-color: #baff29; }
.panel-content { padding: 28px; background: #f7f6fb; }
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.panel-card { background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 6px 20px rgba(20,10,60,.06); margin-bottom: 20px; }
.panel-table { width: 100%; border-collapse: collapse; }
.panel-table th, .panel-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eee; font-size: 14px; }
.panel-table th { color: #777; font-weight: 600; font-size: 12px; text-transform: uppercase; }
.status-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.status-pill.ativo, .status-pill.aprovado { background: #e5f9e5; color: #1e8e1e; }
.status-pill.pausado, .status-pill.pendente { background: #fff4d6; color: #a06a00; }
.status-pill.removido, .status-pill.bloqueado { background: #fde3e3; color: #b3261e; }

.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tab-btn {
  padding: 8px 16px; border-radius: 999px; border: 1px solid #ddd; background: #fff;
  cursor: pointer; font-size: 13px; font-weight: 600; color: #555;
}
.tab-btn.active { background: #7c5cff; border-color: #7c5cff; color: #fff; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #333; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; font-family: inherit;
}
.form-field .hint { font-size: 12px; color: #999; margin-top: 4px; }
.form-field .char-count { font-size: 12px; color: #999; text-align: right; margin-top: 2px; }
.form-field .char-count.warn { color: #c0392b; }
.form-error { color: #c0392b; font-size: 13px; margin-top: 4px; }
.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.alert-success { background: #e5f9e5; color: #1e6b1e; }
.alert-error { background: #fde3e3; color: #a3261e; }

.ad-preview-wrap { display: flex; justify-content: center; padding: 20px; background: #f1eef9; border-radius: 12px; margin-bottom: 16px; }

@media (max-width: 860px) {
  .panel-shell { grid-template-columns: 1fr; }
  .panel-sidebar { display: flex; overflow-x: auto; padding: 12px; }
  .panel-nav { display: flex; }
  .form-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   Tema de Serviços de Emergência — aplicado via classe .theme-emergency
   na página de busca. Sobrescreve as variáveis de cor lilás para vermelho;
   como praticamente todo o CSS acima usa var(--brand-purple), o tema se
   propaga automaticamente. Só os poucos rgba() fixos precisam de override.
   ===================================================================== */
.theme-emergency {
  --brand-purple: #dc3545;
  --brand-purple-soft: #fde3e3;
}
.theme-emergency .search-box input:focus,
.theme-emergency .search-box select:focus,
.theme-emergency .form-group input:focus,
.theme-emergency .form-group select:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}
.theme-emergency .ad-card .ad-overlay { background: rgba(220, 53, 69, 0.92); }
.theme-emergency .thumbs button.is-video .thumb-play { background: rgba(220, 53, 69, 0.45); }
.theme-emergency .auth-card { box-shadow: 0 18px 40px rgba(220, 53, 69, 0.12); }
.theme-emergency .ads-carousel .ads-dot { background: rgba(220, 53, 69, .3); }

/* Selo "Emergência" nos cards, exibido apenas no tema vermelho */
.emergency-badge {
  display: inline-block; background: #dc3545; color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 10px; border-radius: 999px; margin-bottom: 6px;
}

/* Popup bloqueante de localização (Serviços de Emergência) */
.emergency-location-overlay {
  position: fixed; inset: 0; background: rgba(20, 5, 5, 0.55); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.emergency-location-overlay.open { display: flex; }
.emergency-location-modal {
  background: #fff; border-radius: 20px; max-width: 440px; width: 100%;
  padding: 32px; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.3);
}
.emergency-location-modal h2 { color: #dc3545; margin: 8px 0 6px; font-size: 22px; }
.emergency-location-modal p { color: #666; font-size: 14px; margin: 0 0 20px; }
.emergency-location-modal .search-box { margin-bottom: 14px; text-align: left; }
.emergency-location-modal .divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: #999; font-size: 12px; }
.emergency-location-modal .divider::before, .emergency-location-modal .divider::after { content: ''; flex: 1; height: 1px; background: #eee; }
.emergency-location-modal .btn-emergency-share {
  background: #dc3545; color: #fff; border: none; border-radius: 999px; padding: 12px 20px;
  font-weight: 700; width: 100%; cursor: pointer;
}
.emergency-location-modal .btn-emergency-share:hover { background: #c82333; }
.emergency-location-modal .emergency-erro { color: #dc3545; font-size: 13px; margin-top: 10px; min-height: 18px; }
