/* ── Property page ──────────────────────────────────────────────────── */

.property {
  background: var(--warm-white);
  font-family: var(--font-sans);
}

.property .serif {
  font-family: var(--font-serif);
}

/* Per-property accent (--accent set inline via ERB) */
.accent-bg { background-color: var(--accent); }
.accent-text { color: var(--accent); }

/* ── Language switcher ─────────────────────────────────────────────── */

.property-lang {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 20;
  display: flex;
  gap: 0.25rem;
}

.property-lang__btn {
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-lg);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s;
  border: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.property-lang__btn--active {
  background: var(--stone-900);
  color: var(--white);
}

.property-lang__btn--inactive {
  background: rgba(255, 255, 255, 0.8);
  color: var(--stone-500);
  backdrop-filter: blur(4px);

  &:hover { background: var(--white); }
}

/* ── Hero photo grid ───────────────────────────────────────────────── */

.photo-hero {
  position: relative;
  overflow: hidden;
  background: var(--stone-200);
  height: min(62vh, 580px);
}

.photo-hero__empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--stone-100);
  font-size: 5rem;
  user-select: none;
}

.photo-hero__grid {
  display: grid;
  height: 100%;
  grid-template-columns: 1fr;
  gap: 3px;
}

@media (min-width: 768px) {
  .photo-hero__grid {
    grid-template-columns: 3fr 2fr;
  }
}

.photo-hero__cell {
  overflow: hidden;
  cursor: pointer;
}

.photo-hero__cell--full {
  width: 100%;
  height: 100%;
}

.photo-hero__placeholder {
  background: var(--stone-100);
}

.photo-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.photo-hero__cell:hover .photo-hero__img {
  transform: scale(1.04);
}

.photo-hero__right {
  display: none;
}

@media (min-width: 768px) {
  .photo-hero__right {
    display: grid;
    gap: 3px;
  }
}

.photo-hero__show-all {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-xl);
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--stone-800);
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: background 0.15s;

  &:hover { background: var(--white); }
  &:active { transform: scale(0.95); }
}

/* ── Content layout ────────────────────────────────────────────────── */

.property-content {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1rem;
  padding-bottom: 7rem;
}

@media (min-width: 640px) { .property-content { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .property-content { padding-bottom: 4rem; } }

.property-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

@media (min-width: 1024px) {
  .property-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
    column-gap: 3.5rem;
  }
}

@media (min-width: 1280px) {
  .property-layout {
    grid-template-columns: minmax(0, 1fr) 400px;
  }
}

/* ── Main column ───────────────────────────────────────────────────── */

.property-main {
  padding-block: 2.5rem 0;
}

@media (min-width: 1024px) {
  .property-main { padding-block: 3rem 0; }
}

.property-main > * + * {
  margin-top: 3rem;
}

.property-main > hr {
  margin-top: 3rem;
}

.property-main > hr + * {
  margin-top: 3rem;
}

/* ── Property header ──────────────────────────────────────────────── */

.property-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 8vw, 3rem);
  color: var(--stone-900);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.property-header__location {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--stone-500);
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
}

.property-header__location svg {
  width: 1rem;
  height: 1rem;
  color: var(--stone-400);
  flex-shrink: 0;
}

.property-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 1rem;
  color: var(--stone-600);
  margin-bottom: 1.5rem;
}

.property-header__meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.property-header__meta-icon {
  font-size: 1.25rem;
}

.property-header__location--spaced {
  margin-bottom: 1.25rem;
}

.property-header__price {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
}

.property-header__price strong {
  font-size: 2.25rem;
  font-weight: 700;
}

.property-header__price small {
  color: var(--stone-400);
  font-size: 1rem;
}

/* ── Section headings ──────────────────────────────────────────────── */

.property-section h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--stone-900);
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .property-section h2 { font-size: 1.875rem; }
}

.property-section h3 {
  font-weight: 600;
  color: var(--stone-900);
  margin-bottom: 0.75rem;
}

/* ── About ─────────────────────────────────────────────────────────── */

.property-about {
  color: var(--stone-600);
  line-height: 1.75;
  max-width: 65ch;
}

.property-about--small {
  font-size: 0.875rem;
}

.property-things-to-do {
  margin-top: 2rem;
}

/* ── Bedrooms ──────────────────────────────────────────────────────── */

.bedroom-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  margin-inline: -1rem;
  padding-inline: 1rem;
  scrollbar-width: none;

  &::-webkit-scrollbar { display: none; }
}

