/* ─── VARIABLES ───────────────────────────────────────────── */
:root {
  --terracota: #a04a2e;
  --terracota-light: #B8652A;
  --arena:     #EDE9E1;
  --arena-dark:#D9D3C7;
  --negro:     #111009;
  --negro-soft:#1C1A15;
  --blanco:    #F8F5EF;
  --muted:     #7A7570;
  --line:      rgba(255,255,255,0.1);
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Outfit', sans-serif;
}

/* ─── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--negro);
  color: var(--arena);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; width: 100%; }
a { text-decoration: none; color: inherit; }

/* ─── GRAIN ───────────────────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ─── NAVBAR ──────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 24px 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: padding 0.4s ease, background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
#navbar.scrolled {
  padding: 16px 56px;
  background: rgba(17,16,9,0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--line);
}
#navbar.solid {
  padding: 22px 56px;
  background: var(--negro);
  border-bottom-color: var(--line);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-mark {
  width: 32px; height: 32px;
  flex-shrink: 0;
}
.logo-mark svg { width: 100%; height: 100%; display: block; }
.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}
.logo-name {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--arena);
}
.logo-sub {
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--arena-dark);
  transition: color 0.25s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--terracota);
  transition: width 0.3s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--blanco); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-cta {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--arena);
  border: 1px solid rgba(237,233,225,0.3);
  padding: 12px 26px;
  transition: border-color 0.3s, color 0.3s;
}
.nav-cta:hover {
  border-color: var(--terracota);
  color: var(--terracota);
}

/* ─── NÚMEROS ALINEADOS ───────────────────────────────────── */
.prop-price, .prop-row-price, .sidebar-price,
.spec-cell-val, .spec-val, .spec-block .spec-val,
.channel-val, .prop-specs .spec strong,
.prop-row-specs .spec-val {
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}

/* ─── BOTONES ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  background: var(--terracota);
  color: var(--blanco);
  padding: 16px 36px;
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}
.btn-primary:hover { background: #8a3e26; transform: translateY(-1px); }

.btn-ghost {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--arena-dark);
  padding: 16px 0;
  border-bottom: 1px solid rgba(237,233,225,0.3);
  transition: color 0.3s, border-color 0.3s;
}
.btn-ghost:hover { color: var(--blanco); border-color: var(--arena); }

.btn-outline {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--arena);
  border: 1px solid rgba(237,233,225,0.3);
  padding: 14px 32px;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.btn-outline:hover {
  border-color: var(--terracota);
  color: var(--terracota);
}

/* ─── SECTION HELPERS ─────────────────────────────────────── */
.section-kicker {
  font-size: 10px;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--terracota);
  margin-bottom: 14px;
  display: block;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.5vw, 52px);
  font-weight: 300;
  line-height: 1.1;
  color: var(--blanco);
}
.section-title em { font-style: italic; }

/* ─── WHATSAPP FLOTANTE ───────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 900;
  width: 52px; height: 52px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.35);
  transition: transform 0.3s, box-shadow 0.3s;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,0.5);
}
.whatsapp-float svg { width: 26px; height: 26px; fill: white; }

/* ─── FOOTER ──────────────────────────────────────────────── */
footer {
  background: var(--negro-soft);
  border-top: 1px solid var(--line);
  padding: 48px 56px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.footer-logo { display: flex; align-items: center; gap: 12px; }
.footer-copy {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.1em;
}
.footer-links {
  display: flex;
  gap: 28px;
  justify-content: flex-end;
}
.footer-links a {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s;
}
.footer-links a:hover { color: var(--arena); }

/* ─── ANIMACIONES ─────────────────────────────────────────── */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.22s; }
.reveal-delay-3 { transition-delay: 0.34s; }
.reveal-delay-4 { transition-delay: 0.46s; }

