/* ===================================================
   DESIGN SYSTEM — Martin Ragusa Propiedades
   Luxury · Minimalist · Modern
=================================================== */


:root {
  --navy:        #0d1b2e;
  --navy-700:    #1a2e4a;
  --navy-500:    #2a4470;
  --cream:       #faf8f4;
  --cream-dark:  #f2ede4;
  --gold:        #c9a96e;
  --gold-light:  #f5edd8;
  --gold-muted:  #9e7d48;
  --white:       #ffffff;
  --text:        #1a2434;
  --muted:       #6b7a8d;
  --muted-light: #a0aebf;
  --line:        #e2ddd6;
  --line-light:  #ede9e2;
  --radius:      4px;
  --radius-md:   6px;
  --radius-lg:   10px;
  --shadow:      0 8px 32px rgba(13, 27, 46, 0.07);
  --shadow-md:   0 16px 48px rgba(13, 27, 46, 0.11);
  --shadow-lg:   0 24px 64px rgba(13, 27, 46, 0.16);
}

/* === RESET === */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  font-weight: 400;
  background: var(--white);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, p { margin: 0; }

/* === TYPOGRAPHY — headings get the serif treatment === */
h1, h2, h3,
.property-detail-title,
.hero h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* === LAYOUT === */
.container {
  width: min(1160px, 92%);
  margin: 0 auto;
}

/* === FADE-IN ANIMATION === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === HEADER / NAV === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line-light);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--navy);
}

.brand-logo {
  height: 48px;
  width: auto;
  display: block;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #c9a163, #ab7c37);
  color: var(--white);
  font-weight: 700;
}

/* === HAMBURGER BUTTON === */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.nav-toggle:hover { background: var(--cream); }

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === MOBILE NAV OVERLAY === */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13, 27, 46, 0.5);
  z-index: 19;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
}

.mobile-nav-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* === MOBILE NAV DRAWER === */
.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--white);
  z-index: 20;
  padding: 80px 28px 32px;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 32px;
  box-shadow: -8px 0 32px rgba(13, 27, 46, 0.12);
}

.mobile-nav.is-open {
  transform: translateX(0);
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav ul a {
  display: block;
  padding: 12px 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--navy);
  border-bottom: 1px solid var(--line-light);
  transition: color 0.2s;
  letter-spacing: 0.01em;
}

.mobile-nav ul a:hover { color: var(--gold-muted); }

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 32px;
  color: var(--navy);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}

.nav-list a {
  position: relative;
  padding-bottom: 3px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-list a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-list a:hover,
.nav-list a:focus-visible { color: var(--gold-muted); }

.nav-list a:hover::after,
.nav-list a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--radius);
  padding: 11px 24px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  border: 1.5px solid transparent;
  transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--navy-700);
  border-color: var(--navy-700);
  box-shadow: 0 4px 16px rgba(13, 27, 46, 0.2);
}

.btn-outline {
  border-color: var(--gold);
  color: var(--navy);
  background: transparent;
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--gold-light);
  border-color: var(--gold);
}

.btn-full { width: 100%; }

/* === WHATSAPP FLOAT === */
.whatsapp-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 100;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.52);
}

/* === HERO === */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--navy);
  padding: 96px 0 72px;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    rgba(13, 27, 46, 0.88) 0%,
    rgba(13, 27, 46, 0.72) 50%,
    rgba(13, 27, 46, 0.45) 100%
  );
  z-index: 0;
}

.hero-bg-slider {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-bg-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.1s ease;
}

.hero-bg-slide.is-active { opacity: 1; }

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--gold);
  margin-bottom: 16px;
  font-family: 'DM Sans', sans-serif;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(2rem, 2.2vw + 1.1rem, 3.2rem);
  color: var(--white);
  line-height: 1.18;
  font-weight: 500;
}

.hero-text {
  margin-top: 20px;
  color: rgba(255,255,255,0.72);
  max-width: 60ch;
  font-size: 1.02rem;
  line-height: 1.7;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero .btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
  font-weight: 600;
}

.hero .btn-primary:hover {
  background: #b8945a;
  border-color: #b8945a;
  box-shadow: 0 4px 16px rgba(201, 169, 110, 0.35);
}

