*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:       #3c4a2e;
  --green-light: #4e5f3a;
  --green-pale:  #f0ede6;
  --cream:       #f8f6f2;
  --text:        #1c1c1c;
  --muted:       #666;
  --border:      #e2ddd6;
  --white:       #fff;
  --radius:      10px;
}

body { font-family: 'Arial', sans-serif; background: var(--white); color: var(--text); line-height: 1.5; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ── HEADER ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 32px;
}
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-icon { width: 44px; height: 44px; }
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-size: 1.15rem; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.logo-tagline { font-size: 0.65rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
nav { display: flex; gap: 28px; flex: 1; justify-content: center; }
nav a { font-size: 0.95rem; color: var(--text); padding-bottom: 2px; border-bottom: 2px solid transparent; }
nav a:hover, nav a.active { border-color: var(--green); }
.btn-add {
  background: var(--green); color: var(--white);
  padding: 10px 20px; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 600; white-space: nowrap;
  transition: background 0.2s;
}
.btn-add:hover { background: var(--green-light); }

/* ── HERO ── */
.hero {
  position: relative; min-height: 480px;
  display: flex; align-items: center;
  overflow: hidden; background: #c9cfc0;
}
.hero-bg {
  position: absolute; inset: 0;
  object-fit: cover; width: 100%; height: 100%; opacity: 0.75;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.92) 38%, rgba(255,255,255,0.1) 70%);
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto; padding: 64px 24px;
}
.hero-content h1 {
  font-size: 2.6rem; font-weight: 800; line-height: 1.15;
  color: var(--text); max-width: 480px; margin-bottom: 16px;
}
.hero-content p {
  font-size: 1rem; color: #444; max-width: 380px; margin-bottom: 28px;
}
.btn-primary {
  display: inline-block;
  background: var(--green); color: var(--white);
  padding: 14px 28px; border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 600;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--green-light); }