/* ─── MOBILE ──────────────────────────────────────────────── */
/* ─── HAMBURGER ───────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--arena);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-mobile-brand, .nav-mobile-cta-li { display: none; }

@media (max-width: 900px) {
  #navbar, #navbar.scrolled, #navbar.solid { padding: 18px 24px; }
  .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links {
    position: fixed;
    inset: 0;
    background: var(--negro);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 72px 40px 56px;
    gap: 0;
    display: flex;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 999;
  }
  .nav-links.open { opacity: 1; pointer-events: all; }
  .nav-mobile-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-bottom: 48px;
    width: 100%;
  }
  .nav-mobile-brand svg { width: 48px; height: 48px; }
  .nav-mobile-brand .logo-name {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.28em;
    color: var(--arena);
  }
  .nav-mobile-brand .logo-sub {
    font-size: 9px;
    letter-spacing: 0.32em;
    color: var(--muted);
    text-transform: uppercase;
  }
  .nav-links > li:not(.nav-mobile-brand) {
    border-top: 1px solid var(--line);
    width: 100%;
    text-align: center;
  }
  .nav-links a {
    font-size: 13px;
    letter-spacing: 0.3em;
    color: var(--arena-dark);
    padding: 22px 0;
    display: block;
  }
  .nav-links a:hover, .nav-links a.active { color: var(--blanco); }
  .nav-mobile-cta-li {
    display: block;
    margin-top: auto;
    padding-top: 48px;
    border-top: none !important;
    text-align: center;
  }
  .nav-mobile-cta-li .btn-primary { padding: 16px 48px; font-size: 10px; }
  footer { padding: 32px 24px; grid-template-columns: 1fr; text-align: center; gap: 20px; }
  .footer-logo { justify-content: center; }
  .footer-links { justify-content: center; }
  .whatsapp-float { bottom: 20px; right: 20px; width: 46px; height: 46px; }
}

/* ─── PROPIEDADES (compartido) ────────────────────────────── */
.hero-main-img { grid-row: 1 / 3; position: relative; overflow: hidden; }
.hero-main-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-thumb { position: relative; overflow: hidden; }
.hero-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.hero-thumb:hover img { transform: scale(1.05); }
.gallery-btn {
  position: absolute;
  bottom: 20px; right: 20px;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  background: rgba(17,16,9,0.75);
  backdrop-filter: blur(8px);
  color: var(--arena);
  border: 1px solid var(--line);
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.3s;
}
.gallery-btn:hover { background: rgba(17,16,9,0.92); }

.prop-content {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
  border-top: 1px solid var(--line);
}
.prop-main {
  padding: 72px 80px 100px 56px;
  border-right: 1px solid var(--line);
}
.prop-breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 44px;
}
.prop-breadcrumb a { transition: color 0.25s; }
.prop-breadcrumb a:hover { color: var(--arena); }
.prop-breadcrumb span { color: rgba(255,255,255,0.2); }
.prop-header-tag {
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--terracota);
  margin-bottom: 12px;
}
.prop-header-name {
  font-family: var(--font-serif);
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 300;
  color: var(--blanco);
  line-height: 1;
  margin-bottom: 8px;
}
.prop-header-location {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 48px;
}
.prop-specs-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line);
  margin-bottom: 64px;
}
.spec-cell {
  padding: 24px 20px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.spec-cell:last-child { border-right: none; }
.spec-cell-val {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 300;
  color: var(--blanco);
  line-height: 1;
}
.spec-cell-label {
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
.prop-desc-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--blanco);
  margin-bottom: 20px;
}
.prop-desc-body {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.95;
  margin-bottom: 20px;
}
.extras-section { margin-top: 56px; }
.extras-title {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--blanco);
  margin-bottom: 24px;
}
.extras-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.extra-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.extra-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--terracota);
  flex-shrink: 0;
}
.amenidades-section { margin-top: 56px; }
.amenidades-title {
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}
.amenidades-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.amenidad-tag {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--arena-dark);
  border: 1px solid var(--line);
  padding: 8px 16px;
}
.prop-sidebar {
  padding: 72px 48px;
  position: sticky;
  top: 72px;
  align-self: start;
}
.sidebar-price-label {
  font-size: 9px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--terracota);
  margin-bottom: 8px;
}
.sidebar-price {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 300;
  color: var(--blanco);
  margin-bottom: 4px;
}
.sidebar-price-sub {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 36px;
}
.sidebar-divider { height: 1px; background: var(--line); margin: 28px 0; }
.sidebar-cta-stack { display: flex; flex-direction: column; gap: 12px; }
.sidebar-cta-stack .btn-primary,
.sidebar-cta-stack .btn-outline { text-align: center; width: 100%; }
.sidebar-info { margin-top: 36px; display: flex; flex-direction: column; gap: 16px; }
.sidebar-info-item { display: flex; flex-direction: column; gap: 4px; }
.sidebar-info-label {
  font-size: 9px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--muted);
}
.sidebar-info-val { font-size: 14px; color: var(--arena-dark); }

