/* CasaCaribe - Premium Caribbean Real Estate Platform */

/* ===== CSS Variables ===== */
:root {
  --primary: #0e7490;
  --primary-dark: #155e75;
  --primary-light: #22d3ee;
  --primary-50: #ecfeff;
  --primary-100: #cffafe;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --accent-light: #fbbf24;
  --bg: #fafaf9;
  --bg-card: #ffffff;
  --dark: #1e293b;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --success: #059669;
  --danger: #dc2626;
  --whatsapp: #25d366;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1);
  --radius: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --max-width: 1280px;
  --header-h: 72px;
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font: inherit; border: none; background: none; }
input, select, textarea { font: inherit; }
ul { list-style: none; }

/* ===== Loading Screen ===== */
.loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: white;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
  color: var(--text-secondary); font-size: .95rem;
}
.loading-spinner {
  width: 44px; height: 44px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Skeleton ===== */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
.fade-in-up { animation: fadeInUp .5s ease both; }
.fade-in { animation: fadeIn .4s ease both; }
.card-fav.pop { animation: heartPop .3s ease; }

/* ===== Utilities ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ===== Buttons ===== */
.btn {
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .95rem;
  transition: all var(--transition);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap; line-height: 1.4;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-dark); color: white; transform: translateY(-1px); }
