:root{
  --dark:#20242b;
  --dark-soft:#4a5160;
  --gold:#b9893f;
  --gold-light:#e9c88f;
  --bg:#f7f5f1;
  --card:#ffffff;
  --line:#e7e2d9;
  --green:#3a7d55;
  --badge-bg:#eaf3ec;
  --radius:16px;
  --shadow:0 10px 30px rgba(32,36,43,0.08);
}
*{box-sizing:border-box;margin:0;padding:0;}
body{
  font-family:'Inter',sans-serif;
  background:var(--bg);
  color:var(--dark);
  line-height:1.5;
  padding-bottom:50px;
}
h1,h2,h3{font-family:'Poppins',sans-serif;}
img{max-width:100%;display:block;}
a{color:inherit;text-decoration:none;}

/* ---------- CINTA FULL BRANDING ---------- */
.fb-ribbon{
  position:fixed;left:0;right:0;bottom:0;height:50px;z-index:9999;
  background:#085A6E;color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-family:'Inter',sans-serif;font-size:1rem;font-weight:600;letter-spacing:.02em;
  text-decoration:none;box-shadow:0 -4px 14px rgba(0,0,0,.15);
  transition:background .2s ease;
}
.fb-ribbon:hover{background:#0a6f87;}

/* ---------- HEADER ---------- */
header{
  background:var(--dark);
  color:#fff;
  padding:16px 24px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px;
}
.back-link{
  display:flex;align-items:center;gap:6px;
  font-size:.85rem;color:#cfe9f7;opacity:.85;
}
.back-link svg{width:16px;height:16px;stroke:#cfe9f7;}
.ref-badge{
  font-size:.8rem;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.18);
  padding:5px 12px;
  border-radius:999px;
  color:#cfe9f7;
}

/* ---------- CONTAINER ---------- */
.wrap{max-width:1080px;margin:0 auto;padding:28px 20px 60px;}

/* ---------- GALLERY ---------- */
.gallery-main{
  position:relative;
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
  aspect-ratio:16/10;
  background:#111;
  cursor:zoom-in;
}
.gallery-main img{
  width:100%;height:100%;object-fit:cover;
  transition:opacity .25s ease;
}
.gallery-counter{
  position:absolute;bottom:14px;right:14px;
  background:rgba(0,0,0,.55);color:#fff;
  font-size:.8rem;padding:5px 11px;border-radius:999px;
}
.gallery-nav{
  position:absolute;top:50%;transform:translateY(-50%);
  width:42px;height:42px;border-radius:50%;
  background:rgba(255,255,255,.9);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 12px rgba(0,0,0,.2);
  cursor:pointer;border:none;
}
.gallery-nav.prev{left:14px;}
.gallery-nav.next{right:14px;}
.gallery-nav svg{width:20px;height:20px;stroke:var(--dark);}

.thumbs{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(72px, 1fr));
  gap:8px;
  margin-top:10px;
}
.thumbs img{
  width:100%;aspect-ratio:1/1;object-fit:cover;
  border-radius:8px;cursor:pointer;
  border:2px solid transparent;
  opacity:.65;
  transition:opacity .2s, border-color .2s;
}
.thumbs img.active{opacity:1;border-color:var(--gold);}
.thumbs img:hover{opacity:1;}

/* ---------- TITLE / PRICE BAR ---------- */
.title-row{
  display:flex;flex-wrap:wrap;gap:20px;
  justify-content:space-between;align-items:flex-end;
  margin-top:30px;padding-bottom:20px;border-bottom:1px solid var(--line);
}
.title-row h1{font-size:1.7rem;font-weight:700;}
.location{
  color:var(--dark-soft);font-size:.95rem;margin-top:6px;
  display:flex;align-items:center;gap:6px;
}
.location svg{width:16px;height:16px;stroke:var(--gold);flex-shrink:0;}
.price-box{text-align:right;}
.price-box .amount{font-size:1.9rem;font-weight:800;color:var(--green);font-family:'Poppins',sans-serif;}
.price-box .period{font-size:.85rem;color:var(--dark-soft);}
.price-box .maint{
  display:inline-block;margin-top:6px;font-size:.75rem;
  background:var(--badge-bg);color:var(--green);padding:3px 10px;border-radius:999px;
}

