/**
 * =============================================================================
 * Search Package - Home Search Styles v2.12
 * =============================================================================
 * Archivo cacheable - El navegador lo guarda después de la primera visita
 * =============================================================================
 */

/* ============================================
   SEARCH TOP BAR
   ============================================ */
.az-srch-top { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }

/* Switch de vista (Lista/Mapa) */
.az-switch { display: flex; align-items: center; gap: 10px; }
.az-switch-label { font-size: 11px; color: #565959; font-weight: 700; }

/* Segmented control */
.az-seg { display: inline-flex; border: 1px solid #d5d9d9; border-radius: 999px; overflow: hidden; background: #fff; }
.az-seg a { padding: 8px 12px; font-size: 13px; text-decoration: none; color: #0F1111; border-right: 1px solid #d5d9d9; }
.az-seg a:last-child { border-right: 0; }
.az-seg a.on { background: #111; color: #fff; border-right: 1px solid #111; }

/* Pills (botones de filtro) */
.az-pill { border: 1px solid #d5d9d9; background: #fff; border-radius: 999px; padding: 8px 12px; font-size: 13px; cursor: pointer; text-decoration: none; color: #0F1111; }
.az-pill.on { border-color: #111; background: #f3f3f3; }

/* Pill con slider (radio) */
.az-pill-range { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #111; background: #f3f3f3; border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.az-pill-range input[type=range] { width: 80px; height: 4px; cursor: pointer; -webkit-appearance: none; appearance: none; background: #ccc; border-radius: 2px; }
.az-pill-range input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; background: #111; border-radius: 50%; cursor: pointer; }
.az-pill-range .v { font-size: 11px; font-weight: 700; color: #0F1111; min-width: 35px; text-align: right; }

/* ============================================
   CARDS DE PROVEEDORES
   ============================================ */
.az-card { display: flex; gap: 12px; align-items: flex-start; }
.az-ava { width: 54px; height: 54px; border-radius: 10px; border: 1px solid #e3e6e6; background: #fff; overflow: hidden; flex: 0 0 auto; }
.az-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.az-name { font-size: 15px; font-weight: 700; color: #0F1111; }
.az-meta { font-size: 12px; color: #565959; margin-top: 2px; }

/* Estrellas de rating */
.az-stars2 { display: inline-block; position: relative; font-size: 14px; line-height: 1; letter-spacing: .5px; vertical-align: middle; }
.az-stars2 .bg { color: #d5d9d9; }
.az-stars2 .fg { position: absolute; top: 0; left: 0; white-space: nowrap; overflow: hidden; color: #f08804; }

/* Chips de servicios */
.az-chips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.az-chip { display: inline-block; padding: 6px 10px; border: 1px solid #d5d9d9; border-radius: 999px; font-size: 12px; background: #fff; }

/* Badge "Nuevo" */
.az-badge-new { display: inline-block; background: #00B4D8; color: #fff; font-size: 9px; font-weight: 700; padding: 2px 5px; border-radius: 3px; margin-left: 6px; vertical-align: middle; text-transform: uppercase; }

/* ============================================
   BOTONES DE CATEGORÍAS
   ============================================ */
.az-cat-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 16px; background: #fff; border: 1px solid #e3e6e6; text-decoration: none; color: #0F1111; transition: all 0.2s ease; }
.az-cat-btn:hover { background: #f7fafa; border-color: #007185; transform: translateY(-2px); }
.az-cat-icon { font-size: 24px; line-height: 1; }
.az-cat-label { font-size: 10px; font-weight: 600; margin-top: 4px; text-align: center; }

/* ============================================
   MAPA
   ============================================ */
.az-map { height: 420px; border: 1px solid #e3e6e6; border-radius: 12px; overflow: hidden; }

/* Marcadores del mapa */
.mk-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mk { width: 44px; height: 44px; border-radius: 14px; border: 2px solid #fff; box-shadow: 0 10px 18px rgba(0,0,0,.14); background: #fff; overflow: hidden; position: relative; }
.mk img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk .b { position: absolute; right: -2px; bottom: -2px; height: 18px; border-radius: 999px; background: #111; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; border: 2px solid #fff; padding: 0 6px; white-space: nowrap; }
.mk-n { max-width: 92px; padding: 2px 7px; background: rgba(255,255,255,.95); border: 1px solid #d5d9d9; border-radius: 999px; font-size: 11px; font-weight: 800; color: #0F1111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Cluster de marcadores */
.mk.mk-cluster { display: flex; flex-direction: column; align-items: center; justify-content: center; background: #f7f7f7; border: 2px solid #111; }
.mk.mk-cluster .mk-num { font-size: 16px; font-weight: 900; color: #0F1111; line-height: 1; }
.mk.mk-cluster .b { position: absolute; right: -2px; bottom: -2px; }

/* Popup del mapa */
.pv-pop { min-width: 220px; max-width: 260px; }
.pv-pop .row { display: flex; gap: 10px; align-items: flex-start; }
.pv-pop .ava { width: 46px; height: 46px; border-radius: 12px; border: 1px solid #e3e6e6; overflow: hidden; background: #fff; flex: 0 0 auto; }
.pv-pop .ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-pop .n { font-weight: 900; color: #0F1111; font-size: 14px; line-height: 1.15; }
.pv-pop .r { font-size: 12px; color: #565959; margin-top: 4px; }
.pv-pop .chips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.pv-pop .chip { display: inline-block; padding: 5px 9px; border: 1px solid #d5d9d9; border-radius: 999px; font-size: 11px; background: #fff; }

/* ============================================
   BOTÓN CENTRAR MAPA
   ============================================ */
.map-center-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: #fff;
  border: none;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: background 0.2s;
}
.map-center-btn:hover { background: #f5f5f5; }
.map-center-btn:active { background: #e0e0e0; }
.map-center-btn svg { color: #5f6368; }

/* ============================================
   SPINNER / LOADER
   ============================================ */
.az-spinner { width: 30px; height: 30px; margin: 0 auto; border: 3px solid #e3e6e6; border-top-color: #007185; border-radius: 50%; animation: az-spin 0.8s linear infinite; }
@keyframes az-spin { to { transform: rotate(360deg); } }

/* ============================================
   PAGINACIÓN ESTILO AMAZON
   ============================================ */
.pagination-container { display: flex; justify-content: center; align-items: center; padding: 20px; gap: 8px; flex-wrap: wrap; }
.pag-btn { padding: 8px 12px; border: 1px solid #ddd; background: #fff; border-radius: 4px; cursor: pointer; font-size: 14px; transition: all 0.2s; }
.pag-btn:hover { border-color: #007185; background: #f7fafa; }
.pag-btn.active { border-color: #007bff; background: #007bff; color: #fff; font-weight: bold; }
.pag-prev, .pag-next { padding: 8px 16px; }

/* ============================================
   UTILIDADES
   ============================================ */
.bottom-spacer { height: 120px; }
.search-loading { text-align: center; padding: 40px; }