.btn-outline { border: 2px solid var(--border); color: var(--text-secondary); background: white; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline.active { border-color: var(--primary); color: white; background: var(--primary); }
.btn-ghost { color: var(--text-secondary); padding: 8px 14px; }
.btn-ghost:hover { color: var(--primary); background: var(--primary-50); }
.btn-whatsapp { background: var(--whatsapp); color: white; }
.btn-whatsapp:hover { background: #1ebe57; color: white; transform: translateY(-1px); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; color: white; }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 50%; }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: #ffffff;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow var(--transition);
  min-height: var(--header-h);
}
.header.scrolled { box-shadow: var(--shadow-md); }
.header-inner {
  max-width: var(--max-width); margin: 0 auto;
  padding: 0 20px; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.logo { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.logo img { height: 36px; width: auto; }
.logo-text {
  font-size: 1.5rem; font-weight: 800;
  color: var(--dark); letter-spacing: -.5px;
}
.logo-text span { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  padding: 8px 16px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: .9rem; font-weight: 500;
  transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active { background: var(--primary-50); color: var(--primary); }
.lang-toggle {
  padding: 6px 12px; border-radius: var(--radius-xs);
  background: var(--bg); border: 1px solid var(--border);
  font-size: .8rem; font-weight: 700; color: var(--text-secondary);
  transition: all var(--transition); text-transform: uppercase;
}
.lang-toggle:hover { border-color: var(--primary); color: var(--primary); }
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 10px; border-radius: var(--radius-sm); cursor: pointer; border: none; background: none; }
.hamburger:hover { background: var(--bg); }
.hamburger span { display: block; width: 24px; height: 3px; background: var(--dark); border-radius: 2px; transition: .3s; }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-nav {
  display: none; position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100vh; height: 100dvh;
  background: #ffffff; z-index: 200;
  padding: 0; flex-direction: column;
  overflow-y: auto;
}
.mobile-nav.open { display: flex !important; }
.mobile-nav-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: var(--header-h);
  border-bottom: 1px solid var(--border-light);
}
.mobile-nav-header .logo-text {
  font-size: 1.5rem; font-weight: 800;
  color: var(--dark); letter-spacing: -.5px;
}
.mobile-nav-header .logo-text span { color: var(--accent); }
.mobile-nav-close {
  background: none; border: none; cursor: pointer;
  font-size: 1.8rem; color: var(--text-secondary);
  padding: 8px; line-height: 1;
}
.mobile-nav-close:hover { color: var(--dark); }
.mobile-nav-links {
  display: flex; flex-direction: column; gap: 4px;
  padding: 20px;
  flex: 1;
}
.mobile-nav-links a {
  padding: 20px 24px; border-radius: var(--radius-sm);
  color: var(--text); font-size: 1.2rem; font-weight: 600;
  transition: all var(--transition);
  text-decoration: none;
  border-bottom: 1px solid var(--border-light);
}
.mobile-nav-links a:last-child { border-bottom: none; }
.mobile-nav-links a:hover, .mobile-nav-links a:active { background: var(--primary-50); color: var(--primary); }
.mobile-nav-footer {
  padding: 20px; border-top: 1px solid var(--border-light);
  text-align: center;
}
.mobile-nav-footer .lang-btn {
  padding: 10px 24px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  background: none; cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--text-secondary);
}
.header.mobile-open { background: #ffffff !important; }
.mobile-nav a {
  padding: 16px 20px; border-radius: var(--radius-sm);
  color: var(--text); font-size: 1.05rem; font-weight: 500;
  transition: all var(--transition);
}
.mobile-nav a:hover { background: var(--primary-50); color: var(--primary); }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #0c4a5e 0%, #0e7490 30%, #0891b2 60%, #06b6d4 100%);
  color: white; padding: 64px 20px 80px; text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.05' d='M0,160L48,170.7C96,181,192,203,288,197.3C384,192,480,160,576,149.3C672,139,768,149,864,170.7C960,192,1056,224,1152,218.7C1248,213,1344,171,1392,149.3L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'/%3E%3C/svg%3E") no-repeat bottom / cover;
}
.hero-content { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero h1 {
  font-size: 2.5rem; font-weight: 800; margin-bottom: 12px;
  letter-spacing: -.5px; line-height: 1.2;
}
.hero p { font-size: 1.15rem; opacity: .9; margin-bottom: 32px; line-height: 1.6; }
.hero-stats {
  display: flex; justify-content: center; gap: 32px;
  margin-bottom: 32px; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-value { font-size: 1.8rem; font-weight: 800; display: block; }
.hero-stat-label { font-size: .85rem; opacity: .8; }
.hero-quick-filters { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 0; }
.hero-quick-filters .btn {
  background: rgba(255,255,255,.15); color: white;
  border: 2px solid rgba(255,255,255,.3); backdrop-filter: blur(4px);
}
.hero-quick-filters .btn:hover { background: white; color: var(--primary); border-color: white; }

/* ===== Search Section ===== */
.search-section {
  max-width: 900px; margin: -40px auto 0;
  padding: 0 20px; position: relative; z-index: 10;
}
.search-box {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-xl); padding: 24px;
}
.search-main { display: flex; gap: 10px; flex-wrap: wrap; }
.search-main input {
  flex: 1; min-width: 0; padding: 14px 18px;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-size: 1rem; outline: none; transition: all var(--transition);
  background: var(--bg);
}
.search-main input:focus { border-color: var(--primary); background: white; box-shadow: 0 0 0 3px var(--primary-100); }
.search-main .btn { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 480px) {
  .search-main { flex-direction: column; }
  .search-main .btn { width: 100%; justify-content: center; }
  .search-box { padding: 16px; }
}

/* ===== Sticky Filter Bar ===== */
.filter-bar {
  background: white; border-bottom: 1px solid var(--border);
  padding: 16px 0; position: sticky; top: var(--header-h); z-index: 50;
  box-shadow: var(--shadow-sm);
}
.filter-bar-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 20px;
}
.filter-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.type-tabs { display: flex; gap: 6px; }
.type-tab {
  padding: 8px 18px; border-radius: 50px;
  font-size: .85rem; font-weight: 600;
  border: 2px solid var(--border); color: var(--text-secondary);
  background: white; transition: all var(--transition);
}
.type-tab:hover { border-color: var(--primary-light); color: var(--primary); }
.type-tab.active { background: var(--primary); color: white; border-color: var(--primary); }

.filter-divider { width: 1px; height: 28px; background: var(--border); margin: 0 4px; }

.filter-select, .filter-input {
  padding: 8px 14px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  background: white; font-size: .88rem; color: var(--text);
  outline: none; transition: all var(--transition); min-width: 0;
}
.filter-select:focus, .filter-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }

.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-label {
  font-size: .72rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .8px;
}
.filters-expand {
  display: none; width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border-light);
}
.filters-expand.open { display: grid; }

