:root {
  --green: #00843d;
  --green-dark: #006b32;
  --green-soft: #e8f5ee;
  --green-mid: rgba(0, 132, 61, 0.12);
  --orange: #ff7a00;
  --ink: #202020;
  --muted: rgba(32, 32, 32, 0.55);
  --line: rgba(32, 32, 32, 0.15);
  --bg: #ffffff;
  --header-bg: #ffffff;
  --surface: #f7faf8;
  --radius: 6px;
  --content: 1380px;
  --font: "General Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --shadow-soft: 0 10px 28px rgba(0, 80, 40, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 420px at 50% -80px, rgba(0, 132, 61, 0.07), transparent 70%),
    var(--bg);
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.container {
  width: min(100% - 2rem, var(--content));
  margin-inline: auto;
}

/* Header */
.site-header {
  background: var(--header-bg);
  padding: 16px 0;
  border-bottom: 1px solid rgba(0, 132, 61, 0.12);
  position: sticky;
  top: 0;
  z-index: 40;
  transition: box-shadow 0.2s ease, padding 0.2s ease, background 0.2s ease;
}

.site-header.is-scrolled {
  padding: 10px 0;
  box-shadow: 0 8px 24px rgba(0, 60, 30, 0.08);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: block;
  width: 149px;
  height: 53px;
  flex-shrink: 0;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(400px, 100%);
  height: 42px;
  padding: 0 8px 0 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-mid);
}

.search input {
  border: 0;
  outline: 0;
  width: 100%;
  background: transparent;
  color: var(--ink);
}

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

.search__submit {
  border: 0;
  background: transparent;
  padding: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
}

.search__submit:hover {
  background: var(--green-soft);
}

.search img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--green);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  padding: 10px 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-add:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.btn-add img {
  width: 15px;
  height: 15px;
}

.btn-add .em {
  font-weight: 600;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}

.header-link img {
  width: 18px;
  height: 18px;
}

/* Hero */
.hero {
  padding: 48px 0 12px;
  text-align: center;
}

.hero-title {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 500;
  color: var(--green);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 10px;
  line-height: 1.15;
}

.hero-free {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.hero-free__mark {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 6px);
  width: 54px;
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
}

.hero-title .accent {
  color: var(--orange);
  font-weight: 600;
}

.hero-title .flame {
  width: 26px;
  height: 28px;
  display: inline-block;
  margin-left: 2px;
}

.hero-sub {
  margin: 10px 0 0;
  font-size: clamp(22px, 2.8vw, 36px);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
}

/* Categories */
.categories {
  padding: 28px 0 56px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-top: 14px;
}

.category-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0, 132, 61, 0.1);
  overflow: visible;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 132, 61, 0.12);
}

.category-card__title {
  margin: 0;
  background: linear-gradient(90deg, var(--green) 0%, rgba(0, 132, 61, 0.15) 70%, transparent 100%);
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  border-radius: var(--radius);
  padding: 8px 88px 8px 12px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.category-card__title a {
  color: inherit;
}

.category-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-card__list a {
  font-size: 16px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.category-card__list a:hover {
  color: var(--green);
}

.category-card__icon {
  position: absolute;
  right: 8px;
  top: -10px;
  width: 78px;
  height: 78px;
  object-fit: contain;
  pointer-events: none;
  z-index: 2;
}

/* Sections / carousels */
.section {
  padding: 24px 0 48px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 500;
}

.section-head .flame {
  width: 26px;
  height: 28px;
}

.carousel {
  position: relative;
}

.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 243px);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 2px 12px;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-70%);
  width: 35px;
  height: 35px;
  border: 0;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 2;
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-btn:hover {
  background: var(--green-dark);
}

.carousel-btn.prev {
  left: -8px;
}

.carousel-btn.next {
  right: -8px;
}

.carousel-btn svg {
  width: 8px;
  height: 12px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
}

.dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.dots span {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: rgba(32, 32, 32, 0.15);
}

.dots span.is-active {
  background: var(--green);
}

/* Product card */
.product-card {
  position: relative;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(0, 132, 61, 0.1);
  padding: 8px 8px 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.product-card__media {
  position: relative;
  height: 210px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.product-card:hover .product-card__media img {
  transform: scale(1.04);
}

.product-card__badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 1;
  background: rgba(0, 132, 61, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 4px;
  text-transform: capitalize;
}

.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 35px;
  height: 35px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.fav-btn img {
  width: 35px;
  height: 35px;
}

.product-card__title {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.product-card__specs {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 400;
}

.product-card__specs .dot {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--line);
  flex-shrink: 0;
}

.product-card__loc {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
}

.product-card__loc img {
  width: 16px;
  height: 20px;
}

.product-card__price {
  margin: 0;
  color: var(--green);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Footer */
.site-footer {
  background: var(--green);
  color: #fff;
  padding: 24px 0;
  margin-top: 24px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  flex: 1;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
}

.footer-nav a::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.footer-social {
  display: flex;
  gap: 20px;
}

.footer-social img {
  width: 23px;
  height: 23px;
}

.footer-rule {
  width: min(658px, 100%);
  height: 1px;
  background: #f4f4f4;
  margin: 16px auto 0;
}

.footer-copy {
  margin: 0;
  padding-top: 18px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero,
.category-card,
.section {
  animation: rise-in 0.55s ease both;
}

.category-card:nth-child(2) { animation-delay: 0.05s; }
.category-card:nth-child(3) { animation-delay: 0.1s; }
.category-card:nth-child(4) { animation-delay: 0.15s; }
.category-card:nth-child(5) { animation-delay: 0.2s; }
.category-card:nth-child(6) { animation-delay: 0.25s; }
.category-card:nth-child(7) { animation-delay: 0.3s; }
.category-card:nth-child(8) { animation-delay: 0.35s; }

.category-card__title a { color: inherit; }
.category-card__all {
  margin-top: 6px;
  color: var(--green);
  font-size: 15px;
  font-weight: 600;
}

.page-block { padding: 28px 0 56px; }
.page-title {
  margin: 12px 0 28px;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  color: var(--muted);
}
.breadcrumbs li:not(:last-child)::after {
  content: ">";
  margin-left: 8px;
  color: var(--line);
}
.breadcrumbs a:hover { color: var(--green); }
.breadcrumbs .current { color: var(--green); font-weight: 600; }

.loc-layout,
.listings-layout,
.detail-hero,
.detail-main {
  display: grid;
  gap: 24px;
}
.loc-layout,
.listings-layout,
.detail-hero {
  grid-template-columns: minmax(0, 1fr) 180px;
}
.loc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 40px;
}
.loc-group h2 {
  margin: 0 0 12px;
  font-size: 20px;
}
.loc-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.loc-group a:hover { color: var(--green); }
.count { color: var(--green); font-weight: 600; }

.ad-rail {
  min-height: 420px;
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(0, 132, 61, 0.16), rgba(0, 132, 61, 0.04)),
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 14px,
      rgba(0, 132, 61, 0.05) 14px,
      rgba(0, 132, 61, 0.05) 15px
    );
  border: 1px solid rgba(0, 132, 61, 0.12);
  position: relative;
  overflow: hidden;
}
.ad-rail::before {
  content: "HouseUAE";
  position: absolute;
  inset: auto 16px 16px 16px;
  font-weight: 600;
  font-size: 18px;
  color: rgba(0, 132, 61, 0.35);
  letter-spacing: 0.02em;
}
.ad-rail--stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  background: transparent;
  border: 0;
}
.ad-rail--stack::before {
  content: none;
}
.ad-rail--stack > div {
  flex: 1;
  min-height: 180px;
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(0, 132, 61, 0.14), rgba(0, 132, 61, 0.03)),
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 14px,
      rgba(0, 132, 61, 0.05) 14px,
      rgba(0, 132, 61, 0.05) 15px
    );
  border: 1px solid rgba(0, 132, 61, 0.12);
}