.hero .btn-outline {
  border-color: rgba(255,255,255,0.45);
  color: var(--white);
}

.hero .btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
}

.hero-stats {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 12px;
}

.hero-stats article {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.05);
  padding: 14px 16px;
  backdrop-filter: blur(4px);
}

.hero-stats strong {
  display: block;
  color: var(--white);
  font-size: 1.2rem;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
}

.hero-stats span {
  color: rgba(255,255,255,0.6);
  font-size: 0.83rem;
}

/* === HERO FEATURED CARD === */
.hero-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: fadeUp 0.7s 0.2s both;
}

.hero-card-image {
  width: 100%;
  height: 210px;
  display: block;
  object-fit: cover;
}

.hero-card-body {
  padding: 22px 24px 26px;
}

.card-label {
  color: var(--gold-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-label::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--gold);
}

.hero-card h2 {
  color: var(--navy);
  font-size: 1.35rem;
  line-height: 1.3;
}

.hero-card p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.price {
  margin-top: 16px;
  color: var(--navy);
  font-weight: 600;
  font-size: 1.35rem;
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.expensas-price {
  margin-top: 4px !important;
  color: var(--muted) !important;
  font-size: 1rem !important;
  font-family: 'DM Sans', sans-serif !important;
}

/* === SECTIONS === */
.section { padding: 80px 0; }

.section-soft {
  background: var(--cream);
}

.section-head {
  max-width: 680px;
  margin-bottom: 48px;
}

.section-head .eyebrow {
  color: var(--gold-muted);
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 2vw + 0.8rem, 2.6rem);
  line-height: 1.18;
  color: var(--navy);
  font-weight: 500;
}

/* === PROPERTY CAROUSEL === */
.property-carousel-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.property-carousel-wrap .property-grid {
  flex: 1;
  min-width: 0;
  margin-top: 0;
}

.carousel-btn {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  transition: border-color 0.2s, background 0.2s, opacity 0.2s;
  align-self: center;
}

.carousel-btn:hover:not(:disabled) {
  border-color: var(--gold);
  background: var(--gold-light);
}

.carousel-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

.property-grid,
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.services-grid { margin-top: 0; }

.property-section + .property-section { margin-top: 32px; }

.property-group-title {
  margin-top: 36px;
  margin-bottom: 4px;
  color: var(--navy);
  font-size: 1.1rem;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* === PROPERTY CARD === */
.property-card {
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(13, 27, 46, 0.05);
  transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

a.property-card {
  display: block;
  color: inherit;
  cursor: pointer;
}

a.property-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--line);
}

.property-content { padding: 20px 22px 22px; }

.property-image-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.property-image-blur {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(18px);
  transform: scale(1.06);
  opacity: 0.75;
}

.property-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.5s ease;
}

a.property-card:hover .property-image { transform: scale(1.03); }

.property-badge {
  display: inline-block;
  background: var(--gold-light);
  color: var(--gold-muted);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  padding: 4px 10px;
}

.property-card h3 {
  margin-top: 12px;
  color: var(--navy);
  font-size: 1.05rem;
  line-height: 1.35;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 1.2rem;
}

