:root {
  --navy: #0b1f3a;
  --navy-2: #122a4a;
  --gold: #c9a227;
  --gold-2: #e0bc4a;
  --cream: #f6f3ec;
  --ink: #1a1a1a;
  --muted: #5c6570;
  --white: #ffffff;
  --line: #e6e1d6;
  --shadow: 0 18px 50px rgba(11, 31, 58, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, select, input, textarea { font: inherit; }

.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

/* Header */
.topbar {
  background: var(--navy);
  color: #d7deea;
  font-size: 13px;
  padding: 8px 0;
}
.topbar .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.topbar a { color: var(--gold-2); }

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246,243,236,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 64px; width: auto; max-width: 280px; object-fit: contain; background: #fff; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 10px;
  background: linear-gradient(145deg, var(--navy), #1d4a7a);
  color: var(--gold); display: grid; place-items: center;
  font-weight: 800; letter-spacing: .5px;
}
.brand h1 { font-size: 18px; letter-spacing: .4px; color: var(--navy); }
.brand span { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.badge.off { background: #8a1f1f; }
.card.unavailable { opacity: .88; }
.card.unavailable .card-img { filter: grayscale(.35); }
.stamp {
  position: absolute; top: 12px; right: 12px;
  background: #8a1f1f; color: #fff; font-size: 12px; font-weight: 800;
  padding: 7px 11px; border-radius: 8px; letter-spacing: .4px;
  text-transform: uppercase;
}
.price-block { display: flex; flex-direction: column; gap: 2px; }
.price-block small { color: var(--muted); font-weight: 600; font-size: 12px; }
.checks { display: flex; gap: 14px; align-items: center; padding-top: 8px; }
.checks label { display: flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink); }
.dropzone {
  border: 2px dashed #cfc7b6; border-radius: 14px; padding: 18px; background: #faf8f3;
  text-align: center; cursor: pointer;
}
.dropzone input { display: none; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin-top: 10px; }
.thumbs .thumb { position: relative; }
.thumbs img { width: 100%; height: 80px; object-fit: cover; border-radius: 8px; }
.thumbs button {
  position: absolute; top: 4px; right: 4px; border: 0; background: #8a1f1f; color: #fff;
  border-radius: 50%; width: 22px; height: 22px; cursor: pointer; font-size: 12px;
}
.nav-links { display: flex; gap: 22px; align-items: center; font-weight: 600; color: var(--navy); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gold); color: var(--navy); border: 0; border-radius: 999px;
  padding: 10px 18px; font-weight: 700; cursor: pointer;
}
.btn:hover { background: var(--gold-2); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--navy); }
.btn.navy { background: var(--navy); color: #fff; }

/* Hero */
.hero { position: relative; height: min(78vh, 720px); overflow: hidden; background: #081527; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease;
  background-size: cover; background-position: center;
}
.hero-slide.active { opacity: 1; }
.hero-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,21,39,.78) 0%, rgba(8,21,39,.28) 60%, rgba(8,21,39,.15) 100%);
}
.hero-content {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 0 70px;
  color: #fff;
}
.hero-content .kicker { color: var(--gold-2); letter-spacing: 2px; text-transform: uppercase; font-size: 12px; font-weight: 700; }
.hero-content h2 { font-size: clamp(32px, 5vw, 58px); line-height: 1.1; max-width: 720px; margin: 10px 0 14px; }
.hero-meta { display: flex; gap: 16px; flex-wrap: wrap; color: #e8edf5; margin-bottom: 22px; }
.hero-dots { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.hero-dots button {
  width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.35); cursor: pointer;
}
.hero-dots button.on { background: var(--gold); }

/* Filters */
.filters {
  background: #fff; margin-top: -36px; position: relative; z-index: 5;
  border-radius: 18px; box-shadow: var(--shadow); padding: 18px;
}
.filters-grid {
  display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 12px;
}
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
select, input, textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #fff; color: var(--ink);
}
.section { padding: 64px 0; }
.section h3 { font-size: 28px; color: var(--navy); margin-bottom: 8px; }
.section p.lead { color: var(--muted); margin-bottom: 28px; }

.grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.card {
  background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 8px 24px rgba(11,31,58,.08);
  display: flex; flex-direction: column;
}
.card-img { height: 210px; background-size: cover; background-position: center; position: relative; }
.badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--navy); color: #fff; font-size: 11px; font-weight: 700;
  padding: 6px 10px; border-radius: 999px; letter-spacing: .4px;
}
.badge.rent { background: #1b6b4a; }
.card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h4 { color: var(--navy); font-size: 18px; }
.price { color: var(--gold); font-weight: 800; font-size: 18px; }
.specs { color: var(--muted); font-size: 13px; }
.empty { text-align: center; padding: 40px; color: var(--muted); grid-column: 1/-1; }

.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.about-box { background: var(--navy); color: #fff; border-radius: 20px; padding: 36px; }
.about-box h3 { color: #fff; }
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 24px; }
.stat { background: rgba(255,255,255,.06); border-radius: 12px; padding: 14px; }
.stat b { display: block; font-size: 22px; color: var(--gold-2); }

footer { background: var(--navy); color: #c9d3e0; padding: 40px 0 20px; }
.foot { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.foot h4 { color: #fff; margin-bottom: 10px; }
.copy { border-top: 1px solid rgba(255,255,255,.1); margin-top: 28px; padding-top: 14px; font-size: 13px; }

/* Property page */
.detail-hero { height: 420px; background-size: cover; background-position: center; position: relative; }
.detail-hero::after { content:""; position:absolute; inset:0; background: linear-gradient(to top, #081527, transparent 55%); }
.detail { display: grid; grid-template-columns: 1.5fr .8fr; gap: 28px; margin-top: -80px; position: relative; }
.panel { background:#fff; border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.contact-card { position: sticky; top: 90px; }

/* Admin */
.admin-wrap { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #d5deea; padding: 24px 16px; }
.sidebar a, .sidebar button.link {
  display: block; width: 100%; text-align: left; background: none; border: 0; color: inherit;
  padding: 10px 12px; border-radius: 8px; cursor: pointer; margin-bottom: 4px;
}
.sidebar a.active, .sidebar button.link.active, .sidebar a:hover { background: rgba(255,255,255,.08); color: var(--gold-2); }
.admin-main { padding: 28px; background: #eef1f5; }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1/-1; }
.login-box { max-width: 420px; margin: 12vh auto; background:#fff; padding: 28px; border-radius: 16px; box-shadow: var(--shadow); }

@media (max-width: 900px) {
  .filters-grid, .grid, .about, .detail, .foot, .admin-wrap, .form-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hero { height: 62vh; }
}
