:root {
  --bg: #0c2b66;
  --bg2: #103a88;
  --muted: #7d8aa8;
  --card: #ffffff;
  --ink: #101828;
  --green: #22c55e;
  --shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  background: #f6f8fb;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ============================
   HEADER
============================ */
.site-header {
  background: linear-gradient(120deg, var(--bg), var(--bg2));
  color: #fff;
  padding: 32px 0 18px;
  box-shadow: var(--shadow);
  position: relative;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-title {
  margin: 0 0 4px;
  font: 700 28px/1.25 Montserrat, Inter, sans-serif;
}
.brand-title .sep {
  opacity: 0.5;
  margin: 0 6px;
}
.tagline,
.job {
  margin: 4px 0;
  opacity: 0.9;
}

.socials {
  display: flex;
  gap: 10px;
  margin: 10px 0 0;
}
.social {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.social:hover {
  background: rgba(255, 255, 255, 0.2);
}
.ico {
  width: 18px;
  height: 18px;
  display: block;
}

.profile {
  flex: 0 0 auto;
}
.profile-pic {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

/* ============================
   STICKY FILTER BAR
============================ */
#filtersBar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  transition: all 0.25s ease;
}

#filtersBar.stuck {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  animation: slideDown 0.25s ease both;
}

@keyframes slideDown {
  from {
    transform: translateY(-10px);
    opacity: 0.3;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.control {
  height: 40px;
  border: 1px solid #d0d5dd;
  background: #fff;
  border-radius: 10px;
  padding: 0 12px;
  min-width: 150px;
}
#pmin,
#pmax {
  max-width: 160px;
}

.btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn.primary {
  background: #fff;
  color: #0f172a;
}
.btn.ghost {
  background: transparent;
  color: #0c2b66;
  border: 1px solid #ccc;
}
.btn:hover {
  opacity: 0.95;
}

/* ============================
   SECTIONS & CARDS
============================ */
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 24px 0 12px;
}
.section-title h2 {
  margin: 0;
  font: 700 20px/1.2 Inter;
}
.flame {
  font-size: 22px;
}
.muted {
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #e9eef6;
  display: block;
}
.card-body {
  padding: 14px;
}
.price {
  color: #0a7a2a;
  font-weight: 700;
  margin: 0 0 6px;
}
.title {
  font-weight: 700;
  margin: 0 0 6px;
}
.meta {
  color: #475467;
  font-size: 14px;
}
.card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.12);
  transition: 0.2s;
}
.hot .card {
  outline: 2px solid #ffb703;
}

/* ============================
   MODAL
============================ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 50;
}
.modal.show {
  display: flex;
}
.modal-dialog {
  background: #fff;
  border-radius: 18px;
  max-width: 980px;
  width: 100%;
  box-shadow: var(--shadow);
  position: relative;
}
.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
  opacity: 0.6;
}
.modal-body {
  padding: 22px;
}
.modal-body h3 {
  margin: 0 0 12px;
  font: 700 22px/1.3 Inter;
}
.m-meta p {
  margin: 4px 0 0;
}
.pin {
  margin-right: 6px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.btn.wa {
  background: var(--green);
  color: #fff;
}
.btn.call {
  background: #0ea5e9;
  color: #fff;
}

/* ============================
   GALLERY
============================ */
.gallery {
  position: relative;
  margin-top: 14px;
}
.gframe {
  height: 420px;
  background: #eff4fb;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
#gImg {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.gbtn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: rgba(16, 24, 40, 0.65);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}
.gbtn.left {
  left: 10px;
}
.gbtn.right {
  right: 10px;
}

/* ============================
   RESPONSIVE
============================ */
@media (max-width: 820px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .profile-pic {
    width: 120px;
    height: 120px;
  }
  .gframe {
    height: 300px;
  }
}

/* ============================
   HOT LISTINGS CAROUSEL (Mobile)
============================ */
@media (max-width: 820px) {
  .hot .carousel {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  .hot .carousel::-webkit-scrollbar {
    display: none;
  }
  .hot .grid {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    scroll-snap-align: start;
    min-width: 100%;
  }
  .hot .card {
    flex: 0 0 100%;
    scroll-snap-align: start;
  }
  .hot .carousel {
    padding-right: 16px;
  }
  .hot .card img.thumb {
    height: 220px;
  }
}

/* =========================================
   MOBILE FILTER BAR OPTIMIZATION
========================================= */
@media (max-width: 820px) {
  #filtersBar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 6px 10px;
    justify-content: center;
  }

  .control {
    min-width: unset;
    width: 100%;
    height: 38px;
    font-size: 14px;
    border-radius: 8px;
  }

  .btn {
    height: 36px;
    font-size: 14px;
    padding: 0 10px;
    border-radius: 8px;
  }

  #apply {
    grid-column: span 1;
    background: var(--bg);
    color: #fff;
    border: none;
    font-weight: 600;
  }

  #reset {
    grid-column: span 1;
    background: #f1f5f9;
    color: #0c2b66;
    border: 1px solid #cbd5e1;
  }

  #fsort {
    grid-column: span 1;
  }
}
