/* css/main.css — Movin.ie shared styles */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Reset & Variables ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }
body { font-family: 'DM Sans', sans-serif; background: #F7F5F0; color: #1a1a1a; line-height: 1.5; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
input, select, textarea, button { font-family: inherit; }

:root {
  --green:        #1a5c45;
  --green-dark:   #0e3d2e;
  --green-light:  #e9f4ef;
  --orange:       #e07b3f;
  --border:       #e8e4dc;
  --bg:           #F7F5F0;
  --white:        #fff;
  --text:         #1a1a1a;
  --muted:        #888;
  --error:        #d93025;
  --success:      #1a7a3a;
  --radius:       16px;
  --radius-sm:    10px;
  --radius-pill:  50px;
  --shadow:       0 4px 24px rgba(0,0,0,.07);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.12);
  --nav-h:        64px;
}

/* ── Typography ────────────────────────────────────────────────── */
.serif { font-family: 'Playfair Display', serif; }
h1,h2,h3 { font-family: 'Playfair Display', serif; font-weight: 700; line-height: 1.15; }

/* ── Layout ─────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.page-wrap  { min-height: calc(100vh - var(--nav-h)); }

/* ── Navigation ─────────────────────────────────────────────────── */
.nav {
  height: var(--nav-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center;
}
.nav-inner {
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700; color: var(--green);
  cursor: pointer; flex-shrink: 0;
}
.nav-logo span { color: var(--orange); }
.nav-links {
  display: flex; gap: 1.5rem; list-style: none;
  font-size: 14px; color: #555;
}
.nav-links li { cursor: pointer; transition: color .15s; white-space: nowrap; }
.nav-links li:hover, .nav-links li.active { color: var(--green); font-weight: 500; }
.nav-right { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.nav-user {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; padding: 6px 12px; border-radius: var(--radius-pill);
  transition: background .15s;
}
.nav-user:hover { background: var(--green-light); }
.nav-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.nav-user-name { font-size: 14px; font-weight: 500; color: var(--green); }
.nav-dropdown {
  position: absolute; top: calc(var(--nav-h) - 4px); right: 1.5rem;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); min-width: 200px; padding: .5rem;
  display: none; z-index: 300;
}
.nav-dropdown.open { display: block; }
.nav-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: .65rem 1rem; border-radius: 8px;
  font-size: 14px; color: #444; cursor: pointer; transition: background .12s;
}
.nav-dropdown-item:hover { background: var(--bg); }
.nav-dropdown-item.danger { color: var(--error); }
.nav-dropdown-divider { border-top: 1px solid var(--border); margin: .4rem 0; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; font-family: 'DM Sans', sans-serif; font-weight: 500;
  border: none; border-radius: var(--radius-pill); transition: all .2s;
  white-space: nowrap; text-decoration: none;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary  { background: var(--green); color: #fff; padding: 11px 24px; font-size: 14px; }
.btn-primary:hover:not(:disabled)  { background: var(--green-dark); }
.btn-ghost    { background: transparent; color: var(--green); border: 1.5px solid var(--green); padding: 10px 22px; font-size: 14px; }
.btn-ghost:hover:not(:disabled)    { background: var(--green); color: #fff; }
.btn-orange   { background: var(--orange); color: #fff; padding: 11px 24px; font-size: 14px; }
.btn-orange:hover:not(:disabled)   { background: #c96a30; }
.btn-sm       { padding: 7px 16px; font-size: 13px; }
.btn-lg       { padding: 14px 32px; font-size: 16px; }
.btn-block    { width: 100%; }
.btn-loading  { position: relative; color: transparent !important; }
.btn-loading::after {
  content: ''; position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
  animation: spin .7s linear infinite;
}

/* ── Forms ───────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 1rem; }
.form-label { font-size: 13px; font-weight: 500; color: #555; }
.form-label .req { color: var(--orange); }
.form-input {
  width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 14px; font-size: 14px; background: #fafaf8; color: #333;
  outline: none; transition: border .15s;
}
.form-input:focus { border-color: var(--green); background: #fff; }
.form-input.error { border-color: var(--error); }
.form-input::placeholder { color: #bbb; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; cursor: pointer; }
.form-textarea { resize: vertical; min-height: 100px; line-height: 1.65; }
.form-error { font-size: 12px; color: var(--error); margin-top: 3px; }
.form-hint  { font-size: 12px; color: var(--muted); margin-top: 3px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* ── Cards ───────────────────────────────────────────────────────── */
.card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 1.75rem;
}
.card-title { font-family: 'Playfair Display', serif; font-size: 19px; font-weight: 700; color: #111; margin-bottom: .25rem; }
.card-sub   { font-size: 13px; color: var(--muted); font-weight: 300; margin-bottom: 1.4rem; }

/* ── Alerts ──────────────────────────────────────────────────────── */
.alert { padding: .85rem 1.1rem; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 1rem; }
.alert-error   { background: #fdf2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert-info    { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* ── Badges / Tags ───────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: var(--radius-pill); }
.badge-green  { background: var(--green); color: #fff; }
.badge-orange { background: var(--orange); color: #fff; }
.badge-blue   { background: #3a8bd4; color: #fff; }
.badge-grey   { background: #e5e5e5; color: #555; }

/* ── Property card ───────────────────────────────────────────────── */
.prop-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.prop-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.prop-card-img {
  height: 180px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #c8dfd4, #e9f4ef);
  display: flex; align-items: center; justify-content: center; font-size: 52px;
}
.prop-card-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.prop-card-save {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,.92); border: none; border-radius: 50%;
  width: 34px; height: 34px; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s;
}
.prop-card-save:hover { transform: scale(1.15); }
.prop-card-save.saved { color: var(--orange); }
.prop-card-tags { position: absolute; top: 10px; left: 10px; display: flex; gap: 5px; }
.prop-card-body { padding: 1rem 1.1rem 1.1rem; }
.prop-card-loc  { font-size: 11px; color: #bbb; margin-bottom: 3px; text-transform: uppercase; letter-spacing: .5px; }
.prop-card-title { font-family: 'Playfair Display', serif; font-size: 15px; font-weight: 700; color: #111; margin-bottom: 6px; line-height: 1.3; }
.prop-card-price { font-size: 19px; font-weight: 500; color: var(--green); margin-bottom: 9px; }
.prop-card-price small { font-size: 12px; color: #ccc; font-weight: 300; }
.prop-card-meta { display: flex; gap: 12px; font-size: 11px; color: #aaa; padding-top: 9px; border-top: 1px solid #f0ede6; }

/* ── Upload zone ──────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed #c8dfd4; border-radius: 13px; padding: 2.25rem;
  text-align: center; cursor: pointer; background: #f7fbf9;
  transition: all .15s;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--green); background: var(--green-light); }
.upload-zone-icon { font-size: 34px; margin-bottom: .5rem; }
.upload-zone-text { font-size: 14px; color: #666; }
.upload-zone-hint { font-size: 12px; color: #bbb; margin-top: 5px; }

/* ── Photo preview grid ──────────────────────────────────────────── */
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 1rem; }
.photo-thumb {
  position: relative; aspect-ratio: 1; border-radius: 8px;
  overflow: hidden; background: var(--bg);
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb-del {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,.6); color: #fff; border: none;
  border-radius: 50%; width: 22px; height: 22px; font-size: 11px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.photo-thumb.primary::after {
  content: 'Cover'; position: absolute; bottom: 4px; left: 4px;
  background: var(--green); color: #fff; font-size: 10px; font-weight: 500;
  padding: 2px 7px; border-radius: 4px;
}

/* ── Pagination ──────────────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 2rem; flex-wrap: wrap; }
.page-btn {
  width: 36px; height: 36px; border-radius: 9px; border: 1.5px solid var(--border);
  background: #fafaf8; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.page-btn.active { background: var(--green); color: #fff; border-color: var(--green); font-weight: 500; }
.page-btn:hover:not(.active) { border-color: var(--green); color: var(--green); }

/* ── Steps bar ───────────────────────────────────────────────────── */
.steps-bar {
  display: flex; justify-content: center; align-items: center;
  gap: 0; background: #fff; border-bottom: 1px solid var(--border);
  padding: .9rem 2rem; flex-wrap: wrap;
}
.step-item { display: flex; align-items: center; gap: 8px; padding: .4rem 1rem; }
.step-num {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500; background: #ede9e1; color: #aaa; flex-shrink: 0;
}
.step-item.active .step-num { background: var(--green); color: #fff; }
.step-item.done .step-num   { background: var(--green-light); color: var(--green); }
.step-label { font-size: 13px; color: #aaa; }
.step-item.active .step-label { color: var(--green); font-weight: 500; }
.step-sep { color: #ddd; font-size: 18px; }

/* ── Spinner / Loading ───────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--green-light); border-top-color: var(--green);
  animation: spin .7s linear infinite; margin: 0 auto;
}
.loading-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 4rem; color: var(--muted); }

/* ── Empty state ─────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--muted); }
.empty-state-icon { font-size: 48px; margin-bottom: 1rem; }
.empty-state h3 { font-family: 'Playfair Display', serif; font-size: 20px; color: #333; margin-bottom: .5rem; }
.empty-state p  { font-size: 14px; font-weight: 300; max-width: 320px; margin: 0 auto 1.5rem; }

/* ── Modal ───────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; padding: 1rem; opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: #fff; border-radius: 20px; padding: 2rem;
  width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
  transform: translateY(20px); transition: transform .2s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-title { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: #aaa; padding: 4px; }
.modal-close:hover { color: #333; }

/* ── Footer ──────────────────────────────────────────────────────── */
.footer { background: #0e2d22; color: rgba(255,255,255,.5); padding: 2.5rem 1.5rem; margin-top: 4rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer strong { color: #fff; font-weight: 500; }
.footer-links { display: flex; gap: 1.5rem; font-size: 13px; flex-wrap: wrap; }
.footer-links span { cursor: pointer; transition: color .15s; }
.footer-links span:hover { color: #fff; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
}