.subcat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.subcat-link {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-weight: 500;
  transition: border-color .15s ease, color .15s ease;
}
.subcat-link:hover {
  border-color: var(--green);
  color: var(--green);
}

.listings-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.listings-head .page-title { margin-bottom: 0; }
.sort-bar select,
.filters select,
.auth-form input,
.auth-form select,
.add-form input,
.add-form select,
.add-form textarea,
.mortgage-form input,
.account-form input,
.account-form select,
.account-form textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sort-bar select:focus,
.filters select:focus,
.auth-form input:focus,
.auth-form select:focus,
.add-form input:focus,
.add-form select:focus,
.add-form textarea:focus,
.mortgage-form input:focus,
.account-form input:focus,
.account-form select:focus,
.account-form textarea:focus,
.filters input[type="number"]:focus {
  outline: 0;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-mid);
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin: 16px 0 20px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(0, 132, 61, 0.1);
}
.filters label,
.sort-bar label,
.auth-form label,
.add-form label,
.mortgage-form label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 500;
  min-width: 140px;
}
.emirate-chips,
.readiness-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 20px;
}
.emirate-chips a,
.readiness-tabs a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 14px;
  background: #fff;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.emirate-chips a:hover,
.readiness-tabs a:hover {
  border-color: var(--green);
  color: var(--green);
}
.emirate-chips a.is-active,
.readiness-tabs a.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 16px;
}
.product-card__body { display: flex; flex-direction: column; gap: 12px; }
.product-card__title a:hover { color: var(--green); }
.fav-btn.is-active {
  filter: none;
}
.fav-btn.is-active img {
  filter: invert(28%) sepia(88%) saturate(1200%) hue-rotate(110deg);
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.pagination a:hover { color: var(--green); }

.detail-gallery {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  min-height: 420px;
  box-shadow: var(--shadow-soft);
}
.detail-gallery img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: cover;
}
.detail-gallery__actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
}
.detail-gallery__actions .fav-btn {
  position: static;
  top: auto;
  right: auto;
}
.detail-gallery__count {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  background: rgba(32, 32, 32, 0.72);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 4px;
}
.detail-main {
  grid-template-columns: minmax(0, 1fr) 280px;
  margin-top: 28px;
}
.detail-price {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  color: var(--green);
}
.detail-title {
  margin: 8px 0 16px;
  font-size: 28px;
  font-weight: 600;
}
.detail-loc { margin: 12px 0 20px; }
.detail-desc { color: var(--ink); line-height: 1.5; }
.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.detail-facts span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.agent-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: fit-content;
}
.agent-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 600;
}
.agent-card p { margin: 4px 0 0; color: var(--muted); }
.agent-card__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--green);
  color: var(--green);
  border-radius: var(--radius);
  padding: 10px 20px;
  font-weight: 500;
}
.mortgage {
  margin-top: 40px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
}
.mortgage h2 { grid-column: 1 / -1; margin: 0; }
.mortgage-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.mortgage-result {
  background: #f4f4f4;
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}
.mortgage-result strong {
  font-size: 24px;
  color: var(--green);
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 24px 0 8px;
  color: var(--muted);
  font-size: 14px;
}
.detail-meta .report { color: #c0392b; }

.auth-page { max-width: 480px; }
.auth-form,
.add-form .add-col--details {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-errors {
  background: #fff1f0;
  border: 1px solid #ffccc7;
  color: #a8071a;
  padding: 12px 16px;
  border-radius: var(--radius);
}
.auth-switch a { color: var(--green); font-weight: 600; }
.header-user { gap: 8px; }
.header-logout {
  margin-left: 8px;
  color: var(--green);
  font-size: 14px;
  font-weight: 600;
}

.add-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.add-step {
  background: #f4f4f4;
  border-radius: var(--radius);
  padding: 12px;
  opacity: .55;
}
.add-step h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.add-step.is-active,
.add-step.is-done {
  opacity: 1;
  background: linear-gradient(90deg, var(--green), rgba(0,132,61,.2));
  color: #fff;
}
.add-step.is-clickable,
.add-step.is-done {
  cursor: pointer;
}
.add-step.is-clickable:hover {
  filter: brightness(1.05);
}
.add-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.add-col {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  opacity: .45;
  pointer-events: none;
}
.add-col[hidden] {
  display: none !important;
}
.add-col.is-active {
  opacity: 1;
  pointer-events: auto;
  border-color: var(--green);
}
.add-col h3 { margin: 0 0 10px; font-size: 15px; }
.add-col--details {
  grid-column: 1 / -1;
}
.add-col--details.is-active {
  opacity: 1;
  pointer-events: auto;
}
.picker-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 360px;
  overflow: auto;
}
.picker-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
}
.picker-item:hover,
.picker-item.is-selected {
  background: var(--green);
  color: #fff;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.property-specs[hidden],
.form-row[hidden] {
  display: none !important;
}
.empty-state,
.empty-note {
  color: var(--muted);
  padding: 24px 0;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 28px;
  border: 1px dashed rgba(0, 132, 61, 0.28);
  border-radius: var(--radius);
  background: var(--surface);
}
.empty-state--inline {
  align-items: center;
  text-align: center;
}
.empty-state p,
.empty-note {
  margin: 0;
}
.search--page {
  width: min(560px, 100%);
  margin-bottom: 24px;
  gap: 12px;
}
.results-count { margin-bottom: 16px; font-weight: 500; }

@media (max-width: 1100px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-actions {
    gap: 16px;
  }

  .search {
    width: 260px;
  }

  .loc-layout,
  .listings-layout,
  .detail-hero,
  .detail-main,
  .mortgage {
    grid-template-columns: 1fr;
  }

  .ad-rail { display: none; }

  .listings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .loc-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .add-columns,
  .add-steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .header-actions {
    justify-content: stretch;
  }

  .search {
    width: 100%;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .carousel-btn {
    display: none;
  }

  .footer-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-nav {
    gap: 16px;
  }

  .listings-grid,
  .loc-grid,
  .add-columns,
  .add-steps,
  .form-row,
  .mortgage-form,
  .detail-facts {
    grid-template-columns: 1fr;
  }
}

/* Account */
.account-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
}
.account-nav__title {
  margin: 0 0 16px;
  font-size: 28px;
}
.account-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.account-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-weight: 500;
}
.account-nav__link .chev { margin-left: auto; color: var(--muted); }
.account-nav__link.is-active,
.account-nav__link:hover {
  background: rgba(0, 132, 61, 0.12);
  color: var(--green);
}
.account-nav__icon::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 4px;
}
.profile-summary {
  display: flex;
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.profile-summary__avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 600;
  flex-shrink: 0;
}
.profile-summary__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-summary h1 {
  margin: 0 0 12px;
  font-size: 28px;
}
.profile-summary__meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.profile-summary__meta span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.account-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.account-card__head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}
.account-card__head h2 { margin: 0; }
.account-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-row--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-success {
  background: #f0f9f4;
  border: 1px solid #b7ebc8;
  color: var(--green-dark);
  padding: 12px 16px;
  border-radius: var(--radius);
}
.myads-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: #f4f4f4;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.myads-banner > div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
}
.myads-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 20px;
}
.myads-group h2 {
  margin: 0 0 12px;
  background: var(--green);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 18px;
}
.myads-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.myads-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}
.myads-thumb {
  width: 96px;
  height: 72px;
  border-radius: 4px;
  overflow: hidden;
}
.myads-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.myads-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.myads-info .muted { color: var(--muted); font-size: 14px; }
.myads-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.myads-actions button,
.btn-danger {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
}
.btn-danger { color: #c0392b; border-color: #f5c2c0; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.gallery-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.gallery-item span {
  display: block;
  padding: 10px;
  font-size: 14px;
  font-weight: 500;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 24px;
}
.lead { color: var(--muted); line-height: 1.5; max-width: 70ch; }
.feature-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}
.feature-box {
  min-height: 180px;
  background: #e8e8e8;
  border-radius: var(--radius);
}
.two-col-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}
.two-col-copy h2,
.requirements h2,
.contact-box h2 { margin-top: 0; }
.requirements,
.contact-box,
.announce-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.check-line {
  flex-direction: row !important;
  align-items: flex-start;
  gap: 10px;
  min-width: 0 !important;
}
.check-line input { margin-top: 4px; width: auto; }

