/* ===== Banner ===== */
.spv-banner img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  display: block;
}

/* ===== Layout base ===== */
.spv {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 24px 16px;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

@media (min-width:1200px) {
  .spv {
    padding: 40px 70px;
    max-width: 2000px;
  }
}

/* ===== Head (card + mapa) ===== */
.spv-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: stretch; /* card y mapa misma altura */
}

/* Por defecto (móvil / tablet): se apilan al 100% */
.spv-head .spv-card,
.spv-head .spv-map {
  flex: 1 1 100%;
  max-width: 100%;
}

/* En escritorio: 60% card / 40% mapa en una sola fila */
@media (min-width:1024px) {
  .spv-head {
    flex-wrap: nowrap;
    gap: 22px;
  }

  .spv-head .spv-card {
    flex: 0 0 60%;
    max-width: 60%;
  }

  .spv-head .spv-map {
    flex: 0 0 40%;
    max-width: 40%;
  }
}

/* Sin mapa: card ocupa todo el ancho */
.spv--nomap .spv-head .spv-card {
  flex: 1 1 100%;
  max-width: 100%;
}

/* ===== Card proveedor ===== */
.spv-card {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .05);
  position: relative;
  z-index: 10;
}

.spv-logo {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  background: #f9f9f9;
  border: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.spv-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.spv-info {
  flex: 1 1 240px;
  min-width: 240px;
}

.spv-title {
  margin: 0 0 .45rem;
  font-size: 1.6rem;
  line-height: 1.15;
  color: #111;
}

.spv-desc {
  color: #555;
  line-height: 1.6;
  margin: .3rem 0 .6rem;
}

/* Summary descripción (plegable con mismo look que spv-card, debajo de head) */
.spv-summary {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .05);
  position: relative;
  z-index: 10;
  padding: 0;
  margin-top: 12px;
}

.spv-summary summary {
  cursor: pointer;
  padding: 12px 16px;
  list-style: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}

.spv-summary summary::-webkit-details-marker {
  display: none;
}

.spv-summary summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid #777;
  border-bottom: 2px solid #777;
  transform: rotate(45deg);
  transition: transform .2s ease;
  flex-shrink: 0;
  margin-left: 10px;
}

.spv-summary[open] summary::after {
  transform: rotate(-135deg);
}

.spv-summary .spv-desc {
  padding: 0 16px 16px;
  margin-top: 4px;
}

.spv-contact {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  margin-top: .35rem;
  color: #444;
}

.spv-contact__item {
  display: flex;
  gap: .5rem;
  align-items: baseline;
}

.spv-contact__item i {
  color: #888;
  width: 18px;
  text-align: center;
}

.spv-contact__item a {
  color: #6a7a69;
  text-decoration: none;
}

.spv-contact__item a:hover {
  text-decoration: underline;
}

/* Socials */
.spv-socials {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: .7rem;
}

.spv-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #eee;
  color: #333;
  text-decoration: none;
  font-size: 16px;
  transition: background .2s ease, color .2s ease;
}

.spv-socials a:hover {
  background: #6a7a69;
  color: #fff;
}

/* Mapa */
.spv-map {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  height: auto;
  display: flex;
}

.spv-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 174px;
}

/* ===== Main ===== */
.spv-main {
  margin-top: 16px;
}

.spv-main__head {
  margin-bottom: 10px;
}

/* Más espacio entre bloque superior y título “Servicios de…” */
.spv-main__title {
  margin: 26px 0 10px;
  font-size: 1.4rem;
  line-height: 1.2;
}

/* ===== Toolbar ===== */
.spv-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
}

