/* =========================================================================
   Properties listing — Continental Real Estate
   Modern, brand-matched. Inter + Playfair, brand red #E30613.
   ========================================================================= */

:root {
  --props-red: #E30613;
  --props-red-soft: rgba(227, 6, 19, 0.08);
  --props-red-glow: rgba(227, 6, 19, 0.18);
  --props-ink: #1f2330;
  --props-text: #475569;
  --props-muted: #5f6368;
  --props-line: #e8eaed;
  --props-bg: #f8f9fa;
  --props-radius: 16px;
}

/* ---------- Hero ---------- */
/* Override .page-header globals so the dark overlay doesn't kill our colors. */
.page-header.properties-hero {
  background: linear-gradient(135deg, #0f1724 0%, #1a2440 50%, #0f1724 100%) !important;
  background-color: transparent !important;
  padding: 90px 0 70px !important;
  text-align: center;
}
/* Hide the inherited dark scrim from .page-header::before — our gradient already dims enough */
.page-header.properties-hero::before {
  background: radial-gradient(ellipse at 80% 20%, var(--props-red-glow), transparent 55%),
              radial-gradient(ellipse at 15% 85%, rgba(227,6,19,0.10), transparent 50%) !important;
}
.page-header.properties-hero .container {
  text-align: center;
}
.page-header.properties-hero .hero-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ffb199;
  background: rgba(227,6,19,0.18);
  border: 1px solid rgba(227,6,19,0.4);
  border-radius: 999px;
  margin: 0 auto 18px;
}
.page-header.properties-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.1;
  margin: 0 auto 14px;
  color: #ffffff !important;
  text-shadow: 0 4px 24px rgba(0,0,0,0.5);
  max-width: 900px;
}
.page-header.properties-hero .hero-sub {
  max-width: 640px;
  color: rgba(255,255,255,0.92) !important;
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 auto 18px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.page-header.properties-hero .breadcrumb {
  color: rgba(255,255,255,0.7);
  justify-content: center;
}
.page-header.properties-hero .breadcrumb a { color: #ffb199; }
.page-header.properties-hero .breadcrumb a:hover { color: #fff; }

/* ---------- Toolbar ---------- */
.properties-toolbar-section {
  background: #fff;
  padding: 28px 0 18px;
  border-bottom: 1px solid var(--props-line);
}
.properties-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}
.props-search {
  position: relative;
  display: flex;
  align-items: center;
}
.props-search i {
  position: absolute;
  left: 18px;
  color: var(--props-muted);
  font-size: 0.95rem;
  pointer-events: none;
}
.props-search input {
  width: 100%;
  padding: 14px 18px 14px 44px;
  border: 1px solid var(--props-line);
  border-radius: 12px;
  background: #fff;
  color: var(--props-ink);
  font-family: 'Inter', sans-serif;
  font-size: 0.98rem;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.props-search input:focus {
  outline: none;
  border-color: var(--props-red);
  box-shadow: 0 0 0 3px var(--props-red-soft);
}
.props-filters {
  display: flex;
  gap: 12px;
  align-items: end;
}
.props-filter { flex: 1 1 0; min-width: 0; }
.props-filter label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--props-muted);
  margin-bottom: 6px;
}
.props-filter select {
  width: 100%;
  padding: 12px 36px 12px 14px;
  border: 1px solid var(--props-line);
  border-radius: 12px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%231f2330' d='M6 8L0 0h12z'/></svg>") right 14px center / 10px no-repeat;
  appearance: none;
  -webkit-appearance: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  color: var(--props-ink);
  cursor: pointer;
}
.props-filter select:focus {
  outline: none;
  border-color: var(--props-red);
  box-shadow: 0 0 0 3px var(--props-red-soft);
}
.props-clear {
  align-self: end;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid var(--props-line);
  border-radius: 12px;
  color: var(--props-muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color .25s ease, color .25s ease, background .25s ease;
}
.props-clear:hover {
  border-color: var(--props-red);
  color: var(--props-red);
  background: var(--props-red-soft);
}

.props-meta {
  margin-top: 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--props-muted);
}
.props-meta strong { color: var(--props-ink); }
.props-meta-source {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
}
.props-meta-source::before {
  content: "";
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(34,197,94,0.18);
  animation: propsPulse 2.4s ease-out infinite;
}
@keyframes propsPulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  100% { box-shadow: 0 0 0 10px rgba(34,197,94,0); }
}

/* ---------- Properties section ---------- */
.properties-section {
  background: var(--props-bg);
  padding: 50px 0 90px;
}

/* ---------- Grid + Cards ---------- */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 980px) { .properties-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .properties-grid { grid-template-columns: 1fr; gap: 18px; } }

.prop-card {
  background: #fff;
  border-radius: var(--props-radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(20, 20, 40, 0.06);
  border: 1px solid var(--props-line);
  display: flex;
  flex-direction: column;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .35s ease;
  opacity: 0;
  transform: translateY(18px);
  animation: propsFadeUp .6s ease forwards;
}
@keyframes propsFadeUp { to { opacity: 1; transform: translateY(0); } }
.prop-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 44px rgba(227, 6, 19, 0.12), 0 8px 18px rgba(20, 20, 40, 0.08);
  border-color: rgba(227, 6, 19, 0.18);
}
.prop-card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0f1724;
}
.prop-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .8s cubic-bezier(.2,.8,.2,1);
}
.prop-card:hover .prop-card-img img { transform: scale(1.05); }