.listings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product-card--row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 10px;
}
.product-card--row .product-card__media {
  height: 110px;
}
.product-card--row .fav-btn {
  top: 18px;
  right: 18px;
}
.product-card__meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.header-user {
  align-items: center;
}
.header-user span {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.header-user small {
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
}
.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.cookie-banner {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 50;
  width: min(420px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.12);
  padding: 18px;
}
.cookie-banner[hidden] {
  display: none !important;
}
.cookie-banner h3 { margin: 0 0 8px; }
.cookie-banner p { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.cookie-banner a { color: var(--green); }
.cookie-banner__actions { display: flex; gap: 10px; }

@media (max-width: 900px) {
  .account-layout,
  .content-layout,
  .profile-summary__meta,
  .feature-boxes,
  .two-col-copy,
  .gallery-grid,
  .myads-item {
    grid-template-columns: 1fr;
  }
  .profile-summary { flex-direction: column; align-items: flex-start; }
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--green);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.account-logout {
  display: inline-block;
  margin-top: 18px;
  color: var(--green);
  font-weight: 600;
}

.fav-menu {
  position: relative;
}
.fav-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 320px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
  padding: 10px;
  z-index: 40;
}
.fav-menu:hover .fav-dropdown,
.fav-menu:focus-within .fav-dropdown {
  display: block;
}
.fav-dropdown__item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
}
.fav-dropdown__item:hover { background: #f6f6f6; }
.fav-dropdown__item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
}
.fav-dropdown__item strong {
  display: block;
  font-size: 14px;
}
.fav-dropdown__item small {
  color: var(--muted);
  font-size: 12px;
}
.fav-dropdown__all {
  display: block;
  text-align: center;
  padding: 10px;
  color: var(--green);
  font-weight: 600;
  border-top: 1px solid var(--line);
  margin-top: 6px;
}