.property-card p:not(.price):not(.expensas-price) {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.property-message {
  margin-top: 24px;
  color: var(--muted);
}

.empty-state {
  margin: 0;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: var(--cream);
  font-size: 0.92rem;
}

/* === SERVICES GRID === */
.services-grid article {
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.services-grid article:hover {
  box-shadow: var(--shadow);
  border-color: var(--line);
}

.services-grid h3 {
  color: var(--navy);
  font-size: 1.25rem;
  margin-bottom: 10px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
}

.services-grid p {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.65;
}

/* === ABOUT / TESTIMONIAL === */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-grid h2 {
  font-size: clamp(1.6rem, 1.8vw + 0.8rem, 2.4rem);
  color: var(--navy);
  line-height: 1.2;
}

.about-grid p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

blockquote {
  margin: 0;
  border-left: 2px solid var(--gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--cream);
  padding: 28px 28px 28px 32px;
  color: var(--navy);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.65;
}

cite {
  margin-top: 16px;
  display: block;
  font-style: normal;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--gold-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* === FOOTER === */
.site-footer {
  background: var(--navy);
  color: #dde4f0;
  padding: 64px 0 24px;
}

.site-footer h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 1.8rem;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: start;
}

.contact-list p {
  margin-top: 10px;
  font-size: 0.94rem;
}

.contact-form-card {
  margin-top: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 28px;
}

.contact-form-card h3 {
  color: var(--white);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 1.5rem;
}

.contact-form-text {
  margin-top: 8px;
  color: rgba(255,255,255,0.58);
  font-size: 0.9rem;
}

.contact-form {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: rgba(255,255,255,0.82);
  font-weight: 500;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 10px 14px;
  font: inherit;
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.contact-form select option {
  background-color: var(--navy);
  color: var(--white);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255,255,255,0.35);
}

.contact-form-full { grid-column: 1 / -1; }

.contact-form-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.contact-form-actions .btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
  font-weight: 600;
}

.contact-form-actions .btn-primary:hover {
  background: #b8945a;
  border-color: #b8945a;
}

.contact-form-note {
  color: rgba(255,255,255,0.42);
  font-size: 0.84rem;
}

.contact-form-feedback {
  margin: 0;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.9rem;
  background: rgba(187, 231, 205, 0.1);
  border: 1px solid rgba(187, 231, 205, 0.4);
  color: #c8f0d8;
}

.contact-form-feedback.is-error {
  background: rgba(246, 199, 199, 0.1);
  border-color: rgba(246, 199, 199, 0.4);
  color: #ffd8d8;
}

.copyright {
  text-align: center;
  margin-top: 40px;
  color: rgba(255,255,255,0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* === RESPONSIVE === */
@media (max-width: 980px) {
  .nav-list,
  .nav-cta { display: none; }

  .nav-toggle { display: flex; }

  .mobile-nav-overlay { display: block; }

  .hero-grid,
  .services-grid,
  .about-grid,
  .footer-grid { grid-template-columns: 1fr; }

  /* Carousel en mobile: scroll snap nativo, sin flechas */
  .carousel-btn { display: none !important; }

  .property-carousel-wrap {
    gap: 0;
    overflow: hidden;
  }

  .property-carousel-wrap .property-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 14px;
    padding: 4px 2px 12px;
    grid-template-columns: none;
  }

  .property-carousel-wrap .property-grid::-webkit-scrollbar {
    display: none;
  }

  .property-carousel-wrap .property-grid > * {
    flex: 0 0 82%;
    scroll-snap-align: start;
    min-width: 0;
  }

  .hero {
    padding: 72px 0 52px;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 5vw, 2.6rem);
  }

  .section-head { margin-bottom: 32px; }
}

@media (max-width: 600px) {
  .property-grid { grid-template-columns: 1fr; }

  .visit-form { grid-template-columns: 1fr; }

  .gallery-layout {
    max-width: 100%;
  }
  .gallery-thumbs-col {
    width: 70px;
  }

  .gallery-thumbs-col {
    flex-direction: row;
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
  }

  .gallery-thumb-v {
    width: 72px;
    aspect-ratio: 4/3;
    flex-shrink: 0;
  }

  .similar-grid { grid-template-columns: 1fr; }

  .hero-stats { grid-template-columns: repeat(3, 1fr); }

  .hero-stats article { padding: 10px 12px; }

  .hero-stats strong { font-size: 1rem; }

  .hero-stats span { font-size: 0.75rem; }
}

@media (max-width: 640px) {
  .contact-form { grid-template-columns: 1fr; }
  .hero { padding-top: 68px; }
  .section { padding: 52px 0; }
  .admin-form-grid { grid-template-columns: 1fr; }
}

/* ===================================================
   ADMIN PANEL
=================================================== */

.admin-page { background: var(--cream); }

.admin-layout {
  display: grid;
  gap: 24px;
}

.admin-card {
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(13, 27, 46, 0.05);
  padding: 28px;
}

.admin-card h1,
.admin-card h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  color: var(--navy);
}