@media (min-width: 1024px) {
  .bedroom-scroll {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }
}

.bedroom-card {
  flex-shrink: 0;
  width: 10rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--stone-200);
  background: var(--white);
  padding: 1.25rem 1.125rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (min-width: 480px) {
  .bedroom-card { width: 11rem; }
}

@media (min-width: 1024px) {
  .bedroom-card {
    width: auto;
    align-items: flex-start;
    text-align: left;
  }
}

.bedroom-card__icon {
  font-size: 2.25rem;
  margin-bottom: 0.875rem;
  line-height: 1;
}

.bedroom-card__name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--stone-900);
  margin-bottom: 0.25rem;
}

.bedroom-card__type {
  font-size: 0.8125rem;
  color: var(--stone-500);
}

.bedroom-card__capacity {
  font-size: 0.8125rem;
  color: var(--stone-400);
  margin-top: 0.25rem;
}

/* ── Amenities ─────────────────────────────────────────────────────── */

.amenity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1rem;
}

@media (min-width: 768px) {
  .amenity-grid { grid-template-columns: repeat(3, 1fr); }
}

.amenity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 0.9375rem;
  color: var(--stone-700);
  border-bottom: 1px solid var(--stone-100);
}

.amenity__icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stone-500);
}

.amenity-toggle {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--stone-900);
  text-decoration: underline;
  text-underline-offset: 4px;
  background: none;
  border: none;
  transition: color 0.15s;

  &:hover { color: var(--stone-600); }
}

/* ── Gallery ───────────────────────────────────────────────────────── */

.gallery {
  columns: 2;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .gallery { columns: 3; }
}

.gallery__item {
  break-inside: avoid;
  overflow: hidden;
  border-radius: var(--radius-xl);
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.gallery__img {
  width: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.gallery__item:hover .gallery__img {
  transform: scale(1.05);
}

/* ── Map ───────────────────────────────────────────────────────────── */

.property-map {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--stone-200);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  height: 340px;
}

/* ── Rules ─────────────────────────────────────────────────────────── */

.rules-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--stone-200);
  background: var(--white);
  padding: 1.5rem;
}

.rules-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.rules-card__row:first-child { padding-top: 0; }
.rules-card__row + .rules-card__row { border-top: 1px solid var(--stone-100); }

.rules-card__label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--stone-600);
}

.rules-card__label span:first-child {
  font-size: 1.25rem;
}

.rules-card__value {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--stone-900);
  font-variant-numeric: tabular-nums;
}

.rules-card__text {
  padding-top: 1rem;
  border-top: 1px solid var(--stone-100);
  font-size: 0.875rem;
  color: var(--stone-600);
  line-height: 1.6;
  white-space: pre-line;
}

/* ── Contact card ──────────────────────────────────────────────────── */

.contact-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--stone-200);
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.contact-card__price {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--stone-100);
}

.contact-card__price-label {
  font-size: 0.75rem;
  color: var(--stone-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.contact-card__price-amount {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.contact-card__price-amount strong {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--stone-900);
}

.contact-card__price-amount small {
  font-size: 0.875rem;
  color: var(--stone-400);
}

.contact-card__body {
  padding: 1.25rem 1.5rem;
}

.contact-card__heading {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--stone-400);
  margin-bottom: 1rem;
}

.contact-card__actions > * + * {
  margin-top: 0.75rem;
}

/* WhatsApp button */
.contact-whatsapp {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  border-radius: var(--radius-xl);
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  background: #25D366;
  border: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: opacity 0.15s;

  &:hover { opacity: 0.9; }
  &:active { transform: scale(0.98); }
}

.contact-whatsapp svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.contact-whatsapp__label { flex: 1; }
.contact-whatsapp__arrow { width: 1rem; height: 1rem; opacity: 0.7; }

/* Secondary contact buttons */
.contact-secondary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  border-radius: var(--radius-xl);
  border: 1px solid var(--stone-200);
  background: var(--white);
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--stone-800);
  transition: border-color 0.15s, background 0.15s;

  &:hover {
    border-color: var(--stone-400);
    background: var(--stone-50);
  }
  &:active { transform: scale(0.98); }
}

.contact-secondary__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-secondary__icon svg {
  width: 1rem;
  height: 1rem;
  color: var(--white);
}

.contact-secondary__text {
  flex: 1;
}

.contact-secondary__sublabel {
  display: block;
  font-size: 0.75rem;
  color: var(--stone-400);
  line-height: 1;
  margin-bottom: 0.125rem;
}

