@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500;1,600&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

/* ─────────────────────────────────────────────
   DESIGN TOKENS
───────────────────────────────────────────── */
:root {
  --bg:              #F5F1EA;
  --fg:              #1A1915;
  --fg-muted:        #4A4740;
  --card:            #FFFFFF;
  --card-border:     rgba(45, 43, 38, 0.08);
  --accent:          #D97757;
  --accent-hover:    #B85C3F;
  --accent-soft:     rgba(217, 119, 87, 0.10);
  --muted:           #8F8876;
  --muted-soft:      rgba(143, 136, 118, 0.12);
  --divider:         rgba(45, 43, 38, 0.08);

  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:  'DM Sans', system-ui, -apple-system, sans-serif;

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 9999px;

  --shadow-xs:  0 1px 4px rgba(45,43,38,0.06);
  --shadow-sm:  0 2px 12px rgba(45,43,38,0.07);
  --shadow-md:  0 4px 20px rgba(45,43,38,0.09);
  --shadow-lg:  0 8px 32px rgba(45,43,38,0.12);
  --shadow-xl:  0 16px 48px rgba(45,43,38,0.14);

  --header-h: 64px;
  --transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─────────────────────────────────────────────
   RESET + BASE
───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font-sans); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font-sans); font-size: 14px; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* ─────────────────────────────────────────────
   PAGE BG
───────────────────────────────────────────── */
.page-bg {
  min-height: 100vh;
  background:
    radial-gradient(circle at 0% 0%, rgba(217, 119, 87, 0.07) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(143, 136, 118, 0.05) 0%, transparent 50%),
    var(--bg);
}

/* ─────────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────────── */
.serif { font-family: var(--font-serif); }

.text-hero {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.text-h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.text-h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 500;
  line-height: 1.2;
}

.text-h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
}

.text-accent  { color: var(--accent); }
.text-muted   { color: var(--muted); }
.text-fg-muted { color: var(--fg-muted); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }

.text-marble {
  background: linear-gradient(135deg, #1A1915 30%, #8F8876 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─────────────────────────────────────────────
   CARDS
───────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.card-hover {
  transition: transform var(--transition), box-shadow var(--transition);
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-sm {
  border-radius: var(--r-md);
}

/* ─────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(217,119,87,0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid rgba(45,43,38,0.18);
}
.btn-secondary:hover:not(:disabled) {
  border-color: rgba(45,43,38,0.32);
  background: rgba(45,43,38,0.03);
}

.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  padding: 8px 14px;
  border-radius: var(--r-sm);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--muted-soft);
  color: var(--fg);
}

.btn-danger {
  background: #FEE2E2;
  color: #B91C1C;
}
.btn-danger:hover:not(:disabled) {
  background: #FECACA;
}

.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-lg { padding: 13px 30px; font-size: 15px; }
.btn-icon { padding: 9px; border-radius: var(--r-sm); }

/* ─────────────────────────────────────────────
   BADGES
───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-draft      { background: #F3F4F6; color: #6B7280; }
.badge-published  { background: #D1FAE5; color: #065F46; }
.badge-reserved   { background: #FEF3C7; color: #92400E; }
.badge-sold       { background: rgba(217,119,87,0.12); color: #B85C3F; }
.badge-accent     { background: rgba(217,119,87,0.12); color: var(--accent); }
.badge-venta      { background: #EFF6FF; color: #1D4ED8; }
.badge-alquiler   { background: #F0FDF4; color: #15803D; }
.badge-traspaso   { background: #FDF4FF; color: #7C3AED; }
.badge-featured   { background: #FEF9C3; color: #854D0E; }

.badge-nueva         { background: #EFF6FF; color: #1D4ED8; }
.badge-contactado    { background: #F0FDF4; color: #15803D; }
.badge-visita        { background: #FFF7ED; color: #C2410C; }
.badge-negociacion   { background: #FDF4FF; color: #7C3AED; }
.badge-cerrada       { background: #F0FDF4; color: #15803D; }
.badge-descartada    { background: #F3F4F6; color: #6B7280; }

/* ─────────────────────────────────────────────
   FORM CONTROLS
───────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 500; color: var(--fg-muted); }
.form-hint  { font-size: 12px; color: var(--muted); }
.form-error { font-size: 12px; color: #DC2626; }

.input, .select, .textarea {
  width: 100%;
  background: var(--card);
  border: 1px solid rgba(45,43,38,0.15);
  border-radius: var(--r-sm);
  padding: 9px 13px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--fg);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217,119,87,0.12);
}

.input::placeholder, .textarea::placeholder { color: var(--muted); }

.textarea { resize: vertical; min-height: 100px; line-height: 1.6; }

.select-wrap { position: relative; }
.select-wrap::after {
  content: '';
  position: absolute;
  right: 13px; top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--muted);
  pointer-events: none;
}

/* ─────────────────────────────────────────────
   CHECKBOX / RADIO
───────────────────────────────────────────── */
.checkbox-wrap {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 14px;
}
.checkbox-wrap input[type="checkbox"] {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(45,43,38,0.2);
  cursor: pointer;
  accent-color: var(--accent);
}

/* ─────────────────────────────────────────────
   SKELETON
───────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}
.skeleton {
  background: linear-gradient(90deg,
    rgba(45,43,38,0.06) 0%,
    rgba(45,43,38,0.11) 50%,
    rgba(45,43,38,0.06) 100%
  );
  background-size: 600px 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: var(--r-sm);
}

/* ─────────────────────────────────────────────
   PAGE TRANSITIONS
───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.anim-fade-up { animation: fadeUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.anim-fade-in { animation: fadeIn 0.22s ease forwards; }

/* ─────────────────────────────────────────────
   LAYOUT UTILITIES
───────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-sm {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 72px 0; }
.section-sm { padding: 48px 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

/* ─────────────────────────────────────────────
   PUBLIC HEADER
───────────────────────────────────────────── */
.pub-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(245, 241, 234, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
}

.pub-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 10px;
}

.pub-header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ─────────────────────────────────────────────
   ADMIN LAYOUT
───────────────────────────────────────────── */
.admin-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  z-index: 200;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 0;
}

.admin-content {
  padding-top: calc(var(--header-h) + 32px);
  padding-bottom: 48px;
  min-height: 100vh;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.admin-nav-item:hover { color: var(--fg); background: var(--muted-soft); }
.admin-nav-item.active { color: var(--accent); background: var(--accent-soft); }

/* ─────────────────────────────────────────────
   KPI CARDS
───────────────────────────────────────────── */
.kpi-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kpi-value {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 1;
  color: var(--fg);
}

.kpi-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.kpi-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}

/* ─────────────────────────────────────────────
   LISTING CARDS
───────────────────────────────────────────── */
.listing-card-h {
  display: grid;
  grid-template-columns: 280px 1fr;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.listing-card-h:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.listing-card-v {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.listing-card-v:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.listing-img {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #e8e3d8 0%, #d4cfc5 100%);
}

.listing-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.listing-card-h:hover .listing-img img,
.listing-card-v:hover .listing-img img {
  transform: scale(1.04);
}

.listing-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  background: linear-gradient(135deg, #ede9e2 0%, #ddd8d0 100%);
}

.listing-badges {
  position: absolute;
  top: 12px; left: 12px;
  display: flex; gap: 6px;
  flex-wrap: wrap;
}

.listing-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }

.listing-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.3;
}

.listing-price {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.listing-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.listing-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--muted);
}