/* ===== Results Bar ===== */
.results-bar {
  max-width: var(--max-width); margin: 20px auto 0; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.results-count { font-size: .95rem; color: var(--text-secondary); }
.results-count strong { color: var(--text); font-weight: 700; }
.sort-select {
  padding: 8px 14px; border: 2px solid var(--border);
  border-radius: var(--radius-sm); background: white;
  font-size: .88rem; color: var(--text); outline: none;
}

/* ===== Listings Grid ===== */
.listings-section {
  max-width: var(--max-width); margin: 16px auto; padding: 0 20px 60px;
}
.listings-grid {
  display: grid; grid-template-columns: 1fr; gap: 24px;
}

/* ===== Property Card ===== */
.property-card {
  background: var(--bg-card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: all var(--transition); position: relative;
  cursor: pointer;
}
.property-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.card-image {
  position: relative; aspect-ratio: 16/9; overflow: hidden; background: #e2e8f0;
}
.card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.property-card:hover .card-image img { transform: scale(1.05); }
.card-badges {
  position: absolute; top: 12px; left: 12px;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.badge {
  padding: 5px 12px; border-radius: 50px;
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  backdrop-filter: blur(4px);
}
.badge-sale { background: rgba(5,150,105,.9); color: white; }
.badge-rent { background: rgba(14,116,144,.9); color: white; }
.badge-vacation { background: rgba(245,158,11,.9); color: white; }
.badge-featured { background: rgba(220,38,38,.9); color: white; }
.badge-new { background: rgba(99,102,241,.9); color: white; }

.card-fav {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; transition: all var(--transition);
  color: white; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5));
}
.card-fav:hover { transform: scale(1.2); }
.card-fav.active { color: var(--danger); filter: drop-shadow(0 1px 3px rgba(0,0,0,.3)); }

/* Detail view fav button */
.card-fav.detail-fav {
  position: static;
  width: 40px; height: 40px;
  background: var(--bg);
  color: var(--text-secondary);
  filter: none;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.card-fav.detail-fav:hover { background: var(--border-light); transform: scale(1.1); }
.card-fav.detail-fav.active { color: var(--danger); background: #fef2f2; border-color: #fecaca; }
.card-image-count {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(0,0,0,.6); color: white;
  padding: 4px 10px; border-radius: 50px;
  font-size: .75rem; font-weight: 600;
  backdrop-filter: blur(4px);
}

.card-body { padding: 18px 20px; }
.card-price {
  font-size: 1.4rem; font-weight: 800; color: var(--primary); margin-bottom: 4px;
}
.card-price .price-period { font-size: .8rem; font-weight: 500; color: var(--text-secondary); }
.card-title {
  font-size: .95rem; font-weight: 600; margin-bottom: 6px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  color: var(--text);
}
.card-location {
  font-size: .85rem; color: var(--text-secondary); margin-bottom: 14px;
  display: flex; align-items: center; gap: 5px;
}
.card-meta {
  display: flex; gap: 16px; padding-top: 14px;
  border-top: 1px solid var(--border-light);
}
.meta-item {
  font-size: .82rem; color: var(--text-secondary);
  display: flex; align-items: center; gap: 5px;
}
.meta-item svg { width: 16px; height: 16px; color: var(--text-muted); }
.meta-item strong { color: var(--text); font-weight: 600; }

/* ===== Regions Section ===== */
.regions-section {
  max-width: var(--max-width); margin: 48px auto; padding: 0 20px;
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.section-title { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.section-subtitle { font-size: .95rem; color: var(--text-secondary); margin-top: 4px; }
.regions-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
.region-card {
  position: relative; border-radius: var(--radius-md); overflow: hidden;
  aspect-ratio: 4/3; cursor: pointer;
  transition: all var(--transition);
}
.region-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.region-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.region-card:hover img { transform: scale(1.05); }
.region-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 60%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 20px; color: white;
}
.region-card-name { font-size: 1.1rem; font-weight: 700; }
.region-card-count { font-size: .82rem; opacity: .85; }

/* ===== Featured Section ===== */
.featured-section {
  max-width: var(--max-width); margin: 48px auto; padding: 0 20px;
}
.featured-scroll {
  display: flex; gap: 20px; overflow-x: auto; padding-bottom: 8px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.featured-scroll::-webkit-scrollbar { display: none; }
.featured-scroll .property-card {
  min-width: 300px; max-width: 340px; scroll-snap-align: start; flex-shrink: 0;
}

/* ===== Pagination ===== */
.pagination {
  display: flex; justify-content: center; gap: 6px;
  margin-top: 40px; flex-wrap: wrap;
}
.page-btn {
  min-width: 42px; height: 42px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: .9rem;
  border: 2px solid var(--border); color: var(--text-secondary);
  background: white; transition: all var(--transition);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }

/* ===== Detail View ===== */
.detail-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg); overflow-y: auto;
  display: none;
}
.detail-overlay.open { display: block; animation: fadeIn .3s ease; }

.detail-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 20px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.detail-back {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; color: var(--text); font-size: .95rem;
  padding: 8px 16px; border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.detail-back:hover { background: var(--bg); color: var(--primary); }
.detail-actions { display: flex; gap: 8px; }

/* Carousel */
.carousel { position: relative; width: 100%; height: 480px; background: #1e293b; overflow: hidden; }
.carousel-track { display: flex; height: 100%; transition: transform .4s ease; }
.carousel-track img { min-width: 100%; height: 100%; object-fit: contain; background: #1e293b; }
@media (max-width: 767px) { .carousel { height: 280px; } }
@media (min-width: 1024px) { .carousel { height: 560px; } }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.9); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; box-shadow: var(--shadow-md);
  transition: all var(--transition); z-index: 2;
}
.carousel-btn:hover { background: white; transform: translateY(-50%) scale(1.05); }
.carousel-prev { left: 16px; }
.carousel-next { right: 16px; }
.carousel-dots {
  position: absolute; bottom: 16px; left: 50%;
  transform: translateX(-50%); display: flex; gap: 8px; z-index: 2;
}
.carousel-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.4); transition: all var(--transition);
  border: 2px solid transparent;
}
.carousel-dot.active { background: white; transform: scale(1.2); }
.carousel-thumbs {
  display: flex; gap: 8px; padding: 12px 16px;
  overflow-x: auto; background: #1e293b;
  scrollbar-width: none;
}
.carousel-thumbs::-webkit-scrollbar { display: none; }
.carousel-thumb {
  width: 72px; height: 52px; border-radius: var(--radius-xs);
  overflow: hidden; flex-shrink: 0; cursor: pointer;
  opacity: .5; transition: all var(--transition);
  border: 2px solid transparent;
}
.carousel-thumb.active { opacity: 1; border-color: var(--primary); }
.carousel-thumb:hover { opacity: .8; }
.carousel-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Detail Content */
.detail-layout {
  max-width: var(--max-width); margin: 0 auto;
  padding: 32px 20px 80px;
  display: grid; grid-template-columns: 1fr; gap: 32px;
}
.detail-main { min-width: 0; }
.detail-sidebar { position: relative; }

.detail-price-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px; flex-wrap: wrap;
}
.detail-price { font-size: 2rem; font-weight: 800; color: var(--primary); }
.detail-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.detail-location {
  color: var(--text-secondary); margin-bottom: 24px;
  display: flex; align-items: center; gap: 6px; font-size: .95rem;
}

.detail-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px; margin-bottom: 28px;
}
.stat-box {
  background: var(--primary-50); border-radius: var(--radius-sm);
  padding: 16px; text-align: center;
}
.stat-box .stat-value { font-size: 1.4rem; font-weight: 800; color: var(--primary); }
.stat-box .stat-label {
  font-size: .75rem; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: .5px; margin-top: 2px;
}

