/* ==========================================================================
   Ficha de propiedad (estilo Airbnb + Goodlers). Usa las variables de main.css.
   ========================================================================== */

.arp-prop { --arp-tabs-h: 56px; padding-bottom: 24px; }

/* ------------------------------------------------------------ encabezado */
.arp-prop__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; padding-block: 20px 16px; }
.arp-prop__title { font-size: clamp(24px, 3.6vw, 34px); letter-spacing: -.02em; }
.arp-prop__meta { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; color: var(--arp-muted); font-size: 15px; }
.arp-prop__meta .arp-icon { width: 18px; height: 18px; }
.arp-prop__tools { display: flex; gap: 4px; }
.arp-tool {
	display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border: 0; border-radius: var(--arp-radius-sm);
	background: none; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}
.arp-tool:hover { background: var(--arp-surface); }
.arp-tool .arp-icon { width: 20px; height: 20px; }
.arp-tool.is-on { color: var(--arp-accent); }
.arp-tool.is-on .arp-icon { fill: currentColor; }

/* ------------------------------------------------------------ galería */
.arp-gal { position: relative; margin-inline: calc(-1 * var(--arp-gutter)); }
.arp-gal__track {
	display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.arp-gal__track::-webkit-scrollbar { display: none; }
.arp-gal__item {
	flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4 / 3; padding: 0; border: 0; background: var(--arp-surface); overflow: hidden; cursor: zoom-in;
}
.arp-gal__item { position: relative; }
.arp-gal__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.arp-gal__count {
	position: absolute; right: 12px; bottom: 12px; padding: 4px 12px; border-radius: 999px; background: rgba(0, 0, 0, .65);
	color: #fff; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.arp-gal__all {
	position: absolute; left: 12px; bottom: 12px; display: none; align-items: center; gap: 8px; padding: 9px 16px;
	border: 1px solid var(--arp-ink); border-radius: var(--arp-radius-sm); background: #fff; font-size: 14px; font-weight: 600;
}
.arp-gal__all .arp-icon { width: 18px; height: 18px; }
.arp-gal__all:hover { background: var(--arp-surface); }
.arp-gal--empty { display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--arp-surface); color: var(--arp-muted); }

/* Escritorio: mosaico 1 grande + 4 */
@media (min-width: 760px) {
	.arp-gal { margin-inline: 0; border-radius: var(--arp-radius); overflow: hidden; }
	.arp-gal__track {
		display: grid; gap: 8px; overflow: visible; scroll-snap-type: none;
		grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); aspect-ratio: 2 / 1; max-height: 560px; width: 100%;
	}
	.arp-gal__item { aspect-ratio: auto; flex: none; }
	.arp-gal__item:first-child { grid-column: 1 / 3; grid-row: 1 / 3; }
	.arp-gal__item:nth-child(n+6) { display: none; }
	.arp-gal__item img { transition: transform .4s, filter .2s; }
	.arp-gal__item:hover img { filter: brightness(.92); }
	.arp-gal__count { display: none; }
	.arp-gal__all { display: inline-flex; left: auto; right: 16px; bottom: 16px; }
	.arp-gal--n1 .arp-gal__track { grid-template-columns: 1fr; aspect-ratio: 16 / 7; }
	.arp-gal--n1 .arp-gal__item:first-child { grid-column: 1; grid-row: 1 / 3; }
	.arp-gal--n2 .arp-gal__track { grid-template-columns: 1fr 1fr; }
	.arp-gal--n2 .arp-gal__item:first-child, .arp-gal--n3 .arp-gal__item:first-child { grid-column: 1; grid-row: 1 / 3; }
	.arp-gal--n2 .arp-gal__item:nth-child(2) { grid-row: 1 / 3; }
	.arp-gal--n3 .arp-gal__track { grid-template-columns: 2fr 1fr; }
	.arp-gal--n4 .arp-gal__track { grid-template-columns: 2fr 1fr; grid-template-rows: repeat(3, minmax(0, 1fr)); }
	.arp-gal--n4 .arp-gal__item:first-child { grid-column: 1; grid-row: 1 / 4; }
}