.listings-layout--map {
  grid-template-columns: 1fr;
}
.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 16px;
  min-height: 560px;
}
.listings-map {
  min-height: 560px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: #e8e8e8;
}
.map-side-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 560px;
  overflow: auto;
}
.map-popup {
  min-width: 160px;
}
.map-popup img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 6px;
}
.map-popup strong { display: block; margin-bottom: 4px; }
.map-popup a { color: var(--green); font-weight: 600; }

@media (max-width: 900px) {
  .map-layout { grid-template-columns: 1fr; }
}

/* Modal / contact */
.modal[hidden] { display: none !important; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}
.modal__panel {
  position: relative;
  width: min(440px, 100%);
  background: #fff;
  border-radius: 12px;
  padding: 22px;
  z-index: 1;
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.contact-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}
.contact-tabs button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.contact-tabs button.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.contact-pane { display: none; }
.contact-pane.is-active { display: block; }
.contact-phone {
  font-size: 22px;
  font-weight: 600;
  margin: 8px 0 16px;
}

.share-btn {
  border: 0;
  background: rgba(255,255,255,.92);
  border-radius: 6px;
  padding: 8px 12px;
  margin-left: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.detail-gallery__actions {
  display: flex;
  align-items: center;
}

.scroll-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scroll-fab button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #202020;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
}
.scroll-fab button:hover { background: var(--green); }