/* Text-only card variant — header bar with status + type, no image */
.prop-card.prop-card-text { overflow: hidden; }
.prop-card-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #0f1724 0%, #1a2440 100%);
  border-bottom: 3px solid var(--props-red);
  min-height: 54px;
}
.prop-card.prop-card-text .prop-status {
  position: static;
  z-index: auto;
}
.prop-card.prop-card-text .prop-type-tag {
  position: static;
  z-index: auto;
  color: #fff;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: none;
}
.prop-status {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #16a34a, #15803d);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.35);
}
.prop-status::before {
  content: "";
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.7);
  animation: propsStatusPulse 2s ease-out infinite;
}
@keyframes propsStatusPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
  100% { box-shadow: 0 0 0 6px rgba(255,255,255,0); }
}
.prop-type-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 5px 10px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--props-ink);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
  border-radius: 999px;
}

.prop-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
}
.prop-card-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin: 0;
  color: var(--props-ink);
  line-height: 1.3;
}
.prop-card-body .prop-unit {
  font-size: 0.88rem;
  color: var(--props-muted);
  margin: 0;
}
.prop-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 6px 0 8px;
  font-size: 0.85rem;
  color: var(--props-text);
}
.prop-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.prop-meta-item i {
  color: var(--props-red);
  font-size: 0.85rem;
}
.prop-price {
  font-weight: 700;
  color: var(--props-ink);
  font-size: 1.05rem;
}
.prop-price small {
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--props-muted);
  margin-left: 4px;
}
.prop-card-foot {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  gap: 10px;
}
.prop-inquire-btn {
  flex: 1;
  padding: 11px 14px;
  background: linear-gradient(135deg, var(--props-red), #b3050f);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform .2s ease, box-shadow .25s ease;
}
.prop-inquire-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(227, 6, 19, 0.32);
}

/* ---------- Skeleton ---------- */
.properties-skeleton {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  grid-column: 1 / -1;
}
@media (max-width: 980px) { .properties-skeleton { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .properties-skeleton { grid-template-columns: 1fr; } }
.prop-skeleton {
  height: 360px;
  border-radius: var(--props-radius);
  background: linear-gradient(110deg, #eef0f3 8%, #f5f6f8 18%, #eef0f3 33%);
  background-size: 200% 100%;
  animation: propsShimmer 1.4s linear infinite;
  border: 1px solid var(--props-line);
}
@keyframes propsShimmer { to { background-position-x: -200%; } }

/* ---------- Load more ---------- */
.props-load-more-wrap {
  margin-top: 36px;
  text-align: center;
}
.props-load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: #fff;
  color: var(--props-ink);
  border: 2px solid var(--props-line);
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .25s ease, color .25s ease, background .25s ease, transform .2s ease;
}
.props-load-more-btn:hover {
  border-color: var(--props-red);
  color: var(--props-red);
  background: var(--props-red-soft);
  transform: translateY(-1px);
}

/* ---------- Empty ---------- */
.properties-empty {
  text-align: center;
  padding: 60px 20px;
}
.properties-empty i {
  font-size: 3rem;
  color: var(--props-muted);
  margin-bottom: 14px;
}
.properties-empty h3 {
  margin: 8px 0 4px;
  font-family: 'Playfair Display', serif;
  color: var(--props-ink);
}
.properties-empty p { color: var(--props-muted); margin-bottom: 18px; }

/* ---------- Inquire modal ---------- */
.props-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.props-modal[hidden] { display: none; }
.props-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 22, 0.55);
  backdrop-filter: blur(4px);
  animation: propsFadeIn .25s ease;
}
@keyframes propsFadeIn { from { opacity: 0; } to { opacity: 1; } }
.props-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 18px;
  padding: 30px 30px 26px;
  box-shadow: 0 30px 80px rgba(8, 12, 22, 0.35);
  animation: propsModalIn .35s cubic-bezier(.2,.8,.2,1);
}
@keyframes propsModalIn {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.props-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--props-line);
  border-radius: 50%;
  color: var(--props-ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.props-modal-close:hover {
  border-color: var(--props-red);
  color: var(--props-red);
  background: var(--props-red-soft);
}
.props-modal-head {
  margin-bottom: 20px;
  padding-right: 40px;
}
.props-modal-eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--props-red);
  margin-bottom: 4px;
}
.props-modal-head h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin: 0 0 4px;
  color: var(--props-ink);
}
.props-modal-sub {
  margin: 0;
  color: var(--props-muted);
  font-size: 0.9rem;
}
.props-modal-form { display: flex; flex-direction: column; gap: 14px; }
.props-form-row label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--props-ink);
  margin-bottom: 6px;
}
.props-form-row label span { color: var(--props-red); }
.props-form-row input,
.props-form-row textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--props-line);
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--props-ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.props-form-row textarea { resize: vertical; min-height: 80px; }
.props-form-row input:focus,
.props-form-row textarea:focus {
  outline: none;
  border-color: var(--props-red);
  box-shadow: 0 0 0 3px var(--props-red-soft);
}
.props-form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) { .props-form-row-split { grid-template-columns: 1fr; } }
.props-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  justify-content: flex-end;
}
.props-modal-actions .btn { padding: 10px 18px; font-size: 0.92rem; }
.props-modal-success {
  margin: 0;
  padding: 12px 14px;
  background: rgba(34, 197, 94, 0.08);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 10px;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- Toolbar responsive ---------- */
@media (max-width: 760px) {
  .properties-toolbar { grid-template-columns: 1fr; }
  .props-filters { flex-wrap: wrap; }
  .props-clear { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .prop-card, .prop-card-img img, .props-modal-card,
  .prop-skeleton, .prop-status::before { animation: none; transition: none; }
}