.listing-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--muted);
}

/* ─────────────────────────────────────────────
   FILTER PANEL
───────────────────────────────────────────── */
.filter-panel {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.filter-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.toggle-group {
  display: flex;
  background: var(--bg);
  border-radius: var(--r-full);
  padding: 3px;
  gap: 2px;
}

.toggle-option {
  flex: 1;
  padding: 7px 14px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  color: var(--muted);
  border: none;
  background: transparent;
}
.toggle-option.active {
  background: var(--card);
  color: var(--fg);
  box-shadow: var(--shadow-xs);
}

/* ─────────────────────────────────────────────
   PROPERTY GALLERY
───────────────────────────────────────────── */
.gallery-main {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, #e8e3d8, #d4cfc5);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}

.gallery-thumb {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--r-sm);
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition);
  background: linear-gradient(135deg, #e8e3d8, #d4cfc5);
}
.gallery-thumb.active { border-color: var(--accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-thumb:hover img { transform: scale(1.08); }

/* ─────────────────────────────────────────────
   LEAD TIMELINE
───────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: flex;
  gap: 16px;
  padding-bottom: 24px;
  position: relative;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:last-child .timeline-line { display: none; }

.timeline-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--card-border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  z-index: 1;
  box-shadow: var(--shadow-xs);
}

.timeline-line {
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: var(--divider);
}

.timeline-content { flex: 1; padding-top: 4px; }

/* ─────────────────────────────────────────────
   DATA TABLE
───────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 16px;
  border-bottom: 1px solid var(--divider);
  white-space: nowrap;
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--divider);
  font-size: 14px;
  vertical-align: middle;
}
.data-table tbody tr {
  transition: background var(--transition);
}
.data-table tbody tr:hover {
  background: rgba(45,43,38,0.02);
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ─────────────────────────────────────────────
   MODAL
───────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(26,25,21,0.5);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn 0.15s ease;
}
.modal {
  background: var(--card);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-header {
  padding: 24px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-body { padding: 20px 28px 28px; }
.modal-footer {
  padding: 0 28px 24px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ─────────────────────────────────────────────
   TOAST
───────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 1000;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  padding: 12px 18px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.2s ease;
  max-width: 320px;
}
.toast-success { background: #065F46; color: white; }
.toast-error   { background: #B91C1C; color: white; }
.toast-info    { background: var(--fg); color: white; }

/* ─────────────────────────────────────────────
   TABS
───────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--bg);
  border-radius: var(--r-full);
  padding: 4px;
  width: fit-content;
}
.tab {
  padding: 8px 18px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.tab.active {
  background: var(--card);
  color: var(--fg);
  box-shadow: var(--shadow-xs);
}
.tab:hover:not(.active) { color: var(--fg); }

.tabs-line {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 24px;
}
.tab-line {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
}
.tab-line.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-line:hover:not(.active) { color: var(--fg); }

/* ─────────────────────────────────────────────
   WIZARD STEPS
───────────────────────────────────────────── */
.wizard-steps {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}
.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 12px;
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  border: none;
  background: transparent;
  transition: background var(--transition), color var(--transition);
}
.wizard-step.active { background: var(--accent-soft); color: var(--accent); }
.wizard-step.done   { color: var(--fg); }
.wizard-step:hover:not(.active) { background: var(--muted-soft); color: var(--fg); }

.wizard-step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(45,43,38,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.wizard-step.active .wizard-step-num { background: var(--accent); color: white; }
.wizard-step.done .wizard-step-num { background: #10B981; color: white; }

/* ─────────────────────────────────────────────
   PROPERTY IMAGE UPLOAD
───────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed rgba(45,43,38,0.15);
  border-radius: var(--r-lg);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.img-thumb-admin {
  aspect-ratio: 4/3;
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #e8e3d8, #d4cfc5);
  border: 2px solid transparent;
  transition: border-color var(--transition);
}
.img-thumb-admin.cover { border-color: var(--accent); }
.img-thumb-admin img { width: 100%; height: 100%; object-fit: cover; }
.img-thumb-admin-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  opacity: 0;
  transition: opacity var(--transition);
}
.img-thumb-admin:hover .img-thumb-admin-overlay { opacity: 1; }

/* ─────────────────────────────────────────────
   EMPTY STATE
───────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 64px 24px;
  text-align: center;
  color: var(--muted);
}
.empty-state-icon {
  width: 56px; height: 56px;
  background: var(--muted-soft);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}

/* ─────────────────────────────────────────────
   MAP EMBED
───────────────────────────────────────────── */
.map-container {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--card-border);
}
.map-container iframe {
  display: block;
  width: 100%;
  border: none;
}

/* ─────────────────────────────────────────────
   PAGINATION
───────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.page-btn {
  min-width: 36px; height: 36px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--muted);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.page-btn:hover:not(:disabled) { color: var(--fg); border-color: rgba(45,43,38,0.2); }
.page-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─────────────────────────────────────────────
   CATEGORY CHIPS (landing)
───────────────────────────────────────────── */
.cat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
}
.cat-chip:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  color: var(--accent);
}
.cat-chip-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}