.lightbox[hidden] { display: none !important; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0,0,0,.86);
  display: grid;
  place-items: center;
  padding: 24px;
}
.lightbox img {
  max-width: min(1100px, 100%);
  max-height: calc(100vh - 48px);
  object-fit: contain;
  border-radius: 8px;
}
.lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
}

@media (max-width: 760px) {
  .site-header { padding: 12px 0; }
  .header-actions { gap: 10px; }
  .btn-add span .em { font-weight: 600; }
  .hero-title { gap: 6px; }
  .page-title { font-size: 26px; }
  .fav-dropdown { width: min(320px, calc(100vw - 24px)); right: -10px; }
  .detail-gallery { min-height: 260px; }
  .detail-gallery img { max-height: 280px; }
  .agent-card { order: -1; }
  .mortgage { padding: 16px; }
  .scroll-fab { right: 12px; bottom: 12px; }
}

.amenities { margin-top: 28px; }
.amenities h2 { margin: 0 0 12px; font-size: 20px; }
.amenities__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.amenity-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(0, 132, 61, 0.12);
}
.amenities-fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.amenities-fieldset legend {
  padding: 0 6px;
  font-weight: 600;
}
.amenities-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 12px;
}
.filters input[type="number"] {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fff;
}

.inquiry-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.inquiry-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  align-items: start;
}
.inquiry-item.is-unread {
  border-color: rgba(0,132,61,.35);
  background: #f7fbf8;
}
.inquiry-thumb {
  width: 88px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
}
.inquiry-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.inquiry-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.inquiry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.inquiry-meta a { color: var(--green); font-weight: 600; }

@media (max-width: 760px) {
  .inquiry-item { grid-template-columns: 1fr; }
}

.detail-gallery {
  display: grid;
  gap: 10px;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  min-height: 0;
}
.detail-gallery__main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  min-height: 420px;
}
.detail-gallery__main > .lightbox-trigger {
  display: block;
  min-height: 420px;
}
.detail-gallery__main img {
  max-height: 520px;
}
.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}
.detail-thumb {
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #eee;
  aspect-ratio: 4 / 3;
}
.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.detail-thumb.is-active {
  border-color: var(--green);
}
.edit-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.edit-gallery__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.edit-gallery__item img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.map-side-item {
  border-radius: var(--radius);
  transition: box-shadow .2s ease, outline-color .2s ease;
}
.map-side-item.is-active {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.map-popup__price { font-weight: 600; margin: 2px 0; }
.map-popup__meta { color: #666; font-size: 12px; margin-bottom: 6px; }
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }
.inquiry-thumb--icon {
  display: grid;
  place-items: center;
  background: #e8f5ee;
  color: var(--green);
  font-weight: 700;
  font-size: 22px;
}
.inquiry-actions form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.muted { color: #666; font-size: 14px; }

.auth-page .account-form,
.auth-form {
  background: #fff;
  border: 1px solid rgba(0, 132, 61, 0.1);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}
.page-title {
  letter-spacing: -0.02em;
}
.btn-outline {
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-outline:hover {
  background: var(--green-soft);
}
.section {
  border-top: 1px solid rgba(0, 132, 61, 0.06);
}
.category-card__all {
  color: var(--green);
  font-weight: 600;
  margin-top: auto;
}
.share-btn {
  border: 1px solid rgba(0, 132, 61, 0.15);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
@media (max-width: 760px) {
  .hero {
    padding: 32px 0 8px;
  }
  .product-card__media {
    height: 180px;
  }
  .detail-gallery__main,
  .detail-gallery__main > .lightbox-trigger {
    min-height: 260px;
  }
}