/* 1) Orden: primero el formulario de orden */
.spv-toolbar .spv-sortbar {
  order: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.spv-toolbar .spv-sortbar__select {
  min-width: 180px;
}

/* 2) Form de filtros (categoría + buscar + botón) */
.spv-toolbar .service-page-form {
  order: 1;
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  flex: 1 1 auto;
  margin-bottom: 0;
}

/* Categoría: primero dentro del form */
.spv-toolbar .service-page-form__select {
  order: 1;
  flex: 1 1 180px;
  min-width: 160px;
  max-width: 260px;
  padding: .6rem .9rem;
  border: 1px solid #dcdcdc;
  border-radius: 999px;
  background: #fff;
  font-size: 1rem;
  transition: border-color .12s ease, box-shadow .12s ease;
}

/* Buscar servicios: después del select, más grande */
.spv-toolbar .service-page-form__input {
  order: 2;
  flex: 2 1 260px;
  min-width: 220px;
  padding: .6rem .9rem;
  border: 1px solid #dcdcdc;
  border-radius: 999px;
  background: #fff;
  font-size: 1rem;
  transition: border-color .12s ease, box-shadow .12s ease;
}

.spv-toolbar .service-page-form__input:focus,
.spv-toolbar .service-page-form__select:focus {
  outline: 2px solid rgba(0, 0, 0, .12);
  border-color: #bcbcbc;
}

/* Botón: último, pegado a la derecha */
.spv-toolbar .svc-btn.service-page-form__button {
  order: 3;
  padding: .65rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  flex: 0 0 auto;
  margin-left: auto;
}

/* Select de orden común */
.spv-select {
  width: 100%;
  max-width: 240px;
  padding: .6rem .9rem;
  border: 1px solid #dcdcdc;
  border-radius: 999px;
  background: #fff;
  font-size: 1rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  background-size: 12px 8px;
  transition: border-color .12s ease, box-shadow .12s ease;
}

.spv-select:focus {
  outline: 2px solid rgba(0, 0, 0, .12);
  border-color: #bcbcbc;
}

.spv-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Responsive toolbar */
@media (max-width: 900px) {
  .spv-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .spv-toolbar .spv-sortbar,
  .spv-toolbar .service-page-form {
    width: 100%;
  }

  .spv-toolbar .service-page-form__input,
  .spv-toolbar .service-page-form__select {
    flex: 1 1 100%;
    min-width: 0;
  }

  .spv-toolbar .svc-btn.service-page-form__button {
    margin-left: 0;
  }
}

/* Chips */
.svc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 14px;
}

.svc-chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .42rem .68rem .42rem .78rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .06);
  background: #c6b194;
  color: #fff;
  text-decoration: none;
  font-size: .92rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  transition: filter .12s ease;
}

.svc-chip:hover {
  filter: brightness(.98);
}

.svc-chip__x {
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  font-weight: 700;
}

/* ===== Grid de servicios ===== */
.spv-grid {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

@media (min-width:700px) {
  .spv-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (min-width:1024px) {
  .spv-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
  }
}

.svc-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: visible;
}

.svc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
  border-color: #e6e6e6;
}

.svc-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #f6f6f6 center/cover no-repeat;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

.svc-card__cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  text-indent: -9999px;
}

.svc-card__title {
  margin: 10px 14px 6px;
  font-size: 1rem;
  line-height: 1.25;
  text-align: center;
}

.svc-card__titlelink {
  color: inherit;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.svc-card__titlelink:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Botón */
.svc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .65rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform .06s ease, box-shadow .12s ease, filter .12s ease;
}

.svc-btn:active {
  transform: translateY(1px);
}

.svc-btn--block {
  width: calc(100% - 28px);
  margin: 12px 14px 16px;
}

.svc-btn--primary {
  background: #748573;
  color: #fff;
  border-color: #6a7a69;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}

.svc-btn--primary:hover {
  filter: brightness(.97);
}

/* Paginación */
.svc-pagination {
  margin-top: 18px;
  text-align: center;
}

.svc-pagination .page-numbers {
  display: inline-block;
  margin: 0 4px;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  transition: background .12s ease, border-color .12s ease;
}

.svc-pagination .current {
  background: #748573;
  color: #fff;
  border-color: #6a7a69;
}

/* Empty */
.svc-empty {
  margin-top: 12px;
  color: #666;
}

/* Focus visible */
.svc-btn:focus-visible,
.spv-select:focus-visible,
.svc-card a:focus-visible {
  outline: 3px solid rgba(116, 133, 115, .35);
  outline-offset: 2px;
  border-radius: 12px;
}

/* Precio en cards */
.svc-card__price {
  text-align: center;
  padding: 0 10px 12px;
  font-size: 14px;
  line-height: 1.25;
  color: #000;
}

.svc-card__price .now {
  font-weight: 700;
}

.svc-card__price .was {
  margin-right: 8px;
  text-decoration: line-through;
  opacity: .7;
  font-weight: 500;
}

/* ===== Override fancy-select-wrap solo aquí ===== */
body[data-fancy-form-rcs="1"] .spv .fancy-select-wrap {
  padding-top: 0 !important;
}