/* ── SEARCH BAR ── */
.search-bar-wrap { background: var(--white); padding: 0 0 32px; }
.search-bar {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
}
.search-form {
  display: flex; align-items: center; gap: 0;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
.search-field {
  flex: 1; display: flex; align-items: center; gap: 8px;
  padding: 14px 18px; border-right: 1px solid var(--border);
  min-width: 0;
}
.search-field:last-of-type { border-right: none; }
.search-field svg { flex-shrink: 0; opacity: 0.5; }
.search-field input, .search-field select {
  border: none; outline: none; font-size: 0.9rem;
  background: transparent; width: 100%; color: var(--text);
}
.search-field select { cursor: pointer; }
.btn-search {
  background: var(--green); color: var(--white);
  padding: 0 28px; font-size: 0.95rem; font-weight: 600;
  border: none; cursor: pointer; height: 52px; white-space: nowrap;
  transition: background 0.2s; flex-shrink: 0;
}
.btn-search:hover { background: var(--green-light); }

/* ── SECTION ── */
.section { max-width: 1200px; margin: 0 auto; padding: 0 24px 60px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; }
.section-head h2 { font-size: 1.5rem; font-weight: 700; }
.see-all { font-size: 0.9rem; color: var(--green); display: flex; align-items: center; gap: 4px; }
.see-all:hover { text-decoration: underline; }

/* ── LISTING CARDS ── */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.listing-card {
  border-radius: var(--radius); overflow: hidden;
  background: var(--white); border: 1px solid var(--border);
  transition: box-shadow 0.2s; display: block; color: inherit;
}
.listing-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.card-img-wrap { position: relative; }
.card-img-wrap img { width: 100%; height: 220px; object-fit: cover; }
.card-img-placeholder {
  width: 100%; height: 220px; background: #e2ddd6;
  display: flex; align-items: center; justify-content: center;
  color: #999; font-size: 0.85rem;
}
.badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--green); color: var(--white);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 20px;
}
.badge.long { background: #5a6e8a; }
.card-fav {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; background: rgba(255,255,255,0.9);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none; font-size: 1rem;
}
.card-body { padding: 16px; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.card-title { font-size: 1rem; font-weight: 700; }
.card-price { font-size: 0.95rem; font-weight: 700; white-space: nowrap; color: var(--text); }
.card-price span { font-size: 0.75rem; font-weight: 400; color: var(--muted); }
.card-address { font-size: 0.82rem; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 4px; }
.card-meta { font-size: 0.8rem; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.card-meta span::before { content: '·'; margin-right: 4px; }
.card-meta span:first-child::before { content: ''; margin-right: 0; }

/* ── FEATURES ── */
.features-wrap { background: var(--cream); padding: 48px 0; margin-bottom: 60px; }
.features-grid {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.feature { display: flex; align-items: flex-start; gap: 16px; }
.feature-icon {
  width: 48px; height: 48px; flex-shrink: 0;
  background: var(--white); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  font-size: 1.3rem;
}
.feature-text h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.feature-text p { font-size: 0.85rem; color: var(--muted); line-height: 1.5; }

/* ── ABOUT ── */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
}
.about-text h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 16px; }
.about-text p { font-size: 0.95rem; color: #555; line-height: 1.7; margin-bottom: 24px; }
.btn-outline {
  display: inline-block; padding: 12px 24px; border-radius: var(--radius);
  border: 2px solid var(--green); color: var(--green);
  font-size: 0.9rem; font-weight: 600; transition: all 0.2s;
}
.btn-outline:hover { background: var(--green); color: var(--white); }
.about-img { border-radius: 12px; overflow: hidden; }
.about-img img { width: 100%; height: 280px; object-fit: cover; }

/* ── FOOTER ── */
footer {
  background: var(--white); border-top: 1px solid var(--border);
  padding: 32px 0 16px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  flex-wrap: wrap; margin-bottom: 24px;
}
.footer-nav { display: flex; gap: 24px; }
.footer-nav a { font-size: 0.9rem; color: var(--muted); }
.footer-nav a:hover { color: var(--text); }
.footer-social { display: flex; gap: 12px; }
.social-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--cream); display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: background 0.2s;
}
.social-icon:hover { background: var(--border); }
.footer-bottom {
  max-width: 1200px; margin: 0 auto; padding: 16px 24px 0;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
}
.footer-bottom p { font-size: 0.8rem; color: var(--muted); }
.footer-bottom a { font-size: 0.8rem; color: var(--muted); }
.footer-bottom a:hover { text-decoration: underline; }

/* ── LISTINGS PAGE ── */
.page-hero {
  background: var(--cream); padding: 40px 0 32px;
  border-bottom: 1px solid var(--border); margin-bottom: 40px;
}
.page-hero h1 { font-size: 1.8rem; font-weight: 800; }
.page-hero p { font-size: 0.9rem; color: var(--muted); margin-top: 6px; }

/* ── LISTING DETAIL ── */
.detail-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px 60px; }
.breadcrumb { font-size: 0.82rem; color: var(--muted); margin-bottom: 20px; display: flex; gap: 6px; align-items: center; }
.breadcrumb a { color: var(--green); }
.detail-photos { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 28px; border-radius: var(--radius); overflow: hidden; }
.detail-photos img { height: 340px; object-fit: cover; flex-shrink: 0; }
.detail-photos .no-photo { height: 300px; width: 100%; background: var(--cream); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.detail-body { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
.detail-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; }
.detail-specs { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0 20px; }
.detail-spec { background: var(--cream); padding: 6px 14px; border-radius: 20px; font-size: 0.82rem; }
.detail-price-card {
  background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 24px; position: sticky; top: 90px;
}
.detail-price { font-size: 1.6rem; font-weight: 800; margin-bottom: 4px; }
.detail-price span { font-size: 1rem; font-weight: 400; color: var(--muted); }
.detail-description { font-size: 0.95rem; line-height: 1.8; color: #444; white-space: pre-wrap; margin-bottom: 20px; }
.contact-btn {
  display: block; text-align: center;
  background: var(--green); color: var(--white);
  padding: 14px; border-radius: var(--radius);
  font-weight: 700; font-size: 1rem; margin-top: 16px;
  transition: background 0.2s;
}
.contact-btn:hover { background: var(--green-light); }
.phone-number { font-size: 1.3rem; font-weight: 700; text-align: center; color: var(--green); margin-top: 12px; }

/* ── ABOUT PAGE ── */
.about-page { max-width: 800px; margin: 0 auto; padding: 0 24px 60px; }
.about-page h2 { font-size: 1.4rem; margin: 28px 0 12px; }
.about-page p { color: #444; line-height: 1.8; margin-bottom: 12px; }

/* ── CONTACTS PAGE ── */
.contacts-page { max-width: 700px; margin: 0 auto; padding: 0 24px 60px; }
.contacts-page h2 { font-size: 1.4rem; margin-bottom: 20px; }
.contact-row { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.contact-row-icon { font-size: 1.5rem; }
.contact-row-label { font-size: 0.8rem; color: var(--muted); margin-bottom: 2px; }
.contact-row-val { font-size: 1rem; font-weight: 600; }

/* ── ADMIN ── */
.admin-wrap { max-width: 900px; margin: 0 auto; padding: 0 24px 60px; }
.admin-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-top: 32px; }
.admin-card h2 { margin-bottom: 20px; font-size: 1.3rem; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.admin-table th { background: var(--cream); font-weight: 700; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; color: #444; }
.form-field input[type=text],
.form-field input[type=number],
.form-field input[type=password],
.form-field textarea {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 0.95rem; font-family: inherit; transition: border-color 0.2s;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--green); }
.form-field textarea { min-height: 130px; resize: vertical; }
.msg-ok { background: #e8f5e9; color: #2e7d32; padding: 10px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 0.9rem; }
.msg-err { background: #fdecea; color: #c62828; padding: 10px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 0.9rem; }
.login-wrap { max-width: 380px; margin: 80px auto; padding: 0 24px; }
.login-wrap .admin-card h2 { text-align: center; margin-bottom: 24px; }

/* ── BUTTONS ── */
.btn { display: inline-block; padding: 9px 18px; border-radius: 8px; font-size: 0.88rem; font-weight: 600; border: none; cursor: pointer; transition: all 0.2s; }
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-light); }
.btn-gray { background: var(--cream); color: var(--text); border: 1px solid var(--border); }
.btn-gray:hover { background: var(--border); }
.btn-red { background: #c62828; color: var(--white); }
.btn-red:hover { background: #b71c1c; }

@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; }
  nav { display: none; }
  .hero-content h1 { font-size: 1.8rem; }
  .features-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .detail-body { grid-template-columns: 1fr; }
  .search-form { flex-direction: column; border-radius: var(--radius); }
  .search-field { border-right: none; border-bottom: 1px solid var(--border); width: 100%; }
  .btn-search { width: 100%; height: 48px; }
}