.detail-section { margin-bottom: 28px; }
.detail-section h3 {
  font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; color: var(--text);
  padding-bottom: 8px; border-bottom: 2px solid var(--border-light);
}
.detail-description { color: var(--text-secondary); line-height: 1.9; font-size: .95rem; }

.features-list { display: flex; flex-wrap: wrap; gap: 8px; }
.feature-tag {
  padding: 7px 16px; background: var(--primary-50); color: var(--primary-dark);
  border-radius: 50px; font-size: .85rem; font-weight: 500;
  display: flex; align-items: center; gap: 6px;
}
.feature-tag svg { width: 14px; height: 14px; }

/* Contact Box */
.contact-box {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 24px;
  border: 1px solid var(--border-light);
}
.contact-box h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 16px; }
.contact-box .contact-buttons { display: flex; flex-direction: column; gap: 10px; }
.contact-box .btn { width: 100%; }
.contact-form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.contact-form input, .contact-form textarea {
  padding: 12px 14px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  outline: none; transition: all var(--transition); font-size: .9rem;
}
.contact-form input:focus, .contact-form textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100);
}
.contact-form textarea { resize: vertical; min-height: 80px; }

/* Similar Properties */
.similar-section { margin-top: 40px; }
.similar-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }

/* ===== Makler Zone ===== */
.auth-page {
  min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.auth-container { width: 100%; max-width: 440px; }
.auth-card {
  background: white; border-radius: var(--radius); padding: 36px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border-light);
}
.auth-card h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; text-align: center; }
.auth-card .subtitle { color: var(--text-secondary); text-align: center; margin-bottom: 24px; font-size: .95rem; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: .82rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .5px; }
.form-group input, .form-group select, .form-group textarea {
  padding: 12px 14px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  outline: none; transition: all var(--transition); font-size: .95rem; background: white;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.auth-switch { text-align: center; margin-top: 16px; font-size: .9rem; color: var(--text-secondary); }
.auth-switch a { font-weight: 600; }

/* Pricing */
.pricing-section { margin-top: 48px; max-width: 900px; margin-left: auto; margin-right: auto; }
.pricing-section h2 { font-size: 1.5rem; font-weight: 800; text-align: center; margin-bottom: 8px; }
.pricing-subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 28px; }
.pricing-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.pricing-card {
  background: white; border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); border: 2px solid var(--border);
  transition: all var(--transition); position: relative;
}
.pricing-card.popular { border-color: var(--primary); }
.pricing-card.popular::before {
  content: 'Más Popular'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: white; padding: 4px 16px; border-radius: 50px;
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pricing-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.pricing-price { font-size: 2.2rem; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.pricing-price span { font-size: .9rem; font-weight: 500; color: var(--text-secondary); }
.pricing-features { margin: 16px 0 20px; display: flex; flex-direction: column; gap: 8px; }
.pricing-features li {
  font-size: .9rem; color: var(--text-secondary);
  display: flex; align-items: center; gap: 8px;
}
.pricing-features li::before { content: '✓'; color: var(--success); font-weight: 700; }

/* Dashboard */
.dashboard { max-width: var(--max-width); margin: 0 auto; padding: 32px 20px 60px; }
.dashboard-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-bottom: 32px;
}
.dashboard-header h1 { font-size: 1.6rem; font-weight: 800; }
.dashboard-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 32px;
}
.dash-stat {
  background: white; border-radius: var(--radius-md); padding: 20px;
  box-shadow: var(--shadow); border: 1px solid var(--border-light);
}
.dash-stat-value { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.dash-stat-label { font-size: .82rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .5px; }

.dashboard-tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 2px solid var(--border-light); }
.dash-tab {
  padding: 12px 20px; font-weight: 600; font-size: .9rem;
  color: var(--text-secondary); border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all var(--transition);
}
.dash-tab:hover { color: var(--primary); }
.dash-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.dash-panel { display: none; }
.dash-panel.active { display: block; animation: fadeIn .3s ease; }