/* ─────────────────────────────────────────────
   DEMO BANNER
───────────────────────────────────────────── */
.demo-banner {
  background: rgba(217,119,87,0.08);
  border: 1px solid rgba(217,119,87,0.2);
  border-radius: var(--r-sm);
  padding: 8px 16px;
  font-size: 13px;
  color: var(--accent);
  display: flex; align-items: center; gap: 8px;
  font-weight: 500;
}

/* ─────────────────────────────────────────────
   SCROLLBAR
───────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(45,43,38,0.12); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(45,43,38,0.22); }

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  .detail-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }

  .listing-card-h {
    grid-template-columns: 1fr;
  }
  .listing-card-h .listing-img {
    height: 200px;
  }

  .admin-topbar { padding: 0 16px; gap: 12px; }
  .admin-nav-item span { display: none; }

  .admin-role-label { display: none; }
  .admin-demo-badge select { font-size: 10px !important; padding: 2px 4px !important; }

  .modal { max-height: 85vh; }
  .modal-header { padding: 18px 18px 0; }
  .modal-body { padding: 14px 18px 18px; }
  .modal-footer { padding: 0 18px 18px; flex-wrap: wrap; }
  .modal-backdrop { padding: 12px; }
  .tabs { width: 100%; overflow-x: auto; }

  .pub-header {
    height: auto;
    min-height: var(--header-h);
    padding: 10px 0;
  }
  .pub-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .kpi-grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Make admin/data tables horizontally scrollable instead of squashing */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-responsive table {
    min-width: 640px;
  }
}

@media (max-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .text-hero { font-size: 2.2rem; }
  .btn-lg { padding: 11px 22px; font-size: 14px; }

  .pub-logo-text { display: none; }
  .pub-header-actions { gap: 8px; }
  .pub-header-actions .btn { padding: 6px 12px; font-size: 12px; }

  .kpi-grid-4 {
    grid-template-columns: 1fr !important;
  }

  .container { padding: 0 12px; }
  .card { padding: 16px !important; }

  .admin-role-selector { display: none; }
}

/* ─────────────────────────────────────────────
   Language switcher (ES / PT / EN)
───────────────────────────────────────────── */
.lang-switch {
  display: flex; gap: 2px; padding: 2px;
  background: var(--muted-soft); border: 1px solid var(--card-border); border-radius: var(--r-full);
  flex-shrink: 0;
}
.lang-switch-btn {
  border: none; background: none; cursor: pointer; font-family: var(--font-sans);
  font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
  padding: 4px 8px; border-radius: var(--r-full); color: var(--muted); transition: all 0.15s ease;
}
.lang-switch-btn.is-active { background: var(--accent); color: #fff; }
.lang-switch-btn:not(.is-active):hover { color: var(--fg); }