/* ─── LIGHTBOX ────────────────────────────────────────────── */
.lb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(10,9,7,0.97);
  flex-direction: column;
}
.lb-overlay.open { display: flex; }
.lb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.lb-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 300;
  color: var(--blanco);
  letter-spacing: 0.05em;
}
.lb-counter { font-size: 11px; color: var(--muted); letter-spacing: 0.2em; }
.lb-close {
  background: none;
  border: 1px solid var(--line);
  color: var(--arena);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 8px 20px;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
}
.lb-close:hover { border-color: var(--terracota); color: var(--terracota); }
.lb-cats {
  display: flex;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  overflow-x: auto;
}
.lb-cat {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.25s, border-color 0.25s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.lb-cat:hover { color: var(--arena); }
.lb-cat.active { color: var(--terracota); border-bottom-color: var(--terracota); }
.lb-grid-wrap { flex: 1; overflow-y: auto; padding: 24px 32px; }
.lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px; }
.lb-thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.lb-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s, opacity 0.3s;
}
.lb-thumb:hover img { transform: scale(1.05); }
.lb-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(17,16,9,0);
  transition: background 0.3s;
}
.lb-thumb:hover::after { background: rgba(17,16,9,0.2); }
.lb-viewer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(7,6,5,0.98);
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.lb-viewer.open { display: flex; }
.lb-viewer-img { max-width: 90vw; max-height: 80vh; object-fit: contain; }
.lb-viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(17,16,9,0.6);
  border: 1px solid var(--line);
  color: var(--arena);
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
  backdrop-filter: blur(8px);
}
.lb-viewer-nav:hover { background: rgba(160,74,46,0.3); border-color: var(--terracota); }
.lb-viewer-nav.prev { left: 24px; }
.lb-viewer-nav.next { right: 24px; }
.lb-viewer-nav svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.lb-viewer-close {
  position: absolute;
  top: 20px; right: 20px;
  background: rgba(17,16,9,0.6);
  border: 1px solid var(--line);
  color: var(--arena);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 8px 20px;
  cursor: pointer;
  transition: border-color 0.25s;
  backdrop-filter: blur(8px);
}
.lb-viewer-close:hover { border-color: var(--terracota); color: var(--terracota); }
.lb-viewer-counter {
  position: absolute;
  bottom: 24px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.2em;
}

@media (max-width: 900px) {
  .prop-content { grid-template-columns: 1fr; }
  .prop-main { padding: 48px 24px 64px; border-right: none; }
  .prop-sidebar { padding: 40px 24px; position: static; border-top: 1px solid var(--line); }
  .prop-specs-grid { grid-template-columns: repeat(3, 1fr); }
  .extras-grid { grid-template-columns: 1fr; }
  .lb-header { padding: 16px 20px; }
  .lb-grid-wrap { padding: 16px 20px; }
  .lb-grid { grid-template-columns: repeat(2, 1fr); }
  .lb-viewer-nav.prev { left: 12px; }
  .lb-viewer-nav.next { right: 12px; }
}