/* Property Table */
.property-table { width: 100%; overflow-x: auto; }
.property-table table { width: 100%; border-collapse: collapse; min-width: 600px; }
.property-table th {
  padding: 12px 14px; text-align: left; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted);
  border-bottom: 2px solid var(--border); font-weight: 700;
}
.property-table td {
  padding: 14px; border-bottom: 1px solid var(--border-light);
  font-size: .9rem;
}
.property-table tr:hover td { background: var(--bg); }
.table-image { width: 60px; height: 42px; border-radius: var(--radius-xs); object-fit: cover; }
.table-actions { display: flex; gap: 6px; }

/* Property Form */
.property-form {
  background: white; border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); border: 1px solid var(--border-light);
}
.property-form h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Inquiries */
.inquiry-card {
  background: white; border-radius: var(--radius-md); padding: 20px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
  margin-bottom: 12px; transition: all var(--transition);
}
.inquiry-card:hover { box-shadow: var(--shadow); }
.inquiry-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 8px; }
.inquiry-name { font-weight: 700; font-size: .95rem; }
.inquiry-date { font-size: .8rem; color: var(--text-muted); }
.inquiry-property { font-size: .85rem; color: var(--primary); font-weight: 600; margin-bottom: 6px; }
.inquiry-message { font-size: .88rem; color: var(--text-secondary); line-height: 1.6; }