.admin-subtitle {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-form {
  margin-top: 20px;
  display: grid;
  gap: 16px;
}

.admin-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-form label {
  display: grid;
  gap: 8px;
  color: var(--navy);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.admin-form label[hidden] { display: none; }

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.admin-form textarea { resize: vertical; }

.full-width { grid-column: 1 / -1; }

.price-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.currency-toggle {
  display: flex;
  gap: 6px;
}

.currency-btn {
  padding: 5px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
  font-weight: 500;
  font-size: 0.83rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  letter-spacing: 0.03em;
}

.currency-btn.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.currency-btn:hover:not(.is-active) {
  border-color: var(--navy-500);
}

.price-field {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}

.price-field:focus-within { border-color: var(--gold); }

.price-field input {
  border: none !important;
  border-radius: 0 !important;
  flex: 1;
  min-width: 0;
}

.price-symbol {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--cream);
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--navy);
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.form-message {
  margin-top: 12px;
  color: #13653f;
  background: #e8f8ef;
  border: 1px solid #bbe7cd;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.9rem;
}

.form-message-error {
  color: #8f1f1f;
  background: #fdecec;
  border-color: #f6c7c7;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-toolbar p { margin: 0; font-size: 0.9rem; }

.admin-property-list {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-property-card {
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
}

.admin-property-image-wrap {
  aspect-ratio: 16 / 10;
  background: var(--cream);
}

.admin-property-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-property-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted-light);
}

.admin-property-content { padding: 16px; }

.admin-property-meta {
  font-size: 0.84rem;
  color: var(--muted);
}

.admin-property-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-btn { padding: 8px 14px; font-size: 0.85rem; }

.action-danger {
  border-color: #e8b4b4;
  color: #9f2f2f;
}

@media (max-width: 900px) {
  .admin-form-grid,
  .admin-property-list { grid-template-columns: 1fr; }
}

/* ===================================================
   PROPERTY DETAIL PAGE
=================================================== */

.back-btn {
  display: inline-flex;
  margin-bottom: 32px;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
}

.property-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.gallery-layout {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 680px;
}

.gallery-layout .gallery-main-wrap {
  flex: 1;
  min-width: 0;
}

.gallery-thumbs-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 420px;
  flex-shrink: 0;
  width: 90px;
}

.gallery-thumb-v {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  cursor: pointer;
  opacity: 0.5;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: opacity 0.2s, border-color 0.2s;
}

.gallery-thumb-v.active,
.gallery-thumb-v:hover {
  opacity: 1;
  border-color: var(--gold);
}

.property-info-section {
  margin-top: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line-light);
}

.property-contact-section {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--line-light);
}

.property-contact-section h2 {
  color: var(--navy);
  font-size: 1.4rem;
  margin-bottom: 18px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
}

.gallery-main-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-md);
  width: 100%;
}

.gallery-blur {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(18px);
  transform: scale(1.06);
  opacity: 0.75;
}

.gallery-main {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.gallery-thumb {
  width: 76px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius);
  cursor: pointer;
  opacity: 0.5;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: opacity 0.2s, border-color 0.2s;
}

.gallery-thumb.active,
.gallery-thumb:hover {
  opacity: 1;
  border-color: var(--gold);
}

.property-detail-title {
  font-size: clamp(1.6rem, 2vw + 0.8rem, 2.2rem);
  color: var(--navy);
  line-height: 1.2;
  margin-top: 12px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
}

.property-detail-features {
  color: var(--muted);
  margin-top: 10px;
  font-size: 0.93rem;
}

.property-detail-location {
  color: var(--muted);
  margin-top: 8px;
  font-size: 0.93rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.property-detail-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line-light);
}

.property-detail-section h2 {
  color: var(--navy);
  font-size: 1.2rem;
  margin-bottom: 10px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
}

.property-detail-section p {
  color: var(--muted);
  line-height: 1.75;
  font-size: 0.95rem;
}

.inquiry-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.inquiry-form label {
  display: grid;
  gap: 6px;
  color: var(--navy);
  font-weight: 500;
  font-size: 0.9rem;
}

.inquiry-form input,
.inquiry-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s;
}

.inquiry-form input:focus,
.inquiry-form textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.inquiry-form textarea { resize: vertical; }

