/* === Layout base === */
.svc-archive {
  padding: 32px 24px;
}

@media (min-width: 1200px) {
  .svc-archive {
    padding: 40px 70px;
  }
}

.svc-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 2000px;
  margin: 0 auto;
}

/* === Sidebar / Filtros === */
.svc-sidebar {
  order: 1;
}

.svc-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .03);
}

.svc-filters__block {
  /* border: 1px solid #eee; */
  /* border-radius: 12px; */
  /* padding: 6px 10px; */
  /* background: #fff; */
  /* transition: box-shadow .15s ease, border-color .15s ease; */
}

.svc-filters__block[open] {
  /* box-shadow: 0 4px 14px rgba(0, 0, 0, .05); */
  /* border-color: #e6e6e6; */
}

.svc-filters__title {
  position: relative;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  padding: 8px 24px 8px 0;
  user-select: none;
}

.svc-filters__title::-webkit-details-marker {
  display: none;
}

.svc-filters__title::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  width: 12px;
  height: 8px;
  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-size: 12px 8px;
  background-repeat: no-repeat;
  transition: transform .15s ease;
}

.svc-filters__block[open] .svc-filters__title::after {
  transform: translateY(-50%) rotate(180deg);
}

.svc-input,
.svc-select {
  width: 100%;
  padding: .6rem .9rem;
  border: 1px solid #dcdcdc;
  border-radius: 999px;
  background: #fff;
  font-size: 1rem;
  transition: border-color .12s ease, box-shadow .12s ease;
}

.svc-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-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;
}

.svc-input:focus,
.svc-select:focus {
  outline: 2px solid rgba(0, 0, 0, .12);
  outline-offset: 1px;
  border-color: #bcbcbc;
}

.svc-filters__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* === Botones === */
.svc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .65rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform .06s ease, box-shadow .12s ease, filter .12s ease;
}

.svc-btn:active {
  transform: translateY(1px);
}

.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);
}

.svc-btn--ghost {
  background: #f7f7f7;
  color: #333;
  border-color: #e3e3e3;
}

.svc-btn--ghost:hover {
  background: #efefef;
}

.svc-btn--block {
  width: calc(100% - 28px);
  margin: 12px 14px 16px;
}

/* === Main / Header === */
.svc-main {
  order: 1;
}

.svc-header {
  margin: 0 auto;
  margin-bottom: 20px;
  max-width: 2000px;
}

.svc-title {
  margin: 0 0 6px;
  /* font-size: 1.7rem; */
  line-height: 1.2;
}

.svc-header__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.svc-results-count {
  font-size: .95rem;
  color: #666;
}

/* Toolbar (orden + per_page) */
.svc-toolbar {
  /* display: flex; */
  display: none;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 6px;
}

.svc-sortbar,
.svc-perpage {
  display: flex;
  align-items: center;
  gap: 8px;
}

.svc-sortbar__select {
  max-width: 100%;
}

.svc-perpage__select {
  max-width: 100%;
}

@media (max-width: 480px) {

  .svc-sortbar__select,
  .svc-perpage__select {
    max-width: 100%;
  }
}

/* === Chips activos === */
.svc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 20px;
}

.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 cards === */
.svc-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

@media (min-width:700px) {
  .svc-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (min-width:1024px) {
  .svc-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
  }
}

/* === Card === */
.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;
}

/* === MEDIA estilo SHORTCODE (contain centrado) === */
.svc-card__media {
  position: relative;
  width: 100%;
  /* igual que shortcode: imagen como background contain centrada */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* relación aproximada del shortcode (300/300) → cuadrado */
  aspect-ratio: 4 / 3;
  background-color: #f6f6f6;

  /* bordes superiores redondeados como la card */
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

/* Overlay clicable (evita anidar enlaces) */
.svc-card__cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  text-indent: -9999px;
  background: transparent;
}

/* === Badge “por …” ESTILO SHORTCODE (rectangular, esquina superior dcha) === */
:root {
  --marron: #6c4b3b;
}

/* fallback si no existe ya en tu tema */
.svc-badge {
  position: absolute;
  right: -10px;
  top: -10px;
  z-index: 2;
  border-radius: 5px;
  padding: 7px 5px;
  background: var(--marron, #6c4b3b);
  color: #fff;
  font-size: 12px !important;
  line-height: 1;
  white-space: nowrap;
  max-width: 85%;
  text-overflow: ellipsis;
  overflow: hidden;
  display: inline-block;
  text-decoration: none;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.svc-badge:hover {
  color: #fff;
  filter: brightness(.98);
}

/* === Título centrado (como shortcode) === */
.svc-card__title {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.35;
  padding: 12px 10px 6px;
  margin: 0;
  text-align: center;
  color: #111;
}

.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 inferior (ya adaptado al ancho) === */
.svc-btn--block {
  width: calc(100% - 28px);
  margin: 12px 14px 16px;
}

/* === Paginación === */
.svc-pagination {
  margin-top: 18px;
  text-align: center;
}

.svc-pagination .page-numbers {
  display: inline-block;
  margin: 0 4px;
  padding: 8px 12px;
  /* border: 1px solid #eee; */
  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: 14px;
  color: #666;
}

/* === Desktop layout: sidebar sticky === */
@media (min-width:1024px) {
  .svc-container {
    grid-template-columns: 300px 1fr;
    align-items: start;
    gap: 26px;
  }

  .svc-sidebar {
    position: sticky;
    top: var(--svc-sticky-top, 24px);
    order: 1;
  }

  .svc-main {
    order: 2;
  }
}

/* === Focus visible accesible === */
.svc-btn:focus-visible,
.svc-input:focus-visible,
.svc-select:focus-visible,
.svc-chip:focus-visible,
.svc-card a:focus-visible {
  outline: 3px solid rgba(116, 133, 115, .35);
  outline-offset: 2px;
  border-radius: 12px;
}

@media (min-width:1024px) {
  .svc-container {
    grid-template-columns: 300px 1fr;
    align-items: start;
    gap: 26px;
  }

  .svc-sidebar {
    position: sticky;
    top: var(--svc-sticky-top, 24px);
    /* <-- offset dinámico */
    order: 1;
  }

  .svc-main {
    order: 2;
  }
}

/* Ajustes menores cuando se usa el shortcode de comarca */
.svc-archive {
  padding: 32px 24px;
}

@media (min-width:1200px) {
  .svc-archive {
    padding: 40px 70px;
  }
}

.svc-header {
  margin: 0 auto 20px;
  max-width: 2000px;
}

/* 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;
}

.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;
}