/* ===== Footer ===== */
.footer {
  background: var(--dark); color: #94a3b8; padding: 48px 20px 20px;
}
.footer-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 32px;
}
.footer-brand { }
.footer-brand .logo-text { color: white; font-size: 1.3rem; margin-bottom: 12px; }
.footer-brand .logo-text span { color: var(--accent); }
.footer-brand p { font-size: .9rem; line-height: 1.7; max-width: 300px; }
.footer-links h4 {
  color: white; font-size: .82rem; text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 14px; font-weight: 700;
}
.footer-links a {
  display: block; color: #94a3b8; padding: 5px 0;
  font-size: .9rem; transition: color var(--transition);
}
.footer-links a:hover { color: var(--primary-light); }
.footer-social { display: flex; gap: 12px; margin-top: 12px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.1); display: flex;
  align-items: center; justify-content: center;
  transition: all var(--transition); font-size: 1rem;
}
.footer-social a:hover { background: var(--primary); transform: translateY(-2px); }
.footer-bottom {
  max-width: var(--max-width); margin: 28px auto 0;
  padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1);
  text-align: center; font-size: .82rem;
}
.footer-bottom a { color: var(--accent); }

/* ===== No Results ===== */
.no-results {
  text-align: center; padding: 80px 20px;
  color: var(--text-secondary); grid-column: 1/-1;
}
.no-results .icon { font-size: 3.5rem; margin-bottom: 16px; opacity: .6; }
.no-results h3 { color: var(--text); margin-bottom: 8px; font-size: 1.2rem; }

/* ===== Responsive ===== */
@media (min-width: 640px) {
  .listings-grid { grid-template-columns: repeat(2, 1fr); }
  .regions-grid { grid-template-columns: repeat(3, 1fr); }
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
  .similar-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 3rem; }
}

@media (min-width: 900px) {
  .listings-grid { grid-template-columns: repeat(3, 1fr); }
  .carousel { height: 480px; }
  .detail-layout { grid-template-columns: 1fr 360px; }
  .detail-sidebar { position: sticky; top: 92px; align-self: start; }
  .similar-grid { grid-template-columns: repeat(3, 1fr); }
  .regions-grid { grid-template-columns: repeat(4, 1fr); }
  .hero h1 { font-size: 3.2rem; }
  .form-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
  .hamburger { display: none !important; }
  .nav-links { display: flex !important; }
}
@media (max-width: 767px) {
  .nav-links { display: none !important; }
  .hamburger { display: flex !important; }
  .lang-toggle { display: none; }
  .header-actions { gap: 4px; }
  .logo-text { font-size: 1.3rem !important; }
  .filter-divider { display: none; }
  .filter-row { flex-direction: column; align-items: stretch; }
  .type-tabs { overflow-x: auto; padding-bottom: 4px; }
  .carousel { height: 280px; }
  .detail-price { font-size: 1.6rem; }
  .hero { padding: 48px 20px 72px; }
  .hero h1 { font-size: 2rem; }
  .form-row { grid-template-columns: 1fr; }
}

/* ===== Detail Specs Grid ===== */
.detail-specs-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.spec-item {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: var(--bg);
  border-radius: var(--radius-sm); font-size: .9rem;
}
.spec-item svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--primary); }
.spec-item a { color: var(--primary); text-decoration: none; }
.spec-item a:hover { text-decoration: underline; }

/* ===== Map ===== */
.map-section { margin-bottom: 24px; }
.map-box {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
  margin-top: 16px;
}
.map-box h3 { font-size: 1rem; margin-bottom: 12px; }
.detail-map {
  width: 100%; height: 300px;
  border-radius: var(--radius-sm);
  background: var(--bg);
}