.contact-secondary__value {
  font-weight: 600;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

/* OTA links */
.contact-ota {
  padding: 0.25rem 1.5rem 1.25rem;
}

.contact-ota__label {
  font-size: 0.75rem;
  color: var(--stone-400);
  margin-bottom: 0.75rem;
}

.contact-ota__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ota-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--stone-200);
  background: var(--stone-50);
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--stone-700);
  transition: background 0.15s;

  &:hover { background: var(--stone-100); }
}

.ota-badge__icon {
  width: 1rem;
  height: 1rem;
  border-radius: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.ota-badge__icon--booking {
  background-color: #003580;
}

.ota-badge__icon--airbnb {
  background-color: #ff5a5f;
}

.ota-badge__icon svg {
  width: 0.875rem;
  height: 0.875rem;
}

.ota-badge__icon--booking svg {
  width: 0.8125rem;
  height: 0.8125rem;
}

.ota-badge__external {
  width: 0.75rem;
  height: 0.75rem;
  opacity: 0.5;
}

/* ── Mobile sticky bar ─────────────────────────────────────────────── */

.mobile-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--stone-200);
  padding: 0.75rem 1rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}

@media (min-width: 1024px) {
  .mobile-bar { display: none; }
}

.mobile-bar__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-bar__price {
  flex: 1;
}

.mobile-bar__price-label {
  font-size: 0.75rem;
  color: var(--stone-400);
  line-height: 1;
  margin-bottom: 0.125rem;
}

.mobile-bar__price-amount {
  font-weight: 700;
  color: var(--stone-900);
  line-height: 1;
}

.mobile-bar__price-amount small {
  font-weight: 400;
  color: var(--stone-400);
  font-size: 0.75rem;
}

.mobile-bar__name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--stone-900);
}

.mobile-bar__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--radius-xl);
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  border: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: opacity 0.15s;

  &:active { transform: scale(0.95); }
}

.mobile-bar__cta--whatsapp {
  background-color: #25D366;
}

.mobile-bar__cta svg {
  width: 1rem;
  height: 1rem;
}

/* ── Sidebar ───────────────────────────────────────────────────────── */

.property-sidebar {
  display: none;
  padding-block: 3rem;
}

@media (min-width: 1024px) {
  .property-sidebar { display: block; }
}

.property-sidebar__sticky {
  position: sticky;
  top: 2rem;
}

/* Mobile contact section (visible < lg) */
.property-mobile-contact {
  display: block;
}

@media (min-width: 1024px) {
  .property-mobile-contact { display: none; }
}

/* ── Lightbox ──────────────────────────────────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lightbox-fade 0.15s ease;
}

.lightbox[hidden] { display: none; }

@keyframes lightbox-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox__counter {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-full);
  transition: color 0.15s, background 0.15s;

  &:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
  }
}

.lightbox__close {
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
}

.lightbox__close svg { width: 1.5rem; height: 1.5rem; }

.lightbox__prev,
.lightbox__next {
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
}

.lightbox__prev { left: 1rem; }
.lightbox__next { right: 1rem; }

.lightbox__prev svg,
.lightbox__next svg {
  width: 1.75rem;
  height: 1.75rem;
}

.lightbox__image {
  max-width: 88vw;
  max-height: 88vh;
  object-fit: contain;
  user-select: none;
  border-radius: 4px;
  transition: opacity 0.2s ease;
}

/* Immediate feedback while the next photo is still downloading */
.lightbox--loading .lightbox__image {
  opacity: 0.35;
}

.lightbox__spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.5rem;
  height: 2.5rem;
  margin: -1.25rem 0 0 -1.25rem;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-full);
  opacity: 0;
  pointer-events: none;
  animation: lightbox-spin 0.7s linear infinite;
}

.lightbox--loading .lightbox__spinner {
  opacity: 1;
}

@keyframes lightbox-spin {
  to { transform: rotate(360deg); }
}

/* ── Property footer ──────────────────────────────────────────────── */

.property-footer {
  border-top: 1px solid var(--stone-200);
  background: var(--white);
  padding: 1.5rem 0;
  text-align: center;
}

.property-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.property-footer__brand {
  font-size: 0.75rem;
  color: var(--stone-400);
}

.property-footer__brand a {
  font-weight: 600;
  color: var(--stone-600);
  transition: color 0.15s;
  &:hover { color: var(--stone-900); }
}

.property-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  font-size: 10px;
  color: var(--stone-400);
}

.property-footer__legal a {
  &:hover { color: var(--stone-600); }
}
