/* Rentas — búsqueda: filtros, lista + mapa, buscador compacto, hero y bloque de mapa. */

.arp-search,
.arp-buscador,
.arp-hero,
.arp-mapblock {
	--s-accent: var(--arp-accent, #c8553d);
	--s-accent-ink: var(--arp-accent-ink, #fff);
	--s-soft: var(--arp-accent-soft, #fbeee9);
	--s-ink: var(--arp-ink, #222);
	--s-muted: var(--arp-muted, #6a6a6a);
	--s-line: var(--arp-line, #e4e4e4);
	--s-bg: var(--arp-bg, #fff);
	--s-surface: var(--arp-surface, #f7f7f7);
	--s-radius: var(--arp-radius, 16px);
	--s-radius-sm: var(--arp-radius-sm, 10px);
	--s-shadow: var(--arp-shadow, 0 6px 24px rgba(0, 0, 0, .08));
	--s-header: var(--arp-header-h, 72px);
	--s-bar: 64px;
	font-family: var(--arp-font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
	color: var(--s-ink);
}
.arp-search *,
.arp-buscador *,
.arp-hero *,
.arp-mapblock * { box-sizing: border-box; }
.arp-search [hidden],
.arp-mapblock [hidden] { display: none !important; }
html.arp-lock { overflow: hidden; }

/* ------------------------------------------------------------------ */
/* Barra de filtros                                                   */
/* ------------------------------------------------------------------ */
.arp-filters {
	position: sticky;
	top: var(--s-header);
	z-index: 45;
	background: var(--s-bg);
	border-bottom: 1px solid var(--s-line);
}
.arp-filters__bar { padding: 12px 16px; max-width: var(--arp-container, 1280px); margin: 0 auto; min-height: var(--s-bar); display: flex; align-items: center; }
.arp-filters__chips {
	display: flex; gap: 8px; align-items: center; width: 100%;
	overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
	padding-bottom: 2px;
}
.arp-filters__chips::-webkit-scrollbar { display: none; }
.arp-pop { flex: 0 0 auto; }
.arp-pop > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; user-select: none;
	border: 1px solid var(--s-line); background: var(--s-bg); color: var(--s-ink); border-radius: 999px; padding: 9px 16px; font-size: .9rem; font-weight: 500; line-height: 1.2; }
.arp-pop > summary::-webkit-details-marker { display: none; }
.arp-pop > summary:hover { border-color: var(--s-ink); }
.arp-pop > summary:focus-visible { outline: 2px solid var(--s-accent); outline-offset: 2px; }
.arp-pop > summary.is-active,
.arp-pop[open] > summary { border-color: var(--s-ink); background: var(--s-surface); box-shadow: inset 0 0 0 1px var(--s-ink); }
.arp-pop > summary .arp-icon { width: 18px; height: 18px; }

/* Panel: hoja inferior en móvil */
.arp-pop__panel {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
	background: var(--s-bg); border-radius: var(--s-radius) var(--s-radius) 0 0;
	padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0, 0, 0, .18);
	max-height: 85vh; overflow-y: auto;
}
.arp-pop[open]::before { content: ""; position: fixed; inset: 0; z-index: 69; background: rgba(0, 0, 0, .35); }
.arp-pop__title { margin: 0 0 12px; font-weight: 600; font-size: 1.05rem; }
.arp-pop__hint { margin: 8px 0 0; font-size: .85rem; color: var(--s-muted); }
.arp-pop__hint:empty { display: none; }
.arp-pop__apply { margin-top: 16px; width: 100%; justify-content: center; }
.arp-pop__rango { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.arp-pop__fechas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.arp-pop--modal .arp-pop__panel { top: 0; border-radius: 0; max-height: none; display: flex; flex-direction: column; padding: 0; }
.arp-pop__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--s-line); }
.arp-pop__head .arp-pop__title { margin: 0; }
.arp-pop__close { border: 0; background: none; cursor: pointer; padding: 6px; border-radius: 50%; color: var(--s-ink); font-size: 1.5rem; line-height: 1; }
.arp-pop__close .arp-icon { width: 22px; height: 22px; display: block; }
.arp-pop__scroll { flex: 1; overflow-y: auto; padding: 16px; }
.arp-pop__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--s-line); }
.arp-pop__foot .arp-pop__apply { margin: 0; width: auto; }
.arp-pop__clear { color: var(--s-ink); font-weight: 600; text-decoration: underline; font-size: .95rem; }

/* Campos y opciones */
.arp-search .arp-field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }
.arp-search .arp-field label,
.arp-fs legend { font-size: .8rem; font-weight: 600; color: var(--s-muted); }
.arp-search .arp-field input,
.arp-search .arp-field select,
.arp-search__sort select {
	width: 100%; border: 1px solid var(--s-line); border-radius: var(--s-radius-sm); padding: 10px 12px; font: inherit; font-size: .95rem; background: var(--s-bg); color: var(--s-ink); min-height: 44px;
}
.arp-search .arp-field input:focus,
.arp-search .arp-field select:focus,
.arp-search__sort select:focus { outline: 2px solid var(--s-accent); outline-offset: 1px; border-color: transparent; }
.arp-fs { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.arp-fs legend { padding: 0; margin-bottom: 8px; }
.arp-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.arp-opt { position: relative; cursor: pointer; }
.arp-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.arp-opt span { display: inline-block; padding: 8px 16px; border: 1px solid var(--s-line); border-radius: 999px; font-size: .9rem; background: var(--s-bg); }
.arp-opt input:checked + span { background: var(--s-ink); color: var(--s-bg); border-color: var(--s-ink); }
.arp-opt input:focus-visible + span { outline: 2px solid var(--s-accent); outline-offset: 2px; }
.arp-amen { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.arp-amen__item { position: relative; cursor: pointer; }
.arp-amen__item input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.arp-amen__item span { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--s-line); border-radius: var(--s-radius-sm); font-size: .88rem; height: 100%; }
.arp-amen__item .arp-icon { width: 20px; height: 20px; flex: 0 0 auto; }
.arp-amen__item input:checked + span { border-color: var(--s-ink); background: var(--s-surface); box-shadow: inset 0 0 0 1px var(--s-ink); }
.arp-amen__item input:focus-visible + span { outline: 2px solid var(--s-accent); outline-offset: 2px; }

/* ------------------------------------------------------------------ */
/* Lista + mapa                                                       */
/* ------------------------------------------------------------------ */
.arp-search__layout { max-width: 1800px; margin: 0 auto; }
.arp-search__list { padding: 20px 16px 96px; min-width: 0; }
.arp-search__head { margin-bottom: 12px; }
.arp-search__title { margin: 0 0 4px; font-size: clamp(1.3rem, 4.5vw, 1.8rem); line-height: 1.2; font-weight: 700; }
.arp-search__desc { margin: 0; color: var(--s-muted); font-size: .95rem; }
.arp-search__toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 14px 0 16px; flex-wrap: wrap; }
.arp-search__count { margin: 0; color: var(--s-muted); font-size: .95rem; }
.arp-search__count strong { color: var(--s-ink); }
.arp-search__sort { display: flex; align-items: center; gap: 8px; }
.arp-search__sort label { font-size: .85rem; color: var(--s-muted); }
.arp-search__sort select { width: auto; min-height: 40px; padding: 8px 12px; }
.arp-results { transition: opacity .2s; }
.arp-search.is-loading .arp-results { opacity: .55; }
.arp-search__error { grid-column: 1 / -1; color: var(--arp-error, #c0392b); }
.arp-card.is-highlight { box-shadow: 0 0 0 2px var(--s-ink); border-radius: var(--s-radius); }
.arp-more { text-align: center; margin-top: 24px; }
.arp-pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 28px; }
.arp-pager__item { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--s-line); border-radius: 50%; color: var(--s-ink); text-decoration: none; font-weight: 500; }
.arp-pager__item.is-active { background: var(--s-ink); color: var(--s-bg); border-color: var(--s-ink); }

/* Esqueleto de carga */
.arp-skel { display: block; }
.arp-skel__img, .arp-skel__l { background: linear-gradient(90deg, #eee 25%, #f6f6f6 37%, #eee 63%); background-size: 400% 100%; animation: arp-shimmer 1.4s ease infinite; border-radius: var(--s-radius-sm); }
.arp-skel__img { aspect-ratio: 4 / 3; border-radius: var(--s-radius); }
.arp-skel__l { height: 14px; margin-top: 12px; width: 80%; }
.arp-skel__l--s { width: 45%; }
@keyframes arp-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* Estado vacío */
.arp-empty { text-align: center; padding: 48px 16px; max-width: 420px; margin: 0 auto; }
.arp-empty__icon { width: 48px; height: 48px; color: var(--s-muted); }
.arp-empty h2 { margin: 12px 0 6px; font-size: 1.2rem; }
.arp-empty p { margin: 0 0 18px; color: var(--s-muted); }

/* Mapa: en móvil es una vista alterna */
.arp-search__map { display: none; }
.arp-search.is-map-view .arp-search__list { display: none; }
.arp-search.is-map-view .arp-search__map {
	display: block; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
	top: calc(var(--s-header) + var(--s-bar) + 1px);
}
.arp-map { width: 100%; height: 100%; min-height: 320px; background: #e9e5dc; }
.arp-map__move {
	position: absolute; z-index: 500; top: 12px; left: 50%; transform: translateX(-50%);
	background: var(--s-bg); border-radius: 999px; padding: 8px 16px; box-shadow: var(--s-shadow);
	font-size: .85rem; font-weight: 500; display: flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap;
}
.arp-map__move input { accent-color: var(--s-accent); width: 16px; height: 16px; margin: 0; }
.arp-search__map .leaflet-container { font-family: inherit; }

.arp-fab {
	position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom));
	background: var(--s-ink); color: var(--s-bg); border: 0; border-radius: 999px; padding: 13px 22px; font: inherit; font-weight: 600; font-size: .95rem;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .3); cursor: pointer;
}
.arp-fab span { display: inline-flex; align-items: center; gap: 8px; }
.arp-fab .arp-icon { width: 18px; height: 18px; }
.arp-fab:focus-visible { outline: 3px solid var(--s-accent); outline-offset: 3px; }

/* Hoja inferior (tarjeta mini al tocar un pin en móvil) */
.arp-sheet {
	position: absolute; z-index: 600; left: 12px; right: 12px; bottom: 84px; background: var(--s-bg);
	border-radius: var(--s-radius); box-shadow: 0 10px 40px rgba(0, 0, 0, .25); padding: 8px; animation: arp-up .25s ease;
}
.arp-sheet__x { position: absolute; z-index: 2; top: 6px; right: 6px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .95); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); font-size: 1.2rem; line-height: 1; cursor: pointer; }
@keyframes arp-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Mini tarjeta (popup / hoja) */
.arp-mini { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--s-ink, #222); }
.arp-mini img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; flex: 0 0 auto; background: #eee; }
.arp-mini__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.arp-mini__meta { font-size: .75rem; color: var(--s-muted, #6a6a6a); }
.arp-mini__title { font-size: .95rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.arp-mini__price { font-size: .85rem; }
.arp-popup .leaflet-popup-content-wrapper { border-radius: 14px; padding: 4px; box-shadow: 0 10px 30px rgba(0, 0, 0, .22); }
.arp-popup .leaflet-popup-content { margin: 6px; }

/* Marcador tipo píldora */
.arp-pin-icon { background: none; border: 0; }
.arp-pin {
	position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
	background: var(--arp-bg, #fff); color: var(--arp-ink, #222); border-radius: 999px; padding: 5px 10px;
	font: 700 .8rem/1 var(--arp-font, system-ui, sans-serif); white-space: nowrap;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .3); border: 1px solid rgba(0, 0, 0, .08);
	transition: transform .15s, background .15s, color .15s;
}
.arp-pin.is-featured { border-color: var(--arp-accent, #c8553d); }
.arp-pin-icon:hover .arp-pin,
.arp-pin-icon:focus-visible .arp-pin,
.arp-pin.is-active { background: var(--arp-ink, #222); color: var(--arp-bg, #fff); transform: translate(-50%, -50%) scale(1.12); z-index: 2; }
.arp-pin-icon:focus { outline: none; }
.arp-pin-icon:focus-visible .arp-pin { outline: 3px solid var(--arp-accent, #c8553d); outline-offset: 2px; }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background-color: rgba(200, 85, 61, .25); }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background-color: var(--arp-accent, #c8553d); color: #fff; font-weight: 700; font-family: inherit; }

/* ------------------------------------------------------------------ */
/* Escritorio: lista a la izquierda, mapa fijo a la derecha           */
/* ------------------------------------------------------------------ */
@media (min-width: 640px) {
	.arp-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
}
@media (min-width: 900px) {
	.arp-filters__bar { padding: 12px 24px; }
	.arp-filters__chips { flex-wrap: wrap; overflow: visible; }
	.arp-pop { position: relative; }
	.arp-pop[open]::before { display: none; }
	.arp-pop__panel {
		position: absolute; top: calc(100% + 10px); left: 0; right: auto; bottom: auto; width: 340px; max-height: none;
		border-radius: var(--s-radius); border: 1px solid var(--s-line); box-shadow: var(--s-shadow); padding: 20px;
	}
	.arp-pop--modal[open]::before { display: block; background: rgba(0, 0, 0, .4); }
	.arp-pop--modal .arp-pop__panel {
		position: fixed; top: 50%; left: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%);
		width: min(640px, 92vw); max-height: 86vh; border-radius: var(--s-radius); padding: 0; overflow: hidden;
	}
	.arp-amen { grid-template-columns: 1fr 1fr 1fr; }

	.arp-search__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 42%); align-items: start; }
	.arp-search__list { padding: 24px 24px 56px; }
	.arp-search__map {
		display: block; position: sticky; top: calc(var(--s-header) + var(--s-bar) + 1px);
		height: calc(100vh - var(--s-header) - var(--s-bar) - 1px);
	}
	.arp-fab { display: none; }
	.arp-sheet { display: none !important; }
}
@media (min-width: 1500px) {
	.arp-results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
	.arp-pop__scroll { -webkit-overflow-scrolling: touch; }
}

/* ------------------------------------------------------------------ */
/* Buscador compacto (.arp-buscador)                                  */
/* ------------------------------------------------------------------ */
.arp-buscador {
	display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: var(--s-bg); color: var(--s-ink);
	border-radius: var(--s-radius); padding: 16px; box-shadow: var(--s-shadow); text-align: left;
}
.arp-buscador__campo { display: flex; flex-direction: column; gap: 2px; min-width: 0; border: 1px solid var(--s-line); border-radius: var(--s-radius-sm); padding: 8px 12px; background: var(--s-bg); }
.arp-buscador__zona, .arp-buscador__modalidad { grid-column: 1 / -1; }
.arp-buscador__campo label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--s-ink); }
.arp-buscador__campo select,
.arp-buscador__campo input { border: 0; padding: 4px 0; background: transparent; font: inherit; font-size: .95rem; color: var(--s-ink); width: 100%; min-width: 0; min-height: 28px; outline: none; }
.arp-buscador__campo input::placeholder { color: var(--s-muted); }
.arp-buscador__campo:focus-within { border-color: var(--s-ink); box-shadow: 0 0 0 1px var(--s-ink); }
.arp-buscador__btn { grid-column: 1 / -1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: var(--s-radius-sm); cursor: pointer;
	background: var(--s-accent); color: var(--s-accent-ink); border: 0; font: inherit; font-weight: 600; }
.arp-buscador__btn .arp-icon { width: 20px; height: 20px; }
.arp-buscador:not(:has(option[value="diaria"]:checked)) .arp-buscador__fechas { display: none; }
.arp-buscador:not(:has(option[value="diaria"]:checked)) .arp-buscador__huespedes { grid-column: 1 / -1; }

@media (min-width: 900px) {
	.arp-buscador { display: flex; align-items: stretch; gap: 0; border-radius: 999px; padding: 8px; border: 1px solid var(--s-line); }
	.arp-buscador__campo { border: 0; border-radius: 999px; padding: 10px 22px; flex: 1 1 0; justify-content: center; }
	.arp-buscador__zona { flex: 1.5 1 0; }
	.arp-buscador__campo + .arp-buscador__campo { position: relative; }
	.arp-buscador__campo + .arp-buscador__campo::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: var(--s-line); }
	.arp-buscador__campo:focus-within { box-shadow: none; background: var(--s-surface); }
	.arp-buscador__campo:focus-within::before,
	.arp-buscador__campo:focus-within + .arp-buscador__campo::before { display: none; }
	.arp-buscador__btn { flex: 0 0 auto; border-radius: 999px; padding: 0 26px; }
}

/* ------------------------------------------------------------------ */
/* Bloque arp/hero-buscador                                           */
/* ------------------------------------------------------------------ */
.arp-hero { position: relative; display: flex; align-items: center; min-height: min(78vh, 620px); background: #2b2b2b; color: #fff; overflow: hidden; }
.arp-hero__slides { position: absolute; inset: 0; }
.arp-hero__slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; }
.arp-hero__slide:first-child { opacity: 1; }
.arp-hero__slides.is-anim .arp-hero__slide { animation-duration: var(--hero-total); animation-iteration-count: infinite; animation-timing-function: ease-in-out; animation-delay: calc(var(--i) * var(--hero-step)); }
.arp-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .45), rgba(0, 0, 0, .25) 45%, rgba(0, 0, 0, .55)); }
.arp-hero__inner { position: relative; z-index: 2; width: 100%; max-width: var(--arp-container, 1280px); margin: 0 auto; padding: 56px 16px; }
.arp-hero__title { margin: 0 0 10px; font-size: clamp(1.9rem, 6vw, 3.4rem); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; max-width: 18ch; text-shadow: 0 2px 20px rgba(0, 0, 0, .35); }
.arp-hero__sub { margin: 0 0 26px; font-size: clamp(1rem, 2.6vw, 1.25rem); max-width: 44ch; opacity: .95; }
.arp-hero .arp-buscador { max-width: 980px; }
.arp-hero__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.arp-hero__chips a { display: inline-block; padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, .18); backdrop-filter: blur(6px); color: #fff; text-decoration: none; font-size: .9rem; font-weight: 500; border: 1px solid rgba(255, 255, 255, .35); }
.arp-hero__chips a:hover, .arp-hero__chips a:focus-visible { background: #fff; color: #222; }
@media (prefers-reduced-motion: reduce) {
	.arp-hero__slides.is-anim .arp-hero__slide { animation: none; }
	.arp-hero__slides.is-anim .arp-hero__slide:not(:first-child) { display: none; }
}

/* ------------------------------------------------------------------ */
/* Bloque arp/mapa                                                    */
/* ------------------------------------------------------------------ */
.arp-mapblock { padding: 40px 16px; max-width: var(--arp-container, 1280px); margin: 0 auto; }
.arp-mapblock__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.arp-mapblock__title { margin: 0 0 6px; font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 700; line-height: 1.15; }
.arp-mapblock__text { margin: 0; color: var(--s-muted); max-width: 60ch; }
.arp-mapblock__map { height: var(--map-h, 480px); border-radius: var(--s-radius); overflow: hidden; border: 1px solid var(--s-line); position: relative; }
.arp-mapblock__map .arp-map { min-height: 0; }
.arp-mapblock__strip { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 16px 2px 8px; -webkit-overflow-scrolling: touch; }
.arp-mapblock__strip .arp-card { flex: 0 0 min(280px, 78vw); scroll-snap-align: start; }
.arp-mapblock__empty { color: var(--s-muted); }

@media (prefers-reduced-motion: reduce) {
	.arp-results, .arp-pin, .arp-sheet { transition: none; animation: none; }
	.arp-skel__img, .arp-skel__l { animation: none; }
}