/* Visor a pantalla completa */
.arp-viewer { position: fixed; inset: 0; z-index: 500; display: flex; flex-direction: column; background: #0d0d0d; color: #fff; }
.arp-viewer[hidden] { display: none; }
.arp-viewer__bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.arp-viewer__count { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.arp-viewer__btn, .arp-viewer__nav {
	display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .12); color: #fff; font-size: 24px; line-height: 1;
}
.arp-viewer__btn:hover, .arp-viewer__nav:hover { background: rgba(255, 255, 255, .24); }
.arp-viewer__stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 8px 16px; }
.arp-viewer__img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 4px; }
.arp-viewer__nav { position: absolute; top: 50%; z-index: 2; margin-top: -22px; font-size: 32px; padding-bottom: 4px; }
.arp-viewer__nav--prev { left: 12px; }
.arp-viewer__nav--next { right: 12px; }
@media (max-width: 759px) { .arp-viewer__nav { display: none; } }
.arp-viewer :focus-visible { outline-color: #fff; }

/* ------------------------------------------------------------ pestañas pegajosas */
.arp-tabs { position: sticky; top: var(--arp-header-h); z-index: 50; margin-top: 20px; background: #fff; border-bottom: 1px solid var(--arp-line); }
.arp-tabs__inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.arp-tabs__inner::-webkit-scrollbar { display: none; }
.arp-tabs a {
	flex: none; padding: 17px 14px 15px; border-bottom: 2px solid transparent; font-size: 14px; font-weight: 600; color: var(--arp-muted); text-decoration: none;
}
.arp-tabs a:hover { color: var(--arp-ink); }
.arp-tabs a[aria-current="true"] { color: var(--arp-ink); border-bottom-color: var(--arp-ink); }

/* ------------------------------------------------------------ layout */
.arp-prop__layout { display: grid; gap: 32px; padding-block: 8px 24px; }
.arp-prop__main { min-width: 0; }
.arp-prop__aside { min-width: 0; }
.arp-block-sec { padding-block: 28px; border-bottom: 1px solid var(--arp-line); scroll-margin-top: calc(var(--arp-header-h) + var(--arp-tabs-h) + 8px); }
.arp-block-sec:last-child { border-bottom: 0; }
.arp-block-sec__sub { margin: -8px 0 16px; color: var(--arp-muted); }
#agente { scroll-margin-top: calc(var(--arp-header-h) + var(--arp-tabs-h) + 8px); }
#arp-reserva, #arp-solicitud, #arp-contacto { scroll-margin-top: calc(var(--arp-header-h) + 16px); }

@media (min-width: 960px) {
	.arp-prop__layout { grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; align-items: start; }
	.arp-prop__sticky {
		position: sticky; top: calc(var(--arp-header-h) + var(--arp-tabs-h) + 16px);
		max-height: calc(100vh - var(--arp-header-h) - var(--arp-tabs-h) - 32px); overflow-y: auto; padding: 4px; margin: -4px; scrollbar-width: thin;
	}
}

/* Specs */
.arp-specs { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0 0 24px; padding: 0 0 24px; list-style: none; border-bottom: 1px solid var(--arp-line); }
.arp-specs li { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; }
.arp-specs .arp-icon { width: 24px; height: 24px; color: var(--arp-accent); }

/* Amenidades */
.arp-amen { display: grid; grid-template-columns: 1fr; gap: 14px 24px; margin: 0 0 24px; padding: 0; list-style: none; }
.arp-amen li { display: flex; align-items: center; gap: 14px; font-size: 15px; }
.arp-amen .arp-icon { width: 26px; height: 26px; color: var(--arp-ink); }
@media (min-width: 600px) { .arp-amen { grid-template-columns: 1fr 1fr; } }
.arp-amen--all { grid-template-columns: 1fr; margin: 0; }
.arp-amen--all li { padding-block: 14px; border-bottom: 1px solid var(--arp-line); }

/* Modal */
.arp-modal { position: fixed; inset: 0; z-index: 400; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .5); }
.arp-modal[hidden] { display: none; }
.arp-modal__panel { width: 100%; max-width: 640px; max-height: 88vh; overflow-y: auto; padding: 0 24px 24px; background: #fff; border-radius: var(--arp-radius) var(--arp-radius) 0 0; }
.arp-modal__head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 20px 0 12px; background: #fff; }
.arp-modal__head h2 { font-size: 20px; }
.arp-modal__close { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; }
.arp-modal__close:hover { background: var(--arp-surface); }
@media (min-width: 760px) { .arp-modal { align-items: center; } .arp-modal__panel { border-radius: var(--arp-radius); } }

/* Mapa */
.arp-map { height: 320px; border-radius: var(--arp-radius); overflow: hidden; background: var(--arp-surface); z-index: 0; }
@media (min-width: 760px) { .arp-map { height: 400px; } }
.arp-note { margin: 12px 0 0; font-size: 14px; color: var(--arp-muted); }

/* Políticas */
.arp-policies { display: grid; gap: 20px; margin: 0; }
.arp-policies dt { margin-bottom: 4px; font-size: 14px; font-weight: 700; }
.arp-policies dd { margin: 0; color: #444; }
@media (min-width: 760px) { .arp-policies { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------------------ lateral */
.arp-side-card { margin-bottom: 20px; padding: 20px; border: 1px solid var(--arp-line); border-radius: var(--arp-radius); background: #fff; box-shadow: var(--arp-shadow); }
.arp-side-price { margin: 0 0 14px; font-size: 15px; color: var(--arp-muted); }
.arp-side-price strong { font-size: 26px; font-weight: 700; color: var(--arp-ink); letter-spacing: -.02em; }
.arp-modes { list-style: none; margin: 0 0 18px; padding: 0 0 4px; border-bottom: 1px solid var(--arp-line); }
.arp-modes li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14px; color: var(--arp-muted); }
.arp-modes strong { color: var(--arp-ink); }

/* Formulario de solicitud */
.arp-contact__title { font-size: 18px; margin-bottom: 4px; }
.arp-contact__intro { margin: 0 0 16px; font-size: 14px; color: var(--arp-muted); }
.arp-contact__status { min-height: 1.4em; margin: 12px 0 0; font-size: 14px; }
.arp-contact__status.is-ok { color: var(--arp-ok); font-weight: 600; }
.arp-contact__status.is-error { color: var(--arp-error); font-weight: 600; }

/* Agente */
.arp-agent__label { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--arp-muted); }
.arp-agent__who { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.arp-agent__photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--arp-accent-soft); }
.arp-agent__photo--empty { display: grid; place-items: center; color: var(--arp-accent); font-size: 26px; font-weight: 700; }
.arp-agent__name { margin: 0; font-size: 17px; font-weight: 700; }
.arp-agent__name a { text-decoration: none; }
.arp-agent__role { margin: 0; font-size: 14px; color: var(--arp-muted); }

/* Similares */
.arp-similar { padding-block: 32px 16px; border-top: 1px solid var(--arp-line); margin-top: 16px; }

/* ------------------------------------------------------------ barra inferior móvil */
.arp-bar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 12px var(--arp-gutter) calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--arp-line);
	box-shadow: 0 -4px 18px rgba(0, 0, 0, .08); transition: transform .25s;
}
.arp-bar.is-hidden { transform: translateY(110%); }
.arp-bar__price { min-width: 0; font-size: 14px; color: var(--arp-muted); }
.arp-bar__price strong { display: block; font-size: 17px; color: var(--arp-ink); }
.arp-bar .arp-btn { flex: none; min-width: 132px; }
@media (max-width: 959px) { .arp-prop { padding-bottom: 88px; } }
@media (min-width: 960px) { .arp-bar { display: none; } }
@media (prefers-reduced-motion: reduce) { .arp-bar { transition: none; } }
