/* ── BAO Espacios — Public Styles ── */
.he-public-wrap { position: relative; }

/* Grid de tarjetas */
.he-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

/* Tarjeta */
.he-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.he-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.1); transform: translateY(-2px); }
.he-card.he-card-expanded { box-shadow: 0 0 0 2px #52b788; }

/* Imagen */
.he-card-img { height: 200px; position: relative; overflow: hidden; background:black; flex: 0 0 auto; }
.he-card-img img { width: 100%; height: 100% !important; object-fit: cover; display: block; transition: transform .3s; }
.he-card:hover .he-card-img img { transform: scale(1.03); }
.he-card-img-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; color: #bbb; }
.he-card-img-placeholder .dashicons { font-size: 48px; width: 48px; height: 48px; }
.he-badge { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 5px; letter-spacing: .5px;    background: #e1921c !important;
    color: white !important; }

.he-cap { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; padding: 3px 9px; border-radius: 5px; display: flex; align-items: center; gap: 4px; }
.he-cap .dashicons { font-size: 14px; width: 14px; height: 14px; }

/* Body */
.he-card-body { padding: 1rem 1rem .5rem; flex: 1 1 auto; }
.he-card-location { font-size: 12px; color: #888; display: flex; align-items: center; gap: 4px; margin-bottom: .4rem; }
.he-card-location .dashicons { font-size: 14px; width: 14px; height: 14px; }
.he-card-name { font-size: 18px; font-weight: 600; color: #1a1a1a; margin: 0 0 .75rem; }

/* Prices */
.he-prices { width: 100%; font-size: 13px; margin-bottom: .75rem; border-collapse: collapse; }
.he-prices tr td { padding: 3px 0; }
.he-price-label { color: #888; font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: .3px; white-space: nowrap; padding-right: 8px; }
.he-price-amount { text-align: right; font-weight: 600; color: #1a1a1a; }

/* Equipment */
.he-equip-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: #888; margin: 0 0 .4rem; }
.he-equip-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .5rem; }
.he-etag { font-size: 11px; padding: 3px 9px; border-radius: 20px; background: #f2f2f2; color: #555; }

/* Footer buttons */
.he-card-footer { display: flex; gap: .5rem; padding: .75rem 1rem; border-top: 1px solid #f0f0f0; margin-top: auto; flex: 0 0 auto; }
.he-btn-wsp {
  flex: 1;
  background: #25d366;
  color: #fff;
  border: none;
  padding: .55rem .75rem;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: background .15s;
}
.he-btn-wsp:hover { background: #1db954; color: #fff; text-decoration: none; }
.he-btn-wsp-disabled { background: #aaa; cursor: default; }
.he-btn-imgs {
  flex: 1;
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
  padding: .55rem .75rem;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background .15s, border-color .15s;
}
.he-btn-imgs:hover { background: #E99541; border-color: #E99541; }
.he-btn-imgs:focus { background: #E99541 !important; border-color: #E99541 !important; }
.he-btn-imgs .dashicons { font-size: 16px; width: 16px; height: 16px; }

/* ── Gallery sidebar ── */
.he-gallery-sidebar {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: 280px;
  background: #fff;
  border-left: 1px solid #e0e0e0;
  box-shadow: -4px 0 20px rgba(0,0,0,.12);
  z-index: 99998;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.he-gallery-sidebar.open { transform: translateX(0); }
.he-gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  flex-shrink: 0;
}
#he-gallery-close {
  background: none;
  border: none;
  font-size: 22px;
  color: #888;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
#he-gallery-close:hover { color: #333; }
.he-gallery-grid {
 display: flex;
    flex-direction: row;
    gap: .5rem;
    padding: .75rem;
    overflow-y: auto;
 
    flex-wrap: wrap;
}
.he-gallery-item {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
  cursor: pointer;
}
.he-gallery-item img {
      width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .2s;
    height: 100% !important;
}
.he-gallery-item:hover img { transform: scale(1.06); }
.he-gallery-empty { padding: 2rem 1rem; text-align: center; color: #aaa; grid-column: 1/-1; }

/* ── Lightbox ── */
.he-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}
.he-lightbox.open { display: flex; }
.he-lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 8px; }
#he-lightbox-close {
  position: fixed;
  top: 1rem; right: 1.5rem;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  border-radius: 50%;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  transition: background .15s;
}
#he-lightbox-close:hover { background: rgba(255,255,255,.3); }
.he-no-offices { color: #888; font-style: italic; }

/* ─────────────────────────────────────────────
   BARRA DE FILTROS
   Reglas "a prueba de temas": muchos themes definen
   estilos de button/input con alta especificidad o
   !important, por eso aquí forzamos las propiedades
   clave de los controles del plugin.
───────────────────────────────────────────── */
.he-public-wrap .he-filters,
.he-public-wrap .he-filters * { box-sizing: border-box !important; }

.he-public-wrap .he-filters {
  background: #fff !important;
  border: 1px solid #ececec !important;
  border-radius: 14px !important;
  padding: 1.1rem 1.25rem !important;
  margin: 0 0 1.75rem !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.03) !important;
  font-family: inherit;
}

/* Reset general de los controles dentro de la barra */
.he-public-wrap .he-filters input,
.he-public-wrap .he-filters select,
.he-public-wrap .he-filters button {
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  margin: 0 !important;
  box-shadow: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  text-shadow: none !important;
  text-decoration: none !important;
  min-height: 0 !important;
  min-width: 0 !important;
  max-width: none !important;
  float: none !important;
  outline: none !important;
}

/* Fila superior */
.he-public-wrap .he-filters-top {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .75rem !important;
  align-items: flex-end !important;
}
.he-public-wrap .he-filter { display: flex !important; flex-direction: column !important; gap: 5px !important; }
.he-public-wrap .he-filter > label {
  display: block !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .5px !important;
  color: #9a9a9a !important;
  margin: 0 !important;
}

.he-public-wrap .he-filters input[type="text"],
.he-public-wrap .he-filters input[type="number"],
.he-public-wrap .he-filters select {
  height: 40px !important;
  padding: 0 12px !important;
  border: 1px solid #e2e2e2 !important;
  border-radius: 9px !important;
  color: #222 !important;
  background-color: #fff !important;
  width: auto !important;
  transition: border-color .15s, box-shadow .15s !important;
}
.he-public-wrap .he-filters input[type="number"] { width: 120px !important; }
.he-public-wrap .he-filters select {
  width: 150px !important;
  padding-right: 30px !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 9px center !important;
  background-size: 15px !important;
  cursor: pointer !important;
}
.he-public-wrap .he-filters input:focus,
.he-public-wrap .he-filters select:focus {
  border-color: #1a1a1a !important;
  box-shadow: 0 0 0 3px rgba(26,26,26,.08) !important;
}

/* Búsqueda */
.he-public-wrap .he-filter-search { flex: 1 1 260px !important; position: relative !important; }
.he-public-wrap .he-filter-search .dashicons {
  position: absolute !important;
  left: 11px !important;
  bottom: 11px !important;
  color: #bbb !important;
  font-size: 18px !important;
  width: 18px !important;
  height: 18px !important;
  pointer-events: none !important;
}
.he-public-wrap .he-filter-search input[type="text"] { width: 100% !important; padding-left: 36px !important; }

/* Botón limpiar (ghost) — gana al botón del tema */
.he-public-wrap .he-filters button.he-f-clear {
  height: 40px !important;
  padding: 0 16px !important;
  border: 1px solid #e2e2e2 !important;
  border-radius: 9px !important;
  background: #fafafa !important;
  color: #555 !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  cursor: pointer !important;
  margin-left: auto !important;
  width: auto !important;
  transition: background .15s, border-color .15s, color .15s !important;
}
.he-public-wrap .he-filters button.he-f-clear:hover {
  background: #f1f1f1 !important;
  border-color: #d5d5d5 !important;
  color: #222 !important;
}

/* Grupos de chips */
.he-public-wrap .he-filter-chips {
  display: flex !important;
  align-items: baseline !important;
  gap: .65rem !important;
  margin-top: .9rem !important;
  padding-top: .9rem !important;
  border-top: 1px solid #f2f2f2 !important;
}
.he-public-wrap .he-filter-chips-label {
  flex: 0 0 auto !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .5px !important;
  color: #9a9a9a !important;
  padding-top: 6px !important;
}
.he-public-wrap .he-chips { display: flex !important; flex-wrap: wrap !important; gap: .4rem !important; }

/* Chips — son <button>; forzamos todo para vencer al tema */
.he-public-wrap .he-filters button.he-fchip {
  display: inline-flex !important;
  align-items: center !important;
  border: 1px solid #e2e2e2 !important;
  background: #fff !important;
  color: #444 !important;
  border-radius: 999px !important;
  padding: 6px 14px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  cursor: pointer !important;
  width: auto !important;
  height: auto !important;
  transition: background .15s, border-color .15s, color .15s !important;
}
.he-public-wrap .he-filters button.he-fchip:hover {
  border-color: #bbb !important;
  color: #111 !important;
  background: #fff !important;
}
.he-public-wrap .he-filters button.he-fchip.active {
  background: #1a1a1a !important;
  border-color: #1a1a1a !important;
  color: #fff !important;
}

/* Contador */
.he-public-wrap .he-filter-meta {
  margin-top: .9rem !important;
  padding-top: .85rem !important;
  border-top: 1px solid #f2f2f2 !important;
  font-size: 12.5px !important;
  color: #999 !important;
}
.he-public-wrap .he-filter-meta #he-results-count { font-weight: 700 !important; color: #1a1a1a !important; }

/* ── Elementos del panel móvil: ocultos en escritorio ── */
.he-filters-toggle,
.he-filters-mobile-head,
.he-filters-mobile-foot,
.he-filters-backdrop { display: none !important; }

.he-no-results {
  text-align: center;
  color: #888;
  font-style: italic;
  padding: 2.5rem 1rem;
}

/* Precio "desde" en la tarjeta */
.he-card-from { font-size: 13px; color: #555; margin: 0 0 .6rem; }
.he-card-from strong { color: #1a1a1a; }


/* ── Tabla de precios ── */
.he-public-wrap .he-prices {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: .25rem 0 1rem !important;
  background:#f9f9f9 !important;
  border: 1px solid #ececec !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  font-size: 13.5px !important;
}

.he-public-wrap .he-prices tr {
  border-bottom: 1px solid #f2f2f2 !important;
}
.he-public-wrap .he-prices tr:last-child {
  border-bottom: none !important;
}

.he-public-wrap .he-prices td {
  padding: 11px 14px !important;
  border: none !important;
  background: transparent !important;
  vertical-align: middle !important;
}

/* Concepto (izquierda): gris, sin gritar en mayúsculas */
.he-public-wrap .he-prices .he-price-label {
  color: #777 !important;
  font-weight: 500 !important;
  text-transform: capitalize !important;  /* "HORA" -> "Hora" */
  letter-spacing: .2px !important;
}

/* Monto (derecha): negro y destacado */
.he-public-wrap .he-prices .he-price-amount {
  text-align: right !important;
  color: #1a1a1a !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

@media (max-width: 768px) {

  /* ── Botón flotante de filtros (sigue el scroll) ── */
  .he-public-wrap .he-filters-toggle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    position: fixed !important;
    left: 50% !important;
    bottom: 18px !important;
    transform: translateX(-50%) !important;
    z-index: 99990 !important;
    height: 46px !important;
    padding: 0 20px !important;
    border: none !important;
    border-radius: 999px !important;
    background: #1a1a1a !important;
    color: #fff !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    box-shadow: 0 6px 20px rgba(0,0,0,.28) !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    transition: opacity .2s, transform .2s !important;
  }
  .he-public-wrap .he-filters-toggle svg { flex: 0 0 auto !important; }
  .he-public-wrap .he-filters-toggle .he-filters-toggle-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 6px !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #1a1a1a !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
  }

  /* El panel pasa a ser un drawer lateral izquierdo */
  .he-public-wrap .he-filters {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100% !important;
    width: 86% !important;
    max-width: 360px !important;
    margin: 0 !important;
    border: none !important;
    border-right: 1px solid #ececec !important;
    border-radius: 0 !important;
    box-shadow: 4px 0 24px rgba(0,0,0,.18) !important;
    z-index: 99991 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    transform: translateX(-100%) !important;
    transition: transform .3s cubic-bezier(.4,0,.2,1) !important;
    padding: 0 1.1rem 1.1rem !important;
  }
  .he-public-wrap .he-filters.open { transform: translateX(0) !important; }

  /* Encabezado del drawer */
  .he-public-wrap .he-filters-mobile-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: sticky !important;
    top: 0 !important;
    margin: 0 -1.1rem .9rem !important;
    padding: .9rem 1.1rem !important;
    background: #fff !important;
    border-bottom: 1px solid #f0f0f0 !important;
    z-index: 2 !important;
  }
  .he-public-wrap .he-filters-mobile-title {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
  }
  .he-public-wrap button.he-filters-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    border: none !important;
    background: #f3f3f3 !important;
    border-radius: 50% !important;
    font-size: 22px !important;
    line-height: 1 !important;
    color: #555 !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    appearance: none !important;
  }
  .he-public-wrap button.he-filters-close:hover { background: #e9e9e9 !important; color: #111 !important; }

  /* Pie con botón "Ver resultados" */
  .he-public-wrap .he-filters-mobile-foot {
    display: block !important;
    position: sticky !important;
    bottom: 0 !important;
    margin: 1rem -1.1rem 0 !important;
    padding: .85rem 1.1rem !important;
    background: #fff !important;
    border-top: 1px solid #f0f0f0 !important;
  }
  .he-public-wrap button.he-filters-apply {
    display: block !important;
    width: 100% !important;
    height: 46px !important;
    border: none !important;
    border-radius: 10px !important;
    background: #1a1a1a !important;
    color: #fff !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    appearance: none !important;
  }

  /* Fondo oscuro */
  .he-public-wrap .he-filters-backdrop,
  .he-filters-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0,0,0,.45) !important;
    z-index: 99989 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity .3s, visibility .3s !important;
  }
  .he-public-wrap .he-filters-backdrop.open,
  .he-filters-backdrop.open { opacity: 1 !important; visibility: visible !important; }

  /* Cuando el drawer está abierto, ocultamos el botón flotante */
  .he-public-wrap.he-filters-active .he-filters-toggle {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Apilado de controles dentro del drawer */
  .he-public-wrap .he-filters-top { flex-direction: column !important; align-items: stretch !important; }
  .he-public-wrap .he-filters input[type="number"],
  .he-public-wrap .he-filters select,
  .he-public-wrap .he-filter-search { width: 100% !important; flex-basis: auto !important; }
  .he-public-wrap .he-filters button.he-f-clear { margin-left: 0 !important; width: 100% !important; }
  .he-public-wrap .he-filter-chips { flex-direction: column !important; align-items: stretch !important; }
  .he-public-wrap .he-filter-chips-label { padding-top: 0 !important; }
}

/* ───────── Paginación ───────── */
.he-public-wrap .he-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  margin-top: 1.75rem;
}
.he-public-wrap .he-pagination button {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #444;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s, color .15s;
}
.he-public-wrap .he-pagination button:hover:not(:disabled):not(.is-current) {
  border-color: #E99541;
  color: #E99541;
}
.he-public-wrap .he-pagination button.is-current {
  background: #E99541;
  border-color: #E99541;
  color: #fff;
  cursor: default;
}
.he-public-wrap .he-pagination button:disabled {
  opacity: .9;
  cursor: default;
}
.he-public-wrap .he-pagination .he-page-dots {
  min-width: 22px;
  text-align: center;
  color: #aaa;
  user-select: none;
}
.he-public-wrap .he-pagination .he-page-nav .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
}
@media (max-width: 480px) {
  .he-public-wrap .he-pagination button { min-width: 34px; height: 34px; padding: 0 9px; font-size: 13px; }
}