/* ---------- QUICK STATS ---------- */
.stats{
  display:grid;grid-template-columns:repeat(auto-fit, minmax(110px, 1fr));
  gap:12px;margin:24px 0;
}
.stat-card{
  background:var(--card);border-radius:12px;padding:16px 10px;
  text-align:center;box-shadow:var(--shadow);
}
.stat-card svg{width:26px;height:26px;stroke:var(--gold);margin-bottom:8px;}
.stat-card .val{font-weight:700;font-size:1.05rem;}
.stat-card .lbl{font-size:.75rem;color:var(--dark-soft);}

/* ---------- SECTION ---------- */
section.block{margin-top:38px;}
section.block h2{
  font-size:1.2rem;font-weight:700;margin-bottom:16px;
  display:flex;align-items:center;gap:10px;
}
section.block h2::before{
  content:"";width:5px;height:20px;background:var(--gold);border-radius:3px;
}

.feature-grid{
  display:grid;grid-template-columns:repeat(2,1fr);gap:12px;
}
.feature{
  display:flex;align-items:center;gap:12px;
  background:var(--card);border-radius:12px;padding:14px 16px;
  box-shadow:var(--shadow);
}
.feature .icon{
  width:40px;height:40px;flex-shrink:0;border-radius:10px;
  background:var(--badge-bg);display:flex;align-items:center;justify-content:center;
}
.feature .icon svg{width:20px;height:20px;stroke:var(--gold);}
.feature .txt{font-size:.92rem;font-weight:500;}

.amenity-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:14px;
}
.amenity{
  background:var(--dark);color:#fff;border-radius:12px;
  padding:22px 14px;text-align:center;
}
.amenity .icon{
  width:48px;height:48px;margin:0 auto 10px;border-radius:50%;
  background:rgba(255,255,255,.08);display:flex;align-items:center;justify-content:center;
}
.amenity .icon svg{width:24px;height:24px;stroke:var(--gold-light);}
.amenity .txt{font-size:.88rem;font-weight:600;}

.notes{
  display:flex;flex-wrap:wrap;gap:12px;margin-top:20px;
}
.note{
  flex:1;min-width:220px;
  display:flex;align-items:center;gap:10px;
  background:var(--badge-bg);color:var(--green);
  border-radius:12px;padding:14px 16px;font-size:.88rem;font-weight:600;
}
.note svg{width:20px;height:20px;stroke:var(--green);flex-shrink:0;}
.note.warn{background:#faeee7;color:#b5502a;}
.note.warn svg{stroke:#b5502a;}

/* ---------- UBICACIÓN / STREET VIEW ---------- */
.ficha-map{
  border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);
  border:1px solid var(--line);height:420px!important;
}
.ficha-map iframe{width:100%;height:100%;border:0;display:block;}
.streetview-link{
  display:inline-flex;align-items:center;gap:9px;margin-top:14px;
  background:var(--dark);color:#fff;font-weight:700;font-size:.88rem;
  padding:12px 20px;border-radius:10px;
  transition:background .2s ease, transform .2s ease;
}
.streetview-link svg{width:17px;height:17px;stroke:var(--gold-light);}
.streetview-link:hover{background:#333846;transform:translateY(-2px);}

/* ---------- LIGHTBOX ---------- */
.lightbox{
  position:fixed;inset:0;background:rgba(10,10,10,.94);
  display:none;align-items:center;justify-content:center;z-index:999;
}
.lightbox.open{display:flex;}
.lightbox img{max-width:92vw;max-height:82vh;border-radius:8px;}
.lightbox-close{
  position:absolute;top:20px;right:24px;
  width:42px;height:42px;border-radius:50%;
  background:rgba(255,255,255,.12);border:none;
  display:flex;align-items:center;justify-content:center;cursor:pointer;
}
.lightbox-close svg{width:20px;height:20px;stroke:#fff;}
.lightbox .gallery-nav{background:rgba(255,255,255,.14);}
.lightbox .gallery-nav svg{stroke:#fff;}
.lightbox-counter{
  position:absolute;bottom:24px;left:50%;transform:translateX(-50%);
  color:#fff;font-size:.85rem;
}

@media (max-width:640px){
  .ficha-map{height:340px!important;}
  .thumbs{grid-template-columns:repeat(auto-fill, minmax(56px, 1fr));}
  .feature-grid{grid-template-columns:1fr;}
  .amenity-grid{grid-template-columns:1fr 1fr;}
  .title-row{flex-direction:column;align-items:flex-start;}
  .price-box{text-align:left;}
}