/* ===== Trust Badges ===== */
.trust-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 8px; border-radius: 50px;
  font-size: .68rem; font-weight: 700;
  line-height: 1.2;
}
.trust-unverified { background: #f1f5f9; color: #64748b; }
.trust-verified { background: #dbeafe; color: #1d4ed8; }
.trust-trusted { background: #dcfce7; color: #15803d; }
.trust-premium { background: #fef3c7; color: #b45309; }

/* ===== Admin Panel ===== */
.admin-header {
  background: #0f172a !important;
  backdrop-filter: none !important;
}
.admin-header .logo-text { color: white; }
.admin-header .nav-links a { color: #94a3b8; }
.admin-header .nav-links a:hover, .admin-header .nav-links a.active { background: rgba(255,255,255,.1); color: white; }
.admin-header .hamburger span { background: white; }
.admin-header .lang-toggle { border-color: #334155; color: #94a3b8; background: #1e293b; }

.admin-login {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a, #1e293b); padding: 20px;
}
.admin-login .auth-card { max-width: 400px; }

.admin-dash { max-width: var(--max-width); margin: 0 auto; padding: 24px 20px 60px; }
.admin-dash h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 24px; }

.admin-stats-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; margin-bottom: 28px;
}
.admin-stat {
  background: white; border-radius: var(--radius-md); padding: 18px;
  box-shadow: var(--shadow); border: 1px solid var(--border-light);
  text-align: center;
}
.admin-stat .val { font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.admin-stat .lbl { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }

.admin-tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 2px solid var(--border-light); flex-wrap: wrap; }
.admin-tab {
  padding: 10px 18px; font-weight: 600; font-size: .88rem;
  color: var(--text-secondary); border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all var(--transition); cursor: pointer;
}
.admin-tab:hover { color: var(--primary); }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.admin-panel { display: none; }
.admin-panel.active { display: block; animation: fadeIn .3s ease; }

.admin-table { width: 100%; overflow-x: auto; }
.admin-table table { width: 100%; border-collapse: collapse; min-width: 700px; font-size: .88rem; }
.admin-table th {
  padding: 10px 12px; text-align: left; font-size: .75rem;
  text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted);
  border-bottom: 2px solid var(--border); font-weight: 700; cursor: pointer;
  user-select: none; white-space: nowrap;
}
.admin-table th:hover { color: var(--primary); }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.admin-table tr:hover td { background: var(--bg); }

.admin-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.admin-btn {
  padding: 5px 10px; border-radius: var(--radius-xs); font-size: .78rem; font-weight: 600;
  border: none; cursor: pointer; transition: all var(--transition); white-space: nowrap;
}
.admin-btn-approve { background: #dcfce7; color: #15803d; }
.admin-btn-approve:hover { background: #15803d; color: white; }
.admin-btn-reject { background: #fee2e2; color: #dc2626; }
.admin-btn-reject:hover { background: #dc2626; color: white; }
.admin-btn-edit { background: #dbeafe; color: #1d4ed8; }
.admin-btn-edit:hover { background: #1d4ed8; color: white; }
.admin-btn-block { background: #fef3c7; color: #b45309; }
.admin-btn-block:hover { background: #b45309; color: white; }

.status-badge {
  padding: 3px 10px; border-radius: 50px; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; display: inline-block;
}
.status-active { background: #dcfce7; color: #15803d; }
.status-pending { background: #fef3c7; color: #b45309; }
.status-rejected { background: #fee2e2; color: #dc2626; }
.status-sold { background: #e0e7ff; color: #4338ca; }
.status-blocked { background: #fee2e2; color: #dc2626; }
.status-verified { background: #dcfce7; color: #15803d; }
.status-unverified { background: #f1f5f9; color: #64748b; }

.admin-quick-edit {
  background: white; border-radius: var(--radius-md); padding: 20px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  margin-top: 16px; animation: fadeIn .2s ease;
}
.admin-quick-edit h4 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.admin-quick-edit .form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.admin-quick-edit .form-group { flex: 1; min-width: 140px; }
.admin-quick-edit select, .admin-quick-edit input {
  padding: 8px 12px; border: 2px solid var(--border); border-radius: var(--radius-xs);
  font-size: .88rem; width: 100%; outline: none;
}

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--dark); color: white; padding: 12px 24px;
  border-radius: var(--radius-sm); font-size: .9rem; font-weight: 500;
  box-shadow: var(--shadow-lg); z-index: 9999;
  animation: slideUp .3s ease, fadeOut .3s ease 2.5s forwards;
}
@keyframes slideUp { from { transform: translateX(-50%) translateY(20px); opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(-50%) translateY(-10px); } }