.detail-loading {
  color: var(--muted);
  padding: 56px 0;
  text-align: center;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

@media (max-width: 820px) {
  .property-detail-layout { grid-template-columns: 1fr; }
}

/* === FEATURE CHIPS === */
.feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 14px;
  font-size: 0.85rem;
  color: var(--navy);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.feature-chip svg {
  color: var(--gold);
  flex-shrink: 0;
}

/* === PROPERTY DESCRIPTION === */
.property-description-section {
  margin-top: 40px;
  padding-top: 36px;
  border-top: 1px solid var(--line-light);
}

.property-description-section h2 {
  color: var(--navy);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.property-description-section p {
  color: var(--muted);
  line-height: 1.78;
  font-size: 0.95rem;
}

/* === MAP SECTION === */
.property-map-section {
  margin-top: 40px;
  padding-top: 36px;
  border-top: 1px solid var(--line-light);
}

.property-map-section h2 {
  color: var(--navy);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.map-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--gold-muted);
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.map-link:hover {
  color: var(--gold);
  text-decoration: underline;
}

/* === SIMILAR PROPERTIES === */
.similar-section {
  margin-top: 56px;
  padding-top: 44px;
  border-top: 1px solid var(--line-light);
}

.similar-section h2 {
  color: var(--navy);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 1.7rem;
  margin-bottom: 24px;
}

.similar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 820px) {
  .similar-grid { grid-template-columns: 1fr; }
}

/* === LIGHTBOX === */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: zoom-out;
  animation: fadeUp 0.2s both;
}

.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  cursor: default;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 10px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 1.4rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, opacity 0.2s;
  z-index: 2;
}

.lightbox-arrow:hover { background: rgba(255,255,255,0.25); }

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* === FILE THUMBNAIL GRID (admin) === */
.file-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.file-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: grab;
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.2s, opacity 0.2s;
  user-select: none;
}

.file-thumb:active { cursor: grabbing; }
.file-thumb.is-dragging { opacity: 0.35; }
.file-thumb.drag-over {
  border-color: var(--gold);
  transform: scale(1.04);
}

.file-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.file-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 27, 46, 0.6);
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 6px;
  gap: 4px;
}

.file-thumb:hover .file-thumb-overlay { opacity: 1; }

.file-thumb-name {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.file-thumb-actions {
  display: flex;
  gap: 3px;
}

.file-move,
.file-remove {
  flex: 1;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  border-radius: 2px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 4px 0;
  transition: background 0.15s;
}

.file-move:hover:not(:disabled),
.file-remove:hover { background: rgba(255,255,255,0.32); }

.file-move:disabled {
  opacity: 0.25;
  cursor: default;
}

.file-thumb-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 2px;
  pointer-events: none;
}

/* === CONFIRMATION MODAL === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 27, 46, 0.6);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(2px);
}

.modal-overlay.is-visible { opacity: 1; }

.modal-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px;
  max-width: 420px;
  width: 100%;
  transform: translateY(14px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.is-visible .modal-card { transform: translateY(0); }

.modal-message {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.55;
  margin: 0 0 28px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-confirm {
  background: #c0392b;
  color: #fff;
  border-color: #c0392b;
}

.modal-confirm:hover {
  background: #a93226;
  border-color: #a93226;
}

/* === SOLICITAR VISITA MODAL === */
.visit-modal-card {
  max-width: 480px;
  padding: 32px;
}

.visit-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.visit-modal-label {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-muted);
  margin-bottom: 6px;
}

.visit-modal-title {
  color: var(--navy);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.3;
}

.visit-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  flex-shrink: 0;
  border-radius: var(--radius);
  transition: color 0.15s;
}

.visit-modal-close:hover { color: var(--navy); }

.visit-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.visit-form label {
  display: grid;
  gap: 6px;
  color: var(--navy);
  font-weight: 500;
  font-size: 0.88rem;
}

.visit-form input,
.visit-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s;
}

.visit-form input:focus,
.visit-form textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.visit-form textarea { resize: none; }

.visit-form-full { grid-column: 1 / -1; }

.visit-form-actions { display: flex; justify-content: flex-end; }

.visit-result {
  grid-column: 1 / -1;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.9rem;
  margin: 0;
}

.visit-result.is-success {
  background: #e8f8ef;
  border: 1px solid #bbe7cd;
  color: #13653f;
}

.visit-result.is-error {
  background: #fdecec;
  border: 1px solid #f6c7c7;
  color: #8f1f1f;
}
